Skip to content
Snippets Groups Projects
Commit 40aa68e7 authored by Soeren Peters's avatar Soeren Peters
Browse files

Small clean ups.

parent bacfeecd
No related branches found
No related tags found
1 merge request!34Add new library, which contains the calculation of the macroscopic quantities and a general cumulant computation. (Closes #13)
...@@ -244,7 +244,7 @@ void CumulantK17LBMKernelUnified::calculate(int step) ...@@ -244,7 +244,7 @@ void CumulantK17LBMKernelUnified::calculate(int step)
distribution.f[vf::lbm::dir::MMM] = mfaaa; distribution.f[vf::lbm::dir::MMM] = mfaaa;
distribution.f[vf::lbm::dir::ZZZ] = mfbbb; distribution.f[vf::lbm::dir::ZZZ] = mfbbb;
vf::lbm::cumulantChimera(distribution, omega, forces); vf::lbm::cumulantChimeraK17(distribution, omega, forces);
mfcbb = distribution.f[vf::lbm::dir::PZZ]; mfcbb = distribution.f[vf::lbm::dir::PZZ];
mfabb = distribution.f[vf::lbm::dir::MZZ]; mfabb = distribution.f[vf::lbm::dir::MZZ];
......
...@@ -66,7 +66,7 @@ __global__ void LB_Kernel_CumulantK17Unified( ...@@ -66,7 +66,7 @@ __global__ void LB_Kernel_CumulantK17Unified(
real level_forces[3]; real level_forces[3];
getLevelForce(forces[0], forces[1], forces[2], level, level_forces); getLevelForce(forces[0], forces[1], forces[2], level, level_forces);
vf::lbm::cumulantChimera(distributionWrapper.distribution, omega, level_forces); vf::lbm::cumulantChimeraK17(distributionWrapper.distribution, omega, level_forces);
distributionWrapper.write(); distributionWrapper.write();
} }
......
...@@ -16,7 +16,7 @@ namespace vf ...@@ -16,7 +16,7 @@ namespace vf
namespace lbm namespace lbm
{ {
using namespace constant; using namespace constant;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
...@@ -25,7 +25,7 @@ namespace lbm ...@@ -25,7 +25,7 @@ namespace lbm
//! and \ref //! and \ref
//! <a href="https://doi.org/10.1016/j.jcp.2017.07.004"><b>[ M. Geier et al. (2017), DOI:10.1016/j.jcp.2017.07.004 ]</b></a> //! <a href="https://doi.org/10.1016/j.jcp.2017.07.004"><b>[ M. Geier et al. (2017), DOI:10.1016/j.jcp.2017.07.004 ]</b></a>
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
__host__ __device__ void cumulantChimera(Distribution27& distribution, real omega, real* forces) __host__ __device__ void cumulantChimeraK17(Distribution27& distribution, real omega, real* forces)
{ {
//////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////
//! - Read distributions: style of reading and writing the distributions from/to //! - Read distributions: style of reading and writing the distributions from/to
......
...@@ -52,7 +52,7 @@ inline __host__ __device__ real abs_internal(real value) ...@@ -52,7 +52,7 @@ inline __host__ __device__ real abs_internal(real value)
//! and \ref //! and \ref
//! <a href="https://doi.org/10.1016/j.jcp.2017.07.004"><b>[ M. Geier et al. (2017), DOI:10.1016/j.jcp.2017.07.004 ]</b></a> //! <a href="https://doi.org/10.1016/j.jcp.2017.07.004"><b>[ M. Geier et al. (2017), DOI:10.1016/j.jcp.2017.07.004 ]</b></a>
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
__host__ __device__ void cumulantChimera(Distribution27& distribution, real omega, real* forces); __host__ __device__ void cumulantChimeraK17(Distribution27& distribution, real omega, real* forces);
} }
} }
......
...@@ -84,7 +84,8 @@ inline __host__ __device__ real getPressure(const real *const &f27, const real& ...@@ -84,7 +84,8 @@ inline __host__ __device__ real getPressure(const real *const &f27, const real&
constant::c3o1 * (f27[dir::TNE] + f27[dir::TSW] + f27[dir::TSE] + f27[dir::TNW] + constant::c3o1 * (f27[dir::TNE] + f27[dir::TSW] + f27[dir::TSE] + f27[dir::TNW] +
f27[dir::BNE] + f27[dir::BSW] + f27[dir::BSE] + f27[dir::BNW]) - f27[dir::BNE] + f27[dir::BSW] + f27[dir::BSE] + f27[dir::BNW]) -
rho - (vx * vx + vy * vy + vz * vz) * (constant::c1o1 + rho)) * rho - (vx * vx + vy * vy + vz * vz) * (constant::c1o1 + rho)) *
constant::c1o2 + rho; constant::c1o2 + rho; // times zero for incompressible case
// Attention: op defined directly to op = 1 ; ^^^^(1.0/op-0.5)=0.5
} }
// GPU: LBCalcMacCompSP27 // GPU: LBCalcMacCompSP27
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment