PDEMgr Class Reference

AMR-Wind API: amr_wind::pde::PDEMgr Class Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
amr_wind::pde::PDEMgr Class Reference

#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.
 
const PDEBaseicns () const
 
PDEBaseregister_icns ()
 
PDEBaseregister_transport_pde (const std::string &pde_name)
 Register a new PDE instance and return its reference.
 
void advance_states ()
 Advance states for all registered PDEs at the beginning of a timestep.
 
void prepare_boundaries ()
 
void fillpatch_state_fields (const amrex::Real time, const FieldState fstate=FieldState::New)
 Call fillpatch operator on state variables for all registered PDEs.
 
TypeVectorscalar_eqns ()
 
const TypeVectorscalar_eqns () const
 
bool has_pde (const std::string &pde_name) const
 Query if a PDE has already been registered.
 
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)
 
TypeVectorobjects ()
 Return a vector of the registered objects.
 
const TypeVectorobjects () const
 
bool contains (const std::string &key) const
 Query if an object exists using the lookup key.
 
PDEBase & operator() (const std::string &key)
 Return the object corresponding to a lookup key.
 
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.
 

Private Attributes

CFDSimm_sim
 Instance of the CFD simulation controller.
 
std::unique_ptr< PDEBasem_icns
 ICNS instance.
 
std::string m_scheme
 Unique identifier for the numerical scheme.
 
bool m_use_godunov {true}
 Flag indicating whether Godunov scheme is active.
 
bool m_constant_density {true}
 Flag indicating whether density is constant for this simulation.
 

Additional Inherited Members

- Public Types inherited from amr_wind::CollMgr< PDEMgr, PDEBase >
using TypePtr
 
using TypeVector
 
- Protected Attributes inherited from amr_wind::CollMgr< PDEMgr, PDEBase >
TypeVector m_obj_vec
 Collection of objects registered so far.
 
std::unordered_map< std::string, int > m_obj_map
 Key word based lookup.
 

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

◆ prepare_boundaries()

void amr_wind::pde::PDEMgr::prepare_boundaries ( )

Prepare boundaries for registered PDEs at the beginning of a timestep: – intended for when boundaries rely on intermediate time states (nph)

◆ 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:
  • /home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/PDEBase.H
  • /home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/PDEBase.cpp