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

Detailed Description

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

Definition at line 33 of file VariableDependentNeumannBoundaryConditionLocalAssembler.h.

#include <VariableDependentNeumannBoundaryConditionLocalAssembler.h>

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

Public Member Functions

 VariableDependentNeumannBoundaryConditionLocalAssembler (MeshLib::Element const &e, std::size_t const local_matrix_size, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, VariableDependentNeumannBoundaryConditionData const &data)
 
void assemble (std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table_boundary, double const t, std::vector< GlobalVector * > const &x, int const process_id, 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
 

Private Types

using Base
 
using NodalVectorType = typename Base::NodalVectorType
 
using NodalMatrixType = typename Base::NodalMatrixType
 

Private Attributes

VariableDependentNeumannBoundaryConditionData const & _data
 
std::size_t const _local_matrix_size
 

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::VariableDependentNeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::Base
private
Initial value:
GenericNaturalBoundaryConditionLocalAssembler(MeshLib::Element const &e, bool is_axially_symmetric, NumLib::GenericIntegrationMethod const &integration_method)

Definition at line 37 of file VariableDependentNeumannBoundaryConditionLocalAssembler.h.

◆ NodalMatrixType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::VariableDependentNeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::NodalMatrixType = typename Base::NodalMatrixType
private

◆ NodalVectorType

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

Constructor & Destructor Documentation

◆ VariableDependentNeumannBoundaryConditionLocalAssembler()

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

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

Definition at line 45 of file VariableDependentNeumannBoundaryConditionLocalAssembler.h.

51 : Base(e, is_axially_symmetric, integration_method),
52 _data(data),
53 _local_matrix_size(local_matrix_size)
54 {
55 }
GenericNaturalBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim > Base

Member Function Documentation

◆ assemble()

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

Implements ProcessLib::GenericNaturalBoundaryConditionLocalAssemblerInterface.

Definition at line 57 of file VariableDependentNeumannBoundaryConditionLocalAssembler.h.

62 {
64 _local_rhs.setZero();
65 // Get element nodes for the interpolation from nodes to
66 // integration point.
67 NodalVectorType const constant_node_values =
69 .template topRows<ShapeFunction::MeshElement::n_all_nodes>();
70 NodalVectorType const coefficient_current_variable_node_values =
73 .template topRows<ShapeFunction::MeshElement::n_all_nodes>();
74 NodalVectorType const coefficient_other_variable_node_values =
77 .template topRows<ShapeFunction::MeshElement::n_all_nodes>();
78 NodalVectorType const coefficient_mixed_variables_node_values =
81 .template topRows<ShapeFunction::MeshElement::n_all_nodes>();
82 unsigned const n_integration_points =
84
85 auto const indices_current_variable =
86 NumLib::getIndices(mesh_item_id, dof_table_boundary);
87 auto const indices_other_variable = NumLib::getIndices(
89 std::vector<double> const local_current_variable =
90 x[process_id]->get(indices_current_variable);
91 std::vector<double> const local_other_variable =
92 x[process_id]->get(indices_other_variable);
93
94 for (unsigned ip = 0; ip < n_integration_points; ip++)
95 {
96 auto const& n_and_weight = Base::_ns_and_weights[ip];
97 auto const& N = n_and_weight.N;
98 auto const& w = n_and_weight.weight;
99
100 double current_variable_int_pt = 0.0;
101 double other_variable_int_pt = 0.0;
102
103 NumLib::shapeFunctionInterpolate(local_current_variable, N,
104 current_variable_int_pt);
105 NumLib::shapeFunctionInterpolate(local_other_variable, N,
106 other_variable_int_pt);
107 NodalVectorType const neumann_node_values =
108 constant_node_values +
109 coefficient_current_variable_node_values *
110 current_variable_int_pt +
111 coefficient_other_variable_node_values * other_variable_int_pt +
112 coefficient_mixed_variables_node_values *
113 current_variable_int_pt * other_variable_int_pt;
114 _local_rhs.noalias() += N * neumann_node_values.dot(N) * w;
115 }
116
117 b.add(indices_current_variable, _local_rhs);
118 }
void add(IndexType rowId, double v)
add entry
Definition EigenVector.h:76
std::vector< NAndWeight, Eigen::aligned_allocator< NAndWeight > > const _ns_and_weights
void shapeFunctionInterpolate(const NodalValues &, const ShapeMatrix &)
std::vector< GlobalIndexType > getIndices(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
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

References ProcessLib::VariableDependentNeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_data, ProcessLib::GenericNaturalBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_element, ProcessLib::GenericNaturalBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::VariableDependentNeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_local_matrix_size, ProcessLib::GenericNaturalBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_ns_and_weights, MathLib::EigenVector::add(), ProcessLib::VariableDependentNeumannBoundaryConditionData::coefficient_current_variable, ProcessLib::VariableDependentNeumannBoundaryConditionData::coefficient_mixed_variables, ProcessLib::VariableDependentNeumannBoundaryConditionData::coefficient_other_variable, ProcessLib::VariableDependentNeumannBoundaryConditionData::constant, ProcessLib::VariableDependentNeumannBoundaryConditionData::dof_table_boundary_other_variable, NumLib::getIndices(), ParameterLib::Parameter< T >::getNodalValuesOnElement(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), and NumLib::detail::shapeFunctionInterpolate().

Member Data Documentation

◆ _data

◆ _local_matrix_size

template<typename ShapeFunction , int GlobalDim>
std::size_t const ProcessLib::VariableDependentNeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_local_matrix_size
private

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