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

Detailed Description

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

Definition at line 37 of file VolumetricSourceTermFEM.h.

#include <VolumetricSourceTermFEM.h>

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

Public Member Functions

 VolumetricSourceTermLocalAssembler (MeshLib::Element const &element, std::size_t const local_matrix_size, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, ParameterLib::Parameter< double > const &volumetric_source_term)
 
void integrate (std::size_t const id, NumLib::LocalToGlobalIndexMap const &source_term_dof_table, double const t, GlobalVector &b) override
 
- Public Member Functions inherited from ProcessLib::VolumetricSourceTermLocalAssemblerInterface
virtual ~VolumetricSourceTermLocalAssemblerInterface ()=default
 

Private Types

using ShapeMatricesType = ShapeMatrixPolicyType<ShapeFunction, GlobalDim>
 
using LocalAssemblerTraits
 
using NodalVectorType = typename LocalAssemblerTraits::LocalVector
 
using NodalRowVectorType = typename ShapeMatricesType::NodalRowVectorType
 

Private Attributes

ParameterLib::Parameter< double > const & _volumetric_source_term
 
NumLib::GenericIntegrationMethod const & _integration_method
 
std::vector< SourceTermIntegrationPointData< NodalRowVectorType >, Eigen::aligned_allocator< SourceTermIntegrationPointData< NodalRowVectorType > > > _ip_data
 
MeshLib::Element const & _element
 
NodalVectorType _local_rhs
 

Static Private Attributes

static const unsigned NUM_NODAL_DOF = 1
 

Member Typedef Documentation

◆ LocalAssemblerTraits

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::LocalAssemblerTraits
private

◆ NodalRowVectorType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::NodalRowVectorType = typename ShapeMatricesType::NodalRowVectorType
private

Definition at line 48 of file VolumetricSourceTermFEM.h.

◆ NodalVectorType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::NodalVectorType = typename LocalAssemblerTraits::LocalVector
private

Definition at line 47 of file VolumetricSourceTermFEM.h.

◆ ShapeMatricesType

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

Definition at line 42 of file VolumetricSourceTermFEM.h.

Constructor & Destructor Documentation

◆ VolumetricSourceTermLocalAssembler()

template<typename ShapeFunction , int GlobalDim>
ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::VolumetricSourceTermLocalAssembler ( MeshLib::Element const & element,
std::size_t const local_matrix_size,
NumLib::GenericIntegrationMethod const & integration_method,
bool const is_axially_symmetric,
ParameterLib::Parameter< double > const & volumetric_source_term )
inline

Definition at line 51 of file VolumetricSourceTermFEM.h.

57 : _volumetric_source_term(volumetric_source_term),
58 _integration_method(integration_method),
59 _element(element),
60 _local_rhs(local_matrix_size)
61 {
62 unsigned const n_integration_points =
64
65 auto const shape_matrices =
67 GlobalDim>(_element, is_axially_symmetric,
69
70 for (unsigned ip = 0; ip < n_integration_points; ip++)
71 {
72 _ip_data.emplace_back(
73 shape_matrices[ip].N,
75 shape_matrices[ip].integralMeasure *
76 shape_matrices[ip].detJ);
77 }
78 }
double getWeight() const
MathLib::WeightedPoint const & getWeightedPoint(unsigned const igp) const
ParameterLib::Parameter< double > const & _volumetric_source_term
std::vector< SourceTermIntegrationPointData< NodalRowVectorType >, Eigen::aligned_allocator< SourceTermIntegrationPointData< NodalRowVectorType > > > _ip_data
NumLib::GenericIntegrationMethod const & _integration_method
std::vector< typename ShapeMatricesType::ShapeMatrices, Eigen::aligned_allocator< typename ShapeMatricesType::ShapeMatrices > > initShapeMatrices(MeshLib::Element const &e, bool const is_axially_symmetric, IntegrationMethod const &integration_method)

References ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::_element, ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::_ip_data, NumLib::GenericIntegrationMethod::getNumberOfPoints(), MathLib::WeightedPoint::getWeight(), NumLib::GenericIntegrationMethod::getWeightedPoint(), and NumLib::initShapeMatrices().

Member Function Documentation

◆ integrate()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::integrate ( std::size_t const id,
NumLib::LocalToGlobalIndexMap const & source_term_dof_table,
double const t,
GlobalVector & b )
inlineoverridevirtual

Implements ProcessLib::VolumetricSourceTermLocalAssemblerInterface.

Definition at line 80 of file VolumetricSourceTermFEM.h.

83 {
84 _local_rhs.setZero();
85
86 unsigned const n_integration_points =
88
89 for (unsigned ip = 0; ip < n_integration_points; ip++)
90 {
91 auto const& N = _ip_data[ip].N;
92 auto const& w = _ip_data[ip].integration_weight;
93
95 std::nullopt, _element.getID(), ip,
99 N))};
100 auto const st_val = _volumetric_source_term(t, pos)[0];
101
102 _local_rhs.noalias() += N.transpose() * st_val * w;
103 }
104 auto const indices = NumLib::getIndices(id, source_term_dof_table);
105 b.add(indices, _local_rhs);
106 }
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< 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)

References ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::_element, ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::_local_rhs, ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::_volumetric_source_term, MathLib::EigenVector::add(), MeshLib::Element::getID(), NumLib::getIndices(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), and NumLib::interpolateCoordinates().

Member Data Documentation

◆ _element

◆ _integration_method

◆ _ip_data

◆ _local_rhs

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

◆ _volumetric_source_term

template<typename ShapeFunction , int GlobalDim>
ParameterLib::Parameter<double> const& ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::_volumetric_source_term
private

◆ NUM_NODAL_DOF

template<typename ShapeFunction , int GlobalDim>
const unsigned ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::NUM_NODAL_DOF = 1
staticprivate

Definition at line 40 of file VolumetricSourceTermFEM.h.


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