28 std::size_t
const element_id,
29 std::vector<GlobalVector*>
const& x,
33 std::function<Eigen::Vector3d(std::size_t
const,
35 std::vector<GlobalVector*>
const&)>) = 0;
38 template <
typename ShapeFunction,
typename IntegrationMethod,
int GlobalDim>
61 bool const is_axially_symmetric,
62 unsigned const integration_order,
70 auto const n_integration_points =
73 auto const shape_matrices =
77 for (std::size_t ip = 0; ip < n_integration_points; ++ip)
80 shape_matrices[ip].detJ * shape_matrices[ip].integralMeasure);
98 std::vector<GlobalVector*>
const& x,
102 std::function<Eigen::Vector3d(
104 std::vector<GlobalVector*>
const&)>
107 auto get_surface_normal =
110 Eigen::Vector3d surface_element_normal;
115 auto const l0 = Eigen::Map<Eigen::Vector3d const>(
117 auto const l1 = Eigen::Map<Eigen::Vector3d const>(
119 Eigen::Vector3d
const line = l1 - l0;
120 surface_element_normal = line.cross(bulk_normal);
124 surface_element_normal =
127 surface_element_normal.normalize();
132 return surface_element_normal;
134 auto const surface_element_normal =
137 double element_area = 0.0;
138 std::size_t
const n_integration_points =
143 for (std::size_t ip(0); ip < n_integration_points; ip++)
149 auto const bulk_flux =
151 for (
int component_id(0);
156 double const bulk_grad_times_normal(
157 Eigen::Map<Eigen::RowVectorXd const>(bulk_flux.data(),
159 .dot(surface_element_normal));
167 for (
int component_id(0);
const T * getCoords() const
virtual const Node * getNode(unsigned idx) const =0
static Eigen::Vector3d getSurfaceNormal(Element const &e)
Returns the surface normal of a 2D element.
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.
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
typename ShapeMatricesType::NodalMatrixType NodalMatrixType
std::vector< double > _detJ_times_integralMeasure
std::size_t const _bulk_element_id
SurfaceFluxLocalAssembler(MeshLib::Element const &surface_element, std::size_t, bool const is_axially_symmetric, unsigned const integration_order, MeshLib::PropertyVector< std::size_t > const &bulk_element_ids, MeshLib::PropertyVector< std::size_t > const &bulk_face_ids)
IntegrationMethod const _integration_method
std::size_t const _bulk_face_id
ShapeMatrixPolicyType< ShapeFunction, GlobalDim > ShapeMatricesType
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
typename ShapeMatricesType::NodalVectorType NodalVectorType
MeshLib::Element const & _surface_element
MathLib::Point3d getBulkElementPoint(Tri const &, std::size_t const face_id, MathLib::WeightedPoint1D const &wp)
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