OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
eq_base_unit_test.hpp
1 /*
2  * eq_base_unit_test.hpp
3  *
4  * Created on: Sep 18, 2015
5  * Author: i-bird
6  */
7 
8 #ifndef OPENFPM_NUMERICS_SRC_EQUATIONS_EQ_BASE_UNIT_TEST_HPP_
9 #define OPENFPM_NUMERICS_SRC_EQUATIONS_EQ_BASE_UNIT_TEST_HPP_
10 
11 // quadratic and cubic term in p
12 
13 
14 typedef mul<p[x],p[x]> px2;
15 typedef mul<p[y],p[y]> py2;
16 typedef mul<p[x],p[y]> px_py;
17 typedef add<px2,py2> px2_p_py2;
18 typedef add<px2,py2> px2_s_py2;
19 typedef mul<px2,px> px3;
20 typedef mul<py2,py> py3;
21 typedef mul<gm,nu> gm_nu;
22 
23 // quadratic term in p
24 
25 typedef mul<px3,py> px3_m_py;
26 typedef mul<px2,py2> px2_m_py2;
27 typedef mul<px,py3> px_m_py3;
28 
32 
33 // Division of the quadratic term by px2_s_py2
34 
35 typedef div<px3_m_py,px2_p_py2> p_c1;
36 typedef div<px2_m_py2,px2_p_py2> p_c2;
37 typedef div<px_m_py3,px2_p_py2> p_c3;
38 
39 typedef div<px2_r,px2_p_py2> p_c4;
40 typedef div<px_py_r,px2_p_py2> p_c5;
41 typedef div<py2_r,px2_p_py2> p_c6;
42 
43 // Create u_alpha_beta equation
44 
45 template <unsigned int i, unsigned int j> using u = div<2,add<D<i,v[j]>,D<j,v[i]>>>;
46 
47 // terms
48 
49 typedef mul<gm,p_c1,u[x][x]> t1;
50 typedef mul<gm,p_c2,u[x][y]> t2;
51 typedef mul<gm,p_c3,u[y][y]> t3;
52 
53 typedef mul<gm,p_c4,u[x][x]> t4;
54 typedef mul<gm,p_c5,u[x][y]> t5;
55 typedef mul<gm,p_c6,u[y][y]> t6;
56 
57 #endif /* OPENFPM_NUMERICS_SRC_EQUATIONS_EQ_BASE_UNIT_TEST_HPP_ */
Derivative second order on h (spacing)
Definition: Derivative.hpp:28
It model an expression expr1 * expr2.
Definition: mul.hpp:119