ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
erf_actuator::LevelHeights Class Reference

#include <ERF_ActuatorSampling.H>

Collaboration diagram for erf_actuator::LevelHeights:

Public Member Functions

const ZBounds & get (const amrex::MultiFab &z_phys_nd, const amrex::Geometry &geom, bool rebuild=false)
 
int builds () const
 

Private Attributes

ZBounds m_zb
 
amrex::BoxArray m_ba
 z_phys_nd's boxes at the last build More...
 
amrex::Box m_domain
 geom's domain at the last build More...
 
int m_builds {0}
 

Detailed Description

mesh_z_levels of one level, kept between calls: the heights of a level change only when its boxes do (a regrid) or when the terrain moves, so a caller that needs the table at every step builds it once.

Member Function Documentation

◆ builds()

int erf_actuator::LevelHeights::builds ( ) const
inline

How many times get() has built the table.

235 { return m_builds; }
int m_builds
Definition: ERF_ActuatorSampling.H:240

◆ get()

const ZBounds & erf_actuator::LevelHeights::get ( const amrex::MultiFab &  z_phys_nd,
const amrex::Geometry &  geom,
bool  rebuild = false 
)

The table of z_phys_nd's level. Built at the first call, and again when z_phys_nd's boxes or geom's domain differ from those of the last build, or with rebuild true (for heights that change in time on the same boxes: a moving terrain). A collective when it builds; every rank builds at the same calls, as the boxes, the domain and rebuild are the same on every rank.

569 {
570  if (rebuild || m_builds == 0 || m_domain != geom.Domain() || m_ba != z_phys_nd.boxArray()) {
571  m_zb = mesh_z_levels(z_phys_nd, geom);
572  m_ba = z_phys_nd.boxArray();
573  m_domain = geom.Domain();
574  ++m_builds;
575  }
576  return m_zb;
577 }
amrex::Box m_domain
geom's domain at the last build
Definition: ERF_ActuatorSampling.H:239
amrex::BoxArray m_ba
z_phys_nd's boxes at the last build
Definition: ERF_ActuatorSampling.H:238
ZBounds m_zb
Definition: ERF_ActuatorSampling.H:237
ZBounds mesh_z_levels(const MultiFab &z_phys_nd, const Geometry &geom)
Definition: ERF_ActuatorSampling.cpp:552
Here is the call graph for this function:

Member Data Documentation

◆ m_ba

amrex::BoxArray erf_actuator::LevelHeights::m_ba
private

z_phys_nd's boxes at the last build

◆ m_builds

int erf_actuator::LevelHeights::m_builds {0}
private

Referenced by builds().

◆ m_domain

amrex::Box erf_actuator::LevelHeights::m_domain
private

geom's domain at the last build

◆ m_zb

ZBounds erf_actuator::LevelHeights::m_zb
private

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