OGS
ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim > Class Template Referencefinal

Detailed Description

template<typename ShapeFunction, int GlobalDim>
class ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >

Definition at line 31 of file NeumannBoundaryConditionLocalAssembler.h.

#include <NeumannBoundaryConditionLocalAssembler.h>

Inheritance diagram for ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >:
[legend]
Collaboration diagram for ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >:
[legend]

Public Member Functions

 NeumannBoundaryConditionLocalAssembler (MeshLib::Element const &e, std::size_t const local_matrix_size, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, NeumannBoundaryConditionData const &data)
 
void assemble (std::size_t const id, NumLib::LocalToGlobalIndexMap const &dof_table_boundary, double const t, std::vector< GlobalVector * > const &, int const, GlobalMatrix *, GlobalVector &b, GlobalMatrix *) override
 
- Public Member Functions inherited from ProcessLib::GenericNaturalBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >
 GenericNaturalBoundaryConditionLocalAssembler (MeshLib::Element const &e, bool is_axially_symmetric, NumLib::GenericIntegrationMethod const &integration_method)
 
- Public Member Functions inherited from ProcessLib::GenericNaturalBoundaryConditionLocalAssemblerInterface
virtual ~GenericNaturalBoundaryConditionLocalAssemblerInterface ()=default
 

Public Attributes

 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
 

Private Types

using Base
 
using ShapeMatricesType = ShapeMatrixPolicyType<ShapeFunction, GlobalDim>
 
using NodalVectorType = typename Base::NodalVectorType
 

Private Attributes

NeumannBoundaryConditionData const & _data
 
NodalVectorType _local_rhs
 

Additional Inherited Members

- Protected Types inherited from ProcessLib::GenericNaturalBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >
using ShapeMatricesType = ShapeMatrixPolicyType<ShapeFunction, GlobalDim>
 
using NodalMatrixType = typename ShapeMatricesType::NodalMatrixType
 
using NodalVectorType = typename ShapeMatricesType::NodalVectorType
 
- Protected Attributes inherited from ProcessLib::GenericNaturalBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >
NumLib::GenericIntegrationMethod const & _integration_method
 
std::vector< NAndWeight, Eigen::aligned_allocator< NAndWeight > > const _ns_and_weights
 
MeshLib::Element const & _element
 

Member Typedef Documentation

◆ Base

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::Base
private
Initial value:
GenericNaturalBoundaryConditionLocalAssembler(MeshLib::Element const &e, bool is_axially_symmetric, NumLib::GenericIntegrationMethod const &integration_method)

Definition at line 35 of file NeumannBoundaryConditionLocalAssembler.h.

◆ NodalVectorType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::NodalVectorType = typename Base::NodalVectorType
private

Definition at line 38 of file NeumannBoundaryConditionLocalAssembler.h.

◆ ShapeMatricesType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::ShapeMatricesType = ShapeMatrixPolicyType<ShapeFunction, GlobalDim>
private

Definition at line 37 of file NeumannBoundaryConditionLocalAssembler.h.

Constructor & Destructor Documentation

◆ NeumannBoundaryConditionLocalAssembler()

template<typename ShapeFunction , int GlobalDim>
ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::NeumannBoundaryConditionLocalAssembler ( MeshLib::Element const & e,
std::size_t const local_matrix_size,
NumLib::GenericIntegrationMethod const & integration_method,
bool const is_axially_symmetric,
NeumannBoundaryConditionData const & data )
inline

The neumann_bc_value factor is directly integrated into the local element matrix.

Definition at line 43 of file NeumannBoundaryConditionLocalAssembler.h.

49 : Base(e, is_axially_symmetric, integration_method),
50 _data(data),
51 _local_rhs(local_matrix_size)
52 {
53 }
GenericNaturalBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim > Base

Member Function Documentation

◆ assemble()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::assemble ( std::size_t const id,
NumLib::LocalToGlobalIndexMap const & dof_table_boundary,
double const t,
std::vector< GlobalVector * > const & ,
int const ,
GlobalMatrix * ,
GlobalVector & b,
GlobalMatrix *  )
inlineoverridevirtual

Implements ProcessLib::GenericNaturalBoundaryConditionLocalAssemblerInterface.

Definition at line 55 of file NeumannBoundaryConditionLocalAssembler.h.

60 {
61 _local_rhs.setZero();
62
63 unsigned const n_integration_points =
65
66 NodalVectorType parameter_node_values;
69 {
70 // Get element nodes for the interpolation from nodes to integration
71 // point.
72 parameter_node_values =
75 .template topRows<
76 ShapeFunction::MeshElement::n_all_nodes>();
77 }
78
79 double integral_measure = 1.0;
80 for (unsigned ip = 0; ip < n_integration_points; ip++)
81 {
82 auto const& ip_data = Base::_ns_and_weights[ip];
83 auto const& N = ip_data.N;
84 auto const& w = ip_data.weight;
85
86 ParameterLib::SpatialPosition const position{
87 std::nullopt, Base::_element.getID(), ip,
91 Base::_element, N))};
92
94 {
95 integral_measure = (*_data.integral_measure)(t, position)[0];
96 }
99 {
100 _local_rhs.noalias() +=
101 N * parameter_node_values.dot(N) * w * integral_measure;
102 }
103 else
104 {
105 auto const value = _data.neumann_bc_parameter(t, position)[0];
106 _local_rhs.noalias() += N * value * w * integral_measure;
107 }
108 }
109
110 auto const indices = NumLib::getIndices(id, dof_table_boundary);
111 b.add(indices, _local_rhs);
112 }
void add(IndexType rowId, double v)
add entry
Definition EigenVector.h:76
std::size_t getID() const
Returns the ID of the element.
Definition Element.h:89
std::vector< NAndWeight, Eigen::aligned_allocator< NAndWeight > > const _ns_and_weights
ShapeMatrixPolicyType< ShapeFunction, GlobalDim > ShapeMatricesType
std::vector< GlobalIndexType > getIndices(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
std::array< double, 3 > interpolateCoordinates(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
A parameter represented by a mesh property vector.
virtual Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > getNodalValuesOnElement(MeshLib::Element const &element, double const t) const
Returns a matrix of values for all nodes of the given element.
Definition Parameter.h:164
ParameterLib::Parameter< double > const & neumann_bc_parameter
ParameterLib::Parameter< double > const *const integral_measure

References ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_data, ProcessLib::GenericNaturalBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_element, ProcessLib::GenericNaturalBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_local_rhs, ProcessLib::GenericNaturalBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_ns_and_weights, MathLib::EigenVector::add(), MeshLib::Element::getID(), NumLib::getIndices(), ParameterLib::Parameter< T >::getNodalValuesOnElement(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::NeumannBoundaryConditionData::integral_measure, NumLib::interpolateCoordinates(), and ProcessLib::NeumannBoundaryConditionData::neumann_bc_parameter.

Member Data Documentation

◆ _data

template<typename ShapeFunction , int GlobalDim>
NeumannBoundaryConditionData const& ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_data
private

◆ _local_rhs

template<typename ShapeFunction , int GlobalDim>
NodalVectorType ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_local_rhs
private

◆ EIGEN_MAKE_ALIGNED_OPERATOR_NEW

template<typename ShapeFunction , int GlobalDim>
ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::EIGEN_MAKE_ALIGNED_OPERATOR_NEW

Definition at line 120 of file NeumannBoundaryConditionLocalAssembler.h.


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