REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
REMORAPC Class Reference

#include <REMORA_PC.H>

Inheritance diagram for REMORAPC:
Collaboration diagram for REMORAPC:

Public Member Functions

 REMORAPC (amrex::ParGDBBase *a_gdb, const std::string &a_name="particles")
 
 REMORAPC (const amrex::Geometry &a_geom, const amrex::DistributionMapping &a_dmap, const amrex::BoxArray &a_ba, const std::string &a_name="particles")
 
virtual void InitializeParticles (const std::unique_ptr< amrex::MultiFab > &a_ptr=nullptr)
 
virtual void EvolveParticles (int a_lev, amrex::Real a_dt_lev, amrex::Vector< amrex::MultiFab const * > &a_flow_vel, const amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_z_phys_nd)
 
virtual amrex::Vector< std::string > varNames () const
 
virtual amrex::Vector< std::string > meshPlotVarNames () const
 
virtual void AdvectWithFlow (int a_lev, amrex::Real a_dt, amrex::Vector< amrex::MultiFab const * > &a_umac, const std::unique_ptr< amrex::MultiFab > &a_z_height)
 
void WritePlotFile (const std::string &a_fname, const std::string &a_name, const amrex::Vector< amrex::MultiFab > &a_xy) const
 
virtual void massDensity (amrex::MultiFab &a_mf, const int &a_lev, const int &a_comp=0) const
 
virtual void computeMeshVar (const std::string &a_var_name, amrex::MultiFab &a_mf, const int a_lev) const
 
void setAdvectWithFlow (bool a_flag)
 
void initializeParticlesUniformDistributionInBox (const std::unique_ptr< amrex::MultiFab > &a_ptr, const amrex::RealBox &particle_box)
 

Protected Member Functions

virtual void readInputs ()
 

Protected Attributes

bool m_advect_w_flow
 
amrex::RealBox m_particle_box
 
std::string m_name
 
std::string m_initialization_type
 
int m_ppc_init
 

Private Attributes

bool place_randomly_in_cells
 

Detailed Description

Definition at line 105 of file REMORA_PC.H.

Constructor & Destructor Documentation

◆ REMORAPC() [1/2]

REMORAPC::REMORAPC ( amrex::ParGDBBase *  a_gdb,
const std::string &  a_name = "particles" 
)
inline

Constructor

Definition at line 115 of file REMORA_PC.H.

Here is the call graph for this function:

◆ REMORAPC() [2/2]

REMORAPC::REMORAPC ( const amrex::Geometry &  a_geom,
const amrex::DistributionMapping &  a_dmap,
const amrex::BoxArray &  a_ba,
const std::string &  a_name = "particles" 
)
inline

Constructor

Definition at line 130 of file REMORA_PC.H.

Here is the call graph for this function:

Member Function Documentation

◆ AdvectWithFlow()

void REMORAPC::AdvectWithFlow ( int  a_lev,
amrex::Real  a_dt,
amrex::Vector< amrex::MultiFab const * > &  a_umac,
const std::unique_ptr< amrex::MultiFab > &  a_z_height 
)
virtual

Uses midpoint method to advance particles using flow velocity.

Parameters
a_levlevel at which to evolve particles
a_dttime step
a_umacflow velocities
a_z_heightz nodal positions of grid

Definition at line 37 of file REMORA_PC_Evolve.cpp.

Referenced by EvolveParticles().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeMeshVar()

virtual void REMORAPC::computeMeshVar ( const std::string &  a_var_name,
amrex::MultiFab &  a_mf,
const int  a_lev 
) const
inlinevirtual

Compute mesh variable from particles

Definition at line 183 of file REMORA_PC.H.

Here is the call graph for this function:

◆ EvolveParticles()

void REMORAPC::EvolveParticles ( int  a_lev,
amrex::Real  a_dt_lev,
amrex::Vector< amrex::MultiFab const * > &  a_flow_vel,
const amrex::Vector< std::unique_ptr< amrex::MultiFab > > &  a_z_phys_nd 
)
virtual

Evolve particles for one time step

Parameters
a_levlevel at which to evolve particles
a_dt_levtime step
a_flow_velflow velocities
a_z_phys_ndz nodal positions of grid

Definition at line 16 of file REMORA_PC_Evolve.cpp.

Here is the call graph for this function:

◆ InitializeParticles()

void REMORAPC::InitializeParticles ( const std::unique_ptr< amrex::MultiFab > &  a_ptr = nullptr)
virtual

Initialize particles in domain

Definition at line 51 of file REMORA_PC_Init.cpp.

Here is the call graph for this function:

◆ initializeParticlesUniformDistributionInBox()

void REMORAPC::initializeParticlesUniformDistributionInBox ( const std::unique_ptr< amrex::MultiFab > &  a_ptr,
const amrex::RealBox &  particle_box 
)

Default particle initialization

Uniform distribution: the number of particles per grid cell is specified by "initial_particles_per_cell", and they are randomly distributed.

Definition at line 68 of file REMORA_PC_Init.cpp.

Referenced by InitializeParticles().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ massDensity()

void REMORAPC::massDensity ( amrex::MultiFab &  a_mf,
const int &  a_lev,
const int &  a_comp = 0 
) const
virtual

Compute mass density

Parameters
a_mfMultifab to calculate over
a_levlevel to calculate on
a_compcomponent to calculate

Definition at line 14 of file REMORA_PC_Utils.cpp.

Referenced by computeMeshVar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ meshPlotVarNames()

virtual amrex::Vector< std::string > REMORAPC::meshPlotVarNames ( ) const
inlinevirtual

Get real-type particle attribute names

Definition at line 163 of file REMORA_PC.H.

Here is the call graph for this function:

◆ readInputs()

void REMORAPC::readInputs ( )
protectedvirtual

read inputs from file

Definition at line 8 of file REMORA_PC_Init.cpp.

Referenced by REMORAPC(), and REMORAPC().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAdvectWithFlow()

void REMORAPC::setAdvectWithFlow ( bool  a_flag)
inline

Specify if particles should advect with flow

Definition at line 195 of file REMORA_PC.H.

Here is the call graph for this function:

◆ varNames()

virtual amrex::Vector< std::string > REMORAPC::varNames ( ) const
inlinevirtual

Get real-type particle attribute names

Definition at line 156 of file REMORA_PC.H.

Referenced by WritePlotFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WritePlotFile()

void REMORAPC::WritePlotFile ( const std::string &  a_fname,
const std::string &  a_name,
const amrex::Vector< amrex::MultiFab > &  a_xy 
) const

Write the particles to a plotfile with x and y in physical coordinates

Write the particles to a plotfile with x and y in physical coordinates. The particles move in the uniform coordinates of the AMReX geometry; for output, x and y are replaced by the physical coordinates of the cell corners (psi points) interpolated bilinearly to each particle. These are the corner positions the plotfile's nodal displacement gives a viewer, so each particle is drawn inside the cell that holds it. z is already the physical height. Only a copy of the particles is converted, so writing a plotfile does not change the run.

Parameters
a_fnameplotfile directory
a_nameparticle species name
a_xyper level, physical x and y of the psi points (REMORA::plot_node_coords)

Definition at line 59 of file REMORA_PC_Utils.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ m_advect_w_flow

bool REMORAPC::m_advect_w_flow
protected

advect with flow velocity

Definition at line 210 of file REMORA_PC.H.

Referenced by EvolveParticles(), readInputs(), and setAdvectWithFlow().

◆ m_initialization_type

std::string REMORAPC::m_initialization_type
protected

initial particle distribution type

Definition at line 216 of file REMORA_PC.H.

Referenced by InitializeParticles(), and readInputs().

◆ m_name

std::string REMORAPC::m_name
protected

name of this particle species

Definition at line 214 of file REMORA_PC.H.

Referenced by InitializeParticles(), readInputs(), REMORAPC(), and REMORAPC().

◆ m_particle_box

amrex::RealBox REMORAPC::m_particle_box
protected

box within which to place particles

Definition at line 212 of file REMORA_PC.H.

Referenced by InitializeParticles(), and readInputs().

◆ m_ppc_init

int REMORAPC::m_ppc_init
protected

initial number of particles per cell

Definition at line 217 of file REMORA_PC.H.

Referenced by initializeParticlesUniformDistributionInBox(), and readInputs().

◆ place_randomly_in_cells

bool REMORAPC::place_randomly_in_cells
private

place particles at random positions?

Definition at line 224 of file REMORA_PC.H.

Referenced by initializeParticlesUniformDistributionInBox(), and readInputs().


The documentation for this class was generated from the following files: