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

Detailed Description

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

Definition at line 35 of file SurfaceFluxLocalAssembler.h.

#include <SurfaceFluxLocalAssembler.h>

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

Public Member Functions

 SurfaceFluxLocalAssembler (MeshLib::Element const &surface_element, std::size_t, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, MeshLib::PropertyVector< std::size_t > const &bulk_element_ids, MeshLib::PropertyVector< std::size_t > const &bulk_face_ids)
void integrate (std::size_t const element_id, std::vector< GlobalVector * > const &x, MeshLib::PropertyVector< double > &specific_flux, double const t, MeshLib::Mesh const &bulk_mesh, std::function< Eigen::Vector3d(std::size_t const, MathLib::Point3d const &, double const, std::vector< GlobalVector * > const &)> getFlux) override
Public Member Functions inherited from ProcessLib::SurfaceFluxLocalAssemblerInterface
virtual ~SurfaceFluxLocalAssemblerInterface ()=default

Protected Types

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

Static Private Member Functions

static Eigen::Vector3d getSurfaceNormal (MeshLib::Element const &surface_element, MeshLib::Element const &bulk_element)

Private Attributes

MeshLib::Element const & _surface_element
std::vector< double > _detJ_times_integralMeasure
NumLib::GenericIntegrationMethod const & _integration_method
std::size_t const _bulk_element_id
std::size_t const _bulk_face_id

Member Typedef Documentation

◆ NodalMatrixType

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

Definition at line 40 of file SurfaceFluxLocalAssembler.h.

◆ NodalVectorType

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

Definition at line 41 of file SurfaceFluxLocalAssembler.h.

◆ ShapeMatricesType

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

Definition at line 39 of file SurfaceFluxLocalAssembler.h.

Constructor & Destructor Documentation

◆ SurfaceFluxLocalAssembler()

template<typename ShapeFunction, int GlobalDim>
ProcessLib::SurfaceFluxLocalAssembler< ShapeFunction, GlobalDim >::SurfaceFluxLocalAssembler ( MeshLib::Element const & surface_element,
std::size_t ,
NumLib::GenericIntegrationMethod const & integration_method,
bool const is_axially_symmetric,
MeshLib::PropertyVector< std::size_t > const & bulk_element_ids,
MeshLib::PropertyVector< std::size_t > const & bulk_face_ids )
inline

Precomputes the shape matrices for a given surface element.

Parameters
surface_elementThe surface element used for precomputing the shape matrices used later on for the integration.
is_axially_symmetriccorrects integration measure for cylinder coordinates.
bulk_element_idsThe id of the corresponding element in the bulk mesh.
bulk_face_idsThe id of the corresponding face in the bulk element.
integration_methodThe integration method used.

Definition at line 54 of file SurfaceFluxLocalAssembler.h.

65 {
66 auto const n_integration_points =
67 _integration_method.getNumberOfPoints();
68
69 auto const shape_matrices =
74 {
77 }
78 }
ShapeMatrixPolicyType< ShapeFunction, GlobalDim > ShapeMatricesType
NumLib::GenericIntegrationMethod const & _integration_method

References _bulk_element_id, _bulk_face_id, _detJ_times_integralMeasure, _integration_method, _surface_element, NumLib::initShapeMatrices(), and NumLib::N_J.

Member Function Documentation

◆ getSurfaceNormal()

template<typename ShapeFunction, int GlobalDim>
Eigen::Vector3d ProcessLib::SurfaceFluxLocalAssembler< ShapeFunction, GlobalDim >::getSurfaceNormal ( MeshLib::Element const & surface_element,
MeshLib::Element const & bulk_element )
inlinestaticprivate

Definition at line 147 of file SurfaceFluxLocalAssembler.h.

150 {
152
153 if (surface_element.getGeomType() == MeshLib::MeshElemType::LINE)
154 {
155 auto const bulk_normal =
157 auto const& l0 = surface_element.getNode(0)->asEigenVector3d();
158 auto const& l1 = surface_element.getNode(1)->asEigenVector3d();
159 Eigen::Vector3d const line = l1 - l0;
161 }
162 else
163 {
166 }
167 surface_element_normal.normalize();
168 // At the moment (2016-09-28) the surface normal is not oriented
169 // according to the right hand rule. Thus for an intuitive flux
170 // output, i.e., inflow has positive sign, outflow has negative
171 // sign, the normal must not be multiplied by -1.
173 };
static Eigen::Vector3d getSurfaceNormal(Element const &e)
Returns the surface normal of a 2D element.
Definition FaceRule.cpp:33

References MathLib::Point3d::asEigenVector3d(), MeshLib::Element::getGeomType(), MeshLib::Element::getNode(), MeshLib::FaceRule::getSurfaceNormal(), and MeshLib::LINE.

Referenced by integrate().

◆ integrate()

template<typename ShapeFunction, int GlobalDim>
void ProcessLib::SurfaceFluxLocalAssembler< ShapeFunction, GlobalDim >::integrate ( std::size_t const element_id,
std::vector< GlobalVector * > const & x,
MeshLib::PropertyVector< double > & specific_flux,
double const t,
MeshLib::Mesh const & bulk_mesh,
std::function< Eigen::Vector3d(std::size_t const, MathLib::Point3d const &, double const, std::vector< GlobalVector * > const &)> getFlux )
inlineoverridevirtual

Integration for the element with the id element_id.

Parameters
element_idid of the element
xThe global vector containing the values for numerical integration.
specific_fluxPropertyVector the integration result will be stored into, where specific_flux has the same number of entries like mesh elements exists.
tThe integration is performed at the time t.
bulk_meshStores a reference to the bulk mesh that is needed to fetch the information for the integration over the surface mesh.
getFluxfunction that calculates the flux in the integration points of the face elements of the bulk element that belongs to the surface.

Implements ProcessLib::SurfaceFluxLocalAssemblerInterface.

Definition at line 93 of file SurfaceFluxLocalAssembler.h.

102 {
103 auto const& bulk_element = *bulk_mesh.getElement(_bulk_element_id);
104 auto const surface_element_normal =
106
107 double element_area = 0.0;
109 _integration_method.getNumberOfPoints();
110 // specific_flux[id_of_element] +=
111 // int_{\Gamma_e} \alpha \cdot flux \cdot normal \d \Gamma /
112 // element_area
114 {
115 auto const& wp = _integration_method.getWeightedPoint(ip);
116
117 auto const bulk_element_point =
119 auto const bulk_flux =
121 for (int component_id(0);
122 component_id < specific_flux.getNumberOfGlobalComponents();
123 ++component_id)
124 {
125 // TODO find solution for 2d case
126 double const bulk_grad_times_normal(
128 bulk_flux.size())
130
131 specific_flux.getComponent(element_id, component_id) +=
133 wp.getWeight();
134 }
136 }
137 for (int component_id(0);
138 component_id < specific_flux.getNumberOfGlobalComponents();
139 ++component_id)
140 {
141 specific_flux.getComponent(element_id, component_id) /=
143 }
144 }
static Eigen::Vector3d getSurfaceNormal(MeshLib::Element const &surface_element, MeshLib::Element const &bulk_element)
MathLib::Point3d getBulkElementPoint(MeshLib::CellType const bulk_element_cell_type, std::size_t const bulk_face_id, MathLib::WeightedPoint const &point_on_face)

References _bulk_element_id, _bulk_face_id, _detJ_times_integralMeasure, _integration_method, _surface_element, MeshLib::getBulkElementPoint(), MeshLib::PropertyVector< PROP_VAL_TYPE >::getComponent(), MeshLib::Mesh::getElement(), MeshLib::PropertyVectorBase::getNumberOfGlobalComponents(), and getSurfaceNormal().

Member Data Documentation

◆ _bulk_element_id

template<typename ShapeFunction, int GlobalDim>
std::size_t const ProcessLib::SurfaceFluxLocalAssembler< ShapeFunction, GlobalDim >::_bulk_element_id
private

Definition at line 180 of file SurfaceFluxLocalAssembler.h.

Referenced by SurfaceFluxLocalAssembler(), and integrate().

◆ _bulk_face_id

template<typename ShapeFunction, int GlobalDim>
std::size_t const ProcessLib::SurfaceFluxLocalAssembler< ShapeFunction, GlobalDim >::_bulk_face_id
private

Definition at line 181 of file SurfaceFluxLocalAssembler.h.

Referenced by SurfaceFluxLocalAssembler(), and integrate().

◆ _detJ_times_integralMeasure

template<typename ShapeFunction, int GlobalDim>
std::vector<double> ProcessLib::SurfaceFluxLocalAssembler< ShapeFunction, GlobalDim >::_detJ_times_integralMeasure
private

Definition at line 177 of file SurfaceFluxLocalAssembler.h.

Referenced by SurfaceFluxLocalAssembler(), and integrate().

◆ _integration_method

template<typename ShapeFunction, int GlobalDim>
NumLib::GenericIntegrationMethod const& ProcessLib::SurfaceFluxLocalAssembler< ShapeFunction, GlobalDim >::_integration_method
private

Definition at line 179 of file SurfaceFluxLocalAssembler.h.

Referenced by SurfaceFluxLocalAssembler(), and integrate().

◆ _surface_element

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

Definition at line 175 of file SurfaceFluxLocalAssembler.h.

Referenced by SurfaceFluxLocalAssembler(), and integrate().


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