AMR-Wind
v0.1.0
CFD solver for wind plant simulations
|
PDE systems manager. More...
#include <PDEBase.H>
Public Member Functions | |
PDEMgr (CFDSim &sim) | |
~PDEMgr ()=default | |
PDEBase & | icns () |
Return the incompressible Navier-Stokes instance. More... | |
const PDEBase & | icns () const |
PDEBase & | register_icns () |
Create the incompressible Navier-Stokes instance and return its reference. More... | |
PDEBase & | register_transport_pde (const std::string &pde_name) |
Register a new PDE instance and return its reference. More... | |
void | advance_states () |
Advance states for all registered PDEs at the beginning of a timestep. More... | |
void | fillpatch_state_fields (const amrex::Real time, const FieldState fstate=FieldState::New) |
Call fillpatch operator on state variables for all registered PDEs. More... | |
TypeVector & | scalar_eqns () |
Return the vector containing all registered PDE instances. More... | |
const TypeVector & | scalar_eqns () const |
bool | has_pde (const std::string &pde_name) const |
Query if a PDE has already been registered. More... | |
int | num_ghost_state () const |
bool | constant_density () const |
std::string | scheme () const |
Public Member Functions inherited from amr_wind::CollMgr< PDEMgr, PDEBase > | |
CollMgr ()=default | |
CollMgr (const CollMgr &)=delete | |
~CollMgr ()=default | |
CollMgr & | operator= (const CollMgr &)=delete |
PDEBase & | create (const std::string &key, Args &&... args) |
Create a new object and register it in the vector and setup lookup options. More... | |
TypeVector & | objects () |
Return a vector of the registered objects. More... | |
const TypeVector & | objects () const |
bool | contains (const std::string &key) const |
Query if an object exists using the lookup key. More... | |
PDEBase & | operator() (const std::string &key) |
Return the object corresponding to a lookup key. More... | |
const PDEBase & | operator() (const std::string &key) const |
T & | operator() (const std::string &key) |
Return object for a lookup key cast into its exact class definition. More... | |
Private Attributes | |
CFDSim & | m_sim |
Instance of the CFD simulation controller. More... | |
std::unique_ptr< PDEBase > | m_icns |
ICNS instance. More... | |
std::string | m_scheme |
Unique identifier for the numerical scheme. More... | |
bool | m_use_godunov {true} |
Flag indicating whether Godunov scheme is active. More... | |
bool | m_constant_density {true} |
Flag indicating whether density is constant for this simulation. More... | |
Additional Inherited Members | |
Public Types inherited from amr_wind::CollMgr< PDEMgr, PDEBase > | |
using | TypePtr = std::unique_ptr< PDEBase > |
using | TypeVector = amrex::Vector< TypePtr > |
Protected Attributes inherited from amr_wind::CollMgr< PDEMgr, PDEBase > | |
TypeVector | m_obj_vec |
Collection of objects registered so far. More... | |
std::unordered_map< std::string, int > | m_obj_map |
Key word based lookup. More... | |
PDE systems manager.
This class manages a collection of PDEs and provides an interface to register PDEs. An incompressible N-S equation is always registered and treated as a special case. The remaining PDEs are created on-demand and are accessed through the equation systems vector.
|
explicit |
|
default |
void amr_wind::pde::PDEMgr::advance_states | ( | ) |
Advance states for all registered PDEs at the beginning of a timestep.
|
inline |
void amr_wind::pde::PDEMgr::fillpatch_state_fields | ( | const amrex::Real | time, |
const FieldState | fstate = FieldState::New |
||
) |
Call fillpatch operator on state variables for all registered PDEs.
bool amr_wind::pde::PDEMgr::has_pde | ( | const std::string & | pde_name | ) | const |
Query if a PDE has already been registered.
|
inline |
Return the incompressible Navier-Stokes instance.
|
inline |
int amr_wind::pde::PDEMgr::num_ghost_state | ( | ) | const |
PDEBase & amr_wind::pde::PDEMgr::register_icns | ( | ) |
Create the incompressible Navier-Stokes instance and return its reference.
PDEBase & amr_wind::pde::PDEMgr::register_transport_pde | ( | const std::string & | pde_name | ) |
Register a new PDE instance and return its reference.
|
inline |
Return the vector containing all registered PDE instances.
Note that this does not contain the ICNS system as it is treated separately for algorithmic reasons.
|
inline |
|
inline |
|
private |
Flag indicating whether density is constant for this simulation.
|
private |
Unique identifier for the numerical scheme.
|
private |
Instance of the CFD simulation controller.
|
private |
Flag indicating whether Godunov scheme is active.