LifeV
laplacian/laplacianFunctor.hpp
Go to the documentation of this file.
1 /*
2  * laplacianFunctor.hpp
3  *
4  * Created on: Jan 20, 2015
5  * Author: dalsanto
6  */
7 
8 #ifndef _LAPLACIANFUNCTOR_HPP_
9 #define _LAPLACIANFUNCTOR_HPP_
10 
11 #include <lifev/core/LifeV.hpp>
12 
13 
14 namespace LifeV
15 {
16 template < typename Return_Type>
18 {
19 
20 public:
21  typedef Return_Type return_Type;
22 
23  return_Type operator() ( const VectorSmall<3> spaceCoordinates )
24  {
25 
26  Real x = spaceCoordinates[0];
27  Real y = spaceCoordinates[1];
28  Real z = spaceCoordinates[2];
29 
30  return myFunction( 0, x, y, z, 0 );
31 
32  }
33 
34 // laplacianFunctor() {}
35 // laplacianFunctor (const laplacianFunctor&) {}
36  laplacianFunctor ( return_Type (*newFunction)(const Real& /*t*/, const Real& x, const Real& y, const Real& z, const ID& /*i*/) )
37  : myFunction(newFunction) { }
39 
40 private:
41 
42  return_Type (*myFunction)( const Real& /*t*/, const Real& x, const Real& y, const Real& z, const ID& /*i*/ );
43 
44 };
45 
46 } // end namespace LifeV
47 
48 
49 #endif /* LIFEV_ETA_EXAMPLES_LAPLACIAN_LAPLACIANFUNCTOR_HPP_ */
Real const & operator[](UInt const &i) const
Operator [].
return_Type operator()(const VectorSmall< 3 > spaceCoordinates)
uint32_type ID
IDs.
Definition: LifeV.hpp:194
double Real
Generic real data.
Definition: LifeV.hpp:175
laplacianFunctor(return_Type(*newFunction)(const Real &, const Real &x, const Real &y, const Real &z, const ID &))