13#include <range/v3/view/filter.hpp>
18 std::vector<std::reference_wrapper<ProcessVariable>>
const&
21 unsigned const integration_order)
23 for (
int variable_id = 0;
24 variable_id < static_cast<int>(process_variables.size());
32 std::move(sts.begin(), sts.end(), std::back_inserter(
_source_terms));
41 auto non_nullptr = [](std::unique_ptr<SourceTerm>
const& st)
42 {
return st !=
nullptr; };
44 for (
auto const& st :
_source_terms | ranges::views::filter(non_nullptr))
46 st->integrate(t, x, b, jac);
Global vector based on Eigen vector.
std::vector< std::unique_ptr< SourceTerm > > createSourceTerms(const NumLib::LocalToGlobalIndexMap &dof_table, const int variable_id, unsigned const integration_order, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::vector< std::reference_wrapper< ProcessVariable > > const &all_process_variables_for_this_process)
void integrate(const double t, GlobalVector const &x, GlobalVector &b, GlobalMatrix *jac) const
void addSourceTermsForProcessVariables(std::vector< std::reference_wrapper< ProcessVariable > > const &process_variables, NumLib::LocalToGlobalIndexMap const &dof_table, unsigned const integration_order)
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & _parameters
std::vector< std::unique_ptr< SourceTerm > > _source_terms