OGS
DirichletBoundaryConditionWithinTimeInterval.cpp
Go to the documentation of this file.
1
14
20
21namespace ProcessLib
22{
25 BaseLib::TimeInterval time_interval,
26 ParameterLib::Parameter<double> const& parameter,
27 MeshLib::Mesh const& bc_mesh,
28 NumLib::LocalToGlobalIndexMap const& dof_table_bulk,
29 int const variable_id, int const component_id)
30 : _parameter(parameter),
31 _bc_mesh(bc_mesh),
32 _variable_id(variable_id),
33 _component_id(component_id),
34 _time_interval(std::move(time_interval))
35{
36 config(dof_table_bulk);
37}
38
40 NumLib::LocalToGlobalIndexMap const& dof_table_bulk)
41{
44
45 std::vector<MeshLib::Node*> const& bc_nodes = _bc_mesh.getNodes();
46 MeshLib::MeshSubset bc_mesh_subset(_bc_mesh, bc_nodes);
47
48 // Create local DOF table from the BC mesh subset for the given variable
49 // and component id.
51 _variable_id, {_component_id}, std::move(bc_mesh_subset));
52}
53
55 const double t, GlobalVector const& x,
57{
59 {
61 _variable_id, _component_id, t, x, bc_values);
62 return;
63 }
64
65 bc_values.ids.clear();
66 bc_values.values.clear();
67}
68} // namespace ProcessLib
Defines functions that are shared by DirichletBoundaryCondition and DirichletBoundaryConditionWithinT...
Global vector based on Eigen vector.
Definition EigenVector.h:25
A subset of nodes on a single mesh.
Definition MeshSubset.h:26
std::vector< Node * > const & getNodes() const
Get the nodes-vector for the mesh.
Definition Mesh.h:106
std::unique_ptr< LocalToGlobalIndexMap > deriveBoundaryConstrainedMap(int const variable_id, std::vector< int > const &component_ids, MeshLib::MeshSubset &&new_mesh_subset) const
void getEssentialBCValues(const double t, GlobalVector const &x, NumLib::IndexValueVector< GlobalIndexType > &bc_values) const override
Writes the values of essential BCs to bc_values.
DirichletBoundaryConditionWithinTimeInterval(BaseLib::TimeInterval time_interval, ParameterLib::Parameter< double > const &parameter, MeshLib::Mesh const &bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id)
std::unique_ptr< NumLib::LocalToGlobalIndexMap const > _dof_table_boundary
void getEssentialBCValuesLocal(ParameterLib::Parameter< double > const &parameter, MeshLib::Mesh const &bc_mesh, std::vector< std::size_t > const &nodes_in_bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_boundary, int const variable_id, int const component_id, const double t, GlobalVector const &, NumLib::IndexValueVector< GlobalIndexType > &bc_values)
void checkParametersOfDirichletBoundaryCondition(MeshLib::Mesh const &bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id)
bool contains(const double current_time) const
std::vector< IndexType > ids
std::vector< double > values