MoReFEM
|
Polymorphic base of all interface classes. More...
#include <Interface.hpp>
Public Types | |
using | shared_ptr = std::shared_ptr<Interface> |
Alias to shared_ptr. | |
Public Member Functions | |
virtual InterfaceNS::Nature | GetNature () const noexcept=0 |
Nature of the Interface. | |
template<allow_reset_index AllowResetIndexT = allow_reset_index::no> | |
void | SetProgramWiseIndex (InterfaceNS::program_wise_index_type id) noexcept |
Set the identifier associated to this interface. | |
InterfaceNS::program_wise_index_type | GetProgramWiseIndex () const noexcept |
Get the identifier associated to this interface. | |
virtual const Coords::vector_shared_ptr & | GetCoordsList () const noexcept |
template<CoordsNS::index_enum TypeT> | |
std::vector< CoordsNS::index_type< TypeT > > | ComputeCoordsIndexList () const |
Compute the list of Coords indexes that belongs to the interface. | |
const LocalVector & | GetPseudoNormal () const noexcept |
Constant accessor on the pseudo-normal. | |
const std::unique_ptr< LocalVector > & | GetPseudoNormalPtr () const noexcept |
Constant accessor on the pointer of the pseudo-normal. | |
Special members. | |
Interface (const Coords::shared_ptr &coords) | |
Constructor for vertex. | |
template<class LocalContentT > | |
Interface (const LocalContentT &local_content, const Coords::vector_shared_ptr &coords_list_in_geom_elt) | |
Constructor for edges and faces. | |
Interface () | |
Empty constructor (for volumes). | |
virtual | ~Interface () |
Destructor. | |
Interface (const Interface &rhs)=delete | |
The copy constructor. | |
Interface (Interface &&rhs)=delete | |
The move constructor. | |
Interface & | operator= (const Interface &rhs)=delete |
The (copy) operator=. | |
Interface & | operator= (Interface &&rhs)=delete |
The (move) operator=. | |
Protected Member Functions | |
LocalVector & | GetNonCstPseudoNormal () noexcept |
Non constant accessor on the pseudo-normal. | |
Protected Attributes | |
std::unique_ptr< LocalVector > | pseudo_normal_ = nullptr |
Pseudo-normal of the interface. | |
Private Member Functions | |
void | SetCoordsList (const Coords::vector_shared_ptr &coords_list) |
Set coords_list_ and sort it so that the same interface used by another geometric element could match it. | |
Coords::vector_shared_ptr & | GetNonCstCoordsList () noexcept |
Non constant accessor to the underlying list of Coords. | |
Private Attributes | |
Coords::vector_shared_ptr | coords_list_ |
Coords that belongs to the edge_or_face. | |
InterfaceNS::program_wise_index_type | program_wise_index_ |
Facility which handles the indexes related to the Interface. | |
Friends | |
class | Internal::MeshNS::ComputeInterfaceListInMesh |
Polymorphic base of all interface classes.
Very little is defined here; definitions really occur in Internal::InterfaceNS::Interface class.
[internal]
This base class is special because we know for sure the number of final classes expected: Vertex, Edge, Face and Volume. That's why for instance there are some constructors here are already "specialized" for one of these cases.
|
explicit |
|
explicit |
Constructor for edges and faces.
LocalContentT | Type of the container or structure that represents the interface in the local topology. It is given by TopologyT::EdgeContent for the edges and TopologyT::FaceContent for the faces; where TopologyT is the topology of the GeometricElt for which the Interface is built. |
[in] | local_content | Integer values that represent the interface within the local topology. Is is one of the element of TopologyT::GetEdgeList() or TopologyT::GetFaceList() (see above for the meaning of TopologyT). |
[in] | coords_list_in_geom_elt | List of Coords objects within the GeometricElt for which the interface is built. |
|
explicit |
Empty constructor (for volumes).
Volume are apart: when they are built the index is already known as we know for sure each Volume is unique for each GeometricElt. Due to this close relationship, no Coords are stored within a Volume, as it would be a waste of space given the Coords can be retrieved through the GeometricElt object that shares the same index. Volume objects include weak pointers to its related GeometricElt so that Coords could be retrieved without duplication of data.
|
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. |
The (copy) operator=.
[in] | rhs | The object from which the affectation occurs. |
The (move) operator=.
[in] | rhs | The object from which the affectation occurs. |
|
pure virtualnoexcept |
Nature of the Interface.
Implemented in MoReFEM::Internal::InterfaceNS::TInterface< DerivedT, NatureT >, MoReFEM::Internal::InterfaceNS::TInterface< Edge, InterfaceNS::Nature::edge >, MoReFEM::Internal::InterfaceNS::TInterface< Face, InterfaceNS::Nature::face >, MoReFEM::Internal::InterfaceNS::TInterface< Vertex, InterfaceNS::Nature::vertex >, and MoReFEM::Internal::InterfaceNS::TInterface< Volume, InterfaceNS::Nature::volume >.
|
noexcept |
Set the identifier associated to this interface.
[in] | id | Identifier to be associated to the interface. Identifier is unique for all interfaces of the same nature: there should be for instance only one edge with id = 124. |
|
virtualnoexcept |
Get the list of Coords that belongs to the interface.
This methods is overridden only for Volume, as we do not store directly the Coords in this very specific case to avoid redundancy with the GeometricElt which already got them.
Reimplemented in MoReFEM::Volume.
std::vector< CoordsNS::index_type< TypeT > > MoReFEM::Interface::ComputeCoordsIndexList | ( | ) | const |
|
private |
Set coords_list_ and sort it so that the same interface used by another geometric element could match it.
The convention is to put first the Coords with the lower index, and then choose the rotation that put the lowest possible index in second. The index used to do so is the one used to define operator< for Coords class (i.e. the processor-wise one).
For instance let's consider quadrangle 3 5 1 10.
The lower is 1, and there are still two possibilities by rotating it:
This method is used only for faces and edges: it is obviously unrequired for vertices, and no Coords is stored for Volumes.
[in] | coords_list | List of Coords, not yet sort. |
[internal]
It is intended to be called only in Edge and Face constructor.
|
privatenoexcept |
|
friend |
|
private |
Coords that belongs to the edge_or_face.
The convention is that the first Coords is the one with the lowest index. The relative ordering is local_coords.
For instance, if (89, 42, 15) is read in Init(), (15, 89, 42) will be stored.
[internal]
This information is really important when the interfaces are built: it is the way we can figure out if a given interface already exist or not.
|
private |
Facility which handles the indexes related to the Interface.