OGS
NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection > Class Template Reference

Detailed Description

template<typename LocalAssemblerCollection>
class NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >

Definition at line 76 of file ExtrapolatableElementCollection.h.

#include <ExtrapolatableElementCollection.h>

Inheritance diagram for NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >:
[legend]
Collaboration diagram for NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >:
[legend]

Public Types

using LocalAssembler
 LocalAssemblerCollection contains many LocalAssembler's.
 
using IntegrationPointValuesMethod
 

Public Member Functions

 ExtrapolatableLocalAssemblerCollection (LocalAssemblerCollection const &local_assemblers, IntegrationPointValuesMethod const &integration_point_values_method)
 
Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix (std::size_t const id, unsigned const integration_point) const override
 
std::vector< double > const & getIntegrationPointValues (std::size_t const id, const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< double > &cache) const override
 
std::size_t size () const override
 Returns the number of elements whose properties shall be extrapolated.
 
- Public Member Functions inherited from NumLib::ExtrapolatableElementCollection
virtual ~ExtrapolatableElementCollection ()=default
 

Private Attributes

LocalAssemblerCollection const & _local_assemblers
 
IntegrationPointValuesMethod const _integration_point_values_method
 

Member Typedef Documentation

◆ IntegrationPointValuesMethod

template<typename LocalAssemblerCollection >
using NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::IntegrationPointValuesMethod
Initial value:
std::function<std::vector<double> const&(
LocalAssembler const& loc_asm, const double t,
std::vector<GlobalVector*> const& x,
std::vector<NumLib::LocalToGlobalIndexMap const*> const& dof_table,
std::vector<double>& cache)>
typename std::decay_t< decltype(*std::declval< LocalAssemblerCollection >()[static_cast< std::size_t >(0)])> LocalAssembler
LocalAssemblerCollection contains many LocalAssembler's.

A method providing integration point values of some property.

The method must return reference to a vector containing the integration point values.

For further information about the cache parameter see ExtrapolatableElementCollection::getIntegrationPointValues().

Definition at line 97 of file ExtrapolatableElementCollection.h.

◆ LocalAssembler

template<typename LocalAssemblerCollection >
using NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::LocalAssembler
Initial value:
typename std::decay_t<decltype(*std::declval<LocalAssemblerCollection>()
[static_cast<std::size_t>(0)])>

LocalAssemblerCollection contains many LocalAssembler's.

Definition at line 81 of file ExtrapolatableElementCollection.h.

Constructor & Destructor Documentation

◆ ExtrapolatableLocalAssemblerCollection()

template<typename LocalAssemblerCollection >
NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::ExtrapolatableLocalAssemblerCollection ( LocalAssemblerCollection const & local_assemblers,
IntegrationPointValuesMethod const & integration_point_values_method )
inline

Constructs a new instance.

Parameters
local_assemblersa collection of local assemblers whose integration point values shall be extrapolated.
integration_point_values_methoda LocalAssembler method returning integration point values of some property for that local assembler.

Definition at line 111 of file ExtrapolatableElementCollection.h.

114 : _local_assemblers(local_assemblers),
115 _integration_point_values_method{integration_point_values_method}
116 {
117 }
IntegrationPointValuesMethod const _integration_point_values_method

Member Function Documentation

◆ getIntegrationPointValues()

template<typename LocalAssemblerCollection >
std::vector< double > const & NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::getIntegrationPointValues ( std::size_t const id,
const double t,
std::vector< GlobalVector * > const & x,
std::vector< NumLib::LocalToGlobalIndexMap const * > const & dof_table,
std::vector< double > & cache ) const
inlineoverridevirtual

Returns integration point values of some property of a specific element.

Parameters
idID of the element of which the property is queried.
tThe time used in the evaluation if time dependent quantities.
xThe current solutions of a ProcessLib::Process; more generally any nodal GlobalVector pointers for each process.
dof_tableThe processes d.o.f. table used to get each element's local d.o.f. from x.
cacheCan be used to compute a property on-the-fly.
Remarks

Since this method returns a reference, integration point values can not be computed locally and just returned.

Instead, the vector cache can be used to store some derived quantities that should be used as integration point values. They can be written to the cache and a reference to the cache can then be returned by the implementation of this method. Ordinary integration point values can be returned directly (if they are stored in the local assembler), and the cache can be left untouched.

For usage examples see the processes already implemented or the unit test in TestExtrapolation.cpp

Implements NumLib::ExtrapolatableElementCollection.

Definition at line 126 of file ExtrapolatableElementCollection.h.

131 {
132 auto const& loc_asm = *_local_assemblers[id];
133 return _integration_point_values_method(loc_asm, t, x, dof_table,
134 cache);
135 }

References NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::_integration_point_values_method, and NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::_local_assemblers.

◆ getShapeMatrix()

template<typename LocalAssemblerCollection >
Eigen::Map< const Eigen::RowVectorXd > NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::getShapeMatrix ( std::size_t const id,
unsigned const integration_point ) const
inlineoverridevirtual

Returns the shape matrix of the element with the given id at the given integration_point.

Implements NumLib::ExtrapolatableElementCollection.

Definition at line 119 of file ExtrapolatableElementCollection.h.

121 {
122 ExtrapolatableElement const& loc_asm = *_local_assemblers[id];
123 return loc_asm.getShapeMatrix(integration_point);
124 }

References NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::_local_assemblers, and NumLib::ExtrapolatableElement::getShapeMatrix().

◆ size()

template<typename LocalAssemblerCollection >
std::size_t NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::size ( ) const
inlineoverridevirtual

Returns the number of elements whose properties shall be extrapolated.

Implements NumLib::ExtrapolatableElementCollection.

Definition at line 137 of file ExtrapolatableElementCollection.h.

137{ return _local_assemblers.size(); }

References NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::_local_assemblers.

Member Data Documentation

◆ _integration_point_values_method

template<typename LocalAssemblerCollection >
IntegrationPointValuesMethod const NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::_integration_point_values_method
private

◆ _local_assemblers


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