From 9b54973624b5a5c94ecd7bc56b6afa119f94c5d2 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 5 Jun 2014 17:36:57 +0200 Subject: [PATCH] Fix --- python/project_tool.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python/project_tool.hpp b/python/project_tool.hpp index ad36c20..6f8c1d7 100644 --- a/python/project_tool.hpp +++ b/python/project_tool.hpp @@ -25,7 +25,7 @@ static T project_tool(T *vertex_value, T *u, T *u0) template -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 >(vertex_value, u, u0) * rho; -// ret += project_tool >(vertex_value, u, u0) * rho * rho / 2; -// ret += project_tool >(vertex_value, u, u0) * rho * rho * rho / 3; -// ret += project_tool >(vertex_value, u, u0) * rho * rho * rho * rho / 4; + ret += project_tool >(vertex_value, u, u0) * rho * rho / 2; + ret += project_tool >(vertex_value, u, u0) * rho * rho * rho / 3; + ret += project_tool >(vertex_value, u, u0) * rho * rho * rho * rho / 4; return ret; }