Merge branch 'master' of bitbucket.org:glavaux/cosmotool
This commit is contained in:
commit
c1931db2a8
@ -25,7 +25,7 @@ static T project_tool(T *vertex_value, T *u, T *u0)
|
||||
|
||||
|
||||
template<typename T>
|
||||
static T get_u0(const T& u0, int epsilon)
|
||||
static inline T get_u0(const T& u0, int epsilon)
|
||||
{
|
||||
return (epsilon > 0) ? u0 : (1-u0);
|
||||
}
|
||||
@ -35,7 +35,7 @@ struct ProductTerm0
|
||||
{
|
||||
static const int numProducts = 1;
|
||||
|
||||
static T product(T *u, T *u0, int *epsilon, int q)
|
||||
static inline T product(T *u, T *u0, int *epsilon, int q)
|
||||
{
|
||||
T a = 1;
|
||||
|
||||
@ -72,7 +72,7 @@ struct ProductTerm2
|
||||
{
|
||||
static const int numProducts = 3;
|
||||
|
||||
static T product(T *u, T *u0, int *epsilon, int q)
|
||||
static inline T product(T *u, T *u0, int *epsilon, int q)
|
||||
{
|
||||
T a = 1;
|
||||
double G[3];
|
||||
@ -95,7 +95,7 @@ struct ProductTerm3
|
||||
{
|
||||
static const int numProducts = 1;
|
||||
|
||||
static T product(T *u, T *u0, int *epsilon, int q)
|
||||
static inline T product(T *u, T *u0, int *epsilon, int q)
|
||||
{
|
||||
return epsilon[0]*epsilon[1]*epsilon[2]*u[0]*u[1]*u[2];
|
||||
}
|
||||
@ -108,9 +108,9 @@ T compute_projection(T *vertex_value, T *u, T *u0, T rho)
|
||||
T ret;
|
||||
|
||||
ret = project_tool<T, ProductTerm0<T> >(vertex_value, u, u0) * rho;
|
||||
// ret += project_tool<T, ProductTerm1<T> >(vertex_value, u, u0) * rho * rho / 2;
|
||||
// ret += project_tool<T, ProductTerm2<T> >(vertex_value, u, u0) * rho * rho * rho / 3;
|
||||
// ret += project_tool<T, ProductTerm3<T> >(vertex_value, u, u0) * rho * rho * rho * rho / 4;
|
||||
ret += project_tool<T, ProductTerm1<T> >(vertex_value, u, u0) * rho * rho / 2;
|
||||
ret += project_tool<T, ProductTerm2<T> >(vertex_value, u, u0) * rho * rho * rho / 3;
|
||||
ret += project_tool<T, ProductTerm3<T> >(vertex_value, u, u0) * rho * rho * rho * rho / 4;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user