OGS
PhaseFieldIrreversibleDamageOracleBoundaryCondition.h
Go to the documentation of this file.
1
11#pragma once
12
13#include "BoundaryCondition.h"
17
18namespace ProcessLib
19{
21 : public BoundaryCondition
22{
23public:
25 NumLib::LocalToGlobalIndexMap const& dof_table,
26 MeshLib::Mesh const& mesh, int const variable_id,
27 int const component_id)
28 : _dof_table(dof_table),
29 _mesh(mesh),
30 _variable_id(variable_id),
31 _component_id(component_id)
32 {
33 if (variable_id >= static_cast<int>(dof_table.getNumberOfVariables()) ||
34 component_id >=
35 dof_table.getNumberOfVariableComponents(variable_id))
36 {
38 "Variable id or component id too high. Actual values: ({:d}, "
39 "{:d}), "
40 "maximum values: ({:d}, {:d}).",
41 variable_id, component_id, dof_table.getNumberOfVariables(),
42 dof_table.getNumberOfVariableComponents(variable_id));
43 }
44 }
45
47 const double t, const GlobalVector& x,
48 NumLib::IndexValueVector<GlobalIndexType>& bc_values) const override;
49
50 void preTimestep(const double t, std::vector<GlobalVector*> const& x,
51 int const process_id) override;
52
53private:
56 int const _variable_id;
57 int const _component_id;
58
60};
61
62std::unique_ptr<PhaseFieldIrreversibleDamageOracleBoundaryCondition>
64 BaseLib::ConfigTree const& config,
65 NumLib::LocalToGlobalIndexMap const& dof_table, MeshLib::Mesh const& mesh,
66 int const variable_id, int const component_id);
67
68} // namespace ProcessLib
#define OGS_FATAL(...)
Definition Error.h:26
Global vector based on Eigen vector.
Definition EigenVector.h:25
int getNumberOfVariableComponents(int variable_id) const
void getEssentialBCValues(const double t, const GlobalVector &x, NumLib::IndexValueVector< GlobalIndexType > &bc_values) const override
Writes the values of essential BCs to bc_values.
PhaseFieldIrreversibleDamageOracleBoundaryCondition(NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh, int const variable_id, int const component_id)
void preTimestep(const double t, std::vector< GlobalVector * > const &x, int const process_id) override
std::unique_ptr< PhaseFieldIrreversibleDamageOracleBoundaryCondition > createPhaseFieldIrreversibleDamageOracleBoundaryCondition(BaseLib::ConfigTree const &config, NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh, int const variable_id, int const component_id)