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

Class in charge of the face interface. More...

#include <Volume.hpp>

Inheritance diagram for MoReFEM::Volume:
Collaboration diagram for MoReFEM::Volume:

Public Types

using shared_ptr = std::shared_ptr<Volume>
 Alias over shared_ptr.
 
using vector_shared_ptr = std::vector<shared_ptr>
 Alias over vector of shared_ptr.
 
using InterfaceMap = Utilities::PointerComparison::Map<Volume::shared_ptr, std::vector<const GeometricElt*>>
 Typedef useful when the vertices are built.
 

Public Member Functions

const Coords::vector_shared_ptrGetCoordsList () const noexcept override
 Get the list of coords that belongs to the interface.
 
void Print (std::ostream &stream) const
 Print the underlying coords list.
 
virtual::MoReFEM::InterfaceNS::Nature GetNature () const noexcept override final
 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.
 
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.
 Volume (const std::shared_ptr< GeometricElt > &geometric_elt)
 Constructor.
 
 ~Volume () override
 Destructor.
 
 Volume (const Volume &rhs)=delete
 The copy constructor.
 
 Volume (Volume &&rhs)=delete
 The move constructor.
 
Volumeoperator= (const Volume &rhs)=delete
 The (copy) operator=.
 
Volumeoperator= (Volume &&rhs)=delete
 The (move) operator=.
 

Static Public Member Functions

static const std::string & ClassName ()
 Name of the class.
 
static constexpr enum::MoReFEM::InterfaceNS::Nature StaticNature ()
 Nature of the Interface as a static method.
 

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.
 

Static Private Member Functions

static std::map< MeshNS::unique_id, std::size_t > & NvolumePerMesh ()
 Number of volumes built so far for each mesh.
 

Private Attributes

std::weak_ptr< GeometricEltgeometric_elt_
 Pointer to the geometric element in which the Volume is built.
 
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.
 

Detailed Description

Class in charge of the face interface.

Member Typedef Documentation

◆ InterfaceMap

Typedef useful when the vertices are built.

Contrary to the other interfaces, comparison below use up the natural ordering of volumes: the index of a Volume may be assigned during construction (it is the same as the GeometricElt's). We could have done the same as in other interfaces, bt it would have been uselessly memory consuming: we would have to create many pointers for each Volume, whereas the same information can simply be stored within a single index.

Constructor & Destructor Documentation

◆ Volume() [1/3]

MoReFEM::Volume::Volume ( const std::shared_ptr< GeometricElt > & geometric_elt)
explicit

Constructor.

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.

Parameters
[in]geometric_eltThe GeometricElt upom which the Volume interface is built.

◆ Volume() [2/3]

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

The copy constructor.

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

◆ Volume() [3/3]

MoReFEM::Volume::Volume ( Volume && rhs)
delete

The move constructor.

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

Member Function Documentation

◆ operator=() [1/2]

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

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

The (move) operator=.

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

◆ GetCoordsList()

const Coords::vector_shared_ptr & MoReFEM::Volume::GetCoordsList ( ) const
overridevirtualnoexcept

Get the list of coords that belongs to the interface.

Reimplemented from MoReFEM::Interface.

◆ NvolumePerMesh()

static std::map< MeshNS::unique_id, std::size_t > & MoReFEM::Volume::NvolumePerMesh ( )
staticprivate

Number of volumes built so far for each mesh.

[internal] This is a purely internal attribute used in volume creation; should not be used outside of Volume.cpp!

Key is the identifier of the mesh. Value if the number of volumes built so far for each mesh.

Returns
Number of Volume interfaces built for each mesh (represented here by their unique identifiers).

◆ Print()

void MoReFEM::Internal::InterfaceNS::TInterface< Volume , NatureT >::Print ( std::ostream & stream) const
inherited

Print the underlying coords list.

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

◆ GetNature()

virtual::MoReFEM::InterfaceNS::Nature MoReFEM::Internal::InterfaceNS::TInterface< Volume , NatureT >::GetNature ( ) const
finaloverridevirtualnoexceptinherited

Nature of the Interface.

Implements MoReFEM::Interface.

◆ SetProgramWiseIndex()

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

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.

◆ ComputeCoordsIndexList()

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

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)
privateinherited

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 ( )
privatenoexceptinherited

Non constant accessor to the underlying list of Coords.

Returns
Non constant access to the underlying list of Coords.

Field Documentation

◆ geometric_elt_

std::weak_ptr<GeometricElt> MoReFEM::Volume::geometric_elt_
private

Pointer to the geometric element in which the Volume is built.

[internal] For volumes, it would be needlessly costly to store all the Coords as it is done for the other types of interfaces, hence the pointer below that allows to avoid entirely the duplication of the information. Volume class shouldn't try to delete this pointer; it is handled elsewhere.

◆ coords_list_

Coords::vector_shared_ptr MoReFEM::Interface::coords_list_
privateinherited

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_
privateinherited
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: