Applies local velocity-space smoothing to marker weights. More...
#include "quadtree.hpp"
Static Public Member Functions | |
| static void | quadtree_smoothing_conservative (Kokkos::View< Real ** > &part, int npart, Real pos1min, Real pos1max, Real pos2min, Real pos2max, Real sigma, int maxppc, bool do_2w, bool diagnose, Kokkos::View< int * > &diagnose_array) |
| Smooth leaf groups while preserving three velocity moments. | |
| static void | quadtree_smoothing_non_conservative (Kokkos::View< Real ** > &part, int npart, Real pos1min, Real pos1max, Real pos2min, Real pos2max, Real hv, int maxppc) |
| Smooth pairs of marker weights without moment constraints. | |
Applies local velocity-space smoothing to marker weights.
Markers are adaptively binned in the \((v_\parallel,v_\perp)\) plane. The conservative path processes groups of four in each leaf and constructs replacement weights that preserve the local weighted particle number, parallel momentum, and kinetic-energy moments. The non-conservative path blends pairs toward their mean. In both cases the blend factor decays as a Gaussian of inter-marker distance.
The implementation stages Kokkos Views to the host while building and traversing its std::unique_ptr tree.
quadtree.F90, module quadtree_mod, and quadtree_non_conservative.F90 for the pairwise variant.
|
static |
Smooth leaf groups while preserving three velocity moments.
| [in,out] | part | Marker data [4][>=npart]: parallel velocity, perpendicular velocity, primary weight, and secondary weight. |
| [in] | npart | Number of marker columns to insert. |
| [in] | pos1min | Inclusive lower parallel-velocity bound. |
| [in] | pos1max | Inclusive upper parallel-velocity bound. |
| [in] | pos2min | Inclusive lower perpendicular-velocity bound. |
| [in] | pos2max | Inclusive upper perpendicular-velocity bound. |
| [in] | sigma | Gaussian smoothing length in normalized velocity units. |
| [in] | maxppc | Maximum number of markers retained per leaf. |
| [in] | do_2w | Smooth the secondary weight as well as the primary weight. |
| [in] | diagnose | Accumulate tree depth and leaf-count statistics. |
| [in,out] | diagnose_array | Four-element accumulator receiving sums of {depth, depth^2, leaves, leaves^2} when diagnose is true. |
quadtree.F90: quadtree_smoothing.
|
static |
Smooth pairs of marker weights without moment constraints.
| [in,out] | part | Marker data [4][>=npart]: parallel velocity, perpendicular velocity, primary weight, and secondary weight. |
| [in] | npart | Number of marker columns to insert. |
| [in] | pos1min | Inclusive lower parallel-velocity bound. |
| [in] | pos1max | Inclusive upper parallel-velocity bound. |
| [in] | pos2min | Inclusive lower perpendicular-velocity bound. |
| [in] | pos2max | Inclusive upper perpendicular-velocity bound. |
| [in] | hv | Gaussian smoothing length in normalized velocity units. |
| [in] | maxppc | Maximum number of markers retained per leaf. |
quadtree_non_conservative.F90: quadtree_smoothing.