6#include <Eigen/Geometry>
24 std::size_t
const element_id,
25 std::vector<GlobalVector*>
const& x,
29 std::function<Eigen::Vector3d(std::size_t
const,
31 std::vector<GlobalVector*>
const&)>) = 0;
34template <
typename ShapeFunction,
int GlobalDim>
58 bool const is_axially_symmetric,
66 auto const n_integration_points =
69 auto const shape_matrices =
73 for (std::size_t ip = 0; ip < n_integration_points; ++ip)
76 shape_matrices[ip].detJ * shape_matrices[ip].integralMeasure);
94 std::vector<GlobalVector*>
const& x,
98 std::function<Eigen::Vector3d(
100 std::vector<GlobalVector*>
const&)>
104 auto const surface_element_normal =
107 double element_area = 0.0;
108 std::size_t
const n_integration_points =
113 for (std::size_t ip(0); ip < n_integration_points; ip++)
117 auto const bulk_element_point =
119 auto const bulk_flux =
121 for (
int component_id(0);
126 double const bulk_grad_times_normal(
127 Eigen::Map<Eigen::RowVectorXd const>(bulk_flux.data(),
129 .dot(surface_element_normal));
137 for (
int component_id(0);
151 Eigen::Vector3d surface_element_normal;
155 auto const bulk_normal =
159 Eigen::Vector3d
const line = l1 - l0;
160 surface_element_normal = line.cross(bulk_normal);
164 surface_element_normal =
167 surface_element_normal.normalize();
172 return surface_element_normal;
EigenFixedShapeMatrixPolicy< ShapeFunction, GlobalDim > ShapeMatrixPolicyType
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.
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