ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
MoistureComponentIndices::CompList Struct Reference

An ordered list of conserved-state components forming an aggregate moisture output variable (qt, qn, qp, moist_density). More...

#include <ERF_DataStruct.H>

Collaboration diagram for MoistureComponentIndices::CompList:

Public Member Functions

void append (int c)
 Append a component, ignoring the ones the scheme does not carry. More...
 
bool empty () const
 

Public Attributes

int comp [max_size] = {absent, absent, absent, absent, absent, absent}
 
int size = 0
 

Static Public Attributes

static constexpr int max_size = 6
 qv, qc, qi, qr, qs, qg More...
 

Detailed Description

An ordered list of conserved-state components forming an aggregate moisture output variable (qt, qn, qp, moist_density).

Only the species the active scheme carries are appended, so a consumer can sum the list without first asking which ones exist.

Member Function Documentation

◆ append()

void MoistureComponentIndices::CompList::append ( int  c)
inline

Append a component, ignoring the ones the scheme does not carry.

441  {
442  if ( (c >= 0) && (size < max_size) ) { comp[size++] = c; }
443  }
int comp[max_size]
Definition: ERF_DataStruct.H:437
int size
Definition: ERF_DataStruct.H:438
static constexpr int max_size
qv, qc, qi, qr, qs, qg
Definition: ERF_DataStruct.H:436

Referenced by MoistureComponentIndices::nonprecipitating_comps(), MoistureComponentIndices::precipitating_comps(), and MoistureComponentIndices::total_water_comps().

Here is the caller graph for this function:

◆ empty()

bool MoistureComponentIndices::CompList::empty ( ) const
inline
444 { return (size == 0); }

Referenced by MoistureComponentIndices::query_var().

Here is the caller graph for this function:

Member Data Documentation

◆ comp

int MoistureComponentIndices::CompList::comp[max_size] = {absent, absent, absent, absent, absent, absent}

Referenced by append().

◆ max_size

constexpr int MoistureComponentIndices::CompList::max_size = 6
staticconstexpr

qv, qc, qi, qr, qs, qg

Referenced by append().

◆ size

int MoistureComponentIndices::CompList::size = 0

Referenced by append(), and empty().


The documentation for this struct was generated from the following file: