OGS
ReleaseNodalForce.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 <memory>
7
11
12namespace ParameterLib
13{
14template <typename T>
15struct Parameter;
16} // namespace ParameterLib
17
18namespace MeshLib
19{
20class Mesh;
21}
22
23namespace ProcessLib
24{
25
97{
98public:
113 explicit ReleaseNodalForce(
114 int const variable_id,
115 MeshLib::Mesh const& boundary_mesh,
116 std::unique_ptr<NumLib::LocalToGlobalIndexMap>& dof_table,
117 ParameterLib::Parameter<double> const& time_decay_parameter);
118
119 void set(GlobalVector const* r_neq);
120
132 void applyNaturalBC(const double t, std::vector<GlobalVector*> const& x,
133 int const process_id, GlobalMatrix* K, GlobalVector& b,
134 GlobalMatrix* Jac) override;
135
136private:
137 int const variable_id_;
138
140
141 std::unique_ptr<NumLib::LocalToGlobalIndexMap> const dof_table_;
142
152
156 std::vector<double> initial_release_nodal_force_;
157
158 std::vector<GlobalIndexType> global_indices_;
159 std::vector<MeshLib::Node const*> boundary_nodes_;
160};
161
162} // namespace ProcessLib
MathLib::EigenMatrix GlobalMatrix
MathLib::EigenVector GlobalVector
void applyNaturalBC(const double t, std::vector< GlobalVector * > const &x, int const process_id, GlobalMatrix *K, GlobalVector &b, GlobalMatrix *Jac) override
Applies the released nodal force boundary condition. This method scales the nodal forces by the relea...
std::vector< double > initial_release_nodal_force_
ParameterLib::Parameter< double > const & time_decay_parameter_
ReleaseNodalForce(int const variable_id, MeshLib::Mesh const &boundary_mesh, std::unique_ptr< NumLib::LocalToGlobalIndexMap > &dof_table, ParameterLib::Parameter< double > const &time_decay_parameter)
Constructs a released nodal force boundary condition.
std::vector< GlobalIndexType > global_indices_
MeshLib::Mesh const & boundary_mesh_
std::vector< MeshLib::Node const * > boundary_nodes_
void set(GlobalVector const *r_neq)
std::unique_ptr< NumLib::LocalToGlobalIndexMap > const dof_table_