Patate Lib  0.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Vitelotte::FVElementBuilder< _Mesh, _Scalar > Class Template Reference

Inherits Vitelotte::ElementBuilderBase< _Mesh, _Scalar >.

Detailed Description

template<class _Mesh, typename _Scalar = typename _Mesh::Scalar>
class Vitelotte::FVElementBuilder< _Mesh, _Scalar >

Fraeijs de Veubeke's (FV) element builder, for harmonic interpolation with quadratic triangles output.

Use this element builder to solve biharmonic diffusion and get an image with quadratic interpolation.

FV elements have 6 value nodes, 3 at each vertex (v) and 3 at edge midpoints (e), plus 3 gradient nodes corresponding to the mean value of the first (outward) normal derivative along each edge (g). There are the basis functions:

\begin{eqnarray*} v_0 &=& \lambda_{0} \left(\lambda_{0} - \frac{1}{2}\right) \left(\lambda_{0} + 1\right) + 3 \lambda_{0} \lambda_{1} \lambda_{2} + \left( \frac{d \lambda_{0}}{d \boldsymbol{n}_{1}} + \frac{1}{2} \frac{d \lambda_{1}}{d \boldsymbol{n}_{1}} \right) g_1 + \left( \frac{d \lambda_{0}}{d \boldsymbol{n}_{2}} + \frac{1}{2} \frac{d \lambda_{2}}{d \boldsymbol{n}_{2}} \right) g_2 \\ e_0 &=& 4 \lambda_{0} \left(- 2 \lambda_{0} + 1\right) \left(- \lambda_{0} + 1\right) + 4 \lambda_{1} \lambda_{2} - 12 \lambda_{0} \lambda_{1} \lambda_{2}\\ g_0 &=& - \frac{2 \Delta}{l_{0}} \lambda_{0} \left(\lambda_{0} - 1\right) \left(2 \lambda_{0} - 1\right)\\ \end{eqnarray*}

where \(\lambda_i\) is the barycentric coordinate for the vertex \(i\), \(\Delta\) is the area of the triangle, \(l_i\) is the length of the edge \(i\) opposed to the vertex \(i\) and \(\boldsymbol{n}_i\) is the (clockwise, normalized) normal of the edge \(i\). The others basis functions can be obtained by cyclic permutation of the indices.

Public Types

typedef _Scalar Scalar
typedef _Mesh Mesh
typedef ElementBuilderBase
< _Mesh, _Scalar > 
typedef Base::Vector Vector
typedef Base::Matrix Matrix
typedef Base::Triplet Triplet
typedef Base::Face Face
- Public Types inherited from Vitelotte::ElementBuilderBase< _Mesh, _Scalar >
typedef _Scalar Scalar
typedef _Mesh Mesh
typedef Eigen::Matrix< Scalar,
Mesh::DimsAtCompileTime, 1 > 
typedef Eigen::Matrix< Scalar,
Eigen::Dynamic, Eigen::Dynamic > 
typedef Eigen::Triplet< Scalar > Triplet
typedef Mesh::Face Face

Public Member Functions

 FVElementBuilder (Scalar sigma=Scalar(.5))
unsigned nCoefficients (const Mesh &mesh, Face element, SolverError *error=0) const
unsigned nExtraConstraints (const Mesh &mesh, Face element) const
template<typename Inserter >
void addCoefficients (Inserter &inserter, const Mesh &mesh, Face element, SolverError *error=0)
template<typename Inserter >
void addExtraConstraints (Inserter &inserter, const Mesh &mesh, Face element, SolverError *error)
- Public Member Functions inherited from Vitelotte::ElementBuilderBase< _Mesh, _Scalar >
unsigned nExtraConstraints (const Mesh &, Face) const
template<typename Inserter >
void addExtraConstraints (Inserter &, const Mesh &, Face, SolverError *)

Protected Types

typedef Eigen::Matrix< Scalar, 3, 1 > Vector3
typedef Eigen::Matrix< Scalar, 6, 1 > Vector6
typedef Mesh::Halfedge Halfedge
typedef std::map< unsigned,
Halfedge >