@@ -48,7 +48,7 @@ the swarm at the new timestep, and then on the cells again to inject the tracers
4848Due to the stochasticity of the injection, we need a deterministic RNG that will
4949return the same random number of each cells at both par_for. Below is an attempt
5050of generating such RNG using a cell index based seed. Comments welcomed.
51- =============================================================================== */
51+ =============================================================================== */
5252
5353// Generate a unique see, deterministic providing k,j,i
5454KOKKOS_INLINE_FUNCTION
@@ -76,12 +76,10 @@ uint64_t hash(uint64_t seed) {
7676KOKKOS_INLINE_FUNCTION
7777double random_double (uint64_t seed) { return (hash (seed) >> 11 ) * (1.0 / (1ULL << 53 )); }
7878
79-
8079/* ===============================================================================
8180EvaluateCriteria: custom function containing the criteria that cells have to ful-
8281fill to be elligible for the injection of tracers.
83- =============================================================================== */
84-
82+ =============================================================================== */
8583
8684template <typename View4D>
8785KOKKOS_INLINE_FUNCTION bool EvaluateCriteria (InjectionCriteria crit, View4D cons,
@@ -112,9 +110,9 @@ KOKKOS_INLINE_FUNCTION bool EvaluateCriteria(InjectionCriteria crit, View4D cons
112110}
113111
114112/* ===============================================================================
115- Initialize: reads the input parameters, create the tracer package and create the
113+ Initialize: reads the input parameters, create the tracer package and create the
116114swarm object of each individual populations of tracers.
117- =============================================================================== */
115+ =============================================================================== */
118116
119117// Initializing the tracer packages and swarms
120118std::shared_ptr<StateDescriptor> Initialize (ParameterInput *pin) {
@@ -231,8 +229,7 @@ filling a criterion indicated in the input parameter list. Since tracers can't b
231229injected at all timesteps (this would lead to a divergence of the tracer population,
232230these are injected in a stochastic way, based on a target number of tracer per cell
233231and per unit time.
234- =============================================================================== */
235-
232+ =============================================================================== */
236233
237234TaskStatus InjectTracers (MeshBlockData<Real> *mbd, parthenon::SimTime &tm) {
238235
@@ -401,7 +398,7 @@ TaskStatus InjectTracers(MeshBlockData<Real> *mbd, parthenon::SimTime &tm) {
401398/* ===============================================================================
402399RemoveTracers: loops on tracer, check which ones have reach the end of their life-
403400time, remove them in such case.
404- =============================================================================== */
401+ =============================================================================== */
405402
406403TaskStatus RemoveTracers (MeshBlockData<Real> *mbd, parthenon::SimTime &tm) {
407404
@@ -448,9 +445,9 @@ TaskStatus RemoveTracers(MeshBlockData<Real> *mbd, parthenon::SimTime &tm) {
448445
449446/* ===============================================================================
450447SeedInitialTracers: setting up the initial distribution of tracers in each pop. As
451- tracers can now be dynamically injected, it might worth lifting the non zero tracer
448+ tracers can now be dynamically injected, it might worth lifting the non zero tracer
452449condition.
453- =============================================================================== */
450+ =============================================================================== */
454451
455452void SeedInitialTracers (Mesh *pmesh, ParameterInput *pin, parthenon::SimTime &tm) {
456453
@@ -561,7 +558,7 @@ void SeedInitialTracers(Mesh *pmesh, ParameterInput *pin, parthenon::SimTime &tm
561558AdvectTracers: moves the tracers in each population for the current timestep.
562559Two methods are implemented: velocity field interpolation (method 0), or advection
563560through face-centered velocity (recommended).
564- =============================================================================== */
561+ =============================================================================== */
565562
566563TaskStatus AdvectTracers (MeshBlockData<Real> *mbd, const Real dt) {
567564
@@ -692,7 +689,7 @@ TaskStatus AdvectTracers(MeshBlockData<Real> *mbd, const Real dt) {
692689/* ===============================================================================
693690FillTracers: calculate interpolated values of some fields (rho, vel, B, etc.) to
694691damped into the output files.
695- =============================================================================== */
692+ =============================================================================== */
696693
697694TaskStatus FillTracers (MeshData<Real> *md, parthenon::SimTime &tm) {
698695 auto hydro_pkg = md->GetParentPointer ()->packages .Get (" Hydro" );
0 commit comments