OpenBEM
Open-source framework for electromagnetic simulation with the boundary element method.
Loading...
Searching...
No Matches
bem::MeshBase< dim, verts_per_elem > Class Template Referenceabstract

Mesh base class. More...

#include <base.hpp>

Detailed Description

template<uint8_t dim, uint8_t verts_per_elem>
class bem::MeshBase< dim, verts_per_elem >

Mesh base class.

Template Parameters
dim- The dimension of the mesh (1, 2, or 3).
verts_per_elem- Number of vertices per element (e.g., 2 for edges, 3 for triangles, 4 for tetrahedra).

Definition at line 40 of file base.hpp.

Member Function Documentation

◆ verts() [1/2]

template<uint8_t dim, uint8_t verts_per_elem>
const EigMatNX< Float, dim > & bem::MeshBase< dim, verts_per_elem >::verts ( ) const
inline

Returns the coordinates of the mesh vertices.

Returns
Vertex coordinates.

Definition at line 51 of file base.hpp.

◆ verts() [2/2]

template<uint8_t dim, uint8_t verts_per_elem>
EigColVecN< Float, dim > bem::MeshBase< dim, verts_per_elem >::verts ( Index  vert) const
inline

Returns the coordinates of a specific vertex.

Parameters
[in]vert- Vertex index.
Returns
Coordinates of the vertex.

Definition at line 60 of file base.hpp.

◆ elems() [1/3]

template<uint8_t dim, uint8_t verts_per_elem>
const EigMatNX< Index, verts_per_elem > & bem::MeshBase< dim, verts_per_elem >::elems ( ) const
inline

Returns the vertex indices of each element.

Returns
Element-wise triplets of vertex indices.

Definition at line 68 of file base.hpp.

◆ elems() [2/3]

template<uint8_t dim, uint8_t verts_per_elem>
EigColVecN< Index, 3 > bem::MeshBase< dim, verts_per_elem >::elems ( Index  elem) const
inline

Returns the vertex indices of a specific element.

Parameters
[in]elem- Element index.
Returns
Vertex indices of the element.

Definition at line 77 of file base.hpp.

◆ elems() [3/3]

template<uint8_t dim, uint8_t verts_per_elem>
Index bem::MeshBase< dim, verts_per_elem >::elems ( uint8_t  vert,
Index  elem 
) const
inline

Returns the index of a specific vertex of a specific element.

Parameters
[in]vert- Vertex index.
[in]elem- Element index.
Returns
Index of the specified vertex in the specified element.

Definition at line 87 of file base.hpp.

◆ elem_tags() [1/2]

template<uint8_t dim, uint8_t verts_per_elem>
const EigRowVec< Index > & bem::MeshBase< dim, verts_per_elem >::elem_tags ( ) const
inline

Returns the element tags.

Returns
Element-wise tags.

Elements that have the same tag are considered to be part of the same region, for the purpose of defining edges. I.e., an edge between two elements is formed only if they have the same tag.

Definition at line 99 of file base.hpp.

◆ elem_tags() [2/2]

template<uint8_t dim, uint8_t verts_per_elem>
Index bem::MeshBase< dim, verts_per_elem >::elem_tags ( Index  elem) const
inline

Returns the tag associated with a specified element.

Returns
Element tag.

Elements that have the same tag are considered to be part of the same region, for the purpose of defining edges. I.e., an edge between two elements is formed only if they have the same tag.

Definition at line 111 of file base.hpp.

◆ num_verts()

template<uint8_t dim, uint8_t verts_per_elem>
Index bem::MeshBase< dim, verts_per_elem >::num_verts ( ) const
inline

Returns the number of vertices in the mesh.

Returns
Number of vertices.

Definition at line 119 of file base.hpp.

◆ num_elems()

template<uint8_t dim, uint8_t verts_per_elem>
Index bem::MeshBase< dim, verts_per_elem >::num_elems ( ) const
inline

Returns the number of elements in the mesh.

Returns
Number of elements.

Definition at line 127 of file base.hpp.

◆ partition_by_elems()

template<uint8_t dim, uint8_t verts_per_elem>
virtual void bem::MeshBase< dim, verts_per_elem >::partition_by_elems ( MeshBase< dim, verts_per_elem > &  partition,
ConstEigRef< EigRowVec< Index > >  elem_inds 
) const
pure virtual

Returns a sub-mesh that contains only specified elements of this mesh.

Parameters
[out]partition- Partitioned mesh object containing the specified elements.
[in]elem_inds- Indices of elements to keep in the sub-mesh.

◆ elem_centroids()

template<uint8_t dim, uint8_t verts_per_elem>
EigMatNX< Float, dim > bem::MeshBase< dim, verts_per_elem >::elem_centroids ( ) const
inline

Computes and returns the centroid of each element.

Returns
Element-wise centroids.

Definition at line 146 of file base.hpp.

◆ reverse_orientation()

template<uint8_t dim, uint8_t verts_per_elem>
virtual void bem::MeshBase< dim, verts_per_elem >::reverse_orientation ( )
inlinevirtual

Reverses the orientation of each element.

Reimplemented in bem::TriangleMesh< dim >, and bem::TriangleMesh< 3 >.

Definition at line 163 of file base.hpp.

Member Data Documentation

◆ verts_

template<uint8_t dim, uint8_t verts_per_elem>
EigMatNX<Float, dim> bem::MeshBase< dim, verts_per_elem >::verts_
protected

Definition at line 172 of file base.hpp.

◆ elems_

template<uint8_t dim, uint8_t verts_per_elem>
EigMatNX<Index, verts_per_elem> bem::MeshBase< dim, verts_per_elem >::elems_
protected

Definition at line 173 of file base.hpp.

◆ elem_tags_

template<uint8_t dim, uint8_t verts_per_elem>
EigRowVec<Index> bem::MeshBase< dim, verts_per_elem >::elem_tags_
protected

Definition at line 174 of file base.hpp.


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