MoReFEM
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
MoReFEM::FEltSpace Class Referencefinal

The class in charge of most of the interaction with nodes, dofs and unknowns. More...

#include <FEltSpace.hpp>

Inheritance diagram for MoReFEM::FEltSpace:
Collaboration diagram for MoReFEM::FEltSpace:

Public Types

using unique_ptr = std::unique_ptr<FEltSpace>
 Alias over unique_ptr.
 
using vector_unique_ptr = std::vector<unique_ptr>
 Alias over a vector of unique_ptr.
 
using unique_id_parent = Crtp::UniqueId<FEltSpace, FEltSpaceNS::unique_id, UniqueIdNS::AssignationMode::manual>
 Convenient alias to one of the parent.
 
using underlying_type
 Type used for the unique id.
 

Public Member Functions

void InitLocal2Global (DoConsiderProcessorWiseLocal2Global do_consider_processor_wise_local_2_global)
 Init the local2global array for each combination LocalFEltSpace/numbering subset.
 
void MoveMesh (const GlobalVector &vector) const
 Use the output of the finite element space to move a mesh.
 
void MoveMeshFromInitialPosition (const GlobalVector &vector) const
 Exactly the same as MoveMesh except that the displacement is applied upon the initial position of the mesh.
 
void ComputeLocal2Global (const ExtendedUnknown::vector_const_shared_ptr &extended_unknown_list, DoComputeProcessorWiseLocal2Global do_compute_processor_wise_local_2_global) const
 Compute the local2global array required by a given global variational operator.
 
void ComputeLocal2Global (ExtendedUnknown::const_shared_ptr &&extended_unknown_ptr, DoComputeProcessorWiseLocal2Global do_compute_processor_wise_local_2_global) const
 Compute the local2global array required by a given global variational operator.
 
bool IsEmpty () const noexcept
 Return true if the FEltSpace doesn't include any finite element.
 
template<RoleOnProcessor RoleOnProcessorT>
const LocalFEltSpacePerRefLocalFEltSpaceGetLocalFEltSpacePerRefLocalFEltSpace () const noexcept
 Get the list of local finite element spaces sort per finite element type.
 
template<RoleOnProcessor RoleOnProcessorT>
const LocalFEltSpacePerRefLocalFEltSpaceGetLocalFEltSpacePerRefLocalFEltSpace (const Domain &domain) const
 Get the list of local finite element spaces sort per finite element type for a given domain.
 
const LocalFEltSpaceGetLocalFEltSpace (const GeometricElt &geometric_elt) const
 Get the local felt space that matches a given geometric_elt.
 
const LocalFEltSpace::per_geom_elt_indexGetLocalFEltSpaceList (const RefGeomElt &ref_geom_elt) const
 Get the list of local finite element spaces sort for a given ref_geom_elt.
 
const Dof::vector_shared_ptrGetProcessorWiseDofList () const noexcept
 Get the list of processor-wise dofs covered by the finite element space.
 
const Dof::vector_shared_ptrGetGhostDofList () const noexcept
 Get the list of ghost dofs covered by the finite element space.
 
std::size_t NprocessorWiseDof () const noexcept
 Returns the number of processor-wise Dof,.
 
std::size_t NghostDof () const noexcept
 Returns the number of ghost Dof,.
 
std::size_t NprocessorWiseDof (const NumberingSubset &numbering_subset) const
 Returns the number of processor-wise Dof for given numbering_subset.
 
std::size_t NprogramWiseDof (const NumberingSubset &numbering_subset) const
 Returns the number of program-wise Dof for given numbering_subset.
 
Dof::vector_shared_ptr GetProcessorWiseDofList (const NumberingSubset &numbering_subset) const
 Get the list of processor-wise dofs covered by the finite element space and inside given numbering subset.
 
bool DoCoverNumberingSubset (const NumberingSubset &numbering_subset) const
 Check whether numbering_subset is covered in the finite element space.
 
std::size_t GetDimension () const noexcept
 Returns the dimension considered within the FEltSpace.
 
std::size_t GetMeshDimension () const
 Returns the dimension of the mesh (read from the GodOfDof).
 
std::shared_ptr< const GodOfDofGetGodOfDofFromWeakPtr () const
 Access to the enclosing GodOfDof.
 
const ExtendedUnknown::vector_const_shared_ptrGetExtendedUnknownList () const noexcept
 List of all the pairs of unknowns and numbering subset.
 
const NumberingSubsetGetNumberingSubset (const Unknown &unknown) const
 
const NumberingSubset::const_shared_ptrGetNumberingSubsetPtr (const Unknown &unknown) const
 
const ExtendedUnknownGetExtendedUnknown (const Unknown &unknown) const
 
ExtendedUnknown::const_shared_ptr GetExtendedUnknownPtr (const Unknown &unknown) const
 
const NumberingSubset::vector_const_shared_ptrGetNumberingSubsetList () const noexcept
 Get the list of numbering subset.
 
void ClearTemporaryData () const noexcept
 Clear the temporary data used to build properly the Internal::FEltNS::Local2GlobalStorage objects.
 
const QuadratureRulePerTopologyGetQuadratureRulePerTopology () const noexcept
 Constant accessor to the list of default quadrature rules to use in operators for which no rule has been specified.
 
const QuadratureRulePerTopologyGetQuadratureRulePerTopologyRawPtr () const noexcept
 Constant accessor to the list of default quadrature rules to use in operators for which no rule has been specified.
 
const DomainGetDomain () const noexcept
 
const Wrappers::MpiGetMpi () const noexcept
 
std::mutex & GetMutex () const
 
FEltSpaceNS::unique_id GetUniqueId () const
 Get the value of the internal unique ID.
 
Special members.
 FEltSpace (const std::shared_ptr< const GodOfDof > &god_of_dof_ptr, const Domain &domain, FEltSpaceNS::unique_id unique_id, ExtendedUnknown::vector_const_shared_ptr &&extended_unknown_list)
 Constructor.
 
 ~FEltSpace ()=default
 Destructor.
 
 FEltSpace (FEltSpace &rhs)=delete
 The copy constructor.
 
 FEltSpace (FEltSpace &&rhs)=delete
 The move constructor.
 
FEltSpaceoperator= (FEltSpace &rhs)=delete
 The (copy) operator=.
 
FEltSpaceoperator= (FEltSpace &&rhs)=delete
 The (move) operator=.
 

Static Public Member Functions

static const std::string & ClassName ()
 Name of the class.
 
static FEltSpaceNS::unique_id GenerateNewEligibleId ()
 Generate a unique id.
 
static void ClearUniqueIdList ()
 Clear all unique ids.
 

Data Fields

friend GodOfDof
 Friendship to GodOfDof (which stores the FEltSpace defined on its related mesh).
 

Private Member Functions

void Reduce (const Internal::FEltSpaceNS::AssignGeomEltToProcessor &assign_geom_elt_to_processor)
 Reduce the LocalFEltSpace to processor-wise and ghost.
 
std::size_t ComputeMaxOrderFElt () const
 Compute the maximal order of the finite elements present in the FEltSpace.
 
void ComputeDofList (const std::vector< DofNS::unique_id > &dof_unique_id_list)
 Compute the list of dofs from the one available in the GodOfDof.
 
template<RoleOnProcessor RoleOnProcessorT>
std::size_t FillLocalFEltSpaceList (const Mesh &mesh, const Domain &domain, const Internal::RefFEltNS::RefLocalFEltSpace &ref_local_felt_space, LocalFEltSpace::per_geom_elt_index &local_felt_space_list) const
 Fill the local finite element space list.
 
void ClearDofLists ()
 Clear both processor-wise and ghost Dof lists.
 
const LocalFEltSpace::per_geom_elt_indexGetLocalFEltSpaceList (const Internal::RefFEltNS::RefLocalFEltSpace &ref_felt_space) const
 Get the list of local finite element spaces sort for a given RefLocalFEltSpace.
 
void ComputeDofList ()
 Sift through the GodOfDof lists and fill the lists of processor-wise and ghost Dof, and also the NdofHolder object.
 
const Internal::RefFEltNS::RefLocalFEltSpaceGetRefLocalFEltSpace (const RefGeomElt &ref_geom_elt) const
 Get the reference finite element space related to a given ref_geom_elt.
 
Dof::vector_shared_ptrGetNonCstProcessorWiseDofList () noexcept
 Non constant accessor to list of processor-wise Dof

.
 
Dof::vector_shared_ptrGetNonCstGhostDofList () noexcept
 Non constant accessor to list of ghost Dof

.
 
void SetFEltList (const Mesh &mesh, const Domain &domain)
 Prepare the finite element list from the mesh and the domain.
 
void SetMovemeshData ()
 Compute data required for movemesh if relevant.
 
const Internal::FEltSpaceNS::StorageGetFEltStorage () const noexcept
 Get access to the object in charge of finite element storage.
 
Internal::FEltSpaceNS::StorageGetNonCstFEltStorage () noexcept
 Get non constant access to the object in charge of finite element storage.
 
void AssertGodOfDofInitialized () const
 Assert GodOfDof has been properly initialized.
 
const std::map< NumberingSubsetNS::unique_id, Internal::FEltSpaceNS::MovemeshHelper > & GetMovemeshHelperStorage () const noexcept
 Access to useful data when a mesh must be moved according to (felt_space, numbering subset) data.
 
std::map< NumberingSubsetNS::unique_id, Internal::FEltSpaceNS::MovemeshHelper > & GetNonCstMovemeshHelperStorage () noexcept
 Access to useful data when a mesh must be moved according to (felt_space, numbering subset) data.
 
const Internal::FEltSpaceNS::MovemeshHelperGetMovemeshHelper (const GlobalVector &vector) const
 
const Internal::FEltSpaceNS::NdofHolderGetNdofHolder () const noexcept
 Accessor to NdofHolder.
 

Static Private Member Functions

static FEltSpaceNS::unique_id AssignUniqueId ()
 If AssignationMode is automatic, generates a new unique identifier.
 
static FEltSpaceNS::unique_id NewUniqueId (FEltSpaceNS::unique_id new_unique_id)
 If AssignationMode is manual, checks the unique identifier provided is valid.
 
static std::set< FEltSpaceNS::unique_id > & StaticUniqueIdList ()
 List of all identifiers existing for DerivedT.
 

Private Attributes

Internal::FEltSpaceNS::Storage::const_unique_ptr felt_storage_ = nullptr
 Object in charge of storing the finite elements in an efficient way so that access is as fast as possible.
 
std::size_t dimension_ = NumericNS::UninitializedIndex<std::size_t>()
 Dimension considered within the FEltSpace.
 
std::weak_ptr< const GodOfDofgod_of_dof_
 Weak pointer to the enclosing God of dof.
 
const Domaindomain_
 
const ExtendedUnknown::vector_const_shared_ptr extended_unknown_list_
 List of all the pairs of unknowns and numbering subset.
 
const NumberingSubset::vector_const_shared_ptr numbering_subset_list_
 List of numbering subsets considered.
 
std::map< NumberingSubsetNS::unique_id, Internal::FEltSpaceNS::MovemeshHelpermovemesh_helper_data_
 Data that helps to move efficiently a mesh.
 
Dof::vector_shared_ptr dof_list_
 List of processor-wise dofs (ghost excluded).
 
Dof::vector_shared_ptr ghost_dof_list_
 List of ghost dofs.
 
Internal::FEltSpaceNS::NdofHolder::const_unique_ptr Ndof_holder_ = nullptr
 Objects that counts the number of dofs in several configurations.
 
bool are_dof_list_computed_ = false
 Helper data attribute to check some methods are not called unduly before the Dof lists are computed.
 
QuadratureRulePerTopology::const_unique_ptr default_quadrature_rule_per_topology_ = nullptr
 List of default quadrature rules to use in operators for which no rule has been specified.
 
const Wrappers::Mpimpi_
 Mpi object.
 
std::unique_ptr< std::mutex > mutex_
 Mutex object.
 
const FEltSpaceNS::unique_id unique_id_
 The value of the unique id for the current DerivedT object.
 

Friends

struct Internal::FEltSpaceNS::ReduceToProcessorWise
 
class Internal::FEltSpaceNS::AssignGeomEltToProcessor
 Friendship to helper class during partitioning.
 
template<class DerivedT , class ElementaryInterpolatorT >
class ConformInterpolatorNS::LagrangianNS::LagrangianInterpolator
 Friendship to interpolator to allow access to RefLocalFEltSpace.
 
class ConformInterpolatorNS::LagrangianNS::LocalLagrangianInterpolator
 Friendship to interpolator to allow access to RefLocalFEltSpace.
 
template<ParameterNS::Type TypeT, TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, std::size_t Ndim>
class ParameterNS::Policy::AtDof
 Friendship to AtDof parameter policy, which requires access to BasicRefFElt ShapeFunction() method.
 
template<ParameterNS::Type TypeT, TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, std::size_t Ndim>
class ParamAtDof
 Friendship to AtDof parameter policy, which requires access to BasicRefFElt ShapeFunction() method.
 

Detailed Description

The class in charge of most of the interaction with nodes, dofs and unknowns.

Warning
The actual content of the FEltSpace is not filled until its GodOfDof Init() method has been called! All finite element spaces must therefore be defined at this specific stage...

Constructor & Destructor Documentation

◆ FEltSpace() [1/3]

MoReFEM::FEltSpace::FEltSpace ( const std::shared_ptr< const GodOfDof > & god_of_dof_ptr,
const Domain & domain,
FEltSpaceNS::unique_id unique_id,
ExtendedUnknown::vector_const_shared_ptr && extended_unknown_list )
explicit

Constructor.

Parameters
[in]domainGeometric domain upon which the finite element space is defined.
[in]god_of_dof_ptrShared pointer to the enclosing god of dof; a weak pointer will be kept inside current class.
[in]unique_idUnique identifier of the finite element space. This is under this identifier that the finite element space is defined in the input data file.
[in]extended_unknown_listList of couples (Unknown, NumberingSubset) considered within the finite element space.

◆ FEltSpace() [2/3]

MoReFEM::FEltSpace::FEltSpace ( FEltSpace & rhs)
delete

The copy constructor.

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

◆ FEltSpace() [3/3]

MoReFEM::FEltSpace::FEltSpace ( FEltSpace && rhs)
delete

The move constructor.

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

Member Function Documentation

◆ operator=() [1/2]

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

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

The (move) operator=.

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

◆ InitLocal2Global()

void MoReFEM::FEltSpace::InitLocal2Global ( DoConsiderProcessorWiseLocal2Global do_consider_processor_wise_local_2_global)

Init the local2global array for each combination LocalFEltSpace/numbering subset.

This method must be called before ComputeLocal2Global() one, which actually uses up what is computed here to compute the local2global array related to a subset of unknowns.

Parameters
[in]do_consider_processor_wise_local_2_globalIf no, only the program-wise local2global array is computed. If yes, both program- and processor-wise ones are computed. By default it is no: some global operators don't need it so it's best to avoid cluttering memory when it doesn't matter.

◆ MoveMesh()

void MoReFEM::FEltSpace::MoveMesh ( const GlobalVector & vector) const

Use the output of the finite element space to move a mesh.

Relevant only for numbering subsets for which do_move_mesh is true.

Parameters
[in]vectorVector which values will be used to move the coords. The numbering subset used is derived from this vector as well.

The mesh moved here is the one covered by the god of dof that includes the finite element space.

◆ MoveMeshFromInitialPosition()

void MoReFEM::FEltSpace::MoveMeshFromInitialPosition ( const GlobalVector & vector) const

Exactly the same as MoveMesh except that the displacement is applied upon the initial position of the mesh.

Parameters
[in]vectorVector which values will be used to move the coords. The numbering subset used is derived from this vector as well.

◆ Reduce()

void MoReFEM::FEltSpace::Reduce ( const Internal::FEltSpaceNS::AssignGeomEltToProcessor & assign_geom_elt_to_processor)
private

Reduce the LocalFEltSpace to processor-wise and ghost.

Attention
The Dof are NOT yet reduced here; this is done just a bit later. To avoid ambiguity, the Dof lists are cleared in current method; it has to be reinitiated once the reduction is fully performed for the GodOfDof. You shouldn't have to bother with this unless you're a library developer and meddling with GodOfDof initialization - the only moment this method should be used.
Parameters
[in]assign_geom_elt_to_processorAn helper object which keeps track of the choices for all GeometricElt. This helper object is used for all FEltSpace of a given GodOfDof - meaning that the processor choice for a given GeometricElt is the same for all the LocalFEltSpace to which it is related.

◆ ComputeLocal2Global() [1/2]

void MoReFEM::FEltSpace::ComputeLocal2Global ( const ExtendedUnknown::vector_const_shared_ptr & extended_unknown_list,
DoComputeProcessorWiseLocal2Global do_compute_processor_wise_local_2_global ) const

Compute the local2global array required by a given global variational operator.

This method is expected to be called only from a GlobalVariationalOperator or a child class of it; it is public solely to account for the cases we need to call it within definitions of a child of GlobalVariationalOperator class.

InitLocal2Global() must have been called beforehand.

Parameters
[in]do_compute_processor_wise_local_2_globalWhether local -> global will be required for processor- wise dof indexes. This really depends on the operators considered in

[internal] Despite its constness, this method actually modifies one aspect of the FEltSpace: the local2global array is computed and stored within a deep class which specific attribute is mutable. The reason for this is that I would have to renounce to the constness of FEltSpace elsewhere otherwise only for an operation that happens in the very beginning of the program, in the initialization phase.

Parameters
[in]extended_unknown_listList of unknowns handled by the global variational operator which called the present method. This list is split per numbering subset, and for each of them a local2global array is computed.

◆ ComputeLocal2Global() [2/2]

void MoReFEM::FEltSpace::ComputeLocal2Global ( ExtendedUnknown::const_shared_ptr && extended_unknown_ptr,
DoComputeProcessorWiseLocal2Global do_compute_processor_wise_local_2_global ) const

Compute the local2global array required by a given global variational operator.

This method is expected to be called only from a GlobalVariationalOperator or a child class of it; it is public solely to account for the cases we need to call it within definitions of a child of GlobalVariationalOperator class.

InitLocal2Global() must have been called beforehand.

Parameters
[in]do_compute_processor_wise_local_2_globalWhether local -> global will be required for processor- wise dof indexes. This really depends on the operators considered in

[internal] Despite its constness, this method actually modifies one aspect of the FEltSpace: the local2global array is computed and stored within a deep class which specific attribute is mutable. The reason for this is that I would have to renounce to the constness of FEltSpace elsewhere otherwise only for an operation that happens in the very beginning of the program, in the initialization phase.

Parameters
[in]extended_unknown_ptrCouple (Unknown, NumberingSubset) for which local -> global array must be computed.

◆ ComputeMaxOrderFElt()

std::size_t MoReFEM::FEltSpace::ComputeMaxOrderFElt ( ) const
private

Compute the maximal order of the finite elements present in the FEltSpace.

Returns
Maximal order of the finite elements present in the FEltSpace

◆ ComputeDofList()

void MoReFEM::FEltSpace::ComputeDofList ( const std::vector< DofNS::unique_id > & dof_unique_id_list)
private

Compute the list of dofs from the one available in the GodOfDof.

Parameters
[in]dof_unique_id_listList of all dofs unique ids involved in the finite element space before the partitioning occurs. All those still present will be put into dof_list_ container.

[internal] Should only be called in GodOfDof::Init().

◆ FillLocalFEltSpaceList()

template<RoleOnProcessor RoleOnProcessorT>
std::size_t MoReFEM::FEltSpace::FillLocalFEltSpaceList ( const Mesh & mesh,
const Domain & domain,
const Internal::RefFEltNS::RefLocalFEltSpace & ref_local_felt_space,
LocalFEltSpace::per_geom_elt_index & local_felt_space_list ) const
private

Fill the local finite element space list.

Template Parameters
RoleOnProcessorTWhether we consider processor-wise or ghost.
Parameters
[in]meshMesh considered.
[in]domainDomain considered.
[in]ref_local_felt_spaceRefLocalFEltSpace for which the list is created.
[out]local_felt_space_listThe LocalFEltSpace for each GeometricElt.

This is a method rather than an anonymous function solely to 'solve' the friendship of LocalFEltSpace constructor.

◆ ClearDofLists()

void MoReFEM::FEltSpace::ClearDofLists ( )
private

Clear both processor-wise and ghost Dof lists.

This should be called only immediately after data reduction.

◆ GetLocalFEltSpacePerRefLocalFEltSpace() [1/2]

template<RoleOnProcessor RoleOnProcessorT>
const LocalFEltSpacePerRefLocalFEltSpace & MoReFEM::FEltSpace::GetLocalFEltSpacePerRefLocalFEltSpace ( ) const
noexcept

Get the list of local finite element spaces sort per finite element type.

Template Parameters
RoleOnProcessorTWhether we consider processor-wise or ghost.

◆ GetLocalFEltSpacePerRefLocalFEltSpace() [2/2]

template<RoleOnProcessor RoleOnProcessorT>
const LocalFEltSpacePerRefLocalFEltSpace & MoReFEM::FEltSpace::GetLocalFEltSpacePerRefLocalFEltSpace ( const Domain & domain) const

Get the list of local finite element spaces sort per finite element type for a given domain.

Parameters
[in]domainDomain used as filter.

◆ GetLocalFEltSpaceList() [1/2]

const LocalFEltSpace::per_geom_elt_index & MoReFEM::FEltSpace::GetLocalFEltSpaceList ( const Internal::RefFEltNS::RefLocalFEltSpace & ref_felt_space) const
private

Get the list of local finite element spaces sort for a given RefLocalFEltSpace.

Parameters
[in]ref_felt_spaceRefLocalFEltSpace used as gilter.

◆ GetLocalFEltSpace()

const LocalFEltSpace & MoReFEM::FEltSpace::GetLocalFEltSpace ( const GeometricElt & geometric_elt) const

Get the local felt space that matches a given geometric_elt.

Parameters
[in]geometric_eltGeometricElt used as filter.

◆ GetLocalFEltSpaceList() [2/2]

const LocalFEltSpace::per_geom_elt_index & MoReFEM::FEltSpace::GetLocalFEltSpaceList ( const RefGeomElt & ref_geom_elt) const

Get the list of local finite element spaces sort for a given ref_geom_elt.

Parameters
[in]ref_geom_eltRefGeomElt used as filter.

◆ NprocessorWiseDof()

std::size_t MoReFEM::FEltSpace::NprocessorWiseDof ( const NumberingSubset & numbering_subset) const

Returns the number of processor-wise Dof for given numbering_subset.

Parameters
[in]numbering_subsetNumberingSubset for which the tally is requested.
Returns
Number of processor-wise Dof in the current FEltSpace for the chosen NumberingSubset.

◆ NprogramWiseDof()

std::size_t MoReFEM::FEltSpace::NprogramWiseDof ( const NumberingSubset & numbering_subset) const

Returns the number of program-wise Dof for given numbering_subset.

Parameters
[in]numbering_subsetNumberingSubset for which the tally is requested.
Returns
Number of program-wise Dof in the current FEltSpace for the chosen NumberingSubset.

◆ GetProcessorWiseDofList()

Dof::vector_shared_ptr MoReFEM::FEltSpace::GetProcessorWiseDofList ( const NumberingSubset & numbering_subset) const

Get the list of processor-wise dofs covered by the finite element space and inside given numbering subset.

Attention
The list doesn't exist and is returned by value; in most cases filtering on the namesake above will be much more efficient.
Parameters
[in]numbering_subsetNumberingSubset considered.
Returns
List of processor-wise dofs covered by the finite element space and inside given numbering subset.

◆ DoCoverNumberingSubset()

bool MoReFEM::FEltSpace::DoCoverNumberingSubset ( const NumberingSubset & numbering_subset) const

Check whether numbering_subset is covered in the finite element space.

Parameters
[in]numbering_subsetNumberingSubset being investigated.
Returns
True if numbering_subset is covered by the finit element space.

◆ GetNumberingSubset()

const NumberingSubset & MoReFEM::FEltSpace::GetNumberingSubset ( const Unknown & unknown) const

Get the numbering subset associated to unknown.

Parameters
[in]unknownUnknown which associated NumberingSubset is sought.

◆ GetNumberingSubsetPtr()

const NumberingSubset::const_shared_ptr & MoReFEM::FEltSpace::GetNumberingSubsetPtr ( const Unknown & unknown) const

Get the numbering subset associated to unknown.

Parameters
[in]unknownUnknown which associated NumberingSubset is sought.

◆ GetExtendedUnknown()

const ExtendedUnknown & MoReFEM::FEltSpace::GetExtendedUnknown ( const Unknown & unknown) const

Get the pair unknown/numbering subset associated to the given unknown.

Parameters
[in]unknownUnknown which associated NumberingSubset is sought.

◆ GetExtendedUnknownPtr()

ExtendedUnknown::const_shared_ptr MoReFEM::FEltSpace::GetExtendedUnknownPtr ( const Unknown & unknown) const

Get the pair unknown/numbering subset associated to the given unknown as a smart pointer.

Parameters
[in]unknownUnknown which associated ExtendedUnknown is sought.

◆ GetDomain()

const Domain & MoReFEM::FEltSpace::GetDomain ( ) const
noexcept

Domain upon which FEltSpace is defined. By construct its dimension is contrived (it can't overlap several).

◆ GetRefLocalFEltSpace()

const Internal::RefFEltNS::RefLocalFEltSpace & MoReFEM::FEltSpace::GetRefLocalFEltSpace ( const RefGeomElt & ref_geom_elt) const
private

Get the reference finite element space related to a given ref_geom_elt.

[internal] This method assumes there is one; it is checked by an assert in debug mode.

Parameters
[in]ref_geom_eltReference geometric element.
Returns
Reference finite element space related to a given ref_geom_elt.

◆ GetNonCstProcessorWiseDofList()

Dof::vector_shared_ptr & MoReFEM::FEltSpace::GetNonCstProcessorWiseDofList ( )
privatenoexcept

Non constant accessor to list of processor-wise Dof

.

Returns
Reference to list of processor-wise Dof

◆ GetNonCstGhostDofList()

Dof::vector_shared_ptr & MoReFEM::FEltSpace::GetNonCstGhostDofList ( )
privatenoexcept

Non constant accessor to list of ghost Dof

.

Returns
Reference to list of ghost Dof

◆ SetFEltList()

void MoReFEM::FEltSpace::SetFEltList ( const Mesh & mesh,
const Domain & domain )
private

Prepare the finite element list from the mesh and the domain.

[internal] This method is called in the constructor and should not be called again afterwards.

Parameters
[in]meshMesh upon which the GodOfDof in which the finite element space is defined is built.
[in]domainThe domain that delimits the whole finite element space.

◆ SetMovemeshData()

void MoReFEM::FEltSpace::SetMovemeshData ( )
private

Compute data required for movemesh if relevant.

This is done for each numbering subset that features DoMoveMesh() == true.

The data set here is movemesh_helper_data_, which allows to match the dof considered to the actual vertices of the mesh.

Attention
Broaden this when P2 geometry is reimplemented.
Todo
#1679

◆ GetMovemeshHelper()

const Internal::FEltSpaceNS::MovemeshHelper & MoReFEM::FEltSpace::GetMovemeshHelper ( const GlobalVector & vector) const
private

Access to the movemesh helper related to a given vector.

Parameters
[in]vectorGlobalVector which content should be used to move the mesh.

◆ GetMpi()

const Wrappers::Mpi & MoReFEM::Crtp::CrtpMpi< FEltSpace >::GetMpi ( ) const
noexceptinherited

Read-only access to underlying Mpi object.

Returns
Constant accessor to underlying Mpi object.

◆ GetMutex()

std::mutex & MoReFEM::Crtp::Mutex< FEltSpace >::GetMutex ( ) const
inherited

Get access to the mutex.

Returns
Non constant reference to std::mutex underlying object.

◆ GetUniqueId()

FEltSpaceNS::unique_id MoReFEM::Crtp::UniqueId< FEltSpace , FEltSpaceNS::unique_id , AssignationModeT, UniqueIdNS::DoAllowNoId::no >::GetUniqueId ( ) const
inherited

Get the value of the internal unique ID.

Returns
Unique id.

◆ GenerateNewEligibleId()

static FEltSpaceNS::unique_id MoReFEM::Crtp::UniqueId< FEltSpace , FEltSpaceNS::unique_id , AssignationModeT, UniqueIdNS::DoAllowNoId::no >::GenerateNewEligibleId ( )
staticinherited

Generate a unique id.

No new objects is created, and the new identifier is not counted in the list - the purpose here is just to provide a value that don't collide with existing objects. This is really used in a very edge case; think twice before using this functionality as it really might not be what you really seek.

Returns
A unique id that is not in use yet.

◆ ClearUniqueIdList()

static void MoReFEM::Crtp::UniqueId< FEltSpace , FEltSpaceNS::unique_id , AssignationModeT, UniqueIdNS::DoAllowNoId::no >::ClearUniqueIdList ( )
staticinherited

Clear all unique ids.

Attention
This functionality has been put there only for the sake of writing tests; please do not use it! It should be considered as private, even if unfortunately I can't easily put it that way.

◆ AssignUniqueId()

static FEltSpaceNS::unique_id MoReFEM::Crtp::UniqueId< FEltSpace , FEltSpaceNS::unique_id , AssignationModeT, UniqueIdNS::DoAllowNoId::no >::AssignUniqueId ( )
staticprivateinherited

If AssignationMode is automatic, generates a new unique identifier.

Returns
The new unique id, which is just an increment from the previously assigned one.

◆ NewUniqueId()

static FEltSpaceNS::unique_id MoReFEM::Crtp::UniqueId< FEltSpace , FEltSpaceNS::unique_id , AssignationModeT, UniqueIdNS::DoAllowNoId::no >::NewUniqueId ( FEltSpaceNS::unique_id new_unique_id)
staticprivateinherited

If AssignationMode is manual, checks the unique identifier provided is valid.

Parameters
[in]new_unique_idThe proposed new unique id. If it already exists an exception will be thrown.
Returns
The unmodified unique id.

Friends And Related Symbol Documentation

◆ Internal::FEltSpaceNS::ReduceToProcessorWise

Friendship to a private class, which needs to use GetNonCstFEltStorage().

I do not want this method to be public: this access is quite insecure!

Field Documentation

◆ felt_storage_

Internal::FEltSpaceNS::Storage::const_unique_ptr MoReFEM::FEltSpace::felt_storage_ = nullptr
private

Object in charge of storing the finite elements in an efficient way so that access is as fast as possible.

This can noticeably store the list of finite elements restricted on a smaller domain that the one upon which the whole finite element space is built.

◆ domain_

const Domain& MoReFEM::FEltSpace::domain_
private

Domain upon which FEltSpace is defined. By construct its dimension is contrived (it can't overlap several).

◆ extended_unknown_list_

const ExtendedUnknown::vector_const_shared_ptr MoReFEM::FEltSpace::extended_unknown_list_
private

List of all the pairs of unknowns and numbering subset.

GodOfDof is not enough here: same unknown might have been numbered with another NumberingSubset in another finite element space.

◆ numbering_subset_list_

const NumberingSubset::vector_const_shared_ptr MoReFEM::FEltSpace::numbering_subset_list_
private

List of numbering subsets considered.

[internal] Could have been computed from unknown_storage_, but it is convenient to get it stored independently.

◆ movemesh_helper_data_

std::map<NumberingSubsetNS::unique_id, Internal::FEltSpaceNS::MovemeshHelper> MoReFEM::FEltSpace::movemesh_helper_data_
private

Data that helps to move efficiently a mesh.

Key is the unique id of a numbering subset. Values gives away the list of dofs for each vertex.

Relevant only for numbering subsets for which do_move_mesh is true.

◆ mutex_

std::unique_ptr<std::mutex> MoReFEM::Crtp::Mutex< FEltSpace >::mutex_
mutableprivateinherited

Mutex object.

This follows item 16 of Scott Meyers's "Effective Modern C++", which advises to make const member functions thread safe.

However, it is here enclosed in a unique_ptr as mutex doesn't seem to be movable (current implementations of both clang and gcc don't define the move constructor and the move assignation; the copy is deleted).


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