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

Detailed Description

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

Definition at line 56 of file ConstraintDirichletBoundaryConditionLocalAssembler.h.

#include <ConstraintDirichletBoundaryConditionLocalAssembler.h>

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

Public Member Functions

 ConstraintDirichletBoundaryConditionLocalAssembler (MeshLib::Element const &surface_element, std::size_t, bool const is_axially_symmetric, unsigned const integration_order, 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
 
IntegrationMethod const _integration_method
 
std::size_t const _bulk_element_id
 
Eigen::Vector3d const _surface_element_normal
 

Member Typedef Documentation

◆ NodalMatrixType

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

◆ NodalVectorType

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

◆ ShapeMatricesType

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

Constructor & Destructor Documentation

◆ ConstraintDirichletBoundaryConditionLocalAssembler()

template<typename ShapeFunction , typename IntegrationMethod , int GlobalDim>
ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::ConstraintDirichletBoundaryConditionLocalAssembler ( MeshLib::Element const &  surface_element,
std::size_t  ,
bool const  is_axially_symmetric,
unsigned const  integration_order,
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_orderThe order of the integration.
bulk_meshThe bulk mesh the process is defined on.
bulk_idsPairs of bulk element ids and bulk element face ids.

Definition at line 72 of file ConstraintDirichletBoundaryConditionLocalAssembler.h.

77  : _surface_element(surface_element),
78  _integration_method(integration_order),
79  _bulk_element_id(bulk_ids[_surface_element.getID()].first),
81  _surface_element, *(bulk_mesh.getElements()[_bulk_element_id])))
82  {
83  auto const shape_matrices =
85  GlobalDim, NumLib::ShapeMatrixType::N_J>(
86  _surface_element, is_axially_symmetric, _integration_method);
87 
88  auto const bulk_face_id = bulk_ids[_surface_element.getID()].second;
89 
90  auto const n_integration_points =
91  _integration_method.getNumberOfPoints();
92  _ip_data.reserve(n_integration_points);
93 
94  for (unsigned ip = 0; ip < n_integration_points; ++ip)
95  {
96  auto const& wp = _integration_method.getWeightedPoint(ip);
97  auto bulk_element_point = MeshLib::getBulkElementPoint(
98  bulk_mesh, _bulk_element_id, bulk_face_id, wp);
99  _ip_data.emplace_back(shape_matrices[ip].detJ,
100  shape_matrices[ip].integralMeasure,
101  wp.getWeight(),
102  std::move(bulk_element_point));
103  }
104  }
virtual std::size_t getID() const final
Returns the ID of the element.
Definition: Element.h:82
MathLib::Point3d getBulkElementPoint(Tri const &, std::size_t const face_id, MathLib::WeightedPoint1D const &wp)
Eigen::Vector3d calculateNormalizedSurfaceNormal(MeshLib::Element const &surface_element, MeshLib::Element const &bulk_element)
Definition: Utils.h:44
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, IntegrationMethod, GlobalDim >::_bulk_element_id, ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::_integration_method, ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::_ip_data, ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::_surface_element, MeshLib::getBulkElementPoint(), MeshLib::Element::getID(), NumLib::initShapeMatrices(), and NumLib::N_J.

Member Function Documentation

◆ integrate()

template<typename ShapeFunction , typename IntegrationMethod , int GlobalDim>
double ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, IntegrationMethod, 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 112 of file ConstraintDirichletBoundaryConditionLocalAssembler.h.

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

References ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::_bulk_element_id, ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::_integration_method, ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::_ip_data, and ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::_surface_element_normal.

Member Data Documentation

◆ _bulk_element_id

◆ _integration_method

◆ _ip_data

◆ _surface_element

template<typename ShapeFunction , typename IntegrationMethod , int GlobalDim>
MeshLib::Element const& ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::_surface_element
private

◆ _surface_element_normal

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

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