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

Detailed Description

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

Definition at line 42 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 47 of file SurfaceFluxLocalAssembler.h.

◆ NodalVectorType

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

Definition at line 48 of file SurfaceFluxLocalAssembler.h.

◆ ShapeMatricesType

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

Definition at line 46 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 61 of file SurfaceFluxLocalAssembler.h.

72 {
73 auto const n_integration_points =
74 _integration_method.getNumberOfPoints();
75
76 auto const shape_matrices =
81 {
84 }
85 }
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 154 of file SurfaceFluxLocalAssembler.h.

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

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 100 of file SurfaceFluxLocalAssembler.h.

109 {
110 auto const& bulk_element = *bulk_mesh.getElement(_bulk_element_id);
111 auto const surface_element_normal =
113
114 double element_area = 0.0;
116 _integration_method.getNumberOfPoints();
117 // specific_flux[id_of_element] +=
118 // int_{\Gamma_e} \alpha \cdot flux \cdot normal \d \Gamma /
119 // element_area
121 {
122 auto const& wp = _integration_method.getWeightedPoint(ip);
123
124 auto const bulk_element_point =
126 auto const bulk_flux =
128 for (int component_id(0);
129 component_id < specific_flux.getNumberOfGlobalComponents();
130 ++component_id)
131 {
132 // TODO find solution for 2d case
133 double const bulk_grad_times_normal(
135 bulk_flux.size())
137
138 specific_flux.getComponent(element_id, component_id) +=
140 wp.getWeight();
141 }
143 }
144 for (int component_id(0);
145 component_id < specific_flux.getNumberOfGlobalComponents();
146 ++component_id)
147 {
148 specific_flux.getComponent(element_id, component_id) /=
150 }
151 }
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 187 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 188 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 184 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 186 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 182 of file SurfaceFluxLocalAssembler.h.

Referenced by SurfaceFluxLocalAssembler(), and integrate().


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