ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_ShocDriver.H File Reference
#include "ERF_ShocDiagnostics.H"
#include "ERF_ShocTypes.H"
#include "ERF_ShocPreprocess.H"
#include "ERF_ShocColumnData.H"
#include <AMReX_BoxArray.H>
#include <AMReX_MultiFab.H>
#include <memory>
Include dependency graph for ERF_ShocDriver.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ShocDriver
 

Functions

bool shoc_boxarray_spans_full_height (const amrex::BoxArray &ba, const amrex::Box &domain)
 
bool shoc_layout_requires_number_closure (const MoistureComponentIndices &indices, int ncomp) noexcept
 
bool shoc_driver_host_diffusion_moisture_supported (const ShocRuntimeOptions &opts, MoistureType moisture_type, std::string &error_message)
 
bool shoc_driver_state_update_layout_supported (const ShocRuntimeOptions &opts, const MoistureComponentIndices &indices, int ncomp, std::string &error_message)
 

Function Documentation

◆ shoc_boxarray_spans_full_height()

bool shoc_boxarray_spans_full_height ( const amrex::BoxArray &  ba,
const amrex::Box &  domain 
)

◆ shoc_driver_host_diffusion_moisture_supported()

bool shoc_driver_host_diffusion_moisture_supported ( const ShocRuntimeOptions opts,
MoistureType  moisture_type,
std::string &  error_message 
)
inline
28 {
29  if (!shoc_uses_host_diffusion(opts.transport_mode) || moisture_type == MoistureType::None) {
30  return true;
31  }
32 
33  error_message =
34  "Native SHOC host_diffusion with moisture is not yet supported because SHOC does not own cloud macrophysics in this mode while SHOC-family microphysics condensation is suppressed. Use state_update for moist SHOC runs, or run host_diffusion only for dry cases until a transport-aware microphysics ownership predicate is implemented.";
35  return false;
36 }
bool shoc_uses_host_diffusion(ShocTransportMode mode)
Definition: ERF_ShocTypes.H:57
ShocTransportMode transport_mode
Definition: ERF_ShocTypes.H:107

Referenced by ShocDriver::ShocDriver().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shoc_driver_state_update_layout_supported()

bool shoc_driver_state_update_layout_supported ( const ShocRuntimeOptions opts,
const MoistureComponentIndices indices,
int  ncomp,
std::string &  error_message 
)
inline
43 {
45  !shoc_layout_requires_number_closure(indices, ncomp)) {
46  return true;
47  }
48 
49  error_message =
50  "Native SHOC state_update does not yet support number-aware microphysics layouts with cloud/ice number concentrations. A number closure is required before SHOC can update cloud mass in these layouts.";
51  return false;
52 }
bool shoc_layout_requires_number_closure(const MoistureComponentIndices &indices, int ncomp) noexcept
Definition: ERF_ShocDriver.H:18
bool shoc_uses_state_update(ShocTransportMode mode)
Definition: ERF_ShocTypes.H:51

Referenced by ShocDriver::advance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shoc_layout_requires_number_closure()

bool shoc_layout_requires_number_closure ( const MoistureComponentIndices indices,
int  ncomp 
)
inlinenoexcept
20 {
21  return shoc_valid_comp(indices.nc, ncomp) || shoc_valid_comp(indices.ni, ncomp);
22 }
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool shoc_valid_comp(int comp, int ncomp)
Definition: ERF_ShocTypes.H:374
int nc
Definition: ERF_DataStruct.H:113
int ni
Definition: ERF_DataStruct.H:114

Referenced by shoc_driver_state_update_layout_supported().

Here is the call graph for this function:
Here is the caller graph for this function: