OGS 6.2.1-97-g73d1aeda3
PhaseFieldIrreversibleDamageOracleBoundaryCondition.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include "BoundaryCondition.h"
15 #include "ParameterLib/Parameter.h"
16 
17 namespace ProcessLib
18 {
20  : public BoundaryCondition
21 {
22 public:
24  NumLib::LocalToGlobalIndexMap const& dof_table,
25  MeshLib::Mesh const& mesh, int const variable_id,
26  int const component_id)
27  : _dof_table(dof_table),
28  _mesh(mesh),
29  _variable_id(variable_id),
30  _component_id(component_id)
31  {
32  if (variable_id >= static_cast<int>(dof_table.getNumberOfVariables()) ||
33  component_id >=
34  dof_table.getNumberOfVariableComponents(variable_id))
35  {
36  OGS_FATAL(
37  "Variable id or component id too high. Actual values: (%d, "
38  "%d), "
39  "maximum values: (%d, %d).",
40  variable_id, component_id, dof_table.getNumberOfVariables(),
41  dof_table.getNumberOfVariableComponents(variable_id));
42  }
43  }
44 
46  const double t, const GlobalVector& x,
47  NumLib::IndexValueVector<GlobalIndexType>& bc_values) const override;
48 
49  void preTimestep(const double t, const GlobalVector& x) override;
50 
51 private:
54  int const _variable_id;
55  int const _component_id;
56 
58 };
59 
60 std::unique_ptr<PhaseFieldIrreversibleDamageOracleBoundaryCondition>
62  BaseLib::ConfigTree const& config,
63  NumLib::LocalToGlobalIndexMap const& dof_table, MeshLib::Mesh const& mesh,
64  int const variable_id, int const component_id);
65 
66 } // namespace ProcessLib
PhaseFieldIrreversibleDamageOracleBoundaryCondition(NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh, int const variable_id, int const component_id)
int getNumberOfVariableComponents(int variable_id) const
#define OGS_FATAL(fmt,...)
Definition: Error.h:63
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)
void getEssentialBCValues(const double t, const GlobalVector &x, NumLib::IndexValueVector< GlobalIndexType > &bc_values) const override
Writes the values of essential BCs to bc_values.