OGS
BoundaryConditionCollection.cpp
Go to the documentation of this file.
1
12
13namespace ProcessLib
14{
16 const double t, std::vector<GlobalVector*> const& x, int const process_id,
17 GlobalMatrix& K, GlobalVector& b, GlobalMatrix* Jac) const
18{
19 for (auto const& bc : _boundary_conditions)
20 {
21 bc->applyNaturalBC(t, x, process_id, K, b, Jac);
22 }
23}
24
26 std::vector<std::reference_wrapper<ProcessVariable>> const&
27 process_variables,
28 NumLib::LocalToGlobalIndexMap const& dof_table,
29 unsigned const integration_order, Process const& process,
30 std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media)
31{
32 for (int variable_id = 0;
33 variable_id < static_cast<int>(process_variables.size());
34 ++variable_id)
35 {
36 ProcessVariable& pv = process_variables[variable_id];
37 auto bcs = pv.createBoundaryConditions(
38 dof_table, variable_id, integration_order, _parameters, process,
39 process_variables, media);
40
41 std::move(bcs.begin(), bcs.end(),
42 std::back_inserter(_boundary_conditions));
43 }
44
45 // For each BC there will be storage for Dirichlet BC. This storage will be
46 // uninitialized by default, and has to be filled by the respective BC
47 // object if needed.
49}
50} // namespace ProcessLib
Global vector based on Eigen vector.
Definition EigenVector.h:25
void applyNaturalBC(const double t, std::vector< GlobalVector * > const &x, int const process_id, GlobalMatrix &K, GlobalVector &b, GlobalMatrix *Jac) const
std::vector< NumLib::IndexValueVector< GlobalIndexType > > _dirichlet_bcs
std::vector< std::unique_ptr< BoundaryCondition > > _boundary_conditions
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & _parameters
void addBCsForProcessVariables(std::vector< std::reference_wrapper< ProcessVariable > > const &process_variables, NumLib::LocalToGlobalIndexMap const &dof_table, unsigned const integration_order, Process const &process, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::vector< std::unique_ptr< BoundaryCondition > > createBoundaryConditions(const NumLib::LocalToGlobalIndexMap &dof_table, const int variable_id, unsigned const integration_order, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, Process const &process, std::vector< std::reference_wrapper< ProcessVariable > > const &all_process_variables_for_this_process, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)