19 class LocalToGlobalIndexMap;
40 std::vector<GlobalVector*>
const& x,
41 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
42 std::unique_ptr<GlobalVector>& result_cache)>;
44 template <
typename F1,
typename F2>
55 typename std::invoke_result_t<
56 F1,
double const, std::vector<GlobalVector*>
const&,
57 std::vector<NumLib::LocalToGlobalIndexMap const*>
const&,
58 std::unique_ptr<GlobalVector>&>>,
59 "The function eval_field_ does not return a const reference"
60 " to a GlobalVector");
65 typename std::invoke_result_t<
66 F2,
double const, std::vector<GlobalVector*>
const&,
67 std::vector<NumLib::LocalToGlobalIndexMap const*>
const&,
68 std::unique_ptr<GlobalVector>&>>,
69 "The function eval_residuals_ does not return a const reference"
70 " to a GlobalVector");
73 template <
typename F1>
83 typename std::invoke_result_t<
84 F1,
double const, std::vector<GlobalVector*>
const&,
85 std::vector<NumLib::LocalToGlobalIndexMap const*>
const&,
86 std::unique_ptr<GlobalVector>&>>,
87 "The function eval_field_ does not return a const reference"
88 " to a GlobalVector");
118 std::string
const& external_name);
137 std::map<std::string, std::string>::const_iterator
begin()
const;
138 std::map<std::string, std::string>::const_iterator
end()
const;
162 template <
typename LocalAssemblerCollection>
164 const unsigned num_components,
166 LocalAssemblerCollection
const& local_assemblers,
168 LocalAssemblerCollection>::IntegrationPointValuesMethod
169 integration_point_values_method)
171 auto const eval_field =
172 [num_components, &extrapolator, &local_assemblers,
173 integration_point_values_method](
175 std::vector<GlobalVector*>
const& x,
176 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
177 std::unique_ptr<GlobalVector> &
180 local_assemblers, integration_point_values_method);
181 extrapolator.
extrapolate(num_components, extrapolatables, t, x,
186 auto const eval_residuals =
187 [num_components, &extrapolator, &local_assemblers,
188 integration_point_values_method](
190 std::vector<GlobalVector*>
const& x,
191 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
192 std::unique_ptr<GlobalVector> &
195 local_assemblers, integration_point_values_method);
200 return {num_components, eval_field, eval_residuals};
Global vector based on Eigen vector.
Handles configuration of several secondary variables from the project file.
SecondaryVariable const & get(std::string const &external_name) const
Returns the secondary variable with the given external name.
std::map< std::string, std::string > _map_external_to_internal
void addNameMapping(std::string const &internal_name, std::string const &external_name)
Register a variable with the given internal and external names.
std::map< std::string, std::string >::const_iterator begin() const
void addSecondaryVariable(std::string const &internal_name, SecondaryVariableFunctions &&fcts)
std::map< std::string, std::string >::const_iterator end() const
std::map< std::string, SecondaryVariable > _configured_secondary_variables
ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection > makeExtrapolatable(LocalAssemblerCollection const &local_assemblers, IntegrationPointValuesMethod integration_point_values_method)
SecondaryVariableFunctions makeExtrapolator(const unsigned num_components, NumLib::Extrapolator &extrapolator, LocalAssemblerCollection const &local_assemblers, typename NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::IntegrationPointValuesMethod integration_point_values_method)
SecondaryVariableFunctions(const unsigned num_components_, F1 &&eval_field_, F2 &&eval_residuals_)
SecondaryVariableFunctions(const unsigned num_components_, F1 &&eval_field_, std::nullptr_t)
Function const eval_field
Computes the value of the field at every node of the underlying mesh.
const unsigned num_components
Number of components of the variable.
Function const eval_residuals
std::function< GlobalVector const &(const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::unique_ptr< GlobalVector > &result_cache)> Function
Stores information about a specific secondary variable.
SecondaryVariableFunctions fcts
Functions used for computing the secondary variable.
std::string const name
Name of the variable; used, e.g., for output.