MoReFEM
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends
MoReFEM::GeometricElt Class Referenceabstract

Generic class handling geometric element. More...

#include <GeometricElt.hpp>

Inheritance diagram for MoReFEM::GeometricElt:
Collaboration diagram for MoReFEM::GeometricElt:

Public Types

using unique_ptr = std::unique_ptr<GeometricElt>
 Alias for unique pointer.
 
using shared_ptr = std::shared_ptr<GeometricElt>
 Alias for shared pointer.
 
using vector_shared_ptr = std::vector<shared_ptr>
 Alias for vector of pointers.
 

Public Member Functions

virtual std::size_t Ncoords () const =0
 Get the number of Coords object required to characterize completely a GeometricElt of this type.
 
virtual std::size_t Nvertex () const =0
 Get the number of vertice.
 
virtual std::size_t Nedge () const =0
 Get the number of edges.
 
virtual std::size_t Nface () const =0
 Get the number of faces.
 
virtual std::size_t GetDimension () const =0
 Get the dimension of the geometric element.
 
virtual Advanced::GeometricEltEnum GetIdentifier () const =0
 Get the identifier of the geometric element.
 
virtual const RefGeomEltGetRefGeomElt () const =0
 Get a reference to the reference geometric element.
 
virtual const Advanced::GeomEltNS::GenericNameGetName () const =0
 Get the string name of the geometric element (e.g. 'Triangle3', 'Segment2', etc...).
 
void SetIndex (GeomEltNS::index_type index) noexcept
 
GeomEltNS::index_type GetIndex () const
 
MeshNS::unique_id GetMeshIdentifier () const noexcept
 Get the identifier of the mesh.
 
void SetMeshLabel (const MeshLabel::const_shared_ptr &mesh_label) noexcept
 
MeshLabel::const_shared_ptr GetMeshLabelPtr () const noexcept
 Get the label.
 
const Coords::vector_shared_ptrGetCoordsList () const noexcept
 Get the coords as a vector.
 
const CoordsGetCoord (std::size_t i) const
 
const Vertex::vector_shared_ptrGetVertexList () const noexcept
 Return the list of vertice.
 
const OrientedEdge::vector_shared_ptrGetOrientedEdgeList () const
 Return the list of edges.
 
const OrientedFace::vector_shared_ptrGetOrientedFaceList () const
 Return the list of faces.
 
Volume::shared_ptr GetVolumePtr () const
 Return the volume (as an interface).
 
void SetVertexList (Vertex::vector_shared_ptr &&vertex_list)
 Set the list of vertice.
 
void SetOrientedEdgeList (OrientedEdge::vector_shared_ptr &&edge_list)
 Set the list of edges (with their orientation).
 
void SetOrientedFaceList (OrientedFace::vector_shared_ptr &&face_list)
 Set the list of faces (with their orientation).
 
void SetVolume (const Volume::shared_ptr &volume)
 Set the volume interface.
 
template<class InterfaceT >
void BuildInterface (const GeometricElt *geom_elt_ptr, typename InterfaceT::InterfaceMap &interface_list)
 Build a new interface, regardless of the orientation.
 
Special members.
 GeometricElt (MeshNS::unique_id mesh_unique_id)
 Minimal constructor: only the Mesh for which the current geometric element is created is provided.
 
 GeometricElt (MeshNS::unique_id mesh_unique_id, const Coords::vector_shared_ptr &mesh_coords_list, GeomEltNS::index_type index, std::vector< CoordsNS::index_from_mesh_file > &&coords_indexes)
 Constructor from vector.
 
 GeometricElt (MeshNS::unique_id mesh_unique_id, const Coords::vector_shared_ptr &mesh_coords_list, std::vector< CoordsNS::index_from_mesh_file > &&coords_indexes)
 Constructor from vector; index is left undefined.
 
virtual ~GeometricElt ()
 Destructor.
 
 GeometricElt (const GeometricElt &rhs)=delete
 The copy constructor.
 
 GeometricElt (GeometricElt &&rhs)=delete
 The move constructor.
 
GeometricEltoperator= (const GeometricElt &rhs)=delete
 The (copy) operator=.
 
GeometricEltoperator= (GeometricElt &&rhs)=delete
 The (move) operator=.
 

Friends

class PostProcessingNS::OutputDeformedMesh
 Friendship to allow call to SetCoordsList().
 

Shape function methods.

const MeshNS::unique_id mesh_identifier_
 Identifier of the mesh.
 
GeomEltNS::index_type index_ = NumericNS::UninitializedIndex<decltype(index_)>()
 Index associated to the current geometric element.
 
MeshLabel::const_shared_ptr mesh_label_ = nullptr
 Surface reference to which the geometric element belongs to.
 
Coords::vector_shared_ptr coords_list_
 Coords that belong to the geometric element.
 
Vertex::vector_shared_ptr vertex_list_
 List of vertice.
 
OrientedEdge::vector_shared_ptr oriented_edge_list_
 List of edges.
 
OrientedFace::vector_shared_ptr oriented_face_list_
 List of faces.
 
Volume::shared_ptr volume_ = nullptr
 Volume (as an interface).
 
InterfaceNS::Nature higher_interface_type_built_ = InterfaceNS::Nature::undefined
 Knows whether a given type of interface has been built or not.
 
virtual double ShapeFunction (LocalNodeNS::index_type local_node_index, const LocalCoords &local_coords) const =0
 Shape function call.
 
virtual double FirstDerivateShapeFunction (LocalNodeNS::index_type local_node_index, Advanced::ComponentNS::index_type component, const LocalCoords &local_coords) const =0
 First derivate of the shape function call.
 
virtual double SecondDerivateShapeFunction (LocalNodeNS::index_type local_node_index, Advanced::ComponentNS::index_type component1, Advanced::ComponentNS::index_type component2, const LocalCoords &local_coords) const =0
 Second derivate of the shape function call.
 
const Advanced::GeomEltNS::EnsightNameGetEnsightName () const
 Ensight-related methods.
 
virtual void WriteEnsightFormat (std::ostream &stream, bool do_print_index) const =0
 Write the geometric element in Ensight format.
 
GmfKwdCod GetMeditIdentifier () const
 Medit-related methods.
 
virtual void WriteMeditFormat (libmeshb_int mesh_index, const std::unordered_map< ::MoReFEM::CoordsNS::index_from_mesh_file, int > &processor_wise_reindexing) const =0
 Write the geometric elementin Medit format.
 
virtual void ReadMeditFormat (const FilesystemNS::File &medit_file, const Coords::vector_shared_ptr &mesh_coords_list, libmeshb_int libmesh_mesh_index, std::size_t Ncoord_in_mesh, int &reference_index)=0
 Read the geometric element in Medit format.
 
virtual void BuildVertexList (const GeometricElt *geom_elt_ptr, Vertex::InterfaceMap &existing_list)=0
 Build the list of all vertices that belongs to the geometric element.
 
virtual void BuildEdgeList (const GeometricElt *geom_elt_ptr, Edge::InterfaceMap &existing_list)=0
 Build the list of all edges that belongs to the geometric element.
 
virtual void BuildFaceList (const GeometricElt *geom_elt_ptr, Face::InterfaceMap &existing_list)=0
 Build the list of all faces that belongs to the geometric element.
 
virtual void BuildVolumeList (const GeometricElt *geom_elt_ptr, Volume::InterfaceMap &existing_list)=0
 Build the list of all faces that belongs to the geometric element.
 
void SetCoordsList (const Coords::vector_shared_ptr &mesh_coords_list, std::vector< CoordsNS::index_from_mesh_file > &&coords_indexes)
 Set the coord list from the vector given in input.
 
template<InterfaceNS::Nature InterfaceT>
void SetInterfaceListBuilt ()
 Tells the object edges or faces have been built.
 

Detailed Description

Generic class handling geometric element.

Attention
By design a GeometricElt is automatically related to a Mesh object.

This abstract class is meant to be used polymorphically: all geometrical geometric elements should derive from this one. As a matter of fact, the dependency is not direct: a class in Internal::MeshNS namespace named TGeometricElt defines all the pure virtual here (TGeometricElt stands for "templatized geometric element").

GeometricElt objects are expected to be defined within a mesh context: for instance their index_ is the index of the current GeometricElt is used to label the geometric element within the mesh.

If you need to use a type rather than a specific geometric element (for instance in the mesh you have to store in a list the different types of geometric element involved) use rather RefGeomElt.

Constructor & Destructor Documentation

◆ GeometricElt() [1/5]

MoReFEM::GeometricElt::GeometricElt ( MeshNS::unique_id mesh_unique_id)
explicit

Minimal constructor: only the Mesh for which the current geometric element is created is provided.

Parameters
[in]mesh_unique_idUnique identifier of the mesh (which is what is returned by Mesh::GetUniqueId() method).

◆ GeometricElt() [2/5]

MoReFEM::GeometricElt::GeometricElt ( MeshNS::unique_id mesh_unique_id,
const Coords::vector_shared_ptr & mesh_coords_list,
GeomEltNS::index_type index,
std::vector< CoordsNS::index_from_mesh_file > && coords_indexes )
explicit

Constructor from vector.

Minimal constructor: only the Mesh for which the current geometric element is created is provided.

Parameters
[in]mesh_unique_idUnique identifier of the mesh (which is what is returned by Mesh::GetUniqueId() method).
[in]indexIndex associated to the geometric element in the mesh.
Parameters
[in]coords_indexesIndexes of the Coords to pick from mesh_coords_list.
Parameters
[in]mesh_coords_listList of ALL Coords list built from the mesh.

◆ GeometricElt() [3/5]

MoReFEM::GeometricElt::GeometricElt ( MeshNS::unique_id mesh_unique_id,
const Coords::vector_shared_ptr & mesh_coords_list,
std::vector< CoordsNS::index_from_mesh_file > && coords_indexes )
explicit

Constructor from vector; index is left undefined.

Minimal constructor: only the Mesh for which the current geometric element is created is provided.

Parameters
[in]mesh_unique_idUnique identifier of the mesh (which is what is returned by Mesh::GetUniqueId() method).
Parameters
[in]coords_indexesIndexes of the Coords to pick from mesh_coords_list.
Parameters
[in]mesh_coords_listList of ALL Coords list built from the mesh.

Index should be specified through dedicated method SetIndex

◆ GeometricElt() [4/5]

MoReFEM::GeometricElt::GeometricElt ( const GeometricElt & rhs)
explicitdelete

The copy constructor.

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

◆ GeometricElt() [5/5]

MoReFEM::GeometricElt::GeometricElt ( GeometricElt && rhs)
explicitdelete

The move constructor.

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

Member Function Documentation

◆ operator=() [1/2]

GeometricElt & MoReFEM::GeometricElt::operator= ( const GeometricElt & 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]

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

The (move) operator=.

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

◆ Ncoords()

virtual std::size_t MoReFEM::GeometricElt::Ncoords ( ) const
pure virtual

◆ Nvertex()

virtual std::size_t MoReFEM::GeometricElt::Nvertex ( ) const
pure virtual

◆ Nedge()

virtual std::size_t MoReFEM::GeometricElt::Nedge ( ) const
pure virtual

◆ Nface()

virtual std::size_t MoReFEM::GeometricElt::Nface ( ) const
pure virtual

◆ GetDimension()

virtual std::size_t MoReFEM::GeometricElt::GetDimension ( ) const
pure virtual

◆ GetIdentifier()

virtual Advanced::GeometricEltEnum MoReFEM::GeometricElt::GetIdentifier ( ) const
pure virtual

◆ GetRefGeomElt()

virtual const RefGeomElt & MoReFEM::GeometricElt::GetRefGeomElt ( ) const
pure virtual

◆ GetName()

virtual const Advanced::GeomEltNS::GenericName & MoReFEM::GeometricElt::GetName ( ) const
pure virtual

◆ SetIndex()

void MoReFEM::GeometricElt::SetIndex ( GeomEltNS::index_type index)
noexcept

Mutator to the GeometricElt index.

Parameters
[in]indexNew index to set.

◆ GetIndex()

GeomEltNS::index_type MoReFEM::GeometricElt::GetIndex ( ) const
inline

Accessor to the GeometricElt index.

This index is assumed to be unique for a given Mesh: no other geometric element should bear the same index (Mesh enforces that when the mesh is read).

This uniqueness is important: indexes are used to compare elements, and also to define a hash function when GeometricElt are put in an unordered_map.

However, a check upon the mesh is also required: same index might be used by two different meshes for two unrelated geometric elements.

◆ GetMeshIdentifier()

MeshNS::unique_id MoReFEM::GeometricElt::GetMeshIdentifier ( ) const
noexcept

Get the identifier of the mesh.

You shouldn't have to use this: it is used mostly to implement the comparison operators.

Returns
Index that tags the mesh.

◆ SetMeshLabel()

void MoReFEM::GeometricElt::SetMeshLabel ( const MeshLabel::const_shared_ptr & mesh_label)
noexcept

Set the label.

Parameters
[in]mesh_labelMeshLabel associated to the current GeometricElt.

◆ GetCoord()

const Coords & MoReFEM::GeometricElt::GetCoord ( std::size_t i) const

Get the ith coords index.

Parameters
iIndex of the sought Coords object used to define the geometric element.

◆ GetVertexList()

const Vertex::vector_shared_ptr & MoReFEM::GeometricElt::GetVertexList ( ) const
noexcept

Return the list of vertice.

Returns
The list of vertice (as smart pointers).

◆ GetOrientedEdgeList()

const OrientedEdge::vector_shared_ptr & MoReFEM::GeometricElt::GetOrientedEdgeList ( ) const

Return the list of edges.

This method assumes the edges were already built by the mesh; if not an exception is thrown.

Returns
The list of edges (as smart pointers).

◆ GetOrientedFaceList()

const OrientedFace::vector_shared_ptr & MoReFEM::GeometricElt::GetOrientedFaceList ( ) const

Return the list of faces.

This method assumes the faces were already built by the mesh; if not an exception is thrown.

Returns
The list of faces (as smart pointers).

◆ GetVolumePtr()

Volume::shared_ptr MoReFEM::GeometricElt::GetVolumePtr ( ) const

Return the volume (as an interface).

This method assumes the volume were already built by the mesh; if not an exception is thrown.

Returns
The volume interface. Might be nullptr!

◆ SetVertexList()

void MoReFEM::GeometricElt::SetVertexList ( Vertex::vector_shared_ptr && vertex_list)

Set the list of vertice.

Parameters
[in]vertex_listList of Vertex related to the geometric element.

◆ SetOrientedEdgeList()

void MoReFEM::GeometricElt::SetOrientedEdgeList ( OrientedEdge::vector_shared_ptr && edge_list)

Set the list of edges (with their orientation).

Parameters
[in]edge_listList of OrientedEdge related to the geometric element.

◆ SetOrientedFaceList()

void MoReFEM::GeometricElt::SetOrientedFaceList ( OrientedFace::vector_shared_ptr && face_list)

Set the list of faces (with their orientation).

Parameters
[in]face_listList of OrientedFace related to the geometric element.

◆ SetVolume()

void MoReFEM::GeometricElt::SetVolume ( const Volume::shared_ptr & volume)

Set the volume interface.

Parameters
[in]volumeNew value to set.

◆ BuildInterface()

template<class InterfaceT >
void MoReFEM::GeometricElt::BuildInterface ( const GeometricElt * geom_elt_ptr,
typename InterfaceT::InterfaceMap & interface_list )

Build a new interface, regardless of the orientation.

Template Parameters
InterfaceTInterface type, which derives from Interface base class. Choices are among { Vertex, Edge, Face, Volume }.
Parameters
[in]geom_elt_ptrPointer to current GeometricElt; must point to same object as this. This is rather clumsy, but I lack the time currently to fix something that is clumsy but ultimately not broken.
[in,out]interface_listList of InterfaceT under construction when current method is called. If interface is not yet there it is added at the end of the method call.

◆ ShapeFunction()

virtual double MoReFEM::GeometricElt::ShapeFunction ( LocalNodeNS::index_type local_node_index,
const LocalCoords & local_coords ) const
pure virtual

◆ FirstDerivateShapeFunction()

virtual double MoReFEM::GeometricElt::FirstDerivateShapeFunction ( LocalNodeNS::index_type local_node_index,
Advanced::ComponentNS::index_type component,
const LocalCoords & local_coords ) const
pure virtual

◆ SecondDerivateShapeFunction()

virtual double MoReFEM::GeometricElt::SecondDerivateShapeFunction ( LocalNodeNS::index_type local_node_index,
Advanced::ComponentNS::index_type component1,
Advanced::ComponentNS::index_type component2,
const LocalCoords & local_coords ) const
pure virtual

Second derivate of the shape function call.

Parameters
[in]local_node_indexIndex of the local node considered.
[in]local_coordsLocal coordinates at which the shape function is applied.
[in]component1Component of the first derivate considered.
[in]component2Component of the second derivate considered.
Returns
Derivate of the shape function wrt to component1 and component2 at the local node considered.

Implemented in MoReFEM::Internal::GeomEltNS::TGeometricElt< TraitsRefGeomEltT >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron20 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron27 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron8 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Point1 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle4 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle8 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle9 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Segment2 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Segment3 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Tetrahedron10 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Tetrahedron4 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Triangle3 >, and MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Triangle6 >.

◆ BuildVertexList()

virtual void MoReFEM::GeometricElt::BuildVertexList ( const GeometricElt * geom_elt_ptr,
Vertex::InterfaceMap & existing_list )
privatepure virtual

Build the list of all vertices that belongs to the geometric element.

Parameters
[in,out]existing_listList of all vertice that have been built so far for the enclosing geometric mesh. If a vertex already exists, point to the already existing object instead of recreating one. If not, create a new object from scratch and add it in the existing_list.
Parameters
[in]geom_elt_ptrPointer to current GeometricElt; must point to same object as this. This is rather clumsy, but I lack the time currently to fix something that is clumsy but ultimately not broken.

Implemented in MoReFEM::Internal::GeomEltNS::TGeometricElt< TraitsRefGeomEltT >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron20 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron27 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron8 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Point1 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle4 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle8 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle9 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Segment2 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Segment3 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Tetrahedron10 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Tetrahedron4 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Triangle3 >, and MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Triangle6 >.

◆ BuildEdgeList()

virtual void MoReFEM::GeometricElt::BuildEdgeList ( const GeometricElt * geom_elt_ptr,
Edge::InterfaceMap & existing_list )
privatepure virtual

Build the list of all edges that belongs to the geometric element.

Parameters
[in]geom_elt_ptrPointer to current GeometricElt; must point to same object as this. This is rather clumsy, but I lack the time currently to fix something that is clumsy but ultimately not broken.
[in,out]existing_listList of all edges that have been built so far for the enclosing geometric mesh. If an edge already exists, point to the already existing object instead of recreating one. If not, create a new object from scratch and add it in the existing_list.

Implemented in MoReFEM::Internal::GeomEltNS::TGeometricElt< TraitsRefGeomEltT >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron20 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron27 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron8 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Point1 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle4 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle8 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle9 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Segment2 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Segment3 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Tetrahedron10 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Tetrahedron4 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Triangle3 >, and MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Triangle6 >.

◆ BuildFaceList()

virtual void MoReFEM::GeometricElt::BuildFaceList ( const GeometricElt * geom_elt_ptr,
Face::InterfaceMap & existing_list )
privatepure virtual

Build the list of all faces that belongs to the geometric element.

Parameters
[in]geom_elt_ptrPointer to current GeometricElt; must point to same object as this. This is rather clumsy, but I lack the time currently to fix something that is clumsy but ultimately not broken.
[in,out]existing_listList of all faces that have been built so far for the enclosing geometric mesh. If a face already exists, point to the already existing object instead of recreating one. If not, create a new object from scratch and add it in the existing_list.

Implemented in MoReFEM::Internal::GeomEltNS::TGeometricElt< TraitsRefGeomEltT >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron20 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron27 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron8 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Point1 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle4 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle8 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle9 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Segment2 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Segment3 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Tetrahedron10 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Tetrahedron4 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Triangle3 >, and MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Triangle6 >.

◆ BuildVolumeList()

virtual void MoReFEM::GeometricElt::BuildVolumeList ( const GeometricElt * geom_elt_ptr,
Volume::InterfaceMap & existing_list )
privatepure virtual

Build the list of all faces that belongs to the geometric element.

Parameters
[in]geom_elt_ptrPointer to current GeometricElt; must point to same object as this. This is rather clumsy, but I lack the time currently to fix something that is clumsy but ultimately not broken.
[in,out]existing_listList of all faces that have been built so far for the enclosing geometric mesh. If a face already exists, point to the already existing object instead of recreating one. If not, create a new object from scratch and add it in the existing_list.

[internal] As there is at most one volume by GeometricElt, and this volume can't therefore be shared with others geometric elements, we could have handled it differently from other interfaces. But the little efficiency we could have gained would have to be paid with maintenance cost; hence the choice to use a same mechanism for all the interfaces.

Implemented in MoReFEM::Internal::GeomEltNS::TGeometricElt< TraitsRefGeomEltT >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron20 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron27 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron8 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Point1 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle4 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle8 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle9 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Segment2 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Segment3 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Tetrahedron10 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Tetrahedron4 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Triangle3 >, and MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Triangle6 >.

◆ GetEnsightName()

const Advanced::GeomEltNS::EnsightName & MoReFEM::GeometricElt::GetEnsightName ( ) const

Ensight-related methods.

Get the ensight name of the geometric element (e.g. 'tria3', 'bar2', etc...)

An exception is thrown if Medit format is not supported.

Returns
Ensight name (acts as an identifier for Ensight).

◆ WriteEnsightFormat()

virtual void MoReFEM::GeometricElt::WriteEnsightFormat ( std::ostream & stream,
bool do_print_index ) const
pure virtual

◆ GetMeditIdentifier()

GmfKwdCod MoReFEM::GeometricElt::GetMeditIdentifier ( ) const

Medit-related methods.

Get the identifier Medit use to tag the geometric element.

An exception is thrown if Medit format is not supported.

Returns
Identifier.

◆ WriteMeditFormat()

virtual void MoReFEM::GeometricElt::WriteMeditFormat ( libmeshb_int mesh_index,
const std::unordered_map< ::MoReFEM::CoordsNS::index_from_mesh_file, int > & processor_wise_reindexing ) const
pure virtual

Write the geometric elementin Medit format.

Parameters
[in]mesh_indexIndex that was returned by Medit when the output file was opened.
[in]processor_wise_reindexingMedit requires the indexes run from 1 to Ncoord on each processor; this container maps the Coords index to the processor-wise one to write in the Medit file.

The method is indeed an underlying call to the Medit API.

Implemented in MoReFEM::Internal::GeomEltNS::TGeometricElt< TraitsRefGeomEltT >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron20 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron27 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Hexahedron8 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Point1 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle4 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle8 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Quadrangle9 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Segment2 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Segment3 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Tetrahedron10 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Tetrahedron4 >, MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Triangle3 >, and MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Triangle6 >.

◆ ReadMeditFormat()

virtual void MoReFEM::GeometricElt::ReadMeditFormat ( const FilesystemNS::File & medit_file,
const Coords::vector_shared_ptr & mesh_coords_list,
libmeshb_int libmesh_mesh_index,
std::size_t Ncoord_in_mesh,
int & reference_index )
pure virtual

Read the geometric element in Medit format.

Parameters
[in]libmesh_mesh_indexIndex that was returned by Medit when the input file was opened.
[in]Ncoord_in_meshTotal number of coord in the mesh. Used for a check upon file validity.
[out]reference_indexReference of the label, as libmesh int index. The calling function has the responsibility to use (or not) this value and Set the label pointer in GeometricElt object.
Parameters
[in]mesh_coords_listList of ALL Coords list built from the mesh.
[in]medit_fileFile being read.

The method is indeed an underlying call to the Medit API.

◆ SetCoordsList()

void MoReFEM::GeometricElt::SetCoordsList ( const Coords::vector_shared_ptr & mesh_coords_list,
std::vector< CoordsNS::index_from_mesh_file > && coords_indexes )
protected

Set the coord list from the vector given in input.

Parameters
[in]coords_indexesIndexes of the Coords to pick from mesh_coords_list.
Parameters
[in]mesh_coords_listList of ALL Coords list built from the mesh.

Beware: an error will be raised if the input vector size is not what is expected !

◆ SetInterfaceListBuilt()

template<InterfaceNS::Nature InterfaceT>
void MoReFEM::GeometricElt::SetInterfaceListBuilt ( )
protected

Tells the object edges or faces have been built.

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

Field Documentation

◆ index_

GeomEltNS::index_type MoReFEM::GeometricElt::index_ = NumericNS::UninitializedIndex<decltype(index_)>()
private

Index associated to the current geometric element.

This index is assumed to be unique for a given Mesh: no other geometric element should bear the same index (Mesh enforces that when the mesh is read).

This uniqueness is important: indexes are used to compare elements, and also to define a hash function when GeometricElt are put in an unordered_map.

However, a check upon the mesh is also required: same index might be used by two different meshes for two unrelated geometric elements.


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