FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ > Class Template Reference

Assemble class Discrete Integrale of an FE function over a d-1 manifold. More...

#include <surface_integrator.hpp>

Public Types

typedef Tiny::Vector< DataType, domain_dim > CoordVecType
 
typedef Cubature::Rule< SurfaceShapeType, DataType, DataType, RefCoordVecTypeCubatureRuleType
 
typedef TrafoType::CoordType DataType
 
typedef Tiny::Matrix< DataType, domain_dim, sub_dim, sub_dim > HessianInvType
 
typedef Tiny::Tensor3< DataType, domain_dim, sub_dim, sub_dim > HessianType
 
typedef Index IndexType
 
typedef Tiny::Matrix< DataType, sub_dim, domain_dim > JacobianInvType
 
typedef Tiny::Matrix< DataType, domain_dim, sub_dim > JacobianType
 
typedef TrafoType::MeshType MeshType
 
typedef Tiny::Vector< DataType, domain_dim > NormalVecType
 
typedef Tiny::Vector< DataType, sub_dim > RefCoordVecType
 
typedef SurfaceShape_ SurfaceShapeType
 
typedef Trafo_ TrafoType
 

Public Member Functions

 SurfaceIntegrator (const Trafo_ &trafo, const Cubature::DynamicFactory &cubature_factory_)
 Initializes the integrator with a cell wise list of vertices. More...
 
template<typename VertIdx_ >
void add_face (const VertIdx_ &vert_idx)
 
template<typename Vtxs_ >
void add_face_vertices (const Vtxs_ &face_vertices)
 Simply pushes new vertices to the end of the current vertex array. More...
 
template<typename Job_ >
void assemble (Job_ &job)
 
template<typename Job_ >
void assemble_omp (Job_ &job)
 
void compile ()
 
bool get_normal_view () const
 
template<typename MaskVec_ >
void set_mask_vector (const MaskVec_ &cell_mask_vec)
 Sets the cell mask vector, which sorts out any cells completelly outside the fluid domain. More...
 
void set_normal_view (bool inside_view)
 
template<typename Vtxs_ >
void set_vertices (const std::vector< Vtxs_ > &vertices)
 

Static Public Attributes

static constexpr int domain_dim = Trafo_::ShapeType::dimension
 
static constexpr int sub_dim = SurfaceShapeType::dimension
 
static constexpr int verts_per_face = Shape::FaceTraits<SurfaceShapeType, 0>::count
 

Private Member Functions

bool boundingbox_intersect_test (const BoundingBoxType< DataType, domain_dim > &bb_a, const BoundingBoxType< DataType, domain_dim > &bb_b)
 tests whether two boundingboxes intersect in any way More...
 

Private Attributes

std::vector< IndexType > _active_surfaces
 
std::vector< IndexType > _cell_helper
 
std::vector< IndexType > _cell_helper_offsets
 
std::vector< int > _cell_mask_vec
 
CubatureRuleType _cubature_rule
 
bool _inside_view
 Normal defined from the inside or outside? More...
 
std::vector< Geometry::IndexTuple< verts_per_face > > _shape_index_tmp
 
Geometry::IndexSet< verts_per_face > _shape_indices
 
std::vector< Tiny::Vector< DataType, domain_dim > > _shape_vertices
 
const TrafoType & _trafo
 

Detailed Description

template<typename Trafo_, typename SurfaceShape_>
class FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >

Assemble class Discrete Integrale of an FE function over a d-1 manifold.

Template Parameters
Trafo_The trafo on which the FE spaces are defined on
SurfaceShape_The shapetype of the surface elements
Note
For now, this only works for piecewise defined triangulations and we assume no cuvature on the single segments. Maybe we will add this in the future.

Also any vertex mapping provided to this class is assumed to have the 0-th submanifold ordering in the sense of the FEAT3 mesh element mapping, i.e. We always look onto the inner face and the ordering is always left to right:

Line2d: 0 --— 1

Quad: 2 --— 3 | | | | 0 --— 1

Triang: 2 | - | | | - 0 — 1

Note
It is assumed, that the normal orientation is the same for all elements. We generally assume we view from the outside, so you have to set the _view_inside variable if this is not case.

Definition at line 96 of file surface_integrator.hpp.

Member Typedef Documentation

◆ CoordVecType

template<typename Trafo_ , typename SurfaceShape_ >
typedef Tiny::Vector<DataType, domain_dim> FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::CoordVecType

Definition at line 106 of file surface_integrator.hpp.

◆ CubatureRuleType

template<typename Trafo_ , typename SurfaceShape_ >
typedef Cubature::Rule<SurfaceShapeType, DataType, DataType, RefCoordVecType> FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::CubatureRuleType

Definition at line 113 of file surface_integrator.hpp.

◆ DataType

template<typename Trafo_ , typename SurfaceShape_ >
typedef TrafoType::CoordType FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::DataType

Definition at line 104 of file surface_integrator.hpp.

◆ HessianInvType

template<typename Trafo_ , typename SurfaceShape_ >
typedef Tiny::Matrix<DataType, domain_dim, sub_dim, sub_dim> FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::HessianInvType

Definition at line 112 of file surface_integrator.hpp.

◆ HessianType

template<typename Trafo_ , typename SurfaceShape_ >
typedef Tiny::Tensor3<DataType, domain_dim, sub_dim, sub_dim> FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::HessianType

Definition at line 111 of file surface_integrator.hpp.

◆ IndexType

template<typename Trafo_ , typename SurfaceShape_ >
typedef Index FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::IndexType

Definition at line 105 of file surface_integrator.hpp.

◆ JacobianInvType

template<typename Trafo_ , typename SurfaceShape_ >
typedef Tiny::Matrix<DataType, sub_dim, domain_dim> FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::JacobianInvType

Definition at line 110 of file surface_integrator.hpp.

◆ JacobianType

template<typename Trafo_ , typename SurfaceShape_ >
typedef Tiny::Matrix<DataType, domain_dim, sub_dim> FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::JacobianType

Definition at line 109 of file surface_integrator.hpp.

◆ MeshType

template<typename Trafo_ , typename SurfaceShape_ >
typedef TrafoType::MeshType FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::MeshType

Definition at line 100 of file surface_integrator.hpp.

◆ NormalVecType

template<typename Trafo_ , typename SurfaceShape_ >
typedef Tiny::Vector<DataType, domain_dim> FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::NormalVecType

Definition at line 107 of file surface_integrator.hpp.

◆ RefCoordVecType

template<typename Trafo_ , typename SurfaceShape_ >
typedef Tiny::Vector<DataType, sub_dim> FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::RefCoordVecType

Definition at line 108 of file surface_integrator.hpp.

◆ SurfaceShapeType

template<typename Trafo_ , typename SurfaceShape_ >
typedef SurfaceShape_ FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::SurfaceShapeType

Definition at line 101 of file surface_integrator.hpp.

◆ TrafoType

template<typename Trafo_ , typename SurfaceShape_ >
typedef Trafo_ FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::TrafoType

Definition at line 99 of file surface_integrator.hpp.

Constructor & Destructor Documentation

◆ SurfaceIntegrator()

template<typename Trafo_ , typename SurfaceShape_ >
FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::SurfaceIntegrator ( const Trafo_ &  trafo,
const Cubature::DynamicFactory cubature_factory_ 
)
inlineexplicit

Initializes the integrator with a cell wise list of vertices.

Parameters
[in]verticesVector of tupled vertex data
[in]indexThe sparse index array into the vertex data, e.g. face 7 -> Verts (0, 7, 14, 36)

Definition at line 275 of file surface_integrator.hpp.

Member Function Documentation

◆ add_face()

template<typename Trafo_ , typename SurfaceShape_ >
template<typename VertIdx_ >
void FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::add_face ( const VertIdx_ &  vert_idx)
inline

Adds a new face, indexing into the current vertex set

Definition at line 320 of file surface_integrator.hpp.

◆ add_face_vertices()

template<typename Trafo_ , typename SurfaceShape_ >
template<typename Vtxs_ >
void FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::add_face_vertices ( const Vtxs_ &  face_vertices)
inline

Simply pushes new vertices to the end of the current vertex array.

Definition at line 301 of file surface_integrator.hpp.

◆ assemble()

template<typename Trafo_ , typename SurfaceShape_ >
template<typename Job_ >
void FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::assemble ( Job_ &  job)
inline

Definition at line 331 of file surface_integrator.hpp.

◆ assemble_omp()

template<typename Trafo_ , typename SurfaceShape_ >
template<typename Job_ >
void FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::assemble_omp ( Job_ &  job)
inline

Definition at line 363 of file surface_integrator.hpp.

◆ boundingbox_intersect_test()

template<typename Trafo_ , typename SurfaceShape_ >
bool FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::boundingbox_intersect_test ( const BoundingBoxType< DataType, domain_dim > &  bb_a,
const BoundingBoxType< DataType, domain_dim > &  bb_b 
)
inlineprivate

tests whether two boundingboxes intersect in any way

Definition at line 136 of file surface_integrator.hpp.

◆ compile()

template<typename Trafo_ , typename SurfaceShape_ >
void FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::compile ( )
inline

Definition at line 159 of file surface_integrator.hpp.

◆ get_normal_view()

template<typename Trafo_ , typename SurfaceShape_ >
bool FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::get_normal_view ( ) const
inline

Definition at line 154 of file surface_integrator.hpp.

◆ set_mask_vector()

template<typename Trafo_ , typename SurfaceShape_ >
template<typename MaskVec_ >
void FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::set_mask_vector ( const MaskVec_ &  cell_mask_vec)
inline

Sets the cell mask vector, which sorts out any cells completelly outside the fluid domain.

Parameters
[in]cell_mask_vecMask vector, for example generated by fbm_asm->get_fbm_mask_vector(dim)
Note
the mask vec has to match the size of all entities of the background mesh and holds the following encoding 3 -> cell is complettly inside the fbm region, thus the cell is ignored any other -> cell has some subdimensional entitiy, which is outside the fbm region, i.e. part of the fluid domain

Definition at line 352 of file surface_integrator.hpp.

◆ set_normal_view()

template<typename Trafo_ , typename SurfaceShape_ >
void FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::set_normal_view ( bool  inside_view)
inline

Definition at line 149 of file surface_integrator.hpp.

◆ set_vertices()

template<typename Trafo_ , typename SurfaceShape_ >
template<typename Vtxs_ >
void FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::set_vertices ( const std::vector< Vtxs_ > &  vertices)
inline

Careful, this overwrites any previous vertex info

Definition at line 286 of file surface_integrator.hpp.

Member Data Documentation

◆ _active_surfaces

template<typename Trafo_ , typename SurfaceShape_ >
std::vector<IndexType> FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::_active_surfaces
private

Definition at line 127 of file surface_integrator.hpp.

◆ _cell_helper

template<typename Trafo_ , typename SurfaceShape_ >
std::vector<IndexType> FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::_cell_helper
private

Definition at line 125 of file surface_integrator.hpp.

◆ _cell_helper_offsets

template<typename Trafo_ , typename SurfaceShape_ >
std::vector<IndexType> FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::_cell_helper_offsets
private

Definition at line 126 of file surface_integrator.hpp.

◆ _cell_mask_vec

template<typename Trafo_ , typename SurfaceShape_ >
std::vector<int> FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::_cell_mask_vec
private

Definition at line 128 of file surface_integrator.hpp.

◆ _cubature_rule

template<typename Trafo_ , typename SurfaceShape_ >
CubatureRuleType FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::_cubature_rule
private

Definition at line 130 of file surface_integrator.hpp.

◆ _inside_view

template<typename Trafo_ , typename SurfaceShape_ >
bool FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::_inside_view
private

Normal defined from the inside or outside?

Definition at line 133 of file surface_integrator.hpp.

◆ _shape_index_tmp

template<typename Trafo_ , typename SurfaceShape_ >
std::vector<Geometry::IndexTuple<verts_per_face> > FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::_shape_index_tmp
private

Definition at line 123 of file surface_integrator.hpp.

◆ _shape_indices

template<typename Trafo_ , typename SurfaceShape_ >
Geometry::IndexSet<verts_per_face> FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::_shape_indices
private

Definition at line 121 of file surface_integrator.hpp.

◆ _shape_vertices

template<typename Trafo_ , typename SurfaceShape_ >
std::vector<Tiny::Vector<DataType, domain_dim> > FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::_shape_vertices
private

Definition at line 120 of file surface_integrator.hpp.

◆ _trafo

template<typename Trafo_ , typename SurfaceShape_ >
const TrafoType& FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::_trafo
private

Definition at line 119 of file surface_integrator.hpp.

◆ domain_dim

template<typename Trafo_ , typename SurfaceShape_ >
constexpr int FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::domain_dim = Trafo_::ShapeType::dimension
staticconstexpr

Definition at line 102 of file surface_integrator.hpp.

◆ sub_dim

template<typename Trafo_ , typename SurfaceShape_ >
constexpr int FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::sub_dim = SurfaceShapeType::dimension
staticconstexpr

Definition at line 103 of file surface_integrator.hpp.

◆ verts_per_face

template<typename Trafo_ , typename SurfaceShape_ >
constexpr int FEAT::Assembly::SurfaceIntegrator< Trafo_, SurfaceShape_ >::verts_per_face = Shape::FaceTraits<SurfaceShapeType, 0>::count
staticconstexpr

Definition at line 115 of file surface_integrator.hpp.


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