13#include <Eigen/Geometry>
31 std::size_t
const element_id,
32 std::vector<GlobalVector*>
const& x,
36 std::function<Eigen::Vector3d(std::size_t
const,
38 std::vector<GlobalVector*>
const&)>) = 0;
41template <
typename ShapeFunction,
int GlobalDim>
65 bool const is_axially_symmetric,
73 auto const n_integration_points =
76 auto const shape_matrices =
80 for (std::size_t ip = 0; ip < n_integration_points; ++ip)
83 shape_matrices[ip].detJ * shape_matrices[ip].integralMeasure);
101 std::vector<GlobalVector*>
const& x,
105 std::function<Eigen::Vector3d(
107 std::vector<GlobalVector*>
const&)>
111 auto const surface_element_normal =
114 double element_area = 0.0;
115 std::size_t
const n_integration_points =
120 for (std::size_t ip(0); ip < n_integration_points; ip++)
124 auto const bulk_element_point =
126 auto const bulk_flux =
128 for (
int component_id(0);
133 double const bulk_grad_times_normal(
134 Eigen::Map<Eigen::RowVectorXd const>(bulk_flux.data(),
136 .dot(surface_element_normal));
144 for (
int component_id(0);
158 Eigen::Vector3d surface_element_normal;
162 auto const bulk_normal =
166 Eigen::Vector3d
const line = l1 - l0;
167 surface_element_normal = line.cross(bulk_normal);
171 surface_element_normal =
174 surface_element_normal.normalize();
179 return surface_element_normal;
Eigen::Vector3d const & asEigenVector3d() const
virtual MeshElemType getGeomType() const =0
virtual const Node * getNode(unsigned idx) const =0
static Eigen::Vector3d getSurfaceNormal(Element const &e)
Returns the surface normal of a 2D element.
const Element * getElement(std::size_t idx) const
Get the element with the given index.
int getNumberOfGlobalComponents() const
PROP_VAL_TYPE & getComponent(std::size_t tuple_index, int component)
Returns the value for the given component stored in the given tuple.
MathLib::WeightedPoint const & getWeightedPoint(unsigned const igp) const
unsigned getNumberOfPoints() const
virtual ~SurfaceFluxLocalAssemblerInterface()=default
virtual 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 &)>)=0
ShapeMatrixPolicyType< ShapeFunction, GlobalDim > ShapeMatricesType
static Eigen::Vector3d getSurfaceNormal(MeshLib::Element const &surface_element, MeshLib::Element const &bulk_element)
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
NumLib::GenericIntegrationMethod const & _integration_method
std::vector< double > _detJ_times_integralMeasure
typename ShapeMatricesType::NodalMatrixType NodalMatrixType
std::size_t const _bulk_face_id
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)
std::size_t const _bulk_element_id
MeshLib::Element const & _surface_element
typename ShapeMatricesType::NodalVectorType NodalVectorType
MathLib::Point3d getBulkElementPoint(MeshLib::CellType const bulk_element_cell_type, std::size_t const bulk_face_id, MathLib::WeightedPoint const &point_on_face)
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
MatrixType< ShapeFunction::NPOINTS, ShapeFunction::NPOINTS > NodalMatrixType
VectorType< ShapeFunction::NPOINTS > NodalVectorType