Skip to content

Unified Refinement (CF and FC) for gpu and cpu.

Closes #60 (closed)

Creates new folder src/lbm/refinement. Contains the calculation of the coefficients and the interpolation coarse to fine and fine to coarse.

usage in cpu:

  • src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetMomentsInterpolationProcessor.h
  • src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetMomentsInterpolationProcessor.cpp

usage in gpu:

  • src/gpu/VirtualFluids_GPU/GPU/GridScaling/scaleCF_compressible.cu
  • src/gpu/VirtualFluids_GPU/GPU/GridScaling/scaleFC_compressible.cu

How is it used?

// 1. create moment set and calculate moments
vf::lbm::MomentsOnSourceNodeSet momentsSet;
momentsSet.calculateMMM(f, omega);
// ... and so on for all 8 neighbors

// 2. calculate the coefficients
vf::lbm::Coefficients& coefficients
momentsSet.calculateCoefficients(coefficients, xoff, yoff, zoff);

// 3a. interpolate fine to coarse
vf::lbm::interpolateFC(f, vf::lbm::constant::c2o1, omegaC, coefficients);

// 3b. or coarse to fine 
vf::lbm::interpolateCF(f, omegaF, vf::lbm::constant::c1o2, coefficients, -0.25, -0.25, -0.25);
// ... and so on for all 8 neighbors
Edited by Sören Peters

Merge request reports