Moved basic built-in functions for vector operations to math_utils.h from integration.cuh so that they are shared with the CPU and GPU

This commit is contained in:
jpekkila
2019-08-15 11:04:22 +03:00
parent d5b2e5bb42
commit 36fea70560
6 changed files with 92 additions and 86 deletions

View File

@@ -26,7 +26,8 @@
*/
#include "host_forcing.h"
#include "src/core/math_utils.h"
// #include "src/core/math_utils.h"
#include "math.h"
// The is a wrapper for genering random numbers with a chosen system.
AcReal

View File

@@ -32,13 +32,13 @@
AcReal get_random_number_01();
AcReal3 cross(const AcReal3& a, const AcReal3& b);
// AcReal3 cross(const AcReal3& a, const AcReal3& b);
AcReal dot(const AcReal3& a, const AcReal3& b);
// AcReal dot(const AcReal3& a, const AcReal3& b);
AcReal3 vec_norm(const AcReal3& a);
// AcReal3 vec_norm(const AcReal3& a);
AcReal3 vec_multi_scal(const AcReal scal, const AcReal3& a);
// AcReal3 vec_multi_scal(const AcReal scal, const AcReal3& a);
AcReal3 helical_forcing_k_generator(const AcReal kmax, const AcReal kmin);

View File

@@ -27,6 +27,7 @@
#pragma once
#include "astaroth.h"
#include "math.h"
typedef long double ModelScalar;