AMR-Wind  v0.1.0
CFD solver for wind plant simulations
Public Member Functions | Private Attributes | List of all members
amr_wind::pde::PDEMgr Class Reference

PDE systems manager. More...

#include <PDEBase.H>

Inheritance diagram for amr_wind::pde::PDEMgr:
[legend]
Collaboration diagram for amr_wind::pde::PDEMgr:
[legend]

Public Member Functions

 PDEMgr (CFDSim &sim)
 
 ~PDEMgr ()=default
 
PDEBaseicns ()
 Return the incompressible Navier-Stokes instance. More...
 
const PDEBaseicns () const
 
PDEBaseregister_icns ()
 Create the incompressible Navier-Stokes instance and return its reference. More...
 
PDEBaseregister_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...
 
TypeVectorscalar_eqns ()
 Return the vector containing all registered PDE instances. More...
 
const TypeVectorscalar_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
 
CollMgroperator= (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...
 
TypeVectorobjects ()
 Return a vector of the registered objects. More...
 
const TypeVectorobjects () 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

CFDSimm_sim
 Instance of the CFD simulation controller. More...
 
std::unique_ptr< PDEBasem_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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PDEMgr()

amr_wind::pde::PDEMgr::PDEMgr ( CFDSim sim)
explicit

◆ ~PDEMgr()

amr_wind::pde::PDEMgr::~PDEMgr ( )
default

Member Function Documentation

◆ advance_states()

void amr_wind::pde::PDEMgr::advance_states ( )

Advance states for all registered PDEs at the beginning of a timestep.

◆ constant_density()

bool amr_wind::pde::PDEMgr::constant_density ( ) const
inline

◆ fillpatch_state_fields()

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.

◆ has_pde()

bool amr_wind::pde::PDEMgr::has_pde ( const std::string &  pde_name) const

Query if a PDE has already been registered.

◆ icns() [1/2]

PDEBase& amr_wind::pde::PDEMgr::icns ( )
inline

Return the incompressible Navier-Stokes instance.

◆ icns() [2/2]

const PDEBase& amr_wind::pde::PDEMgr::icns ( ) const
inline

◆ num_ghost_state()

int amr_wind::pde::PDEMgr::num_ghost_state ( ) const

◆ register_icns()

PDEBase & amr_wind::pde::PDEMgr::register_icns ( )

Create the incompressible Navier-Stokes instance and return its reference.

◆ register_transport_pde()

PDEBase & amr_wind::pde::PDEMgr::register_transport_pde ( const std::string &  pde_name)

Register a new PDE instance and return its reference.

◆ scalar_eqns() [1/2]

TypeVector& amr_wind::pde::PDEMgr::scalar_eqns ( )
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.

◆ scalar_eqns() [2/2]

const TypeVector& amr_wind::pde::PDEMgr::scalar_eqns ( ) const
inline

◆ scheme()

std::string amr_wind::pde::PDEMgr::scheme ( ) const
inline

Member Data Documentation

◆ m_constant_density

bool amr_wind::pde::PDEMgr::m_constant_density {true}
private

Flag indicating whether density is constant for this simulation.

◆ m_icns

std::unique_ptr<PDEBase> amr_wind::pde::PDEMgr::m_icns
private

ICNS instance.

◆ m_scheme

std::string amr_wind::pde::PDEMgr::m_scheme
private

Unique identifier for the numerical scheme.

◆ m_sim

CFDSim& amr_wind::pde::PDEMgr::m_sim
private

Instance of the CFD simulation controller.

◆ m_use_godunov

bool amr_wind::pde::PDEMgr::m_use_godunov {true}
private

Flag indicating whether Godunov scheme is active.


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