From aa45ce04de9099319b5c813440ac307930302feb Mon Sep 17 00:00:00 2001 From: jpekkila Date: Thu, 15 Aug 2019 11:09:40 +0300 Subject: [PATCH] Made the linear algebra functions used in forcing.cc static to avoid collisions with the functions defined in math_utils.h --- src/standalone/model/host_forcing.cc | 8 ++++---- src/standalone/model/host_forcing.h | 8 -------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/standalone/model/host_forcing.cc b/src/standalone/model/host_forcing.cc index bd68d89..bdc9d9f 100644 --- a/src/standalone/model/host_forcing.cc +++ b/src/standalone/model/host_forcing.cc @@ -37,7 +37,7 @@ get_random_number_01() return AcReal(rand()) / AcReal(RAND_MAX); } -AcReal3 +static AcReal3 cross(const AcReal3& a, const AcReal3& b) { AcReal3 c; @@ -49,13 +49,13 @@ cross(const AcReal3& a, const AcReal3& b) return c; } -AcReal +static AcReal dot(const AcReal3& a, const AcReal3& b) { return a.x * b.x + a.y * b.y + a.z * b.z; } -AcReal3 +static AcReal3 vec_norm(const AcReal3& a) { AcReal3 c; @@ -68,7 +68,7 @@ vec_norm(const AcReal3& a) return c; } -AcReal3 +static AcReal3 vec_multi_scal(const AcReal scal, const AcReal3& a) { AcReal3 c; diff --git a/src/standalone/model/host_forcing.h b/src/standalone/model/host_forcing.h index 4f00464..519c2f0 100644 --- a/src/standalone/model/host_forcing.h +++ b/src/standalone/model/host_forcing.h @@ -32,14 +32,6 @@ AcReal get_random_number_01(); -// AcReal3 cross(const AcReal3& a, const AcReal3& b); - -// AcReal dot(const AcReal3& a, const AcReal3& b); - -// AcReal3 vec_norm(const AcReal3& a); - -// AcReal3 vec_multi_scal(const AcReal scal, const AcReal3& a); - AcReal3 helical_forcing_k_generator(const AcReal kmax, const AcReal kmin); void helical_forcing_e_generator(AcReal3* e_force, const AcReal3 k_force);