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

Edge primitive class. More...

#include <edge.hpp>

Detailed Description

template<uint8_t dim>
class bem::Edge< dim >

Edge primitive class.

Template Parameters
dim- The dimension of the edge (1, 2 or 3).

Definition at line 41 of file edge.hpp.

Constructor & Destructor Documentation

◆ Edge() [1/2]

template<uint8_t dim>
bem::Edge< dim >::Edge ( ConstEigRef< EigMatMN< Float, dim, 2 > >  v)
inline

Constructs an Edge with given vertices.

Parameters
[in]v- Vertices of the edge.

Definition at line 52 of file edge.hpp.

◆ Edge() [2/2]

template<uint8_t dim>
bem::Edge< dim >::Edge ( ConstEigRef< EigColVecN< Float, dim > >  v1,
ConstEigRef< EigColVecN< Float, dim > >  v2 
)
inline

Constructs an Edge with given vertices.

Parameters
[in]v1- First vertex of the edge.
[in]v2- Second vertex of the edge.

Definition at line 64 of file edge.hpp.

Member Function Documentation

◆ v() [1/2]

template<uint8_t dim>
const EigMatMN< Float, dim, 2 > & bem::Edge< dim >::v ( ) const
inline

Returns the vertices of this Edge.

Returns
Vertices of the edge.

Definition at line 77 of file edge.hpp.

◆ v() [2/2]

template<uint8_t dim>
EigColVecN< Float, dim > bem::Edge< dim >::v ( const uint8_t  idx) const
inline

Returns the vertex of this Edge at a given index.

Parameters
[in]idx- Index of the desired vertex (0 or 1).
Returns
Vertex of the edge at the given index.

Definition at line 88 of file edge.hpp.

◆ set_v()

template<uint8_t dim>
void bem::Edge< dim >::set_v ( ConstEigRef< EigMatMN< Float, dim, 2 > >  v)

Sets the vertices of this Edge.

Parameters
[in]v- Vertices of the edge.

Definition at line 28 of file edge.cpp.

◆ length()

template<uint8_t dim>
Float bem::Edge< dim >::length ( ) const
inline

Returns the length of this Edge.

Returns
Length of the edge.

Definition at line 107 of file edge.hpp.

◆ edge_vec()

template<uint8_t dim>
EigColVecN< Float, dim > bem::Edge< dim >::edge_vec ( ) const
inline

Returns the vector from the first to the second vertex of this Edge.

Returns
Vector from the first to the second vertex of the edge.

Definition at line 115 of file edge.hpp.

◆ unit_vec()

template<uint8_t dim>
EigColVecN< Float, dim > bem::Edge< dim >::unit_vec ( ) const
inline

Returns the unit vector along this Edge from its first to its second vertex.

Returns
Unit vector along the edge from the first to the second vertex.

Definition at line 123 of file edge.hpp.

◆ centroid()

template<uint8_t dim>
EigColVecN< Float, dim > bem::Edge< dim >::centroid ( ) const
inline

Returns the centroid of this Edge.

Returns
Centroid of the edge.

Definition at line 131 of file edge.hpp.

◆ reference_edge()

template<uint8_t dim>
Edge< dim > bem::Edge< dim >::reference_edge ( )
static

Returns a reference edge in the specified dimension from 0 to 1 along the first axis.

Returns
Reference edge with vertices (0, 0, ...) and (1, 0, ...).

Definition at line 40 of file edge.cpp.

◆ to_2d()

template<uint8_t dim>
Edge< 2 > bem::Edge< dim >::to_2d ( ) const

Returns an equivalent edge with coordinates in a local 2D system, and with the local origin at this edge's first vertex. If this edge is defined in 1D, the coordinates are unchanged and a second 0-value dimension is added.

Returns
2D Edge with coordinates in a local 2D system.

Definition at line 51 of file edge.cpp.

◆ to_3d()

template<uint8_t dim>
Edge< 3 > bem::Edge< dim >::to_3d ( ) const

Adds a 0-valued third dimension if this Edge is in 2D, adds a 0-valued second and third dimension if it is in 1D, otherwise just returns a copy of this Edge.

Returns
3D Edge.

Definition at line 71 of file edge.cpp.

◆ point_on_edge()

template<uint8_t dim>
bool bem::Edge< dim >::point_on_edge ( ConstEigRef< EigColVecN< Float, dim > >  r,
const Float  tol = EDGE_DEFAULT_TOL 
) const

Returns true if the given point is on the edge, inclusive of vertices.

Parameters
[in]r- Point to be tested.
[in]tol- Tolerance (optional).
Returns
True if the point is on the edge, inclusive of vertices, false otherwise.

Definition at line 81 of file edge.cpp.


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