OGS
ProcessLib::DirichletBoundaryCondition Class Referencefinal

Detailed Description

The DirichletBoundaryCondition class describes a constant in space and time Dirichlet boundary condition. The expected parameter in the passed configuration is "value" which, when not present defaults to zero.

Definition at line 34 of file DirichletBoundaryCondition.h.

#include <DirichletBoundaryCondition.h>

Inheritance diagram for ProcessLib::DirichletBoundaryCondition:
[legend]
Collaboration diagram for ProcessLib::DirichletBoundaryCondition:
[legend]

Public Member Functions

 DirichletBoundaryCondition (ParameterLib::Parameter< double > const &parameter, MeshLib::Mesh const &bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id)
 
void getEssentialBCValues (const double t, GlobalVector const &x, NumLib::IndexValueVector< GlobalIndexType > &bc_values) const override
 Writes the values of essential BCs to bc_values.
 
- 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 void postTimestep (const double, std::vector< GlobalVector * > const &, int const)
 
virtual ~BoundaryCondition ()=default
 

Private Attributes

ParameterLib::Parameter< double > const & _parameter
 
MeshLib::Mesh const & _bc_mesh
 
std::unique_ptr< NumLib::LocalToGlobalIndexMap const > _dof_table_boundary
 
int const _variable_id
 
int const _component_id
 

Constructor & Destructor Documentation

◆ DirichletBoundaryCondition()

ProcessLib::DirichletBoundaryCondition::DirichletBoundaryCondition ( 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 DirichletBoundaryCondition.cpp.

31 : _parameter(parameter),
32 _bc_mesh(bc_mesh),
33 _variable_id(variable_id),
34 _component_id(component_id)
35{
38
39 std::vector<MeshLib::Node*> const& bc_nodes = bc_mesh.getNodes();
40 MeshLib::MeshSubset bc_mesh_subset(_bc_mesh, bc_nodes);
41
42 // Create local DOF table from the BC mesh subset for the given variable
43 // and component id.
44 _dof_table_boundary = dof_table_bulk.deriveBoundaryConstrainedMap(
45 variable_id, {component_id}, std::move(bc_mesh_subset));
46}
A subset of nodes on a single mesh.
Definition MeshSubset.h:26
ParameterLib::Parameter< double > const & _parameter
std::unique_ptr< NumLib::LocalToGlobalIndexMap const > _dof_table_boundary
void checkParametersOfDirichletBoundaryCondition(MeshLib::Mesh const &bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id)

References _bc_mesh, _component_id, _dof_table_boundary, _variable_id, ProcessLib::checkParametersOfDirichletBoundaryCondition(), NumLib::LocalToGlobalIndexMap::deriveBoundaryConstrainedMap(), and MeshLib::Mesh::getNodes().

Member Function Documentation

◆ getEssentialBCValues()

void ProcessLib::DirichletBoundaryCondition::getEssentialBCValues ( const double ,
GlobalVector const & ,
NumLib::IndexValueVector< GlobalIndexType > &  ) const
overridevirtual

Writes the values of essential BCs to bc_values.

Reimplemented from ProcessLib::BoundaryCondition.

Definition at line 48 of file DirichletBoundaryCondition.cpp.

51{
53 _variable_id, _component_id, t, x, bc_values);
54}
void getEssentialBCValuesLocal(ParameterLib::Parameter< double > const &parameter, MeshLib::Mesh const &bc_mesh, std::vector< std::size_t > const &nodes_in_bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_boundary, int const variable_id, int const component_id, const double t, GlobalVector const &, NumLib::IndexValueVector< GlobalIndexType > &bc_values)

References _bc_mesh, _component_id, _dof_table_boundary, _parameter, _variable_id, and ProcessLib::getEssentialBCValuesLocal().

Member Data Documentation

◆ _bc_mesh

MeshLib::Mesh const& ProcessLib::DirichletBoundaryCondition::_bc_mesh
private

◆ _component_id

int const ProcessLib::DirichletBoundaryCondition::_component_id
private

◆ _dof_table_boundary

std::unique_ptr<NumLib::LocalToGlobalIndexMap const> ProcessLib::DirichletBoundaryCondition::_dof_table_boundary
private

◆ _parameter

ParameterLib::Parameter<double> const& ProcessLib::DirichletBoundaryCondition::_parameter
private

Definition at line 48 of file DirichletBoundaryCondition.h.

Referenced by getEssentialBCValues().

◆ _variable_id

int const ProcessLib::DirichletBoundaryCondition::_variable_id
private

The documentation for this class was generated from the following files: