Commit f6271ac7 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#9 Add missing Doxygen comments.

parent 7f9b4626
......@@ -171,6 +171,7 @@ namespace HappyHeart
/// \name Special members.
///@{
// BEWARE: if dimension is in/out, use the 3_bis comment!
/*!
* \class doxygen_hide_geometric_mesh_region_constructor_1
*
......@@ -180,10 +181,18 @@ namespace HappyHeart
*/
/*!
* \class doxygen_hide_geometric_mesh_region_constructor_1_bis
*
* \param[in] unique_id Unique identifier of the \a GeometricMeshRegion.
* \param[in,out] dimension Dimension of the mesh read in the input file.
* \copydoc doxygen_hide_space_unit_arg
*/
/*!
* \class doxygen_hide_geometric_mesh_region_constructor_2
*
* \copydoc doxygen_hide_geometric_mesh_region_constructor_1
* \param[in] do_build_edge Whether edges should be built or not.
* \param[in] do_build_face Whether faces should be built or not.
* \param[in] do_build_volume Whether volumes should be built or not.
......@@ -231,6 +240,7 @@ namespace HappyHeart
* through GeometricMeshRegionManager singleton class, which performs additional bookkeeping on them.
*
* \copydoc doxygen_hide_geometric_mesh_region_constructor_1
* \copydoc doxygen_hide_geometric_mesh_region_constructor_2
* \copydoc doxygen_hide_geometric_mesh_region_constructor_5
*/
explicit GeometricMeshRegion(unsigned int unique_id,
......@@ -250,6 +260,7 @@ namespace HappyHeart
* The constructor is private on purpose: GeometricMeshRegion objects are intended to be created
* through GeometricMeshRegionManager singleton class, which performs additional bookkeeping on them.
*
* \copydoc doxygen_hide_geometric_mesh_region_constructor_1
* \copydoc doxygen_hide_geometric_mesh_region_constructor_2
* \copydoc doxygen_hide_geometric_mesh_region_constructor_3
*/
......@@ -376,19 +387,36 @@ namespace HappyHeart
unsigned int NprogramWiseVertex() const noexcept;
/*!
* \class doxygen_hide_geometric_mesh_region_get_geom_elt_from_index_1
*
* \brief Return the \a GeometricElt which index (given by GetIndex()) is \a index.
*
* \note This method is frankly not efficient at all; it is introduced solely for some PostProcessing need.
*
* \param[in] index Index which associated \a GeometricElt is sought.
*
* \return \a GeometricElt which index (given by GetIndex()) is \a index.
*/
//! \copydoc doxygen_hide_geometric_mesh_region_get_geom_elt_from_index_1
const GeometricElt& GetGeometricEltFromIndex(unsigned int index) const;
/*!
* \class doxygen_hide_geometric_mesh_region_get_geom_elt_from_index_2
*
* \brief Return the \a GeometricElt which index (given by GetIndex()) is \a index and which type is \a
* \a ref_geom_elt.
*
* \note This method is slightly better than its counterpart without \a ref_geom_elt but the comment
* about its lack of efficiency still stands.
*
* \param[in] index Index which associated \a GeometricElt is sought.
* \param[in] ref_geom_elt \a RefGeomElt of the sought \a GeometricElt.
*
* \return \a GeometricElt which index (given by GetIndex()) is \a index.
*/
//! \copydoc doxygen_hide_geometric_mesh_region_get_geom_elt_from_index_2
const GeometricElt& GetGeometricEltFromIndex(unsigned int index,
const RefGeomElt& ref_geom_elt) const;
......@@ -467,6 +495,10 @@ namespace HappyHeart
* reduction.
* - The operation will fail if you write in a different format than the initial one and one of the original
* geometric element is not supported by chosen output format.
*
* \param[in] mesh_file Path to the file into which the mesh will be written.
* \tparam FormatT Format of the file to be written. Read the documentation above about the possible discrepancies
* of formats.
*/
template<Internal::MeshNS::FormatNS::Type FormatT>
void Write(const std::string& mesh_file) const;
......@@ -477,7 +509,9 @@ namespace HappyHeart
* \brief Compute the relevant pseudo-normals on the mesh.
*
* \param[in] label_index_list List of the label on which compute pseudo normals.
*
* \param[in] vertex_interface_list List of \a Vertex.
* \param[in] edge_interface_list List of \a Edge.
* \param[in] face_interface_list List of \a Face.
* \warning Should not be called directly. To compute pseudo-normals use PseudoNormals1 in Lua that will use
* the dedicated magager to compute them.
*
......@@ -530,6 +564,7 @@ namespace HappyHeart
* This method should be called by a any constructor, as it builds and sorts the expected content of the class.
*
* \copydoc doxygen_hide_geometric_mesh_region_constructor_3
* \copydoc doxygen_hide_geometric_mesh_region_constructor_2
*/
void Construct(GeometricElt::vector_shared_ptr&& unsort_element_list,
Coords::vector_shared_ptr&& coords_list,
......@@ -546,9 +581,9 @@ namespace HappyHeart
*
* \param[in] mesh_file File from which the data will be loaded.
* \param[in] format Format of the input file.
* \param[in] unsort_element_list List of geometric elements read in the file. No specific order is expected here.
* \param[in] coords_list List of \a Coords objects read in the file.
* \param[in] mesh_label_list List of \a MeshLabels read in the file.
* \copydoc doxygen_hide_space_unit_arg
* \copydoc doxygen_hide_geometric_mesh_region_constructor_3
*
* \return Dimension read in the file. Might be higher to the dimension effectively used afterwards
* (for instance Ensight will always yield 3 here by construct).
......@@ -570,7 +605,10 @@ namespace HappyHeart
* \tparam InterfaceT Interface type, which derives from Interface base class. Choices are among
* { Vertex, Edge, Face, Volume }.
*
* \internal <b><tt>[internal]</tt></b> A specialization for Vertex is declared in namespace scope at the end of this file.
* \internal <b><tt>[internal]</tt></b> A specialization for Vertex is declared in namespace scope at the end of
* this file.
*
* \param[in,out] interface_list List of \a InterfaceT under construct.
*/
template<class InterfaceT>
void BuildInterface(typename InterfaceT::InterfaceMap& interface_list);
......@@ -592,6 +630,8 @@ namespace HappyHeart
*
* \tparam InterfaceT Interface type, which derives from Interface base class. Choices are among
* { Vertex, Edge, Face, Volume }.
*
* \return Number of interfaces of type \a InterfaceT.
*/
template<class InterfaceT>
unsigned int DetermineNInterface() const;
......@@ -709,6 +749,10 @@ namespace HappyHeart
* \brief Write in the given output directory a file in which all the interfaces are written.
*
* This function should be called only on root processor.
*
* \param[in] mesh \a GeometricMeshRegion which interface list is to be written.
* \param[in] output_directory Output directory into which a file named 'interfaces_*n*.hhdata' will be created,
* where \a n is the unique id of the mesh. This directory must already exists but not include such a file.
*/
void WriteInterfaceList(const GeometricMeshRegion& mesh, const std::string& output_directory);
......
......@@ -168,15 +168,18 @@ namespace HappyHeart
public:
/*!
* \brief Constructor with simple message
* \brief Constructor with simple message.
*
* \param[in] Ngeometric_element Number of \a GeometricElt.
* \param[in] Nunique_indexes Number of unique indexes allotted after building of all \a GeometricElt.
* It should have been equal to \a Ngeometric_element.
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
*
*/
explicit DuplicateInGeometricEltIndex(unsigned int Ngeometric_element,
unsigned int Nunique_indexes,
const char* invoking_file, int invoking_line);
unsigned int Nunique_indexes,
const char* invoking_file, int invoking_line);
//! Destructor
virtual ~DuplicateInGeometricEltIndex();
......
......@@ -58,10 +58,11 @@ namespace HappyHeart
/*!
* \brief Read a mesh in Medit format.
*
* \copydoc doxygen_hide_geometric_mesh_region_constructor_1_bis
* \copydoc doxygen_hide_geometric_mesh_region_constructor_3_bis
* \copydoc doxygen_hide_geometric_mesh_region_constructor_4
*/
void ReadFile(const unsigned int mesh_id,
void ReadFile(const unsigned int unique_id,
const std::string& mesh_file,
double space_unit,
unsigned int& dimension,
......@@ -74,10 +75,11 @@ namespace HappyHeart
* \brief Write a mesh in Medit format.
*
* \copydoc doxygen_hide_geometry_format_write_common_arg
* \param[in] version Version of Medit to use (usually choose '2'; '1' is for float precision).
*/
void WriteFile(const GeometricMeshRegion& mesh,
const std::string& mesh_file,
int version);
int version = 2);
} // namespace Medit
......
......@@ -131,6 +131,8 @@ namespace HappyHeart
/*!
* \brief Obtains the position in the internal storage of all GeometricElt that shares the same dimension.
*
* \param[in] dimension Dimension of the sought \a GeometricElt.
*
* \return Pair <first index, number of geometric elements that share the same dimension>.
*/
const std::pair<unsigned int, unsigned int>& GetLocationInEltList(unsigned int dimension) const;
......@@ -222,21 +224,11 @@ namespace HappyHeart
GeometricElt::vector_shared_ptr GeometricEltListInLabel(const MeshLabel::const_shared_ptr& label) const;
/*!
* \brief Return the \a GeometricElt which index (given by GetIndex()) is \a index.
*
* \note This method is frankly not efficient at all; it is introduced solely for some PostProcessing need.
*/
//! \copydoc doxygen_hide_geometric_mesh_region_get_geom_elt_from_index_1
const GeometricElt& GetGeometricEltFromIndex(unsigned int index) const;
/*!
* \brief Return the \a GeometricElt which index (given by GetIndex()) is \a index and which type is \a
* \a ref_geom_elt.
*
* \note This method is slightly better than its counterpart without \a ref_geom_elt but the comment
* about its lack of efficiency still stands.
*/
//! \copydoc doxygen_hide_geometric_mesh_region_get_geom_elt_from_index_2
const GeometricElt& GetGeometricEltFromIndex(unsigned int index,
const RefGeomElt& ref_geom_elt) const;
......
......@@ -76,11 +76,9 @@ namespace HappyHeart
/*!
* \brief Create a brand new GeometricMeshRegion and returns a reference to it.
*
* \param[in] mesh_file File from which the data will be loaded.
* \param[in] dimension Dimension of the mesh.
* \param[in] format Format of the input file.
* \param[in] do_build_edge Whether edges should be built or not.
* \param[in] do_build_face Whether faces should be built or not.
* \copydoc doxygen_hide_geometric_mesh_region_constructor_5
* \copydoc doxygen_hide_geometric_mesh_region_constructor_1
* \copydoc doxygen_hide_geometric_mesh_region_constructor_2
*
* \internal <b><tt>[internal]</tt></b> This method is public because it is handy for some test executables; however in full-fledged
* model instances you should not use this constructor at all: the other one above calls it with the correct
......@@ -100,13 +98,10 @@ namespace HappyHeart
/*!
* \brief Create a brand new GeometricMeshRegion and returns a reference to it.
*
* \param[in] mesh_file File from which the data will be loaded.
* \copydoc doxygen_hide_space_unit_arg
* \param[in] dimension Dimension of the mesh.
* \param[in] format Format of the input file.
* \param[in] do_build_edge Whether edges should be built or not.
* \param[in] do_build_face Whether faces should be built or not.
* \param[in] unsort_element_list List of geometric elements that belongs to the mesh; no special
* ordering expected here. Unique id of the mesh will be derived from there.
* \copydoc doxygen_hide_geometric_mesh_region_constructor_2
* \copydoc doxygen_hide_geometric_mesh_region_constructor_3
*
* \internal <b><tt>[internal]</tt></b> This method is public because it is handy for some test executables; however in full-fledged
* model instances you should not use this constructor at all: the other one above calls it with the correct
......@@ -127,6 +122,8 @@ namespace HappyHeart
*
* Key is the unique id of each mesh.
* Value is the actual mesh.
*
* \return All meshes in the form of pairs (unique_id, pointer to mesh object).
*/
const storage_type& GetStorage() const noexcept;
......@@ -145,6 +142,8 @@ namespace HappyHeart
*
* Key is the unique id of each mesh.
* Value is the actual mesh.
*
* \return All meshes in the form of pairs (unique_id, pointer to mesh object).
*/
storage_type& GetNonCstStorage() noexcept;
......@@ -208,6 +207,8 @@ namespace HappyHeart
* \brief Write the interface list for each mesh.
*
* Should be called only on root processor.
* \param[in] output_directory Output directory into which files named 'interfaces_*n*.hhdata' will be created,
* where \a n is the unique id of each mesh. This directory must already exists but not include such files.
*/
void WriteInterfaceListForEachMesh(const std::string& output_directory);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment