MoReFEM
|
A Tetrahedron4 geometric element read in a mesh. More...
#include <Tetrahedron4.hpp>
Public Types | |
using | self |
Convenient alias. | |
using | MeditSupport |
Object that store the information about Medit support. | |
using | EnsightSupport |
Object that store the information about Ensight support. | |
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 | |
Tetrahedron4 (MeshNS::unique_id mesh_unique_id) | |
Minimal constructor: only the Mesh for which the current geometric element is created is provided. | |
Tetrahedron4 (MeshNS::unique_id mesh_unique_id, const Coords::vector_shared_ptr &mesh_coords_list, std::istream &stream) | |
Constructor from stream: The indexes related to Ncoords (as defined in enum) are read in the stream and object is built from them. | |
Tetrahedron4 (MeshNS::unique_id mesh_unique_id, const Coords::vector_shared_ptr &mesh_coords_list, std::vector<::MoReFEM::CoordsNS::index_from_mesh_file > &&coords_index_list) | |
Constructor from vector of coords index. | |
~Tetrahedron4 () override | |
Destructor. | |
Tetrahedron4 (const Tetrahedron4 &rhs)=delete | |
The copy constructor. | |
Tetrahedron4 (Tetrahedron4 &&rhs)=delete | |
The move constructor. | |
Tetrahedron4 & | operator= (const Tetrahedron4 &rhs)=delete |
The (copy) operator=. | |
Tetrahedron4 & | operator= (Tetrahedron4 &&rhs)=delete |
The (move) operator=. | |
virtual const RefGeomElt & | GetRefGeomElt () const override final |
Reference geometric element. | |
virtual Advanced::GeometricEltEnum | GetIdentifier () const override final |
Get the identifier of the geometric element. | |
virtual const Advanced::GeomEltNS::GenericName & | GetName () const override final |
Get the name of the geometric element. | |
virtual std::size_t | Ncoords () const override final |
Get the number of Coords object required to characterize completely a GeometricElt of this type. | |
virtual std::size_t | Nvertex () const override final |
Get the number of summits. | |
virtual std::size_t | Nface () const override final |
Get the number of faces. | |
virtual std::size_t | Nedge () const override final |
Get the number of edges. | |
virtual std::size_t | GetDimension () const override final |
Get the dimension of the geometric element. | |
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_ptr & | GetCoordsList () const noexcept |
Get the coords as a vector. | |
const Coords & | GetCoord (std::size_t i) const |
const Vertex::vector_shared_ptr & | GetVertexList () const noexcept |
Return the list of vertice. | |
const OrientedEdge::vector_shared_ptr & | GetOrientedEdgeList () const |
Return the list of edges. | |
const OrientedFace::vector_shared_ptr & | GetOrientedFaceList () 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. | |
Ensight-related methods. | |
virtual void | WriteEnsightFormat (std::ostream &stream, bool do_print_index) const override final |
Write the geometric element in Ensight format. | |
Static Public Member Functions | |
static constexpr Advanced::GeometricEltEnum | Identifier () |
Returns the identifier of the geometric reference element (for instance 'Tria3') | |
Static Private Member Functions | |
static const RefGeomEltNS::Tetrahedron4 & | StaticRefGeomElt () |
Reference geometric element. | |
Shape function methods. | |
virtual double | ShapeFunction (LocalNodeNS::index_type local_node_index, const LocalCoords &local_coords) const override final |
Shape function call. | |
virtual double | FirstDerivateShapeFunction (LocalNodeNS::index_type local_node_index, Advanced::ComponentNS::index_type component, const LocalCoords &local_coords) const override final |
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 override final |
Second derivate of the shape function call. | |
virtual void | BuildVertexList (const GeometricElt *geom_elt_ptr, Vertex::InterfaceMap &existing_list) override final |
Build the list of all vertices that belongs to the geometric element. | |
virtual void | BuildEdgeList (const GeometricElt *geom_elt_ptr, Edge::InterfaceMap &existing_list) override final |
Build the list of all edges that belongs to the geometric element. | |
virtual void | BuildFaceList (const GeometricElt *geom_elt_ptr, Face::InterfaceMap &existing_list) override final |
Build the list of all faces that belongs to the geometric element. | |
virtual void | BuildVolumeList (const GeometricElt *geom_elt_ptr, Volume::InterfaceMap &existing_list) override final |
Build the pointer to the volume if there is one to consider as interface. | |
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 override final |
Write the geometric element in Medit format. | |
virtual void | ReadMeditFormat (const ::MoReFEM::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) override final |
Read the geometric element in Medit format. | |
void | StaticAssertBuiltInConsistency () |
Assert at compile time that the number of coordinates in shape functions is consistent with the topological dimension. | |
Shape function methods. | |
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. | |
const Advanced::GeomEltNS::EnsightName & | GetEnsightName () const |
Ensight-related methods. | |
GmfKwdCod | GetMeditIdentifier () const |
Medit-related 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. | |
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. | |
A Tetrahedron4 geometric element read in a mesh.
We are not considering here a generic Tetrahedron4 object (that's the role of MoReFEM::RefGeomEltNS::Tetrahedron4), but rather a specific geometric element of the mesh, with for instance the coordinates of its coord, the list of its interfaces and so forth.
|
inherited |
Object that store the information about Medit support.
This object inherits from std::true_type if Medit is supported, std::false_type otherwise.
|
inherited |
Object that store the information about Ensight support.
This object inherits from std::true_type if Ensight is supported, std::false_type otherwise.
|
explicit |
Minimal constructor: only the Mesh for which the current geometric element is created is provided.
[in] | mesh_unique_id | Unique identifier of the mesh (which is what is returned by Mesh::GetUniqueId() method). |
|
explicit |
Constructor from stream: The indexes related to Ncoords (as defined in enum) are read in the stream and object is built from them.
This constructor expected integers from stream: it is to be used in formats in which Coords are read first and then their indexes are used to define all the GeometricElt.
[in] | mesh_unique_id | Unique identifier of the mesh (which is what is returned by Mesh::GetUniqueId() method). |
[in] | mesh_coords_list | List of ALL Coords list built from the mesh. |
[in,out] | stream | Stream from which the coordinates of the GeometricElt are read. |
|
explicit |
Constructor from vector of coords index.
[in] | mesh_unique_id | Unique identifier of the mesh (which is what is returned by Mesh::GetUniqueId() method). |
|
delete |
The copy constructor.
[in] | rhs | The object from which the construction occurs. |
|
delete |
The move constructor.
[in] | rhs | The object from which the construction occurs. |
|
delete |
The (copy) operator=.
[in] | rhs | The object from which the affectation occurs. |
|
delete |
The (move) operator=.
[in] | rhs | The object from which the affectation occurs. |
|
finaloverridevirtual |
Reference geometric element.
Implements MoReFEM::Internal::GeomEltNS::TGeometricElt< RefGeomEltNS::Traits::Tetrahedron4 >.
|
finaloverridevirtualinherited |
Get the identifier of the geometric element.
Implements MoReFEM::GeometricElt.
|
finaloverridevirtualinherited |
Get the name of the geometric element.
Implements MoReFEM::GeometricElt.
|
finaloverridevirtualinherited |
Get the number of Coords object required to characterize completely a GeometricElt of this type.
For instance 27 for an Hexahedron27.
Implements MoReFEM::GeometricElt.
|
finaloverridevirtualinherited |
Get the number of summits.
Implements MoReFEM::GeometricElt.
|
finaloverridevirtualinherited |
Get the number of faces.
Implements MoReFEM::GeometricElt.
|
finaloverridevirtualinherited |
Get the number of edges.
Implements MoReFEM::GeometricElt.
|
finaloverridevirtualinherited |
Get the dimension of the geometric element.
Implements MoReFEM::GeometricElt.
|
finaloverridevirtualinherited |
Shape function call.
[in] | local_node_index | Index of the local node considered. |
[in] | local_coords | Local coordinates at which the shape function is applied. |
Implements MoReFEM::GeometricElt.
|
finaloverridevirtualinherited |
First derivate of the shape function call.
[in] | local_node_index | Index of the local node considered. |
[in] | local_coords | Local coordinates at which the shape function is applied. |
[in] | component | Component of the derivate considered. |
Implements MoReFEM::GeometricElt.
|
finaloverridevirtualinherited |
Second derivate of the shape function call.
[in] | local_node_index | Index of the local node considered. |
[in] | local_coords | Local coordinates at which the shape function is applied. |
[in] | component1 | Component of the first derivate considered. |
[in] | component2 | Component of the second derivate considered. |
Implements MoReFEM::GeometricElt.
|
finaloverrideprivatevirtualinherited |
Build the list of all vertices that belongs to the geometric element.
[in,out] | existing_list | List 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. |
[in] | geom_elt_ptr | Pointer 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. |
Implements MoReFEM::GeometricElt.
|
finaloverrideprivatevirtualinherited |
Build the list of all edges that belongs to the geometric element.
[in,out] | existing_list | List 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. |
[in] | geom_elt_ptr | Pointer 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. |
Implements MoReFEM::GeometricElt.
|
finaloverrideprivatevirtualinherited |
Build the list of all faces that belongs to the geometric element.
[in,out] | existing_list | List 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. |
[in] | geom_elt_ptr | Pointer 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. |
Implements MoReFEM::GeometricElt.
|
finaloverrideprivatevirtualinherited |
Build the pointer to the volume if there is one to consider as interface.
[in] | geom_elt_ptr | Pointer 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_list | This list is mostly there for genericity, so that same C++ interface might be used for all 4 kind of interfaces. It is not used however as a searching way to see if the interface already exist or not: by nature a Volume interface can appear only once for its related GeometricElt. |
Implements MoReFEM::GeometricElt.
|
finaloverridevirtualinherited |
Write the geometric element in Ensight format.
[in,out] | stream | Stream upon which object information are written. |
do_print_index | True if the geometric elementis preceded by its internal index. |
Implements MoReFEM::GeometricElt.
|
finaloverridevirtualinherited |
Write the geometric element in Medit format.
[in] | mesh_index | Index that was returned by Medit when the output file was opened. |
[in] | processor_wise_reindexing | Medit 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.
Implements MoReFEM::GeometricElt.
|
finaloverridevirtualinherited |
Read the geometric element in Medit format.
[in] | libmesh_mesh_index | Index that was returned by Medit when the input file was opened. |
[in] | Ncoord_in_mesh | Total number of coord in the mesh. Used for a check upon file validity. |
[out] | reference_index | Reference 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. |
[in] | mesh_coords_list | List of ALL Coords list built from the mesh. |
[in] | medit_file | File being read. |
The method is indeed an underlying call to the Medit API.
|
pure virtualinherited |
Read the geometric element in Medit format.
[in] | libmesh_mesh_index | Index that was returned by Medit when the input file was opened. |
[in] | Ncoord_in_mesh | Total number of coord in the mesh. Used for a check upon file validity. |
[out] | reference_index | Reference 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. |
[in] | mesh_coords_list | List of ALL Coords list built from the mesh. |
[in] | medit_file | File being read. |
The method is indeed an underlying call to the Medit API.
|
noexceptinherited |
Mutator to the GeometricElt index.
[in] | index | New index to set. |
|
inlineinherited |
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.
|
noexceptinherited |
Get the identifier of the mesh.
You shouldn't have to use this: it is used mostly to implement the comparison operators.
|
noexceptinherited |
Set the label.
[in] | mesh_label | MeshLabel associated to the current GeometricElt. |
|
inherited |
Get the ith coords index.
i | Index of the sought Coords object used to define the geometric element. |
|
noexceptinherited |
Return the list of vertice.
|
inherited |
Return the list of edges.
This method assumes the edges were already built by the mesh; if not an exception is thrown.
|
inherited |
Return the list of faces.
This method assumes the faces were already built by the mesh; if not an exception is thrown.
|
inherited |
Return the volume (as an interface).
This method assumes the volume were already built by the mesh; if not an exception is thrown.
|
inherited |
Set the list of vertice.
[in] | vertex_list | List of Vertex related to the geometric element. |
|
inherited |
Set the list of edges (with their orientation).
[in] | edge_list | List of OrientedEdge related to the geometric element. |
|
inherited |
Set the list of faces (with their orientation).
[in] | face_list | List of OrientedFace related to the geometric element. |
|
inherited |
Set the volume interface.
[in] | volume | New value to set. |
|
inherited |
Build a new interface, regardless of the orientation.
InterfaceT | Interface type, which derives from Interface base class. Choices are among { Vertex, Edge, Face, Volume }. |
[in] | geom_elt_ptr | Pointer 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_list | List 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. |
|
inherited |
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.
|
inherited |
Medit-related methods.
Get the identifier Medit use to tag the geometric element.
An exception is thrown if Medit format is not supported.
|
protectedinherited |
|
protectedinherited |
|
privateinherited |
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.