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

Detailed Description

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

Definition at line 57 of file ConstraintDirichletBoundaryConditionLocalAssembler.h.

#include <ConstraintDirichletBoundaryConditionLocalAssembler.h>

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

Public Member Functions

 ConstraintDirichletBoundaryConditionLocalAssembler (MeshLib::Element const &surface_element, std::size_t, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, MeshLib::Mesh const &bulk_mesh, std::vector< std::pair< std::size_t, unsigned > > bulk_ids)
 
double integrate (std::vector< GlobalVector * > const &x, double const t, std::function< Eigen::Vector3d(std::size_t const, MathLib::Point3d const &, double const, std::vector< GlobalVector * > const &)> const &getFlux) override
 
- Public Member Functions inherited from ProcessLib::ConstraintDirichletBoundaryConditionLocalAssemblerInterface
virtual ~ConstraintDirichletBoundaryConditionLocalAssemblerInterface ()=default
 

Protected Types

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

Private Attributes

MeshLib::Element const & _surface_element
 
std::vector< IntegrationPointData_ip_data
 
NumLib::GenericIntegrationMethod const & _integration_method
 
std::size_t const _bulk_element_id
 
Eigen::Vector3d const _surface_element_normal
 

Member Typedef Documentation

◆ NodalMatrixType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::NodalMatrixType = typename ShapeMatricesType::NodalMatrixType
protected

◆ NodalVectorType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::NodalVectorType = typename ShapeMatricesType::NodalVectorType
protected

◆ ShapeMatricesType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::ShapeMatricesType = ShapeMatrixPolicyType<ShapeFunction, GlobalDim>
protected

Constructor & Destructor Documentation

◆ ConstraintDirichletBoundaryConditionLocalAssembler()

template<typename ShapeFunction , int GlobalDim>
ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::ConstraintDirichletBoundaryConditionLocalAssembler ( MeshLib::Element const & surface_element,
std::size_t ,
NumLib::GenericIntegrationMethod const & integration_method,
bool const is_axially_symmetric,
MeshLib::Mesh const & bulk_mesh,
std::vector< std::pair< std::size_t, unsigned > > bulk_ids )
inline

Precomputes the shape matrices for a given surface element.

Parameters
surface_elementThe surface element used for precomputing the
is_axially_symmetricCorrects integration measure for cylinder coordinates.
integration_methodThe integration method used.
bulk_meshThe bulk mesh the process is defined on.
bulk_idsPairs of bulk element ids and bulk element face ids.

Definition at line 73 of file ConstraintDirichletBoundaryConditionLocalAssembler.h.

79 : _surface_element(surface_element),
80 _integration_method(integration_method),
81 _bulk_element_id(bulk_ids[_surface_element.getID()].first),
83 _surface_element, *(bulk_mesh.getElements()[_bulk_element_id])))
84 {
85 auto const shape_matrices =
88 _surface_element, is_axially_symmetric, _integration_method);
89
90 auto const bulk_face_id = bulk_ids[_surface_element.getID()].second;
91 auto const& bulk_element = *bulk_mesh.getElement(_bulk_element_id);
92
93 auto const n_integration_points =
95 _ip_data.reserve(n_integration_points);
96
97 for (unsigned ip = 0; ip < n_integration_points; ++ip)
98 {
99 auto const& wp = _integration_method.getWeightedPoint(ip);
100 auto bulk_element_point =
101 MeshLib::getBulkElementPoint(bulk_element, bulk_face_id, wp);
102 _ip_data.emplace_back(shape_matrices[ip].detJ,
103 shape_matrices[ip].integralMeasure,
104 wp.getWeight(),
105 std::move(bulk_element_point));
106 }
107 }
std::size_t getID() const
Returns the ID of the element.
Definition Element.h:89
MathLib::WeightedPoint const & getWeightedPoint(unsigned const igp) const
MathLib::Point3d getBulkElementPoint(MeshLib::CellType const bulk_element_cell_type, std::size_t const bulk_face_id, MathLib::WeightedPoint const &point_on_face)
Eigen::Vector3d calculateNormalizedSurfaceNormal(MeshLib::Element const &surface_element, MeshLib::Element const &bulk_element)
Definition Utils.h:42
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)
@ N_J
calculates N, dNdr, J, and detJ

References ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_bulk_element_id, ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_surface_element, MeshLib::getBulkElementPoint(), MeshLib::Mesh::getElement(), MeshLib::Element::getID(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), NumLib::GenericIntegrationMethod::getWeightedPoint(), NumLib::initShapeMatrices(), and NumLib::N_J.

Member Function Documentation

◆ integrate()

template<typename ShapeFunction , int GlobalDim>
double ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::integrate ( std::vector< GlobalVector * > const & x,
double const t,
std::function< Eigen::Vector3d(std::size_t const, MathLib::Point3d const &, double const, std::vector< GlobalVector * > const &)> const & getFlux )
inlineoverridevirtual

Integration for the element with the id element_id.

Parameters
xThe global vector containing the values for numerical integration.
tThe point in time the the integration will be performed.
getFluxThe function of the constraining process used to calculate the flux.

Implements ProcessLib::ConstraintDirichletBoundaryConditionLocalAssemblerInterface.

Definition at line 115 of file ConstraintDirichletBoundaryConditionLocalAssembler.h.

120 {
121 auto const n_integration_points =
123 // integrated_value +=
124 // int_{\Gamma_e} \alpha \cdot flux \cdot normal \d \Gamma
125 double integrated_value = 0;
126 for (unsigned ip = 0; ip < n_integration_points; ip++)
127 {
128 auto const bulk_flux = getFlux(
129 _bulk_element_id, _ip_data[ip].bulk_element_point, t, x);
130
131 // TODO find solution for 2d case
132 double const bulk_grad_times_normal(
133 Eigen::Map<Eigen::RowVectorXd const>(bulk_flux.data(),
134 bulk_flux.size())
136
137 integrated_value +=
138 bulk_grad_times_normal *
139 _ip_data[ip].detJ_times_integralMeasure_times_weight;
140 }
141 return integrated_value;
142 }

References ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_bulk_element_id, ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_surface_element_normal, and NumLib::GenericIntegrationMethod::getNumberOfPoints().

Member Data Documentation

◆ _bulk_element_id

◆ _integration_method

◆ _ip_data

◆ _surface_element

◆ _surface_element_normal

template<typename ShapeFunction , int GlobalDim>
Eigen::Vector3d const ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::_surface_element_normal
private

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