OGS
ProcessLib::DirichletBoundaryConditionWithinTimeInterval Class Referencefinal

Detailed Description

#include <DirichletBoundaryConditionWithinTimeInterval.h>

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

Public Member Functions

 DirichletBoundaryConditionWithinTimeInterval (BaseLib::TimeInterval time_interval, 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 Member Functions

void config (NumLib::LocalToGlobalIndexMap const &dof_table_bulk)
 

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
 
BaseLib::TimeInterval const _time_interval
 

Constructor & Destructor Documentation

◆ DirichletBoundaryConditionWithinTimeInterval()

ProcessLib::DirichletBoundaryConditionWithinTimeInterval::DirichletBoundaryConditionWithinTimeInterval ( BaseLib::TimeInterval time_interval,
ParameterLib::Parameter< double > const & parameter,
MeshLib::Mesh const & bc_mesh,
NumLib::LocalToGlobalIndexMap const & dof_table_bulk,
int const variable_id,
int const component_id )

Member Function Documentation

◆ config()

void ProcessLib::DirichletBoundaryConditionWithinTimeInterval::config ( NumLib::LocalToGlobalIndexMap const & dof_table_bulk)
private

Definition at line 39 of file DirichletBoundaryConditionWithinTimeInterval.cpp.

41{
44
45 std::vector<MeshLib::Node*> const& bc_nodes = _bc_mesh.getNodes();
46 MeshLib::MeshSubset bc_mesh_subset(_bc_mesh, bc_nodes);
47
48 // Create local DOF table from the BC mesh subset for the given variable
49 // and component id.
50 _dof_table_boundary = dof_table_bulk.deriveBoundaryConstrainedMap(
51 _variable_id, {_component_id}, std::move(bc_mesh_subset));
52}
A subset of nodes on a single mesh.
Definition MeshSubset.h:26
std::vector< Node * > const & getNodes() const
Get the nodes-vector for the mesh.
Definition Mesh.h:106
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().

Referenced by DirichletBoundaryConditionWithinTimeInterval().

◆ getEssentialBCValues()

void ProcessLib::DirichletBoundaryConditionWithinTimeInterval::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 54 of file DirichletBoundaryConditionWithinTimeInterval.cpp.

57{
59 {
61 _variable_id, _component_id, t, x, bc_values);
62 return;
63 }
64
65 bc_values.ids.clear();
66 bc_values.values.clear();
67}
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)
bool contains(const double current_time) const

References _bc_mesh, _component_id, _dof_table_boundary, _parameter, _time_interval, _variable_id, BaseLib::TimeInterval::contains(), ProcessLib::getEssentialBCValuesLocal(), NumLib::IndexValueVector< typename >::ids, and NumLib::IndexValueVector< typename >::values.

Member Data Documentation

◆ _bc_mesh

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

Definition at line 61 of file DirichletBoundaryConditionWithinTimeInterval.h.

Referenced by config(), and getEssentialBCValues().

◆ _component_id

int const ProcessLib::DirichletBoundaryConditionWithinTimeInterval::_component_id
private

Definition at line 65 of file DirichletBoundaryConditionWithinTimeInterval.h.

Referenced by config(), and getEssentialBCValues().

◆ _dof_table_boundary

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

Definition at line 63 of file DirichletBoundaryConditionWithinTimeInterval.h.

Referenced by config(), and getEssentialBCValues().

◆ _parameter

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

Definition at line 59 of file DirichletBoundaryConditionWithinTimeInterval.h.

Referenced by getEssentialBCValues().

◆ _time_interval

BaseLib::TimeInterval const ProcessLib::DirichletBoundaryConditionWithinTimeInterval::_time_interval
private

Definition at line 67 of file DirichletBoundaryConditionWithinTimeInterval.h.

Referenced by getEssentialBCValues().

◆ _variable_id

int const ProcessLib::DirichletBoundaryConditionWithinTimeInterval::_variable_id
private

Definition at line 64 of file DirichletBoundaryConditionWithinTimeInterval.h.

Referenced by config(), and getEssentialBCValues().


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