OGS
PhaseFieldIrreversibleDamageOracleBoundaryCondition.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include "BoundaryCondition.h"
10
11namespace ProcessLib
12{
14 : public BoundaryCondition
15{
16public:
18 NumLib::LocalToGlobalIndexMap const& dof_table,
19 MeshLib::Mesh const& mesh, int const variable_id,
20 int const component_id)
21 : _dof_table(dof_table),
22 _mesh(mesh),
23 _variable_id(variable_id),
24 _component_id(component_id)
25 {
26 if (variable_id >= static_cast<int>(dof_table.getNumberOfVariables()) ||
27 component_id >=
28 dof_table.getNumberOfVariableComponents(variable_id))
29 {
30 OGS_FATAL(
31 "Variable id or component id too high. Actual values: ({:d}, "
32 "{:d}), "
33 "maximum values: ({:d}, {:d}).",
34 variable_id, component_id, dof_table.getNumberOfVariables(),
35 dof_table.getNumberOfVariableComponents(variable_id));
36 }
37 }
38
40 const double t, const GlobalVector& x,
41 NumLib::IndexValueVector<GlobalIndexType>& bc_values) const override;
42
43 void preTimestep(const double t, std::vector<GlobalVector*> const& x,
44 int const process_id) override;
45
46private:
49 int const _variable_id;
50 int const _component_id;
51
53};
54
56 BaseLib::ConfigTree const& config);
57
58std::unique_ptr<PhaseFieldIrreversibleDamageOracleBoundaryCondition>
60 NumLib::LocalToGlobalIndexMap const& dof_table, MeshLib::Mesh const& mesh,
61 int const variable_id, int const component_id);
62
63} // namespace ProcessLib
MathLib::EigenVector GlobalVector
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
void parsePhaseFieldIrreversibleDamageOracleBoundaryCondition(BaseLib::ConfigTree const &config)
std::unique_ptr< PhaseFieldIrreversibleDamageOracleBoundaryCondition > createPhaseFieldIrreversibleDamageOracleBoundaryCondition(NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh, int const variable_id, int const component_id)