Alamo
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
Integrator::Hydro Class Reference

#include <Hydro.H>

Inheritance diagram for Integrator::Hydro:
Integrator::Integrator

Public Member Functions

 Hydro ()
 
 Hydro (Set::Field< Set::Scalar > &a_eta, Set::Field< Set::Scalar > &a_etaold, bool a_invert)
 
 Hydro (IO::ParmParse &pp)
 
virtual ~Hydro ()
 
- Public Member Functions inherited from Integrator::Integrator
 Integrator ()
 
virtual ~Integrator ()
 
void InitData ()
 
void Restart (std::string restartfile, bool a_node=false)
 
void Evolve ()
 
void SetFilename (std::string _plot_file)
 
std::string GetFilename ()
 
void regrid (int lbase, Set::Scalar time, bool initial=false) override
 
void InitFromScratch (Set::Scalar time)
 
template<class T , int d>
ALAMO_SINGLE_DEFINITION void AddField (Set::Field< T > &new_field, BC::BC< T > *new_bc, int ncomp, int nghost, std::string name, bool writeout, bool evolving, std::vector< std::string >)
 
template<class T >
ALAMO_SINGLE_DEFINITION void RegisterGeneralFab (Set::Field< T > &new_fab, int ncomp, int nghost, bool evolving)
 
template<class T >
ALAMO_SINGLE_DEFINITION void RegisterGeneralFab (Set::Field< T > &new_fab, int ncomp, int nghost, std::string a_name, bool evolving)
 
template<class T >
AMREX_ATTRIBUTE_WEAK void RegisterGeneralFab (Set::Field< T > &new_fab, int ncomp, int nghost, bool writeout, std::string a_name, bool evolving)
 

Static Public Member Functions

static void Parse (Hydro &value, IO::ParmParse &pp)
 

Static Public Attributes

static constexpr const char * name = "hydro"
 

Protected Types

enum  IntegrationScheme { ForwardEuler , SSPRK3 , RK4 }
 
enum  PrescribedFlowMode { Absolute , Relative }
 

Protected Member Functions

void Initialize (int lev) override
 
void Mix (int lev)
 
void TimeStepBegin (Set::Scalar a_time, int a_iter) override
 
void TimeStepComplete (Set::Scalar time, int lev) override
 
void Advance (int lev, Set::Scalar time, Set::Scalar dt) override
 
void TagCellsForRefinement (int lev, amrex::TagBoxArray &tags, amrex::Real, int) override
 
void Regrid (int lev, Set::Scalar time) override
 
virtual void UpdateEta (int lev, Set::Scalar time)
 
virtual void UpdateFluxes (int lev, Set::Scalar time, Set::Scalar dt)
 
void RHS (int lev, Set::Scalar time, amrex::MultiFab &rho_rhs_mf, amrex::MultiFab &M_rhs_mf, amrex::MultiFab &E_rhs_mf, const amrex::MultiFab &rho_mf, const amrex::MultiFab &M_mf, const amrex::MultiFab &E_mf)
 
- Protected Member Functions inherited from Integrator::Integrator
virtual void Integrate (int, Set::Scalar, int, const amrex::MFIter &, const amrex::Box &)
 
void StopClock ()
 
void RestartClock ()
 
void RegisterNewFab (Set::Field< Set::Scalar > &new_fab, BC::BC< Set::Scalar > *new_bc, int ncomp, int nghost, std::string name, bool writeout, bool evolving=true, std::vector< std::string > suffix={})
 
void RegisterNewFab (Set::Field< Set::Scalar > &new_fab, int ncomp, std::string name, bool writeout, bool evolving=true, std::vector< std::string > suffix={})
 
void RegisterNodalFab (Set::Field< Set::Scalar > &new_fab, int ncomp, int nghost, std::string name, bool writeout, bool evolving=true, std::vector< std::string > suffix={})
 
void RegisterNodalFab (Set::Field< Set::Scalar > &new_fab, BC::BC< Set::Scalar > *new_bc, int ncomp, int nghost, std::string name, bool writeout, bool evolving=true, std::vector< std::string > suffix={})
 
template<class T >
void RegisterGeneralFab (Set::Field< T > &new_fab, int ncomp, int nghost, bool evolving=true)
 
template<class T >
void RegisterGeneralFab (Set::Field< T > &new_fab, int ncomp, int nghost, std::string a_name, bool evolving=true)
 
template<class T >
void RegisterGeneralFab (Set::Field< T > &new_fab, int ncomp, int nghost, bool writeout, std::string a_name, bool evolving=true)
 
template<class T , int d>
void AddField (Set::Field< T > &new_field, BC::BC< T > *new_bc, int ncomp, int nghost, std::string, bool writeout, bool evolving, std::vector< std::string > suffix={})
 
void SetFinestLevel (const int a_finestlevel)
 
void RegisterIntegratedVariable (Set::Scalar *integrated_variable, std::string name, bool extensive=true)
 
void SetTimestep (Set::Scalar _timestep)
 
void SetPlotInt (int plot_int)
 
void SetThermoInt (int a_thermo_int)
 
void SetThermoPlotInt (int a_thermo_plot_int)
 
void SetStopTime (Set::Scalar a_stop_time)
 
void DynamicTimestep_SyncTimeStep (int lev, Set::Scalar dt_min)
 
void DynamicTimestep_Reset ()
 
void DynamicTimestep_Update ()
 
void IntegrateVariables (Set::Scalar cur_time, int step)
 
void WritePlotFile (bool initial=false) const
 
void WritePlotFile (std::string prefix, Set::Scalar time, int step) const
 
void WritePlotFile (Set::Scalar time, amrex::Vector< int > iter, bool initial=false, std::string prefix="") const
 

Protected Attributes

Set::Field< Set::Scalardensity_mf
 
Set::Field< Set::Scalardensity_old_mf
 
Set::Field< Set::Scalarenergy_mf
 
Set::Field< Set::Scalarenergy_old_mf
 
Set::Field< Set::Scalarmomentum_mf
 
Set::Field< Set::Scalarmomentum_old_mf
 
Set::Field< Set::Scalarvelocity_mf
 
Set::Field< Set::Scalarpressure_mf
 
struct { 
 
   Set::Field< Set::Scalar >   density_mf 
 
   Set::Field< Set::Scalar >   momentum_mf 
 
   Set::Field< Set::Scalar >   energy_mf 
 
   IC::IC< Set::Scalar > *   density_ic = nullptr 
 
   IC::IC< Set::Scalar > *   momentum_ic = nullptr 
 
   IC::IC< Set::Scalar > *   energy_ic = nullptr 
 
solid 
 
Set::Field< Set::Scalar > * eta_mf
 
Set::Field< Set::Scalar > * eta_old_mf
 
Set::Field< Set::Scalaretadot_mf
 
Set::Field< Set::Scalarvorticity_mf
 
Set::Field< Set::Scalarm0_mf
 
Set::Field< Set::Scalaru0_mf
 
Set::Field< Set::Scalarq_mf
 
Set::Field< Set::ScalarSource_mf
 
Set::Field< Set::Scalarflux_mf
 
BC::BC< Set::Scalar > * density_bc = nullptr
 
BC::BC< Set::Scalar > * momentum_bc = nullptr
 
BC::BC< Set::Scalar > * energy_bc = nullptr
 
BC::BC< Set::Scalar > * eta_bc = nullptr
 
BC::BC< Set::Scalar > * tracer_bc = nullptr
 
IC::IC< Set::Scalar > * velocity_ic = nullptr
 
IC::IC< Set::Scalar > * pressure_ic = nullptr
 
IC::IC< Set::Scalar > * tracer_ic = nullptr
 
IC::IC< Set::Scalar > * ic_m0 = nullptr
 
IC::IC< Set::Scalar > * ic_u0 = nullptr
 
IC::IC< Set::Scalar > * ic_q = nullptr
 
IC::IC< Set::Scalar > * eta_ic = nullptr
 
IC::IC< Set::Scalar > * etadot_ic = nullptr
 
BC::Nothing bc_nothing
 
BC::Constant neumann_bc_1 = BC::Constant::ZeroNeumann(1)
 
BC::Constant neumann_bc_D = BC::Constant::ZeroNeumann(AMREX_SPACEDIM)
 
Set::Scalar c_max = 0.0
 
Set::Scalar vx_max = 0.0
 
Set::Scalar vy_max = 0.0
 
Set::Scalar eta_refinement_criterion =NAN
 
Set::Scalar omega_refinement_criterion =NAN
 
Set::Scalar gradu_refinement_criterion =NAN
 
Set::Scalar p_refinement_criterion =NAN
 
Set::Scalar rho_refinement_criterion
 
Set::Scalar gamma =NAN
 
Set::Scalar cfl =NAN
 
Set::Scalar cfl_v =NAN
 
Set::Scalar mu =NAN
 
Set::Scalar pref =NAN
 
Set::Scalar small =NAN
 
Set::Scalar cutoff =NAN
 
Set::Scalar lagrange =NAN
 
Set::Scalar lagrange_m0 =NAN
 
Solver::Local::Riemann::Riemannriemannsolver = nullptr
 
IntegrationScheme scheme
 
PrescribedFlowMode prescribedflowmode
 
Set::Vector g
 
bool managed = false
 
bool invert = false
 
std::vector< bool > mixed
 
- Protected Attributes inherited from Integrator::Integrator
struct { 
 
   bool   on = false 
 
   int   verbose = -1 
 
   int   nprevious = -1 
 
   Set::Scalar   cfl = NAN 
 
   Set::Scalar   min = NAN 
 
   Set::Scalar   max = NAN 
 
   std::vector< Set::Scalar >   dt_limit_min 
 
   std::vector< Set::Scalar >   previous_timesteps 
 
dynamictimestep 
 
amrex::Vector< amrex::Real > t_new
 
amrex::Vector< int > istep
 
std::string plot_file { "plt" }
 
amrex::Real timestep = NAN
 
amrex::Vector< amrex::Real > dt
 
amrex::Vector< int > nsubsteps
 
bool integrate_variables_before_advance = true
 
bool integrate_variables_after_advance = false
 
bool clock_running = true
 
struct { 
 
   int   number_of_fabs = 0 
 
   std::vector< Set::Field< Set::Scalar > * >   fab_array 
 
   std::vector< int >   ncomp_array 
 
   std::vector< int >   nghost_array 
 
   std::vector< std::vector< std::string > >   name_array 
 
   std::vector< BC::BC< Set::Scalar > * >   physbc_array 
 
   std::vector< bool >   writeout_array 
 
   std::vector< bool >   evolving_array 
 
   bool   any = true 
 
   bool   all = false 
 
node 
 
struct { 
 
   int   number_of_fabs = 0 
 
   std::vector< Set::Field< Set::Scalar > * >   fab_array 
 
   std::vector< int >   ncomp_array 
 
   std::vector< int >   nghost_array 
 
   std::vector< std::vector< std::string > >   name_array 
 
   std::vector< BC::BC< Set::Scalar > * >   physbc_array 
 
   std::vector< bool >   writeout_array 
 
   std::vector< bool >   evolving_array 
 
   bool   any = true 
 
   bool   all = false 
 
cell 
 
std::vector< BaseField * > m_basefields
 
std::vector< BaseField * > m_basefields_cell
 
BC::Nothing bcnothing
 
struct { 
 
   int   interval = -1 
 
   Set::Scalar   dt = NAN 
 
   int   plot_int = -1 
 
   Set::Scalar   plot_dt = NAN 
 
   int   number = 0 
 
   std::vector< Set::Scalar * >   vars 
 
   std::vector< std::string >   names 
 
   std::vector< bool >   extensives 
 
thermo 
 
int regrid_int = -1
 
int base_regrid_int = -1
 
std::string restart_file_cell = ""
 
std::string restart_file_node = ""
 
struct { 
 
   int   on = 0 
 
   std::vector< amrex::Box >   box 
 
explicitmesh 
 
int abort_on_nan = true
 

Detailed Description

Definition at line 17 of file Hydro.H.

Member Enumeration Documentation

◆ IntegrationScheme

Enumerator
ForwardEuler 
SSPRK3 
RK4 

Definition at line 156 of file Hydro.H.

◆ PrescribedFlowMode

Enumerator
Absolute 
Relative 

Definition at line 161 of file Hydro.H.

Constructor & Destructor Documentation

◆ Hydro() [1/3]

Integrator::Hydro::Hydro ( )
inline

Definition at line 22 of file Hydro.H.

◆ Hydro() [2/3]

Integrator::Hydro::Hydro ( Set::Field< Set::Scalar > &  a_eta,
Set::Field< Set::Scalar > &  a_etaold,
bool  a_invert 
)
inline

Definition at line 24 of file Hydro.H.

◆ Hydro() [3/3]

Integrator::Hydro::Hydro ( IO::ParmParse pp)

Definition at line 21 of file Hydro.cpp.

◆ ~Hydro()

virtual Integrator::Hydro::~Hydro ( )
inlinevirtual

Definition at line 34 of file Hydro.H.

Member Function Documentation

◆ Advance()

void Integrator::Hydro::Advance ( int  lev,
Set::Scalar  time,
Set::Scalar  dt 
)
overrideprotectedvirtual

Implements Integrator::Integrator.

Definition at line 314 of file Hydro.cpp.

◆ Initialize()

void Integrator::Hydro::Initialize ( int  lev)
overrideprotectedvirtual

Implements Integrator::Integrator.

Definition at line 197 of file Hydro.cpp.

◆ Mix()

void Integrator::Hydro::Mix ( int  lev)
protected

Definition at line 231 of file Hydro.cpp.

◆ Parse()

void Integrator::Hydro::Parse ( Hydro value,
IO::ParmParse pp 
)
static

Definition at line 27 of file Hydro.cpp.

◆ Regrid()

void Integrator::Hydro::Regrid ( int  lev,
Set::Scalar  time 
)
overrideprotectedvirtual

Reimplemented from Integrator::Integrator.

Definition at line 827 of file Hydro.cpp.

◆ RHS()

void Integrator::Hydro::RHS ( int  lev,
Set::Scalar  time,
amrex::MultiFab &  rho_rhs_mf,
amrex::MultiFab &  M_rhs_mf,
amrex::MultiFab &  E_rhs_mf,
const amrex::MultiFab &  rho_mf,
const amrex::MultiFab &  M_mf,
const amrex::MultiFab &  E_mf 
)
protected

Definition at line 450 of file Hydro.cpp.

◆ TagCellsForRefinement()

void Integrator::Hydro::TagCellsForRefinement ( int  lev,
amrex::TagBoxArray &  tags,
amrex::Real  ,
int   
)
overrideprotectedvirtual

Implements Integrator::Integrator.

Definition at line 837 of file Hydro.cpp.

◆ TimeStepBegin()

void Integrator::Hydro::TimeStepBegin ( Set::Scalar  a_time,
int  a_iter 
)
overrideprotectedvirtual

Reimplemented from Integrator::Integrator.

Definition at line 290 of file Hydro.cpp.

◆ TimeStepComplete()

void Integrator::Hydro::TimeStepComplete ( Set::Scalar  time,
int  lev 
)
overrideprotectedvirtual

Reimplemented from Integrator::Integrator.

Definition at line 295 of file Hydro.cpp.

◆ UpdateEta()

void Integrator::Hydro::UpdateEta ( int  lev,
Set::Scalar  time 
)
protectedvirtual

Definition at line 279 of file Hydro.cpp.

◆ UpdateFluxes()

void Integrator::Hydro::UpdateFluxes ( int  lev,
Set::Scalar  time,
Set::Scalar  dt 
)
protectedvirtual

Definition at line 285 of file Hydro.cpp.

Field Documentation

◆ bc_nothing

BC::Nothing Integrator::Hydro::bc_nothing
protected

Definition at line 137 of file Hydro.H.

◆ c_max

Set::Scalar Integrator::Hydro::c_max = 0.0
protected

Definition at line 142 of file Hydro.H.

◆ cfl

Set::Scalar Integrator::Hydro::cfl =NAN
protected

Definition at line 147 of file Hydro.H.

◆ cfl_v

Set::Scalar Integrator::Hydro::cfl_v =NAN
protected

Definition at line 147 of file Hydro.H.

◆ cutoff

Set::Scalar Integrator::Hydro::cutoff =NAN
protected

Definition at line 150 of file Hydro.H.

◆ density_bc

BC::BC<Set::Scalar>* Integrator::Hydro::density_bc = nullptr
protected

Definition at line 119 of file Hydro.H.

◆ density_ic

IC::IC< Set::Scalar > * Integrator::Hydro::density_ic = nullptr

Definition at line 102 of file Hydro.H.

◆ density_mf

Set::Field<Set::Scalar> Integrator::Hydro::density_mf
protected

Definition at line 86 of file Hydro.H.

◆ density_old_mf

Set::Field<Set::Scalar> Integrator::Hydro::density_old_mf
protected

Definition at line 87 of file Hydro.H.

◆ energy_bc

BC::BC<Set::Scalar>* Integrator::Hydro::energy_bc = nullptr
protected

Definition at line 121 of file Hydro.H.

◆ energy_ic

IC::IC<Set::Scalar>* Integrator::Hydro::energy_ic = nullptr

Definition at line 104 of file Hydro.H.

◆ energy_mf

Set::Field<Set::Scalar> Integrator::Hydro::energy_mf
protected

Definition at line 89 of file Hydro.H.

◆ energy_old_mf

Set::Field<Set::Scalar> Integrator::Hydro::energy_old_mf
protected

Definition at line 90 of file Hydro.H.

◆ eta_bc

BC::BC<Set::Scalar>* Integrator::Hydro::eta_bc = nullptr
protected

Definition at line 122 of file Hydro.H.

◆ eta_ic

IC::IC<Set::Scalar>* Integrator::Hydro::eta_ic = nullptr
protected

Definition at line 134 of file Hydro.H.

◆ eta_mf

Set::Field<Set::Scalar>* Integrator::Hydro::eta_mf
protected

Definition at line 107 of file Hydro.H.

◆ eta_old_mf

Set::Field<Set::Scalar>* Integrator::Hydro::eta_old_mf
protected

Definition at line 108 of file Hydro.H.

◆ eta_refinement_criterion

Set::Scalar Integrator::Hydro::eta_refinement_criterion =NAN
protected

Definition at line 146 of file Hydro.H.

◆ etadot_ic

IC::IC<Set::Scalar>* Integrator::Hydro::etadot_ic = nullptr
protected

Definition at line 135 of file Hydro.H.

◆ etadot_mf

Set::Field<Set::Scalar> Integrator::Hydro::etadot_mf
protected

Definition at line 109 of file Hydro.H.

◆ flux_mf

Set::Field<Set::Scalar> Integrator::Hydro::flux_mf
protected

Definition at line 117 of file Hydro.H.

◆ g

Set::Vector Integrator::Hydro::g
protected

Definition at line 167 of file Hydro.H.

◆ gamma

Set::Scalar Integrator::Hydro::gamma =NAN
protected

Definition at line 147 of file Hydro.H.

◆ gradu_refinement_criterion

Set::Scalar Integrator::Hydro::gradu_refinement_criterion =NAN
protected

Definition at line 146 of file Hydro.H.

◆ ic_m0

IC::IC<Set::Scalar>* Integrator::Hydro::ic_m0 = nullptr
protected

Definition at line 130 of file Hydro.H.

◆ ic_q

IC::IC<Set::Scalar>* Integrator::Hydro::ic_q = nullptr
protected

Definition at line 132 of file Hydro.H.

◆ ic_u0

IC::IC<Set::Scalar>* Integrator::Hydro::ic_u0 = nullptr
protected

Definition at line 131 of file Hydro.H.

◆ invert

bool Integrator::Hydro::invert = false
protected

Definition at line 170 of file Hydro.H.

◆ lagrange

Set::Scalar Integrator::Hydro::lagrange =NAN
protected

Definition at line 151 of file Hydro.H.

◆ lagrange_m0

Set::Scalar Integrator::Hydro::lagrange_m0 =NAN
protected

Definition at line 152 of file Hydro.H.

◆ m0_mf

Set::Field<Set::Scalar> Integrator::Hydro::m0_mf
protected

Definition at line 113 of file Hydro.H.

◆ managed

bool Integrator::Hydro::managed = false
protected

Definition at line 169 of file Hydro.H.

◆ mixed

std::vector<bool> Integrator::Hydro::mixed
protected

Definition at line 172 of file Hydro.H.

◆ momentum_bc

BC::BC<Set::Scalar>* Integrator::Hydro::momentum_bc = nullptr
protected

Definition at line 120 of file Hydro.H.

◆ momentum_ic

IC::IC<Set::Scalar>* Integrator::Hydro::momentum_ic = nullptr

Definition at line 103 of file Hydro.H.

◆ momentum_mf

Set::Field<Set::Scalar> Integrator::Hydro::momentum_mf
protected

Definition at line 92 of file Hydro.H.

◆ momentum_old_mf

Set::Field<Set::Scalar> Integrator::Hydro::momentum_old_mf
protected

Definition at line 93 of file Hydro.H.

◆ mu

Set::Scalar Integrator::Hydro::mu =NAN
protected

Definition at line 147 of file Hydro.H.

◆ name

constexpr const char* Integrator::Hydro::name = "hydro"
staticconstexpr

Definition at line 20 of file Hydro.H.

◆ neumann_bc_1

BC::Constant Integrator::Hydro::neumann_bc_1 = BC::Constant::ZeroNeumann(1)
protected

Definition at line 139 of file Hydro.H.

◆ neumann_bc_D

BC::Constant Integrator::Hydro::neumann_bc_D = BC::Constant::ZeroNeumann(AMREX_SPACEDIM)
protected

Definition at line 140 of file Hydro.H.

◆ omega_refinement_criterion

Set::Scalar Integrator::Hydro::omega_refinement_criterion =NAN
protected

Definition at line 146 of file Hydro.H.

◆ p_refinement_criterion

Set::Scalar Integrator::Hydro::p_refinement_criterion =NAN
protected

Definition at line 146 of file Hydro.H.

◆ pref

Set::Scalar Integrator::Hydro::pref =NAN
protected

Definition at line 147 of file Hydro.H.

◆ prescribedflowmode

PrescribedFlowMode Integrator::Hydro::prescribedflowmode
protected

Definition at line 164 of file Hydro.H.

◆ pressure_ic

IC::IC<Set::Scalar>* Integrator::Hydro::pressure_ic = nullptr
protected

Definition at line 126 of file Hydro.H.

◆ pressure_mf

Set::Field<Set::Scalar> Integrator::Hydro::pressure_mf
protected

Definition at line 96 of file Hydro.H.

◆ q_mf

Set::Field<Set::Scalar> Integrator::Hydro::q_mf
protected

Definition at line 115 of file Hydro.H.

◆ rho_refinement_criterion

Set::Scalar Integrator::Hydro::rho_refinement_criterion
protected

Definition at line 146 of file Hydro.H.

◆ riemannsolver

Solver::Local::Riemann::Riemann* Integrator::Hydro::riemannsolver = nullptr
protected

Definition at line 154 of file Hydro.H.

◆ scheme

IntegrationScheme Integrator::Hydro::scheme
protected

Definition at line 159 of file Hydro.H.

◆ small

Set::Scalar Integrator::Hydro::small =NAN
protected

Definition at line 149 of file Hydro.H.

◆ [struct]

struct { ... } Integrator::Hydro::solid

◆ Source_mf

Set::Field<Set::Scalar> Integrator::Hydro::Source_mf
protected

Definition at line 116 of file Hydro.H.

◆ tracer_bc

BC::BC<Set::Scalar>* Integrator::Hydro::tracer_bc = nullptr
protected

Definition at line 123 of file Hydro.H.

◆ tracer_ic

IC::IC<Set::Scalar>* Integrator::Hydro::tracer_ic = nullptr
protected

Definition at line 128 of file Hydro.H.

◆ u0_mf

Set::Field<Set::Scalar> Integrator::Hydro::u0_mf
protected

Definition at line 114 of file Hydro.H.

◆ velocity_ic

IC::IC<Set::Scalar>* Integrator::Hydro::velocity_ic = nullptr
protected

Definition at line 125 of file Hydro.H.

◆ velocity_mf

Set::Field<Set::Scalar> Integrator::Hydro::velocity_mf
protected

Definition at line 95 of file Hydro.H.

◆ vorticity_mf

Set::Field<Set::Scalar> Integrator::Hydro::vorticity_mf
protected

Definition at line 111 of file Hydro.H.

◆ vx_max

Set::Scalar Integrator::Hydro::vx_max = 0.0
protected

Definition at line 143 of file Hydro.H.

◆ vy_max

Set::Scalar Integrator::Hydro::vy_max = 0.0
protected

Definition at line 144 of file Hydro.H.


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