OGS
|
The SolutionDependentDirichletBoundaryCondition belongs to the Dirichlet-type boundary condition.
This class is a special category of Dirichlet boundary condition, applied in the situation where the value assigned for the boundary condition is dependent on the process solution of the last time step. This particular boundary condition is widely used in the reactive transport problems and has the potential to be used in other processes.
Definition at line 26 of file SolutionDependentDirichletBoundaryCondition.h.
#include <SolutionDependentDirichletBoundaryCondition.h>
Public Member Functions | |
SolutionDependentDirichletBoundaryCondition (std::string property_name, ParameterLib::Parameter< double > const ¶meter, MeshLib::Mesh const &bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id) | |
void | getEssentialBCValues (double const t, GlobalVector const &x, NumLib::IndexValueVector< GlobalIndexType > &bc_values) const override |
Writes the values of essential BCs to bc_values . | |
void | postTimestep (double const, std::vector< GlobalVector * > const &x, int const process_id) override |
Public Member Functions inherited from ProcessLib::BoundaryCondition | |
virtual void | applyNaturalBC (const double, std::vector< GlobalVector * > const &, int const, GlobalMatrix *, GlobalVector &, GlobalMatrix *) |
virtual void | preTimestep (const double, std::vector< GlobalVector * > const &, int const) |
virtual | ~BoundaryCondition ()=default |
Private Attributes | |
MeshLib::Mesh const & | _bc_mesh |
int const | _variable_id |
int const | _component_id |
std::unique_ptr< NumLib::LocalToGlobalIndexMap const > | _dof_table_boundary |
std::unique_ptr< ParameterLib::MeshNodeParameter< double > > | _parameter |
MeshLib::PropertyVector< double > * | _solution_dependent_bc |
ProcessLib::SolutionDependentDirichletBoundaryCondition::SolutionDependentDirichletBoundaryCondition | ( | std::string | property_name, |
ParameterLib::Parameter< double > const & | parameter, | ||
MeshLib::Mesh const & | bc_mesh, | ||
NumLib::LocalToGlobalIndexMap const & | dof_table_bulk, | ||
int const | variable_id, | ||
int const | component_id ) |
Definition at line 26 of file SolutionDependentDirichletBoundaryCondition.cpp.
References _bc_mesh, _component_id, _dof_table_boundary, _parameter, _solution_dependent_bc, _variable_id, ProcessLib::checkParametersOfDirichletBoundaryCondition(), NumLib::LocalToGlobalIndexMap::deriveBoundaryConstrainedMap(), MeshLib::Properties::existsPropertyVector(), MeshLib::Mesh::getName(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getNumberOfNodes(), MeshLib::getOrCreateMeshProperty(), MeshLib::Mesh::getProperties(), MeshLib::Node, OGS_FATAL, ParameterLib::SpatialPosition::setNodeID(), and MeshLib::PropertyVector< PROP_VAL_TYPE >::size().
|
overridevirtual |
Writes the values of essential BCs to bc_values
.
Reimplemented from ProcessLib::BoundaryCondition.
Definition at line 74 of file SolutionDependentDirichletBoundaryCondition.cpp.
References _bc_mesh, _component_id, _dof_table_boundary, _parameter, _variable_id, and ProcessLib::getEssentialBCValuesLocal().
|
overridevirtual |
Renchao: The original idea to place the update of the boundary condition value at the preTimestep stage. The update could be achieved within the class function "Process::preTimestep". Whereas, I find it not doable to implement in this way. The class function "Process::preTimestep" is called in a row by the functions "preTimestepForAllProcesses" and "TimeLoop::outputSolutions". These two functions are called when initializing and subsequently looping over the "TimeLoop". Actually, it is not intended to make the boundary condition value updated in the first loop. Instead, the update is intended to start from the second loop. For these two reasons, I think it more proper to do the implementation at the postTimestep stage.
Reimplemented from ProcessLib::BoundaryCondition.
Definition at line 82 of file SolutionDependentDirichletBoundaryCondition.cpp.
References _bc_mesh, _component_id, _dof_table_boundary, _solution_dependent_bc, _variable_id, MeshLib::Mesh::getID(), MeshLib::Mesh::getNodes(), MeshLib::Node, and MeshLib::PropertyVector< PROP_VAL_TYPE >::size().
|
private |
Definition at line 57 of file SolutionDependentDirichletBoundaryCondition.h.
Referenced by SolutionDependentDirichletBoundaryCondition(), getEssentialBCValues(), and postTimestep().
|
private |
Definition at line 59 of file SolutionDependentDirichletBoundaryCondition.h.
Referenced by SolutionDependentDirichletBoundaryCondition(), getEssentialBCValues(), and postTimestep().
|
private |
Definition at line 60 of file SolutionDependentDirichletBoundaryCondition.h.
Referenced by SolutionDependentDirichletBoundaryCondition(), getEssentialBCValues(), and postTimestep().
|
private |
Definition at line 61 of file SolutionDependentDirichletBoundaryCondition.h.
Referenced by SolutionDependentDirichletBoundaryCondition(), and getEssentialBCValues().
|
private |
Definition at line 64 of file SolutionDependentDirichletBoundaryCondition.h.
Referenced by SolutionDependentDirichletBoundaryCondition(), and postTimestep().
|
private |
Definition at line 58 of file SolutionDependentDirichletBoundaryCondition.h.
Referenced by SolutionDependentDirichletBoundaryCondition(), getEssentialBCValues(), and postTimestep().