LifeV
test_interpolate.hpp File Reference

Interpolate test. More...

#include <lifev/core/LifeV.hpp>
#include <lifev/core/fem/QuadratureRule.hpp>
#include <lifev/core/fem/FESpace.hpp>
#include <lifev/core/array/VectorEpetra.hpp>
#include <string>
#include <fstream>
#include <boost/bind.hpp>
+ Include dependency graph for test_interpolate.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

Real linearFunction (const Real &t, const Real &x, const Real &y, const Real &z, const ID &ic)
 
Real linearBubbleFunction (const Real &t, const Real &x, const Real &y, const Real &z, const ID &ic)
 
Real quadraticFunction (const Real &t, const Real &x, const Real &y, const Real &z, const ID &ic)
 
Real bilinearFunction (const Real &, const Real &x, const Real &y, const Real &z, const ID &ic)
 
template<typename MeshType , typename MapType , typename Fct >
bool check_interpolate (std::vector< std::shared_ptr< FESpace< MeshType, MapType > > > &originalFeSpaceVecPtr, std::vector< std::shared_ptr< FESpace< MeshType, MapType > > > &finalFeSpaceVecPtr, const MapEpetraType &outputMapType, Fct &function, const Real errorArray [], const std::string stringArray [], Real eps, Real time, UInt verbose)
 Interpolate the analytical function into the FE spaces specified in originalFeSpaceVecPtr, obtaining the set of FE vectors. More...
 

Detailed Description

Interpolate test.

Author
Mauro Perego mpere.nosp@m.go@f.nosp@m.su.ed.nosp@m.u
Contributor:
Maintainer:
Mauro Perego mpere.nosp@m.go@f.nosp@m.su.ed.nosp@m.u
@date 07-01-2010

The program tests the interpolation methods between different finite elements (mostly between scalar continuous finite elements). Also it test the interpolation of an analytical function into a finite element space.

Definition in file test_interpolate.hpp.

Function Documentation

◆ linearFunction()

Real linearFunction ( const Real t,
const Real x,
const Real y,
const Real z,
const ID ic 
)

Definition at line 254 of file test_interpolate.cpp.

◆ linearBubbleFunction()

Real linearBubbleFunction ( const Real t,
const Real x,
const Real y,
const Real z,
const ID ic 
)

Definition at line 260 of file test_interpolate.cpp.

◆ quadraticFunction()

Real quadraticFunction ( const Real t,
const Real x,
const Real y,
const Real z,
const ID ic 
)

Definition at line 268 of file test_interpolate.cpp.

◆ bilinearFunction()

Real bilinearFunction ( const Real ,
const Real x,
const Real y,
const Real z,
const ID ic 
)

Definition at line 273 of file test_interpolate.cpp.

◆ check_interpolate()

bool check_interpolate ( std::vector< std::shared_ptr< FESpace< MeshType, MapType > > > &  originalFeSpaceVecPtr,
std::vector< std::shared_ptr< FESpace< MeshType, MapType > > > &  finalFeSpaceVecPtr,
const MapEpetraType outputMapType,
Fct &  function,
const Real  errorArray[],
const std::string  stringArray[],
Real  eps,
Real  time,
UInt  verbose 
)

Interpolate the analytical function into the FE spaces specified in originalFeSpaceVecPtr, obtaining the set of FE vectors.

then, interpolate this set of FE vectors into vectors having FE spaces specified in finalFeSpaceVecPtr (all the possible combination). Compute the errors between these FE vectors and the analytical solution, and compare them with the ones provided in the array errorArray. return true if all the errors are equal to the errors in errorArray, within a tolerance eps. return false otherwise.

Definition at line 65 of file test_interpolate.hpp.