OGS
ProcessLib::Deformation::CollectIntegrationPointDataForExtrapolation< InternalVariable > Class Template Referencefinal

Detailed Description

template<typename InternalVariable>
class ProcessLib::Deformation::CollectIntegrationPointDataForExtrapolation< InternalVariable >

Definition at line 130 of file SolidMaterialInternalToSecondaryVariables.h.

#include <SolidMaterialInternalToSecondaryVariables.h>

Public Member Functions

 CollectIntegrationPointDataForExtrapolation (InternalVariablesCollection< InternalVariable > &&internal_variables_collection)
template<typename LocalAssemblerInterface>
std::vector< double > const & operator() (LocalAssemblerInterface const &loc_asm, const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const

Private Attributes

InternalVariablesCollection< InternalVariable > internal_variables_collection_

Constructor & Destructor Documentation

◆ CollectIntegrationPointDataForExtrapolation()

template<typename InternalVariable>
ProcessLib::Deformation::CollectIntegrationPointDataForExtrapolation< InternalVariable >::CollectIntegrationPointDataForExtrapolation ( InternalVariablesCollection< InternalVariable > && internal_variables_collection)
inlineexplicit

Member Function Documentation

◆ operator()()

template<typename InternalVariable>
template<typename LocalAssemblerInterface>
std::vector< double > const & ProcessLib::Deformation::CollectIntegrationPointDataForExtrapolation< InternalVariable >::operator() ( LocalAssemblerInterface const & loc_asm,
const double ,
std::vector< GlobalVector * > const & ,
std::vector< NumLib::LocalToGlobalIndexMap const * > const & ,
std::vector< double > & cache ) const
inline

Definition at line 142 of file SolidMaterialInternalToSecondaryVariables.h.

148 {
149 cache.clear();
150
151 auto const* const iv =
152 internal_variables_collection_.findInternalVariable(loc_asm);
153
154 if (iv == nullptr)
155 {
156 // If the material model for the present material group does not
157 // have the requested internal variable, return an empty vector,
158 // which will be ignored by the extrapolation algorithm.
159 return cache;
160 }
161
162 auto const& fct = iv->getter;
163
164 const unsigned num_int_pts = loc_asm.getNumberOfIntegrationPoints();
165 assert(num_int_pts > 0);
166
170
171 // TODO avoid the heap allocation (one per finite element)
173
174 for (unsigned i = 0; i < num_int_pts; ++i)
175 {
176 auto const& state = loc_asm.getMaterialStateVariablesAt(i);
177
178 auto const& int_pt_values = fct(state, cache_column);
179 assert(int_pt_values.size() ==
180 static_cast<std::size_t>(
181 internal_variables_collection_.num_components));
183
184 cache_mat.col(i).noalias() = int_pt_values_vec;
185 }
186
187 return cache;
188 }
Eigen::Map< const Vector > toVector(std::vector< double > const &data, Eigen::VectorXd::Index size)
Creates an Eigen mapped vector from the given data vector.

References MathLib::createZeroedMatrix(), internal_variables_collection_, and MathLib::toVector().

Member Data Documentation

◆ internal_variables_collection_

template<typename InternalVariable>
InternalVariablesCollection<InternalVariable> ProcessLib::Deformation::CollectIntegrationPointDataForExtrapolation< InternalVariable >::internal_variables_collection_
private

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