OGS
ProcessLib::GenericNaturalBoundaryCondition< BoundaryConditionData, LocalAssemblerImplementation > Class Template Referencefinal

Detailed Description

template<typename BoundaryConditionData, template< typename, int > class LocalAssemblerImplementation>
class ProcessLib::GenericNaturalBoundaryCondition< BoundaryConditionData, LocalAssemblerImplementation >

Definition at line 16 of file GenericNaturalBoundaryCondition.h.

#include <GenericNaturalBoundaryCondition.h>

Inheritance diagram for ProcessLib::GenericNaturalBoundaryCondition< BoundaryConditionData, LocalAssemblerImplementation >:
[legend]
Collaboration diagram for ProcessLib::GenericNaturalBoundaryCondition< BoundaryConditionData, LocalAssemblerImplementation >:
[legend]

Public Member Functions

template<typename Data>
 GenericNaturalBoundaryCondition (unsigned const integration_order, unsigned const shapefunction_order, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id, unsigned const global_dim, MeshLib::Mesh const &bc_mesh, Data &&data)
void applyNaturalBC (const double t, std::vector< GlobalVector * > const &x, int const process_id, GlobalMatrix *K, GlobalVector &b, GlobalMatrix *Jac) override
Public Member Functions inherited from ProcessLib::BoundaryCondition
virtual void getEssentialBCValues (const double, GlobalVector const &, NumLib::IndexValueVector< GlobalIndexType > &) const
 Writes the values of essential BCs to bc_values.
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

BoundaryConditionData _data
 Data used in the assembly of the specific boundary condition.
MeshLib::Mesh const & _bc_mesh
 A lower-dimensional mesh on which the boundary condition is defined.
std::unique_ptr< NumLib::LocalToGlobalIndexMap_dof_table_boundary
std::vector< std::unique_ptr< GenericNaturalBoundaryConditionLocalAssemblerInterface > > _local_assemblers
 Local assemblers for each element of number of _elements.

Constructor & Destructor Documentation

◆ GenericNaturalBoundaryCondition()

template<typename BoundaryConditionData, template< typename, int > class LocalAssemblerImplementation>
template<typename Data>
ProcessLib::GenericNaturalBoundaryCondition< BoundaryConditionData, LocalAssemblerImplementation >::GenericNaturalBoundaryCondition ( unsigned const integration_order,
unsigned const shapefunction_order,
NumLib::LocalToGlobalIndexMap const & dof_table_bulk,
int const variable_id,
int const component_id,
unsigned const global_dim,
MeshLib::Mesh const & bc_mesh,
Data && data )

Create a boundary condition process from given config, DOF-table, and a mesh subset for a given variable and its component. A local DOF-table, a subset of the given one, is constructed.

Definition at line 14 of file GenericNaturalBoundaryCondition-impl.h.

21{
23 typename std::decay_t<Data>>,
24 "Type mismatch between declared and passed BC data.");
25
26 // check basic data consistency
27 if (variable_id >=
28 static_cast<int>(dof_table_bulk.getNumberOfVariables()) ||
30 dof_table_bulk.getNumberOfVariableComponents(variable_id))
31 {
33 "Variable id or component id too high. Actual values: ({:d}, "
34 "{:d}), "
35 "maximum values: ({:d}, {:d}).",
36 variable_id, component_id, dof_table_bulk.getNumberOfVariables(),
37 dof_table_bulk.getNumberOfVariableComponents(variable_id));
38 }
39
40 if (!_bc_mesh.getProperties().template existsPropertyVector<std::size_t>(
42 {
44 "The required bulk node ids map does not exist in the boundary "
45 "mesh '{:s}'.",
46 _bc_mesh.getName());
47 }
48
50 DBUG(
51 "Found {:d} nodes for Natural BCs for the variable {:d} and component "
52 "{:d}",
54
56
57 // Create local DOF table from the BC mesh subset for the given variable and
58 // component id.
59 _dof_table_boundary = dof_table_bulk.deriveBoundaryConstrainedMap(
61
67 _bc_mesh.isAxiallySymmetric(), _data);
68}
#define OGS_FATAL(...)
Definition Error.h:19
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
MeshLib::Mesh const & _bc_mesh
A lower-dimensional mesh on which the boundary condition is defined.
BoundaryConditionData _data
Data used in the assembly of the specific boundary condition.
std::vector< std::unique_ptr< GenericNaturalBoundaryConditionLocalAssemblerInterface > > _local_assemblers
Local assemblers for each element of number of _elements.
std::unique_ptr< NumLib::LocalToGlobalIndexMap > _dof_table_boundary

References GenericNaturalBoundaryCondition(), _bc_mesh, _data, _dof_table_boundary, _local_assemblers, ProcessLib::BoundaryConditionAndSourceTerm::createLocalAssemblers(), DBUG(), MeshLib::getBulkIDString(), MeshLib::Node, and OGS_FATAL.

Referenced by GenericNaturalBoundaryCondition().

Member Function Documentation

◆ applyNaturalBC()

template<typename BoundaryConditionData, template< typename, int > class LocalAssemblerImplementation>
void ProcessLib::GenericNaturalBoundaryCondition< BoundaryConditionData, LocalAssemblerImplementation >::applyNaturalBC ( const double t,
std::vector< GlobalVector * > const & x,
int const process_id,
GlobalMatrix * K,
GlobalVector & b,
GlobalMatrix * Jac )
overridevirtual

Calls local assemblers which calculate their contributions to the global matrix and the right-hand-side.

Reimplemented from ProcessLib::BoundaryCondition.

Definition at line 74 of file GenericNaturalBoundaryCondition-impl.h.

References _dof_table_boundary, _local_assemblers, applyNaturalBC(), ProcessLib::GenericNaturalBoundaryConditionLocalAssemblerInterface::assemble(), and NumLib::SerialExecutor::executeMemberOnDereferenced().

Referenced by applyNaturalBC().

Member Data Documentation

◆ _bc_mesh

template<typename BoundaryConditionData, template< typename, int > class LocalAssemblerImplementation>
MeshLib::Mesh const& ProcessLib::GenericNaturalBoundaryCondition< BoundaryConditionData, LocalAssemblerImplementation >::_bc_mesh
private

A lower-dimensional mesh on which the boundary condition is defined.

Definition at line 40 of file GenericNaturalBoundaryCondition.h.

Referenced by GenericNaturalBoundaryCondition().

◆ _data

template<typename BoundaryConditionData, template< typename, int > class LocalAssemblerImplementation>
BoundaryConditionData ProcessLib::GenericNaturalBoundaryCondition< BoundaryConditionData, LocalAssemblerImplementation >::_data
private

Data used in the assembly of the specific boundary condition.

Definition at line 37 of file GenericNaturalBoundaryCondition.h.

Referenced by GenericNaturalBoundaryCondition().

◆ _dof_table_boundary

template<typename BoundaryConditionData, template< typename, int > class LocalAssemblerImplementation>
std::unique_ptr<NumLib::LocalToGlobalIndexMap> ProcessLib::GenericNaturalBoundaryCondition< BoundaryConditionData, LocalAssemblerImplementation >::_dof_table_boundary
private

Local dof table, a subset of the global one restricted to the participating number of _elements of the boundary condition.

Definition at line 44 of file GenericNaturalBoundaryCondition.h.

Referenced by GenericNaturalBoundaryCondition(), and applyNaturalBC().

◆ _local_assemblers

template<typename BoundaryConditionData, template< typename, int > class LocalAssemblerImplementation>
std::vector< std::unique_ptr<GenericNaturalBoundaryConditionLocalAssemblerInterface> > ProcessLib::GenericNaturalBoundaryCondition< BoundaryConditionData, LocalAssemblerImplementation >::_local_assemblers
private

Local assemblers for each element of number of _elements.

Definition at line 49 of file GenericNaturalBoundaryCondition.h.

Referenced by GenericNaturalBoundaryCondition(), and applyNaturalBC().


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