MoReFEM
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends
MoReFEM::Interface Class Referenceabstract

Polymorphic base of all interface classes. More...

#include <Interface.hpp>

Inheritance diagram for MoReFEM::Interface:
Collaboration diagram for MoReFEM::Interface:

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_ptrGetCoordsList () 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 LocalVectorGetPseudoNormal () 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.
 
Interfaceoperator= (const Interface &rhs)=delete
 The (copy) operator=.
 
Interfaceoperator= (Interface &&rhs)=delete
 The (move) operator=.
 

Protected Member Functions

LocalVectorGetNonCstPseudoNormal () noexcept
 Non constant accessor on the pseudo-normal.
 

Protected Attributes

std::unique_ptr< LocalVectorpseudo_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_ptrGetNonCstCoordsList () 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
 

Detailed Description

Polymorphic base of all interface classes.

Very little is defined here; definitions really occur in Internal::InterfaceNS::Interface class.

Attention
It must be noted that OrientedEdge and OrientedFace are NOT derived from this class: they are separate objects which are built upon (by composition) respectively Edge and Face which are Interface.

[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.

Constructor & Destructor Documentation

◆ Interface() [1/5]

MoReFEM::Interface::Interface ( const Coords::shared_ptr & coords)
explicit

Constructor for vertex.

Parameters
[in]coordsCoords object associated to the Vertex interface.

◆ Interface() [2/5]

template<class LocalContentT >
MoReFEM::Interface::Interface ( const LocalContentT & local_content,
const Coords::vector_shared_ptr & coords_list_in_geom_elt )
explicit

Constructor for edges and faces.

Template Parameters
LocalContentTType 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.
Parameters
[in]local_contentInteger 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_eltList of Coords objects within the GeometricElt for which the interface is built.

◆ Interface() [3/5]

MoReFEM::Interface::Interface ( )
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.

◆ Interface() [4/5]

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

The copy constructor.

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

◆ Interface() [5/5]

MoReFEM::Interface::Interface ( Interface && rhs)
delete

The move constructor.

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

Member Function Documentation

◆ operator=() [1/2]

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

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

The (move) operator=.

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

◆ GetNature()

virtual InterfaceNS::Nature MoReFEM::Interface::GetNature ( ) const
pure virtualnoexcept

◆ SetProgramWiseIndex()

template<allow_reset_index AllowResetIndexT = allow_reset_index::no>
void MoReFEM::Interface::SetProgramWiseIndex ( InterfaceNS::program_wise_index_type id)
noexcept

Set the identifier associated to this interface.

Parameters
[in]idIdentifier 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.

◆ GetCoordsList()

virtual const Coords::vector_shared_ptr & MoReFEM::Interface::GetCoordsList ( ) const
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.

◆ ComputeCoordsIndexList()

template<CoordsNS::index_enum TypeT>
std::vector< CoordsNS::index_type< TypeT > > MoReFEM::Interface::ComputeCoordsIndexList ( ) const

Compute the list of Coords indexes that belongs to the interface.

Template Parameters
TypeTThe type of Coords index requested.
Returns
List of Coords indexes that belongs to the interface.

This method should not be used that much; that is the reason a return by copy has been adopted here.

◆ SetCoordsList()

void MoReFEM::Interface::SetCoordsList ( const Coords::vector_shared_ptr & coords_list)
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:

  • 1 10 3 5
  • 1 5 3 10 The latter is chosen because 5 is lower than 10.

This method is used only for faces and edges: it is obviously unrequired for vertices, and no Coords is stored for Volumes.

Parameters
[in]coords_listList of Coords, not yet sort.

[internal] It is intended to be called only in Edge and Face constructor.

◆ GetNonCstCoordsList()

Coords::vector_shared_ptr & MoReFEM::Interface::GetNonCstCoordsList ( )
privatenoexcept

Non constant accessor to the underlying list of Coords.

Returns
Non constant access to the underlying list of Coords.

Friends And Related Symbol Documentation

◆ Internal::MeshNS::ComputeInterfaceListInMesh

Friendship to the utility class which reorder properly the Coords in the Interface after the reduction occurred.

Field Documentation

◆ coords_list_

Coords::vector_shared_ptr MoReFEM::Interface::coords_list_
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.

◆ program_wise_index_

InterfaceNS::program_wise_index_type MoReFEM::Interface::program_wise_index_
private
Initial value:
=
NumericNS::UninitializedIndex<InterfaceNS::program_wise_index_type>()

Facility which handles the indexes related to the Interface.


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