MoReFEM
|
Parent class of all GlobalParameterOperator. More...
#include <GlobalParameterOperator.hpp>
Public Types | |
using | LocalParameterOperator = LocalParameterOperatorT |
Alias over the class that handles the elementary calculation. | |
Protected Member Functions | |
const ParameterAtQuadraturePoint< TypeT, TimeManagerT, TimeDependencyT > & | GetParameter () const noexcept |
Constant access to the parameter. | |
template<typename... Args> | |
void | UpdateImpl (Args &&... args) const |
This method is in charge of updating the parameter at each quadrature point. | |
const ExtendedUnknown::const_shared_ptr & | GetExtendedUnknownPtr () const |
Return the Unknown and its associated numbering subset. | |
const ExtendedUnknown & | GetExtendedUnknown () const |
Return the Unknown and its associated numbering subset. | |
const FEltSpace & | GetFEltSpace () const noexcept |
FEltSpace. | |
const Utilities::PointerComparison::Map< RefGeomElt::shared_ptr, typename LocalParameterOperatorT::unique_ptr > & | GetLocalOperatorPerRefGeomElt () const noexcept |
Access to the container that contains the match between a reference geometric element and a local Parameters operator. | |
AllocateGradientFEltPhi | DoAllocateGradientFEltPhi () const noexcept |
Whether the gradient of finite element is required or not. | |
void | PerformElementaryCalculation (const LocalFEltSpace &local_felt_space, LocalParameterOperatorT &local_operator, std::tuple<> &&) const |
Perform the elementary calculation (more exactly handle the call to the LocalParameterOperator...) | |
template<typename... Args> | |
void | PerformElementaryCalculation (const LocalFEltSpace &local_felt_space, LocalParameterOperatorT &local_operator, std::tuple< Args... > &&args) const |
Overload when there are variadic arguments to handle. | |
LocalParameterOperator & | GetNonCstLocalOperator (Advanced::GeometricEltEnum ref_geom_elt_id) const |
Fetch the local operator associated to the finite element type. | |
bool | DoConsider (Advanced::GeometricEltEnum ref_geom_elt_id) const |
Whether there is a local Parameters operator related to a given ref_geom_elt. | |
Special members. | |
template<typename... Args> | |
GlobalParameterOperator (const FEltSpace &felt_space, const Unknown &unknown, const QuadratureRulePerTopology *const quadrature_rule_per_topology, AllocateGradientFEltPhi do_allocate_gradient_felt_phi, ParameterAtQuadraturePoint< TypeT, TimeManagerT, TimeDependencyT > ¶meter, Args &&... args) | |
Constructor. | |
~GlobalParameterOperator ()=default | |
Protected destructor: no direct instance of this class should occur! | |
GlobalParameterOperator (const GlobalParameterOperator &rhs)=delete | |
The copy constructor. | |
GlobalParameterOperator (GlobalParameterOperator &&rhs)=delete | |
The move constructor. | |
GlobalParameterOperator & | operator= (const GlobalParameterOperator &rhs)=delete |
The (copy) operator=. | |
GlobalParameterOperator & | operator= (GlobalParameterOperator &&rhs)=delete |
The (move) operator=. | |
Private Member Functions | |
template<typename... Args> | |
void | CreateLocalOperatorList (std::size_t mesh_dimension, ParameterAtQuadraturePoint< TypeT, TimeManagerT, ParameterNS::TimeDependencyNS::None > ¶meter, Args &&... args) |
Create a LocalParameterOperator for each RefFEltInFEltSpace and store it into the class. | |
const QuadratureRule & | GetQuadratureRule (const RefGeomElt &ref_geom_elt) const |
const QuadratureRulePerTopology & | GetQuadratureRulePerTopology () const noexcept |
Returns the quadrature rule to use for each topology. | |
Private Attributes | |
NodeBearer::vector_shared_ptr | node_for_boundary_condition_ |
List of nodes eligible for boundary conditions. | |
std::unordered_map< Advanced::GeometricEltEnum, typename LocalParameterOperatorT::unique_ptr > | local_operator_per_ref_geom_elt_ |
Map the finite element type to the matching local operator. | |
const FEltSpace & | felt_space_ |
Finite element space. | |
const QuadratureRulePerTopology *const | quadrature_rule_per_topology_ = nullptr |
List of quadrature rules for each type of reference geometric element considered. | |
const ParameterAtQuadraturePoint< TypeT, TimeManagerT, TimeDependencyT > & | parameter_ |
Constant reference to parameter. | |
const AllocateGradientFEltPhi | do_allocate_gradient_felt_phi_ |
Whether the gradient matrix of finite element phi will be required or not. | |
const ExtendedUnknown::const_shared_ptr | extended_unknown_ |
Unknown/numbering subset list. | |
Parent class of all GlobalParameterOperator.
This kind of operator is used to update Parameters.
LocalParameterOperatorT | Class that defines the expected elementary behaviour at each quadrature point; it must be derived from LocalParameterOperator. |
|
explicitprotected |
Constructor.
[in] | felt_space | Finite element space upon which the operator is defined. |
[in] | unknown | Unknown considered. |
[in] | parameter | Parameter at quadrature point on which the operator is defined. |
[in] | args | Variadic arguments that will be perfect-forwarded to the constructor of each LocalParameterOperator. |
[in] | quadrature_rule_per_topology | Quadrature rule for each relevant topology (if one useful in the Model is not specified there an exception will be thrown when usage is attempted). Do not deallocate this raw pointer: it is assumed the actual object is stored in an object such as VariationalFormulation or a Model, probably under a const_unique_ptr to avoid bothering with manual deallocation. If nullptr, the rules defined in the FEltSpace are used. |
[in] | do_allocate_gradient_felt_phi | Whether the gradient matrix of finite element phi will be required or not. If not allocated when it should an assert will warn you in debug mode; so you may specify no by default if you're not entirely sure whether it is required ot not. |
|
protecteddelete |
The copy constructor.
[in] | rhs | The object from which the construction occurs. |
|
protecteddelete |
The move constructor.
[in] | rhs | The object from which the construction occurs. |
|
protecteddelete |
The (copy) operator=.
[in] | rhs | The object from which the affectation occurs. |
|
protecteddelete |
The (move) operator=.
[in] | rhs | The object from which the affectation occurs. |
|
protected |
This method is in charge of updating the parameter at each quadrature point.
This method uses the new C++ 11 feature of variadic template; so that these methods can handle generically all the operators, whatever argument they might require. The drawback is that it isn't clear which arguments are expected for a specific global operator; that's the reason the following method is NOT called Assemble() and is protected rather than public. When a developer introduces a new operator, he must therefore define a public Assemble() that calls the present one.
For instance for UpdateFiberDeformation operator, which requires an additional displacement_increment argument:
[in] | args | Variadic template arguments, specific to the operator being implemented. These arguments might be global: they are to be given to DerivedT::SetComputeEltArrayArguments() which will produce the local ones. |
|
protected |
Perform the elementary calculation (more exactly handle the call to the LocalParameterOperator...)
This method is called in UpdateImpl() and has no business being called elsewhere.
[in] | local_felt_space | Local finite element space considered. |
[in,out] | local_operator | Local operator in charge of the elementary computation at each quadrature point. |
|
protected |
Overload when there are variadic arguments to handle.
This method is called in UpdateImpl() and has no business being called elsewhere.
[in] | local_felt_space | Local finite element space considered. |
[in,out] | local_operator | Local operator in charge of the elementary computation. |
[in] | args | Variadic template arguments, specific to the operator being implemented. These arguments might be global: they are to be given to DerivedT::SetComputeEltArrayArguments() which will produce the local ones. |
|
protected |
Fetch the local operator associated to the finite element type.
[in] | ref_geom_elt_id | Identifier of the reference geometric element which local Parameters operator is requested. |
|
protected |
Whether there is a local Parameters operator related to a given ref_geom_elt.
[in] | ref_geom_elt_id | Identifier of the reference geometric element which pertinence is evaluated. |
It might not if there is a restriction of the domain of definition (for instance elastic stiffness operator does not act upon geometric objects of dimension 1).
This method should be called prior to GetNonCstLocalOperator(): the latter will assert if the ref_felt is invalid.
|
private |
Create a LocalParameterOperator for each RefFEltInFEltSpace and store it into the class.
[in] | mesh_dimension | Dimension of the mesh considered. |
[in] | args | Variadic arguments (see the forecoming section about it in C++ MoReFEM documentation). |
[in,out] | parameter | The ParameterAtQuadraturePoint object to be updated by the current operator. |
|
private |
Return the quadrature rule that match a given reference geometric element.
[in] | ref_geom_elt | RefGeomElt for which the QuadratureRule is sought. |
|
privatenoexcept |
Returns the quadrature rule to use for each topology.
|
private |
List of quadrature rules for each type of reference geometric element considered.
If left empty (nullptr) default one from FEltSpace is used.
This list is given in the constructor; it is up to the caller of the operator to make sure all cases are covered. If not an exception is thrown.
|
private |
Constant reference to parameter.
Reference might be constant here as the global parameter won't attempt any change directly; it is the responsibility of LocalParameterOperator.
|
private |
Whether the gradient matrix of finite element phi will be required or not.
If not allocated when it should an assert will warn you in debug mode; so you may specify no by default if you're not entirely sure whether it is required ot not.