MoReFEM
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
MoReFEM::Mesh Class Referencefinal

Class responsible for a mesh and its content. More...

#include <Mesh.hpp>

Inheritance diagram for MoReFEM::Mesh:
Collaboration diagram for MoReFEM::Mesh:

Public Types

using underlying_type
 Type used for the unique id.
 

Public Member Functions

std::size_t GetDimension () const noexcept
 Get the dimension.
 
template<RoleOnProcessor RoleOnProcessorT>
GeometricElt::vector_shared_ptr GeometricEltListInLabel (const MeshLabel::const_shared_ptr &label) const
 
template<RoleOnProcessor RoleOnProcessorT>
void PrintGeometricEltsInLabel (std::ostream &stream) const
 
std::size_t NprocessorWiseCoord () const noexcept
 Number of processor-wise Coords.
 
std::size_t NghostCoord () const noexcept
 Number of Coords that are exclusively associated to ghost NodeBearer.
 
template<RoleOnProcessorPlusBoth RoleOnProcessorPlusBothT>
RefGeomElt::vector_shared_ptr BagOfEltType () const
 A vector that contains a pointer to a default geometric element for each type encountered in the mesh.
 
template<RoleOnProcessorPlusBoth RoleOnProcessorPlusBothT>
RefGeomElt::vector_shared_ptr BagOfEltType (std::size_t dimension) const
 Same as namesake methods except we limit ourselves to a given dimension.
 
template<RoleOnProcessor RoleOnProcessorT>
subset_range GetSubsetGeometricEltList (const RefGeomElt &geometric_type) const
 Obtains all the geometric elements of a given type.
 
template<RoleOnProcessor RoleOnProcessorT>
subset_range GetSubsetGeometricEltList (const RefGeomElt &geometric_type, std::size_t label_index) const
 Obtains all the geometric elements of a given type belonging to a given label.
 
template<RoleOnProcessor RoleOnProcessorT>
subset_range GetSubsetGeometricEltList (std::size_t dimension) const
 Return the list of geometric elements of the requested dimension.
 
void CheckGeometricEltOrdering () const
 Check the underlying ordering is what is expected within Mesh.
 
template<RoleOnProcessor RoleOnProcessorT>
std::size_t Nvertex () const
 
std::size_t NprogramWiseVertex () const noexcept
 Get the number of program-wise vertex.
 
template<RoleOnProcessor RoleOnProcessorT>
const GeometricEltGetGeometricEltFromIndex (::MoReFEM::GeomEltNS::index_type index) const
 Return the GeometricElt which index (given by GetIndex()) is index.
 
template<RoleOnProcessor RoleOnProcessorT>
const GeometricEltGetGeometricEltFromIndex (::MoReFEM::GeomEltNS::index_type index, const RefGeomElt &ref_geom_elt) const
 Return the GeometricElt which index (given by GetIndex()) is index and which type is a ref_geom_elt.
 
MeshNS::Format GetInitialFormat () const noexcept
 Returns the format in which the mesh was originally read. May be 'None' if undisclosed.
 
template<RoleOnProcessor RoleOnProcessorT>
std::size_t NgeometricElt () const
 Number of geometric elements.
 
template<RoleOnProcessor RoleOnProcessorT>
std::size_t NgeometricElt (std::size_t dimension) const
 
template<RoleOnProcessor RoleOnProcessorT>
std::size_t NgeometricElt (const RefGeomElt &ref_geom_elt) const
 
template<RoleOnProcessor RoleOnProcessorT>
std::size_t NgeometricElt (const RefGeomElt &ref_geom_elt, const MeshLabel &mesh_label) const
 
const CoordsGetCoord (std::size_t index) const
 
template<RoleOnProcessor RoleOnProcessorT>
const GeometricElt::vector_shared_ptrGetGeometricEltList () const noexcept
 Return the list of processor-wise geometric elements.
 
const Coords::vector_shared_ptrGetProcessorWiseCoordsList () const noexcept
 Get the list of all Coords on the processor.
 
const Coords::vector_shared_ptrGetGhostCoordsList () const noexcept
 Get the list of the ghost Coords.
 
Coords::vector_shared_ptrGetNonCstGhostCoordsList () noexcept
 Get the list of the ghost Coords.
 
const MeshLabel::vector_const_shared_ptrGetLabelList () const noexcept
 Get the list of labels.
 
double GetSpaceUnit () const noexcept
 Get the space unit.
 
template<::MoReFEM::MeshNS::Format FormatT>
void Write (const FilesystemNS::File &mesh_file) const
 Write the mesh into a file in the given format.
 
MeshNS::unique_id GetUniqueId () const
 Get the value of the internal unique ID.
 
Edge-related methods.
bool AreEdgesBuilt () const
 Tells whether the edges have been built.
 
template<RoleOnProcessor RoleOnProcessorT>
std::size_t Nedge () const
 Get the number of edges. The edges must have been built prior to the call.
 
Face-related methods.
bool AreFacesBuilt () const
 Tells whether the faces have been built.
 
template<RoleOnProcessor RoleOnProcessorT>
std::size_t Nface () const
 Get the number of faces. The faces must have been built prior to the call.
 
Volume-related methods.
bool AreVolumesBuilt () const
 Tells whether the volumes have been built.
 
template<RoleOnProcessor RoleOnProcessorT>
std::size_t Nvolume () const
 Get the number of volumes. The volumes must have been built prior to the call.
 

Static Public Member Functions

static MeshNS::unique_id GenerateNewEligibleId ()
 Generate a unique id.
 
static void ClearUniqueIdList ()
 Clear all unique ids.
 

Private Member Functions

void ComputePseudoNormals (const std::vector< std::size_t > &label_index_list, const Vertex::InterfaceMap &vertex_interface_list, const Edge::InterfaceMap &edge_interface_list, const Face::InterfaceMap &face_interface_list)
 Compute the relevant pseudo-normals on the mesh.
 
void ShrinkToProcessorWise (const Wrappers::Mpi &mpi, const GeometricElt::vector_shared_ptr &processor_wise_geom_elt_list, const GeometricElt::vector_shared_ptr &ghost_geom_elt_list, Coords::vector_shared_ptr &&processor_wise_coords_list, Coords::vector_shared_ptr &&ghost_coords_list)
 Init a local mesh from a global one.
 
void SetReducedCoordsList (const Wrappers::Mpi &mpi, Coords::vector_shared_ptr &&processor_wise_coords_list, Coords::vector_shared_ptr &&ghost_coords_list)
 Set the new coords after reduction to processor-wise.
 
void SetIsLowestProcessor (const Wrappers::Mpi &mpi, std::size_t Nprogram_wise_coords, const Coords::vector_shared_ptr &a_processor_wise_coords_list) const
 For all processor-wise Coords, determine which is the lowest rank in which they appear (not counting ghosts).
 
void Construct (GeometricElt::vector_shared_ptr &&unsort_processor_wise_geom_elt_list, GeometricElt::vector_shared_ptr &&unsort_ghost_geom_elt_list, Coords::vector_shared_ptr &&coords_list, MeshLabel::vector_const_shared_ptr &&mesh_label_list, BuildEdge do_build_edge, BuildFace do_build_face, BuildVolume do_build_volume, BuildPseudoNormals do_build_pseudo_normals)
 Constructor helper method.
 
void Read (const FilesystemNS::File &mesh_file, ::MoReFEM::MeshNS::Format format, const double space_unit, std::optional< std::reference_wrapper< Wrappers::Lua::OptionFile > > prepartitioned_data, GeometricElt::vector_shared_ptr &unsort_processor_wise_geom_elt_list, GeometricElt::vector_shared_ptr &unsort_ghost_geom_elt_list, Coords::vector_shared_ptr &coords_list, MeshLabel::vector_const_shared_ptr &mesh_label_list)
 Read a mesh from a file.
 
template<>
std::array< std::size_t, 2ul > DetermineNInterface () const
 Specialization for Volume.
 

Static Private Member Functions

static MeshNS::unique_id AssignUniqueId ()
 If AssignationMode is automatic, generates a new unique identifier.
 
static MeshNS::unique_id NewUniqueId (MeshNS::unique_id new_unique_id)
 If AssignationMode is manual, checks the unique identifier provided is valid.
 
static std::set< MeshNS::unique_id > & StaticUniqueIdList ()
 List of all identifiers existing for DerivedT.
 

Private Attributes

const MeshNS::unique_id unique_id_
 The value of the unique id for the current DerivedT object.
 

Convenient enum classes.

Their purpose is to make Init() reading more palatable:

Mesh mesh;
mesh.Init(mesh_file, format, BuildEdge::yes, BuildFace::no);
Class responsible for a mesh and its content.
Definition Mesh.hpp:81

instead of:

Mesh mesh;
mesh.Init(mesh_file, format, true, false);

As a bonus, there is a type checking involved that prevent messing up the order.

enum class  BuildEdge { no , yes }
 Enum used to index the available meshes. More...
 
enum class  BuildFace { no , yes }
 Enum used to index the available meshes. More...
 
enum class  BuildVolume { no , yes }
 Enum used to index the available meshes. More...
 
enum class  BuildPseudoNormals { no , yes }
 Enum used to index the available meshes. More...
 
using self = Mesh
 Alias to the type of the class.
 
using const_unique_ptr = std::unique_ptr<const self>
 Alias to unique_ptr.
 
using unique_id_parent = Crtp::UniqueId<self, MeshNS::unique_id, UniqueIdNS::AssignationMode::manual>
 Convenient alias to parent.
 
using vector_const_unique_ptr = std::vector<const_unique_ptr>
 Alias to vector of unique_ptr.
 
using iterator_geometric_element = Internal::MeshNS::iterator_geometric_element
 Convenient alias.
 
using subset_range = Internal::MeshNS::subset_range
 Alias for subset.
 
static const std::string & ClassName ()
 Returns the name of the class.
 

Helper methods for edges and faces.

Coords::vector_shared_ptr processor_wise_coords_list_
 
Coords::vector_shared_ptr ghost_coords_list_
 List of ghost Coords.
 
Internal::MeshNS::GeometricEltList processor_wise_geometric_elt_list_
 List of all the geometric elements of the mesh, sort by dimension.
 
Internal::MeshNS::GeometricEltList ghost_geometric_elt_list_
 List of all ghost GeometricElt.
 
const std::size_t dimension_
 Dimension of the mesh.
 
MeshLabel::vector_const_shared_ptr label_list_
 All processor-wise labels.
 
std::array< std::size_t, 2ul > Nvertex_on_rank_ = Utilities::FilledWithUninitializedIndex<std::size_t, 2ul>()
 Number of built vertex (processor-wise).
 
std::size_t Nprogram_wise_vertex_ = NumericNS::UninitializedIndex<std::size_t>()
 Number of built vertex (program-wise).
 
std::array< std::size_t, 2ul > Nedge_ = Utilities::FilledWithUninitializedIndex<std::size_t, 2ul>()
 Number of built edges that are related to a NodeBearer.
 
std::array< std::size_t, 2ul > Nface_ = Utilities::FilledWithUninitializedIndex<std::size_t, 2ul>()
 Number of built faces.
 
std::array< std::size_t, 2ul > Nvolume_ = Utilities::FilledWithUninitializedIndex<std::size_t, 2ul>()
 Number of built volumes.
 
const double space_unit_
 Space unit of the mesh.
 
MeshNS::Format initial_format_ = MeshNS::Format::None
 Format in which the mesh was first read. May be 'None' if undisclosed or not kept.
 
template<class InterfaceT >
void BuildInterface (typename InterfaceT::InterfaceMap &interface_list)
 Actual implementation of BuildEdgeList or BuildFaceList.
 
template<class InterfaceT , RoleOnProcessor RoleOnProcessorT>
void BuildInterfaceHelper (typename InterfaceT::InterfaceMap &interface_list)
 Helper of BuildInterface.
 
template<class InterfaceT >
void SetNinterface (std::size_t Nprocessor_wise, std::size_t Nghost)
 Set the number of interfaces of InterfaceT type.
 
template<class InterfaceT >
std::array< std::size_t, 2ul > DetermineNInterface () const
 Determine the number of interfaces of InterfaceT type.
 
void ReduceLabelList ()
 Reconstruct the labels after reduction to processor-wise data.
 
Coords::vector_shared_ptrGetNonCstProcessorWiseCoordsList () noexcept
 Non constant access to the list of all Coords on the processor.
 
void SetProcessorWiseCoordsList (Coords::vector_shared_ptr &&list)
 
void SetGhostCoordsList (Coords::vector_shared_ptr &&list)
 
MeshLabel::vector_const_shared_ptrGetNonCstLabelList () noexcept
 Non constant access to the list of labels.
 
void SortPrepartitionedCoords (std::size_t Nprocessor_wise)
 For constructor for prepartitioned data: split the processor_wise_coords_list_ in processor-wise and ghost Coords.
 
template<RoleOnProcessor RoleOnProcessorT>
const Internal::MeshNS::GeometricEltListGetInternalGeomEltList () const noexcept
 Internal method that dispatch the correct GeometricElt list depending on RoleOnProcessorT value.
 
GeometricElt::vector_shared_ptr ComputeProcessorWiseAndGhostGeometricEltList () const noexcept
 Compute a list of GeometricElt which covers both the processor-wise and ghost.
 

Special members.

 Mesh (MeshNS::unique_id mesh_id, const FilesystemNS::File &mesh_file, std::size_t dimension, MeshNS::Format format, const double space_unit, std::optional< std::reference_wrapper< Wrappers::Lua::OptionFile > > prepartitioned_data=std::nullopt, BuildEdge do_build_edge=BuildEdge::no, BuildFace do_build_face=BuildFace::no, BuildVolume do_build_volume=BuildVolume::no, BuildPseudoNormals do_build_pseudo_normals=BuildPseudoNormals::no)
 Constructor from a file.
 
 Mesh (MeshNS::unique_id mesh_id, std::size_t dimension, double space_unit, GeometricElt::vector_shared_ptr &&unsort_processor_wise_geom_elt_list, GeometricElt::vector_shared_ptr &&unsort_ghost_geom_elt_list, Coords::vector_shared_ptr &&coords_list, MeshLabel::vector_const_shared_ptr &&mesh_label_list, BuildEdge do_build_edge=BuildEdge::no, BuildFace do_build_face=BuildFace::no, BuildVolume do_build_volume=BuildVolume::no, BuildPseudoNormals do_build_pseudo_normals=BuildPseudoNormals::no)
 Construct a Mesh given the list of Coords, GeometricElt and MeshLabel.
 
 Mesh (const Wrappers::Mpi &mpi, MeshNS::unique_id mesh_id, const FilesystemNS::File &mesh_file, Wrappers::Lua::OptionFile &prepartitioned_data, std::size_t dimension, MeshNS::Format format, const double space_unit, BuildEdge do_build_edge=BuildEdge::no, BuildFace do_build_face=BuildFace::no, BuildVolume do_build_volume=BuildVolume::no, BuildPseudoNormals do_build_pseudo_normals=BuildPseudoNormals::no)
 Constructor from pre-partitioned data.
 
 ~Mesh ()
 Destructor.
 
 Mesh (const Mesh &rhs)=delete
 The copy constructor. - disabled.
 
 Mesh (Mesh &&rhs)=delete
 The move constructor.
 
Meshoperator= (const Mesh &rhs)=delete
 The (copy) operator=.
 
Meshoperator= (Mesh &&rhs)=delete
 The (move) operator=.
 

Detailed Description

Class responsible for a mesh and its content.

Objects of this class can only be created through the MeshManager.

Member Typedef Documentation

◆ self

Alias to the type of the class.

Member Enumeration Documentation

◆ BuildEdge

enum class MoReFEM::Mesh::BuildEdge
strong

Enum used to index the available meshes.

◆ BuildFace

enum class MoReFEM::Mesh::BuildFace
strong

Enum used to index the available meshes.

◆ BuildVolume

enum class MoReFEM::Mesh::BuildVolume
strong

Enum used to index the available meshes.

◆ BuildPseudoNormals

Enum used to index the available meshes.

Constructor & Destructor Documentation

◆ Mesh() [1/5]

MoReFEM::Mesh::Mesh ( MeshNS::unique_id mesh_id,
const FilesystemNS::File & mesh_file,
std::size_t dimension,
MeshNS::Format format,
const double space_unit,
std::optional< std::reference_wrapper< Wrappers::Lua::OptionFile > > prepartitioned_data = std::nullopt,
BuildEdge do_build_edge = BuildEdge::no,
BuildFace do_build_face = BuildFace::no,
BuildVolume do_build_volume = BuildVolume::no,
BuildPseudoNormals do_build_pseudo_normals = BuildPseudoNormals::no )
explicitprivate

Constructor from a file.

The constructor is private on purpose: Mesh objects are intended to be created through MeshManager singleton class, which performs additional bookkeeping on them.

Parameters
[in]mesh_idUnique identifier of the Mesh.
[in]dimensionDimension of the mesh.
Parameters
[in]space_unitThe unit of the mesh, in meters.
Parameters
[in]do_build_edgeWhether edges should be built or not.
[in]do_build_faceWhether faces should be built or not.
[in]do_build_volumeWhether volumes should be built or not.
[in]do_build_pseudo_normalsWhether pseudo-normals should be built or not.
Parameters
[in]mesh_fileFile from which the data will be loaded.
[in]formatFormat of the input file.
Parameters
[in]prepartitioned_dataOptional parameter which is used when we are in fact loading a Mesh from prepartitioned data. In this case, this file includes the relevant data required to rebuild the Mesh identically as the one that was serialized in an earlier run.

◆ Mesh() [2/5]

MoReFEM::Mesh::Mesh ( MeshNS::unique_id mesh_id,
std::size_t dimension,
double space_unit,
GeometricElt::vector_shared_ptr && unsort_processor_wise_geom_elt_list,
GeometricElt::vector_shared_ptr && unsort_ghost_geom_elt_list,
Coords::vector_shared_ptr && coords_list,
MeshLabel::vector_const_shared_ptr && mesh_label_list,
BuildEdge do_build_edge = BuildEdge::no,
BuildFace do_build_face = BuildFace::no,
BuildVolume do_build_volume = BuildVolume::no,
BuildPseudoNormals do_build_pseudo_normals = BuildPseudoNormals::no )
explicitprivate

Construct a Mesh given the list of Coords, GeometricElt and MeshLabel.

The constructor is private on purpose: Mesh objects are intended to be created through MeshManager singleton class, which performs additional bookkeeping on them.

Parameters
[in]mesh_idUnique identifier of the Mesh.
[in]dimensionDimension of the mesh.
Parameters
[in]space_unitThe unit of the mesh, in meters.
Parameters
[in]do_build_edgeWhether edges should be built or not.
[in]do_build_faceWhether faces should be built or not.
[in]do_build_volumeWhether volumes should be built or not.
[in]do_build_pseudo_normalsWhether pseudo-normals should be built or not.
Parameters
[in,out]unsort_processor_wise_geom_elt_listList of processor-wiseGeometricElt. No specific order is expected here.
[in,out]unsort_ghost_geom_elt_listList of ghostGeometricElt. No specific order is expected here.
[in]coords_listList of Coords objects.
[in]mesh_label_listList of MeshLabels.

◆ Mesh() [3/5]

MoReFEM::Mesh::Mesh ( const Wrappers::Mpi & mpi,
MeshNS::unique_id mesh_id,
const FilesystemNS::File & mesh_file,
Wrappers::Lua::OptionFile & prepartitioned_data,
std::size_t dimension,
MeshNS::Format format,
const double space_unit,
BuildEdge do_build_edge = BuildEdge::no,
BuildFace do_build_face = BuildFace::no,
BuildVolume do_build_volume = BuildVolume::no,
BuildPseudoNormals do_build_pseudo_normals = BuildPseudoNormals::no )
explicitprivate

Constructor from pre-partitioned data.

Parameters
[in]mpiMpi object which knows the rank of the processor, the total number of processors, etc...
Parameters
[in]mesh_fileFile from which the data will be loaded.
[in]formatFormat of the input file.
[in]mesh_idUnique identifier of the Mesh to be created.
[in]prepartitioned_dataLua file which gives the data needed to reconstruct the data from pre-computed partitioned data. Note: it is not const as such objects relies on a Lua stack which is modified for virtually each operation.
[in,out]dimensionDimension of the mesh read in the input file.
Parameters
[in]do_build_edgeWhether edges should be built or not.
[in]do_build_faceWhether faces should be built or not.
[in]do_build_volumeWhether volumes should be built or not.
[in]do_build_pseudo_normalsWhether pseudo-normals should be built or not.
Parameters
[in]space_unitThe unit of the mesh, in meters.

◆ Mesh() [4/5]

MoReFEM::Mesh::Mesh ( const Mesh & rhs)
delete

The copy constructor. - disabled.

Parameters
[in]rhsThe object from which the construction occurs. - disabled.

◆ Mesh() [5/5]

MoReFEM::Mesh::Mesh ( Mesh && rhs)
delete

The move constructor.

Parameters
[in]rhsThe object from which the construction occurs.

Member Function Documentation

◆ operator=() [1/2]

Mesh & MoReFEM::Mesh::operator= ( const Mesh & rhs)
delete

The (copy) operator=.

Parameters
[in]rhsThe object from which the affectation occurs.
Returns
Reference to the object (to enable chained affectation).

◆ operator=() [2/2]

Mesh & MoReFEM::Mesh::operator= ( Mesh && rhs)
delete

The (move) operator=.

Parameters
[in]rhsThe object from which the affectation occurs.
Returns
Reference to the object (to enable chained affectation).

◆ GeometricEltListInLabel()

template<RoleOnProcessor RoleOnProcessorT>
GeometricElt::vector_shared_ptr MoReFEM::Mesh::GeometricEltListInLabel ( const MeshLabel::const_shared_ptr & label) const

List of all geometric elements that belong to the same label.

Parameters
[in]labelMeshLabel used as filter.

◆ PrintGeometricEltsInLabel()

template<RoleOnProcessor RoleOnProcessorT>
void MoReFEM::Mesh::PrintGeometricEltsInLabel ( std::ostream & stream) const

Print the number of geometric elements for each label (for debug purposes).

Parameters
[in,out]streamStream upon which object information are written.

◆ NghostCoord()

std::size_t MoReFEM::Mesh::NghostCoord ( ) const
noexcept

Number of Coords that are exclusively associated to ghost NodeBearer.

Should not be useful to develop a model; it's there for two usages only:

  • Movemesh implementation within the library.
  • Some integration tests.
Returns
Number of Coords that are exclusively associated to ghost NodeBearer.

◆ BagOfEltType() [1/2]

template<RoleOnProcessorPlusBoth RoleOnProcessorPlusBothT>
RefGeomElt::vector_shared_ptr MoReFEM::Mesh::BagOfEltType ( ) const

A vector that contains a pointer to a default geometric element for each type encountered in the mesh.

For instance the vector would return a pointer to default Triangle3 and Tetraedre4 geometric elements if the mesh is constituted solely of these two types of elements.

Template Parameters
RoleOnProcessorPlusBothTWhether we consider processor-wise or ghost. If both, encompass both cases.
Returns
One RefGeomElt object if GeometricElt of the same type were found.

◆ BagOfEltType() [2/2]

template<RoleOnProcessorPlusBoth RoleOnProcessorPlusBothT>
RefGeomElt::vector_shared_ptr MoReFEM::Mesh::BagOfEltType ( std::size_t dimension) const

Same as namesake methods except we limit ourselves to a given dimension.

Parameters
[in]dimensionOnly objects of this dimension will be considered.
Template Parameters
RoleOnProcessorPlusBothTWhether we consider processor-wise or ghost. If both, encompass both cases.
Returns
One RefGeomElt object if GeometricElt of the same type were found.

◆ GetSubsetGeometricEltList() [1/3]

template<RoleOnProcessor RoleOnProcessorT>
subset_range MoReFEM::Mesh::GetSubsetGeometricEltList ( const RefGeomElt & geometric_type) const

Obtains all the geometric elements of a given type.

Parameters
[in]geometric_typeType of the geometric element requested.
Template Parameters
RoleOnProcessorTWhether we consider processor-wise or ghost.
Returns
Pair of iterators that delimits the required subset.
auto subset = GetSubsetGeometricEltList(geometric_type); // geometric_type is assumed to be properly
initialized. for (auto it = subset.first; it != subset.second; ++it)
{
... loop over all elements that share the given type ...
}
subset_range GetSubsetGeometricEltList(const RefGeomElt &geometric_type) const
Obtains all the geometric elements of a given type.

[internal] The internal structure of the geometric elements storage shouldn't vary much (if at all...) during the program, so you can be fairly assured the iterators won't be invalidated. Nonetheless, do not store them for instance in the class: generate them when they are required.

◆ GetSubsetGeometricEltList() [2/3]

template<RoleOnProcessor RoleOnProcessorT>
subset_range MoReFEM::Mesh::GetSubsetGeometricEltList ( const RefGeomElt & geometric_type,
std::size_t label_index ) const

Obtains all the geometric elements of a given type belonging to a given label.

Parameters
[in]geometric_typeType of the geometric element requested.
[in]label_indexIndex of the label considered
Returns
Pair of iterators that delimits the required subset.

See namesake method to see how it should be used.

◆ GetSubsetGeometricEltList() [3/3]

template<RoleOnProcessor RoleOnProcessorT>
subset_range MoReFEM::Mesh::GetSubsetGeometricEltList ( std::size_t dimension) const

Return the list of geometric elements of the requested dimension.

This method does not allocate new dynamic array.

Template Parameters
RoleOnProcessorTWhether we consider processor-wise or ghost.
Parameters
[in]dimensionDimension used as filter.
Returns
Pair of iterators that delimit all the appropriate GeometricElt.

◆ CheckGeometricEltOrdering()

void MoReFEM::Mesh::CheckGeometricEltOrdering ( ) const

Check the underlying ordering is what is expected within Mesh.

This is obviously a debug method...

◆ Nvertex()

template<RoleOnProcessor RoleOnProcessorT>
std::size_t MoReFEM::Mesh::Nvertex ( ) const

Get the number of processor-wise vertex.

Template Parameters
RoleOnProcessorTWhether we consider processor-wise or ghost.

◆ GetGeometricEltFromIndex() [1/2]

template<RoleOnProcessor RoleOnProcessorT>
const GeometricElt & MoReFEM::Mesh::GetGeometricEltFromIndex ( ::MoReFEM::GeomEltNS::index_type index) const

Return the GeometricElt which index (given by GetIndex()) is index.

Note
This method is frankly not efficient at all; it is introduced solely for some PostProcessing need.
Parameters
[in]indexIndex which associated GeometricElt is sought.
Returns
GeometricElt which index (given by GetIndex()) is index.

◆ GetGeometricEltFromIndex() [2/2]

template<RoleOnProcessor RoleOnProcessorT>
const GeometricElt & MoReFEM::Mesh::GetGeometricEltFromIndex ( ::MoReFEM::GeomEltNS::index_type index,
const RefGeomElt & ref_geom_elt ) const

Return the GeometricElt which index (given by GetIndex()) is index and which type is a ref_geom_elt.

Note
This method is slightly better than its counterpart without ref_geom_elt but the comment about its lack of efficiency still stands.
Parameters
[in]indexIndex which associated GeometricElt is sought.
[in]ref_geom_eltRefGeomElt of the sought GeometricElt.
Returns
GeometricElt which index (given by GetIndex()) is index.

◆ NgeometricElt() [1/3]

template<RoleOnProcessor RoleOnProcessorT>
std::size_t MoReFEM::Mesh::NgeometricElt ( std::size_t dimension) const

Number of geometric elements of a given dimension.

Template Parameters
RoleOnProcessorTWhether we consider processor-wise or ghost.
Parameters
[in]dimensionDimension used as filter.

◆ NgeometricElt() [2/3]

template<RoleOnProcessor RoleOnProcessorT>
std::size_t MoReFEM::Mesh::NgeometricElt ( const RefGeomElt & ref_geom_elt) const

Number of geometric elements of a given type

Template Parameters
RoleOnProcessorTWhether we consider processor-wise or ghost.
Parameters
[in]ref_geom_eltType of the RefGeomElt.

◆ NgeometricElt() [3/3]

template<RoleOnProcessor RoleOnProcessorT>
std::size_t MoReFEM::Mesh::NgeometricElt ( const RefGeomElt & ref_geom_elt,
const MeshLabel & mesh_label ) const

Number of geometric elements of a given type within a given label.

Template Parameters
RoleOnProcessorTWhether we consider processor-wise or ghost.
Parameters
[in]mesh_labelMeshLabel for which the tallying is done.
[in]ref_geom_eltType of the RefGeomElt.

◆ GetCoord()

const Coords & MoReFEM::Mesh::GetCoord ( std::size_t index) const

Get the index -th coord on the processor.

Parameters
[in]indexPosition of the sought Coords in the processor-wise Coords list. This index is the output of Coords::GetPositionInCoordsListInMesh(), NOT Coords::GetIndex() which might not be contiguous.

◆ GetProcessorWiseCoordsList()

const Coords::vector_shared_ptr & MoReFEM::Mesh::GetProcessorWiseCoordsList ( ) const
noexcept

Get the list of all Coords on the processor.

What is the meaning of "processor_wise" and "ghost" for Coords?

For a Dof, the "ghost" concept (relevant only for parallel runs) is clear cut:

  • If a Dof is handled primarily by the current processor, we call it "processor_wise".
  • If it is primarily handled by another processor BUT its value is nonetheless required on the current processor, we call it a "ghost". PETSc gets a whole mechanism to update these values (handled mostly automatically in GlobalVector in MoReFEM).
  • If a Dof is not relevant in any way on the current processor.... it is simply not there at all.

Regarding Coords, the definition as such isn't so clear, but is nonetheless useful:

  • A "processor_wise" Coords is a Coords directly related to a NodeBearer which bears a processor-wise Dof.
  • A "ghost" Coords is.... every odd Coords we need on the processor somehow but aren't related to a processor-wise Dof. For instance they might be: . A Coords related to a ghost Dof. . A Coords that forms a GeometricElt which is used in a DirichletBoundaryCondition (by convention all the Coords related to a boundary condition are kept on all processors - we would need this to be able to reconstruct properly the pattern of the matrices.

◆ GetGhostCoordsList()

const Coords::vector_shared_ptr & MoReFEM::Mesh::GetGhostCoordsList ( ) const
noexcept

Get the list of the ghost Coords.

What is the meaning of "processor_wise" and "ghost" for Coords?

For a Dof, the "ghost" concept (relevant only for parallel runs) is clear cut:

  • If a Dof is handled primarily by the current processor, we call it "processor_wise".
  • If it is primarily handled by another processor BUT its value is nonetheless required on the current processor, we call it a "ghost". PETSc gets a whole mechanism to update these values (handled mostly automatically in GlobalVector in MoReFEM).
  • If a Dof is not relevant in any way on the current processor.... it is simply not there at all.

Regarding Coords, the definition as such isn't so clear, but is nonetheless useful:

  • A "processor_wise" Coords is a Coords directly related to a NodeBearer which bears a processor-wise Dof.
  • A "ghost" Coords is.... every odd Coords we need on the processor somehow but aren't related to a processor-wise Dof. For instance they might be: . A Coords related to a ghost Dof. . A Coords that forms a GeometricElt which is used in a DirichletBoundaryCondition (by convention all the Coords related to a boundary condition are kept on all processors - we would need this to be able to reconstruct properly the pattern of the matrices.

So to put in a nutshell: unless you are a core library develop that needs to tinker with library aspects, you probably don't need this method!

Returns
List of Coords.

◆ GetNonCstGhostCoordsList()

Coords::vector_shared_ptr & MoReFEM::Mesh::GetNonCstGhostCoordsList ( )
noexcept

Get the list of the ghost Coords.

What is the meaning of "processor_wise" and "ghost" for Coords?

For a Dof, the "ghost" concept (relevant only for parallel runs) is clear cut:

  • If a Dof is handled primarily by the current processor, we call it "processor_wise".
  • If it is primarily handled by another processor BUT its value is nonetheless required on the current processor, we call it a "ghost". PETSc gets a whole mechanism to update these values (handled mostly automatically in GlobalVector in MoReFEM).
  • If a Dof is not relevant in any way on the current processor.... it is simply not there at all.

Regarding Coords, the definition as such isn't so clear, but is nonetheless useful:

  • A "processor_wise" Coords is a Coords directly related to a NodeBearer which bears a processor-wise Dof.
  • A "ghost" Coords is.... every odd Coords we need on the processor somehow but aren't related to a processor-wise Dof. For instance they might be: . A Coords related to a ghost Dof. . A Coords that forms a GeometricElt which is used in a DirichletBoundaryCondition (by convention all the Coords related to a boundary condition are kept on all processors - we would need this to be able to reconstruct properly the pattern of the matrices.

So to put in a nutshell: unless you are a core library develop that needs to tinker with library aspects, you probably don't need this method! (even more so than for GetGhostCoordsList()).

Returns
List of Coords.

◆ Write()

template<::MoReFEM::MeshNS::Format FormatT>
void MoReFEM::Mesh::Write ( const FilesystemNS::File & mesh_file) const

Write the mesh into a file in the given format.

Several notes and caveat:

  • Only processor-wise data are written on disk; i.e. there is one mesh per processor.
  • So you need to use mpi rank in the mesh file name, to avoid overwriting the work of another processor.
  • Some elements of the original mesh (before data reduction) might be 'lost': for instance if there are no boundary condition on an edge and therefore no specific finite element treatment, it is dropped in the 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.
Parameters
[in]mesh_filePath to the file into which the mesh will be written.
Template Parameters
FormatTFormat of the file to be written. Read the documentation above about the possible discrepancies of formats.

◆ ComputePseudoNormals()

void MoReFEM::Mesh::ComputePseudoNormals ( const std::vector< std::size_t > & label_index_list,
const Vertex::InterfaceMap & vertex_interface_list,
const Edge::InterfaceMap & edge_interface_list,
const Face::InterfaceMap & face_interface_list )
private

Compute the relevant pseudo-normals on the mesh.

Parameters
[in]label_index_listList of the label on which compute pseudo normals.
[in]vertex_interface_listList of Vertex.
[in]edge_interface_listList of Edge.
[in]face_interface_listList of Face.
Warning
Should not be called directly. To compute pseudo-normals use PseudoNormals1 in Lua that will use the dedicated magager to compute them.

◆ ShrinkToProcessorWise()

void MoReFEM::Mesh::ShrinkToProcessorWise ( const Wrappers::Mpi & mpi,
const GeometricElt::vector_shared_ptr & processor_wise_geom_elt_list,
const GeometricElt::vector_shared_ptr & ghost_geom_elt_list,
Coords::vector_shared_ptr && processor_wise_coords_list,
Coords::vector_shared_ptr && ghost_coords_list )
private

Init a local mesh from a global one.

Parameters
[in]mpiMpi object which knows the rank of the processor, the total number of processors, etc...
[in]processor_wise_geom_elt_listList of all geometric elements that are handled by the local processor. This list must be a subset of the current list of geometric elements.
[in]ghost_geom_elt_listList of ghost GeometricElt.
[in]processor_wise_coords_listList of processor-wise coords list, devised from the processor-wise list of NodeBearer.
[in]ghost_coords_listList of ghost coords list, i.e. Coords that are only involved with ghost NodeBearer. If a Coords is related to both a processor-wise and a ghost NodeBearer, it won't appear in this list (put differently, intersection of processor_wise_coords_list and ghost_coords_list is the empty set).

The internal index and the lowest processor for each Coords aren't yet computed; they will be only after the call to SetReducedCoordsList.

◆ SetReducedCoordsList()

void MoReFEM::Mesh::SetReducedCoordsList ( const Wrappers::Mpi & mpi,
Coords::vector_shared_ptr && processor_wise_coords_list,
Coords::vector_shared_ptr && ghost_coords_list )
private

Set the new coords after reduction to processor-wise.

This method is supposed to be called only in ShrinkToProcessorWise().

Parameters
[in]mpiMpi object which knows the rank of the processor, the total number of processors, etc...
Parameters
[in]processor_wise_coords_listList of processor-wise coords list, devised from the processor-wise list of NodeBearer.
[in]ghost_coords_listList of ghost coords list, i.e. Coords that are only involved with ghost NodeBearer. If a Coords is related to both a processor-wise and a ghost NodeBearer, it won't appear in this list (put differently, intersection of processor_wise_coords_list and ghost_coords_list is the empty set).

The internal index and the lowest processor for each Coords aren't yet computed; they will be only after the call to SetReducedCoordsList.

◆ SetIsLowestProcessor()

void MoReFEM::Mesh::SetIsLowestProcessor ( const Wrappers::Mpi & mpi,
std::size_t Nprogram_wise_coords,
const Coords::vector_shared_ptr & a_processor_wise_coords_list ) const
private

For all processor-wise Coords, determine which is the lowest rank in which they appear (not counting ghosts).

The point is to be able to count without duplicating the number of Coords inside a given Domain.

Parameters
[in]mpiMpi object which knows the rank of the processor, the total number of processors, etc...
[in]Nprogram_wise_coordsNumber of program-wise coords. This is required for internal Mpi computations,
[in,out]a_processor_wise_coords_listThe processor-wise list of Coords. The list itself is not modified, but the point of the method is to set properly the internal field is_lowest_processor_, hence the 'out' status.

This is an internal method that is meant to be called by SetReducedCoordsList() only.

◆ Construct()

void MoReFEM::Mesh::Construct ( GeometricElt::vector_shared_ptr && unsort_processor_wise_geom_elt_list,
GeometricElt::vector_shared_ptr && unsort_ghost_geom_elt_list,
Coords::vector_shared_ptr && coords_list,
MeshLabel::vector_const_shared_ptr && mesh_label_list,
BuildEdge do_build_edge,
BuildFace do_build_face,
BuildVolume do_build_volume,
BuildPseudoNormals do_build_pseudo_normals )
private

Constructor helper method.

This method should be called by a any constructor, as it builds and sorts the expected content of the class.

Parameters
[in,out]unsort_processor_wise_geom_elt_listList of processor-wiseGeometricElt. No specific order is expected here.
[in,out]unsort_ghost_geom_elt_listList of ghostGeometricElt. No specific order is expected here.
[in]coords_listList of Coords objects.
[in]mesh_label_listList of MeshLabels.
Parameters
[in]do_build_edgeWhether edges should be built or not.
[in]do_build_faceWhether faces should be built or not.
[in]do_build_volumeWhether volumes should be built or not.
[in]do_build_pseudo_normalsWhether pseudo-normals should be built or not.

◆ Read()

void MoReFEM::Mesh::Read ( const FilesystemNS::File & mesh_file,
::MoReFEM::MeshNS::Format format,
const double space_unit,
std::optional< std::reference_wrapper< Wrappers::Lua::OptionFile > > prepartitioned_data,
GeometricElt::vector_shared_ptr & unsort_processor_wise_geom_elt_list,
GeometricElt::vector_shared_ptr & unsort_ghost_geom_elt_list,
Coords::vector_shared_ptr & coords_list,
MeshLabel::vector_const_shared_ptr & mesh_label_list )
private

Read a mesh from a file.

Parameters
[in]mesh_fileFile from which the data will be loaded.
[in]formatFormat of the input file.
Parameters
[in]space_unitThe unit of the mesh, in meters.
Parameters
[in,out]unsort_processor_wise_geom_elt_listList of processor-wiseGeometricElt. No specific order is expected here.
[in,out]unsort_ghost_geom_elt_listList of ghostGeometricElt. No specific order is expected here.
[in]coords_listList of Coords objects.
[in]mesh_label_listList of MeshLabels.
Parameters
[in]prepartitioned_dataOptional parameter which is used when we are in fact loading a Mesh from prepartitioned data. In this case, this file includes the relevant data required to rebuild the Mesh identically as the one that was serialized in an earlier run.

(for instance Ensight will always yield 3 here by construct).

◆ BuildInterface()

template<class InterfaceT >
void MoReFEM::Mesh::BuildInterface ( typename InterfaceT::InterfaceMap & interface_list)
private

Actual implementation of BuildEdgeList or BuildFaceList.

Template Parameters
InterfaceTInterface type, which derives from Interface base class. Choices are among { Vertex, Edge, Face, Volume }.

[internal] A specialization for Vertex is declared in namespace scope at the end of this file.

This method builds both processor-wise and ghost interface.

Parameters
[in,out]interface_listList of InterfaceT under construct.

◆ BuildInterfaceHelper()

template<class InterfaceT , RoleOnProcessor RoleOnProcessorT>
void MoReFEM::Mesh::BuildInterfaceHelper ( typename InterfaceT::InterfaceMap & interface_list)
private

Helper of BuildInterface.

Template Parameters
RoleOnProcessorTWhether we consider processor-wise or ghost.

This method builds the interface either for processor-wise or for ghost.

Parameters
[in,out]interface_listList of InterfaceT under construct.

◆ SetNinterface()

template<class InterfaceT >
void MoReFEM::Mesh::SetNinterface ( std::size_t Nprocessor_wise,
std::size_t Nghost )
private

Set the number of interfaces of InterfaceT type.

Template Parameters
InterfaceTInterface type, which derives from Interface base class. Choices are among { Vertex, Edge, Face, Volume }.
Parameters
[in]Nprocessor_wiseNumber of processsor-wise edges or faces fed to the object .
[in]NghostNumber of ghost edges or faces fed to the object .

◆ DetermineNInterface()

template<class InterfaceT >
std::array< std::size_t, 2ul > MoReFEM::Mesh::DetermineNInterface ( ) const
private

Determine the number of interfaces of InterfaceT type.

Template Parameters
InterfaceTInterface type, which derives from Interface base class. Choices are among { Vertex, Edge, Face, Volume }.
Returns
Number of interfaces of type InterfaceT; first index is for processor-wise count, second one for ghosts.

◆ ReduceLabelList()

void MoReFEM::Mesh::ReduceLabelList ( )
private

Reconstruct the labels after reduction to processor-wise data.

Only labels involved with GeometricElt kept on the local processors are kept.

◆ SetProcessorWiseCoordsList()

void MoReFEM::Mesh::SetProcessorWiseCoordsList ( Coords::vector_shared_ptr && list)
private

Mutator the list of the Coords related to processor-wise NodeBearer.

Parameters
[in]listThe list of ghost Coords computed outside the Mesh.

◆ SetGhostCoordsList()

void MoReFEM::Mesh::SetGhostCoordsList ( Coords::vector_shared_ptr && list)
private

Mutator the list of the Coords related ONLY to ghost NodeBearer.

Parameters
[in]listThe list of ghost Coords computed outside the Mesh.

◆ SortPrepartitionedCoords()

void MoReFEM::Mesh::SortPrepartitionedCoords ( std::size_t Nprocessor_wise)
private

For constructor for prepartitioned data: split the processor_wise_coords_list_ in processor-wise and ghost Coords.

In this constructor, we want to rebuild the model from data that were partitioned beforehand. So we read a mesh file which is a subset of the full mesh submitted initially to the partition; when it is read all Coords are tagged as processor-wise. That is not actually the reality: some of them are in fact mainly born by another processor and it is a ghost for current rank. The role of this method is to sort this and split between processor_wise_coords_list_ and ghost_coords_list_; it's rather trivial as by construct the Nprocessor_wise first elements are processor-wise.

Parameters
[in]Nprocessor_wiseNumber of Coords to keep in processor-wise containers.

Should not be used outside of the constructor for prepartitioned data.

◆ ComputeProcessorWiseAndGhostGeometricEltList()

GeometricElt::vector_shared_ptr MoReFEM::Mesh::ComputeProcessorWiseAndGhostGeometricEltList ( ) const
noexcept

Compute a list of GeometricElt which covers both the processor-wise and ghost.

Attention
This operation is costly (a new container is allocated) and is intended to be used only when writing a mesh into a file and in preparation of prepartifioned data.
Returns
The list of all GeometricElt of interest for the current processor.

◆ GetInternalGeomEltList()

template<RoleOnProcessor RoleOnProcessorT>
const Internal::MeshNS::GeometricEltList & MoReFEM::Mesh::GetInternalGeomEltList ( ) const
privatenoexcept

Internal method that dispatch the correct GeometricElt list depending on RoleOnProcessorT value.

Template Parameters
RoleOnProcessorTWhether we consider processor-wise or ghost.

◆ GetUniqueId()

MeshNS::unique_id MoReFEM::Crtp::UniqueId< Mesh , MeshNS::unique_id , AssignationModeT, UniqueIdNS::DoAllowNoId::no >::GetUniqueId ( ) const
inherited

Get the value of the internal unique ID.

Returns
Unique id.

◆ GenerateNewEligibleId()

static MeshNS::unique_id MoReFEM::Crtp::UniqueId< Mesh , MeshNS::unique_id , AssignationModeT, UniqueIdNS::DoAllowNoId::no >::GenerateNewEligibleId ( )
staticinherited

Generate a unique id.

No new objects is created, and the new identifier is not counted in the list - the purpose here is just to provide a value that don't collide with existing objects. This is really used in a very edge case; think twice before using this functionality as it really might not be what you really seek.

Returns
A unique id that is not in use yet.

◆ ClearUniqueIdList()

static void MoReFEM::Crtp::UniqueId< Mesh , MeshNS::unique_id , AssignationModeT, UniqueIdNS::DoAllowNoId::no >::ClearUniqueIdList ( )
staticinherited

Clear all unique ids.

Attention
This functionality has been put there only for the sake of writing tests; please do not use it! It should be considered as private, even if unfortunately I can't easily put it that way.

◆ AssignUniqueId()

static MeshNS::unique_id MoReFEM::Crtp::UniqueId< Mesh , MeshNS::unique_id , AssignationModeT, UniqueIdNS::DoAllowNoId::no >::AssignUniqueId ( )
staticprivateinherited

If AssignationMode is automatic, generates a new unique identifier.

Returns
The new unique id, which is just an increment from the previously assigned one.

◆ NewUniqueId()

static MeshNS::unique_id MoReFEM::Crtp::UniqueId< Mesh , MeshNS::unique_id , AssignationModeT, UniqueIdNS::DoAllowNoId::no >::NewUniqueId ( MeshNS::unique_id new_unique_id)
staticprivateinherited

If AssignationMode is manual, checks the unique identifier provided is valid.

Parameters
[in]new_unique_idThe proposed new unique id. If it already exists an exception will be thrown.
Returns
The unmodified unique id.

Field Documentation

◆ processor_wise_coords_list_

Coords::vector_shared_ptr MoReFEM::Mesh::processor_wise_coords_list_
private

List of all Coords on the processor.

What is the meaning of "processor_wise" and "ghost" for Coords?

For a Dof, the "ghost" concept (relevant only for parallel runs) is clear cut:

  • If a Dof is handled primarily by the current processor, we call it "processor_wise".
  • If it is primarily handled by another processor BUT its value is nonetheless required on the current processor, we call it a "ghost". PETSc gets a whole mechanism to update these values (handled mostly automatically in GlobalVector in MoReFEM).
  • If a Dof is not relevant in any way on the current processor.... it is simply not there at all.

Regarding Coords, the definition as such isn't so clear, but is nonetheless useful:

  • A "processor_wise" Coords is a Coords directly related to a NodeBearer which bears a processor-wise Dof.
  • A "ghost" Coords is.... every odd Coords we need on the processor somehow but aren't related to a processor-wise Dof. For instance they might be: . A Coords related to a ghost Dof. . A Coords that forms a GeometricElt which is used in a DirichletBoundaryCondition (by convention all the Coords related to a boundary condition are kept on all processors - we would need this to be able to reconstruct properly the pattern of the matrices.

◆ ghost_coords_list_

Coords::vector_shared_ptr MoReFEM::Mesh::ghost_coords_list_
private

List of ghost Coords.

What is the meaning of "processor_wise" and "ghost" for Coords?

For a Dof, the "ghost" concept (relevant only for parallel runs) is clear cut:

  • If a Dof is handled primarily by the current processor, we call it "processor_wise".
  • If it is primarily handled by another processor BUT its value is nonetheless required on the current processor, we call it a "ghost". PETSc gets a whole mechanism to update these values (handled mostly automatically in GlobalVector in MoReFEM).
  • If a Dof is not relevant in any way on the current processor.... it is simply not there at all.

Regarding Coords, the definition as such isn't so clear, but is nonetheless useful:

  • A "processor_wise" Coords is a Coords directly related to a NodeBearer which bears a processor-wise Dof.
  • A "ghost" Coords is.... every odd Coords we need on the processor somehow but aren't related to a processor-wise Dof. For instance they might be: . A Coords related to a ghost Dof. . A Coords that forms a GeometricElt which is used in a DirichletBoundaryCondition (by convention all the Coords related to a boundary condition are kept on all processors - we would need this to be able to reconstruct properly the pattern of the matrices.

◆ processor_wise_geometric_elt_list_

Internal::MeshNS::GeometricEltList MoReFEM::Mesh::processor_wise_geometric_elt_list_
private

List of all the geometric elements of the mesh, sort by dimension.

Key is the dimension, and value is the list of all geometric elements of that dimension in the mesh.

Underlying order is expected to be by geometric element nature (all triangles3, then all triangles6, etc...).

◆ ghost_geometric_elt_list_

Internal::MeshNS::GeometricEltList MoReFEM::Mesh::ghost_geometric_elt_list_
private

List of all ghost GeometricElt.

These GeometricElt aren't directly handled by the current rank, but they are related for few LocalFEltSpace that gets some NodeBearer that are managed by the current rank, We shouldn't have to use them except for writing data on disk; the point of this list is mostly to keep track of them.

◆ Nvertex_on_rank_

std::array<std::size_t, 2ul> MoReFEM::Mesh::Nvertex_on_rank_ = Utilities::FilledWithUninitializedIndex<std::size_t, 2ul>()
private

Number of built vertex (processor-wise).

Interfaces that are present on a processor-wise GeomElt but which NodeBearer is handled by another processor is not counted here.

First index is the processor-wise count, second the ghost one.

◆ Nedge_

std::array<std::size_t, 2ul> MoReFEM::Mesh::Nedge_ = Utilities::FilledWithUninitializedIndex<std::size_t, 2ul>()
private

Number of built edges that are related to a NodeBearer.

Interfaces that are present on a processor-wise GeomElt but which NodeBearer is handled by another processor is not counted here.

If BuildEdgeList() has not been called, this quantity is an UninitializedIndex; fetching this quantity should lead to an assert.

First index is the processor-wise count, second the ghost one.

◆ Nface_

std::array<std::size_t, 2ul> MoReFEM::Mesh::Nface_ = Utilities::FilledWithUninitializedIndex<std::size_t, 2ul>()
private

Number of built faces.

Interfaces that are present on a processor-wise GeomElt but which NodeBearer is handled by another processor is not counted here.

If BuildFaceList() has not been called, this quantity is an UninitializedIndex; fetching this quantity should lead to an assert. First index is the processor-wise count, second the ghost one.

◆ Nvolume_

std::array<std::size_t, 2ul> MoReFEM::Mesh::Nvolume_ = Utilities::FilledWithUninitializedIndex<std::size_t, 2ul>()
private

Number of built volumes.

Interfaces that are present on a processor-wise GeomElt but which NodeBearer is handled by another processor is not counted here.

If BuildFaceList() has not been called, this quantity is an UninitializedIndex; fetching this quantity should lead to an assert.

First index is the processor-wise count, second the ghost one.


The documentation for this class was generated from the following file: