OGS
ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryCondition< GlobalDim, LocalAssemblerImplementation > Class Template Referencefinal

Detailed Description

template<int GlobalDim, template< typename, int > class LocalAssemblerImplementation>
class ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryCondition< GlobalDim, LocalAssemblerImplementation >

The normal traction boundary condition is a special type of Neumann boundary condition where the given value is applied in the direction of the element's normal vector \(\mathbf{n}\):

\[ \bar{t} := \sigma \mathbf{n} = p \mathbf{n}, \]

where \(p\) is the value on the boundary given by the parameter tag.

Definition at line 32 of file NormalTractionBoundaryCondition.h.

#include <NormalTractionBoundaryCondition.h>

Inheritance diagram for ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryCondition< GlobalDim, LocalAssemblerImplementation >:
[legend]
Collaboration diagram for ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryCondition< GlobalDim, LocalAssemblerImplementation >:
[legend]

Public Member Functions

 NormalTractionBoundaryCondition (unsigned const integration_order, unsigned const shapefunction_order, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, MeshLib::Mesh const &bc_mesh, ParameterLib::Parameter< double > const &pressure)
 
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

MeshLib::Mesh const & _bc_mesh
 
std::vector< MeshLib::Node * > _nodes_subset
 
std::unique_ptr< MeshLib::MeshSubset const > _mesh_subset_all_nodes
 
std::unique_ptr< NumLib::LocalToGlobalIndexMap_dof_table_boundary
 
unsigned const _integration_order
 Integration order for integration over the lower-dimensional elements.
 
std::vector< std::unique_ptr< NormalTractionBoundaryConditionLocalAssemblerInterface > > _local_assemblers
 Local assemblers for each element of number of _elements.
 
ParameterLib::Parameter< double > const & _pressure
 

Constructor & Destructor Documentation

◆ NormalTractionBoundaryCondition()

template<int GlobalDim, template< typename, int > class LocalAssemblerImplementation>
ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryCondition< GlobalDim, LocalAssemblerImplementation >::NormalTractionBoundaryCondition ( unsigned const integration_order,
unsigned const shapefunction_order,
NumLib::LocalToGlobalIndexMap const & dof_table_bulk,
int const variable_id,
MeshLib::Mesh const & bc_mesh,
ParameterLib::Parameter< double > const & pressure )

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 26 of file NormalTractionBoundaryCondition-impl.h.

32 : _bc_mesh(bc_mesh),
33 _integration_order(integration_order),
34 _pressure(pressure)
35{
36 // Create component ids vector for the current variable.
37 auto const& number_of_components =
38 dof_table_bulk.getNumberOfVariableComponents(variable_id);
39 std::vector<int> component_ids(number_of_components);
40 std::iota(std::begin(component_ids), std::end(component_ids), 0);
41
42 // BC mesh subset creation
43 std::vector<MeshLib::Node*> const bc_nodes = _bc_mesh.getNodes();
44 DBUG("Found {:d} nodes for Natural BCs for the variable {:d}",
45 bc_nodes.size(), variable_id);
46
47 MeshLib::MeshSubset bc_mesh_subset(_bc_mesh, bc_nodes);
48
49 // Create local DOF table from the BC mesh subset for the given variable and
50 // component ids.
51 _dof_table_boundary = dof_table_bulk.deriveBoundaryConstrainedMap(
52 variable_id, component_ids, std::move(bc_mesh_subset));
53
55 GlobalDim, LocalAssemblerImplementation>(
56 *_dof_table_boundary, shapefunction_order, _bc_mesh.getElements(),
59}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
A subset of nodes on a single mesh.
Definition MeshSubset.h:26
bool isAxiallySymmetric() const
Definition Mesh.h:137
std::vector< Node * > const & getNodes() const
Get the nodes-vector for the mesh.
Definition Mesh.h:106
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.
Definition Mesh.h:109
unsigned const _integration_order
Integration order for integration over the lower-dimensional elements.
std::vector< std::unique_ptr< NormalTractionBoundaryConditionLocalAssemblerInterface > > _local_assemblers
Local assemblers for each element of number of _elements.
void createLocalAssemblers(NumLib::LocalToGlobalIndexMap const &dof_table, const unsigned shapefunction_order, std::vector< MeshLib::Element * > const &mesh_elements, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, NumLib::IntegrationOrder const integration_order, ExtraCtorArgs &&... extra_ctor_args)

References DBUG().

Member Function Documentation

◆ applyNaturalBC()

template<int GlobalDim, template< typename, int > class LocalAssemblerImplementation>
void ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryCondition< GlobalDim, 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 63 of file NormalTractionBoundaryCondition-impl.h.

67{
70 _local_assemblers, *_dof_table_boundary, t, x, K, b, Jac);
71}
virtual void assemble(std::size_t const id, NumLib::LocalToGlobalIndexMap const &dof_table_boundary, double const t, std::vector< GlobalVector * > const &, GlobalMatrix &, GlobalVector &b, GlobalMatrix *)=0
static void executeMemberOnDereferenced(Method method, Container const &container, Args &&... args)

References NumLib::SerialExecutor::executeMemberOnDereferenced().

Member Data Documentation

◆ _bc_mesh

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

Definition at line 51 of file NormalTractionBoundaryCondition.h.

◆ _dof_table_boundary

template<int GlobalDim, template< typename, int > class LocalAssemblerImplementation>
std::unique_ptr<NumLib::LocalToGlobalIndexMap> ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryCondition< GlobalDim, 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 61 of file NormalTractionBoundaryCondition.h.

◆ _integration_order

template<int GlobalDim, template< typename, int > class LocalAssemblerImplementation>
unsigned const ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryCondition< GlobalDim, LocalAssemblerImplementation >::_integration_order
private

Integration order for integration over the lower-dimensional elements.

Definition at line 64 of file NormalTractionBoundaryCondition.h.

◆ _local_assemblers

template<int GlobalDim, template< typename, int > class LocalAssemblerImplementation>
std::vector< std::unique_ptr<NormalTractionBoundaryConditionLocalAssemblerInterface> > ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryCondition< GlobalDim, LocalAssemblerImplementation >::_local_assemblers
private

Local assemblers for each element of number of _elements.

Definition at line 69 of file NormalTractionBoundaryCondition.h.

◆ _mesh_subset_all_nodes

template<int GlobalDim, template< typename, int > class LocalAssemblerImplementation>
std::unique_ptr<MeshLib::MeshSubset const> ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryCondition< GlobalDim, LocalAssemblerImplementation >::_mesh_subset_all_nodes
private

Definition at line 57 of file NormalTractionBoundaryCondition.h.

◆ _nodes_subset

template<int GlobalDim, template< typename, int > class LocalAssemblerImplementation>
std::vector<MeshLib::Node*> ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryCondition< GlobalDim, LocalAssemblerImplementation >::_nodes_subset
private

Intersection of boundary nodes and bulk mesh subset for the variable_id/component_id pair.

Definition at line 55 of file NormalTractionBoundaryCondition.h.

◆ _pressure

template<int GlobalDim, template< typename, int > class LocalAssemblerImplementation>
ParameterLib::Parameter<double> const& ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryCondition< GlobalDim, LocalAssemblerImplementation >::_pressure
private

Definition at line 71 of file NormalTractionBoundaryCondition.h.


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