REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
REMORA_Tracers.cpp
Go to the documentation of this file.
1#include <string>
2#include <REMORA.H>
3#include <REMORA_PC.H>
4
5#ifdef REMORA_USE_PARTICLES
6
7using namespace amrex;
8
9/*! Read tracer and hydro particles parameters */
29
30/*! Initialize tracer and hydro particles */
32 const Vector<std::unique_ptr<MultiFab>>& a_z_phys_nd )
33{
35
36 for (auto it = namelist_unalloc.begin(); it != namelist_unalloc.end(); ++it) {
37
38 std::string species_name( *it );
39
41
44 pc->InitializeParticles(a_z_phys_nd[0]);
45 amrex::Print() << "Initialized " << pc->TotalNumberOfParticles() << " tracer particles.\n";
47
49
52 pc->InitializeParticles(a_z_phys_nd[0]);
53 amrex::Print() << "Initialized " << pc->TotalNumberOfParticles() << " hydro particles.\n";
55
56 }
57 }
58
61
62 return;
63}
64
65/*! Evolve tracers and hydro particles for one time step*/
67 Real a_dt_lev,
69 const Vector<std::unique_ptr<MultiFab>>& a_z_phys_nd )
70{
76 }
82 }
83 return;
84}
85
86#endif
mf_h setVal(geomdata.ProbHi(2))
ParticlesNamesList & getNamesUnalloc()
void pushBack(const std::string &a_name, REMORAPC *const a_pc)
void addName(const std::string &a_name)
bool m_use_hydro_particles
tracer particles that fall with gravity
Definition REMORA.H:2036
void initializeTracers(amrex::ParGDBBase *, const amrex::Vector< std::unique_ptr< amrex::MultiFab > > &)
Initialize tracer and hydro particles.
std::string pp_prefix
default prefix for input file parameters
Definition REMORA.H:381
void readTracersParams()
Read tracer and hydro particles parameters.
bool m_use_tracer_particles
tracer particles that advect with flow
Definition REMORA.H:2034
void evolveTracers(int lev, amrex::Real dt, amrex::Vector< amrex::MultiFab const * > &flow_vel, const amrex::Vector< std::unique_ptr< amrex::MultiFab > > &)
Evolve tracers and hydro particles.
ParticleData particleData
Particle container with all particle species.
Definition REMORA.H:2030
const std::string tracers
Definition REMORA_PC.H:51
const std::string hydro
Definition REMORA_PC.H:52