#include <AMReX_ParmParse.H>
#include <algorithm>
#include <cctype>
#include <string>
Go to the source code of this file.
◆ ShocMomentumTransport
| Enumerator |
|---|
| None | |
| StateUpdate | |
◆ ShocTransportMode
◆ parse_shoc_momentum_transport_string()
| bool parse_shoc_momentum_transport_string |
( |
std::string |
value, |
|
|
ShocMomentumTransport & |
mode, |
|
|
std::string & |
error_message |
|
) |
| |
|
inline |
91 if (value ==
"none") {
95 if (value ==
"state_update") {
99 if (value ==
"host_diffusion") {
101 "erf.shoc.momentum_transport = host_diffusion has been removed for native SHOC. Use 'state_update' to retain SHOC momentum transport, or 'none' to disable SHOC momentum transport.";
105 error_message =
"erf.shoc.momentum_transport must be 'none' or 'state_update'";
std::string shoc_to_lower(std::string value)
Definition: ERF_ShocTransportStruct.H:53
Referenced by read_shoc_transport_modes().
◆ parse_shoc_transport_mode_string()
| bool parse_shoc_transport_mode_string |
( |
std::string |
value, |
|
|
ShocTransportMode & |
mode, |
|
|
std::string & |
error_message |
|
) |
| |
|
inline |
66 if (value ==
"state_update") {
70 if (value ==
"host_diffusion") {
72 "erf.shoc.transport_mode = host_diffusion has been removed for native SHOC. Use erf.shoc.transport_mode = state_update.";
75 if (value ==
"tendencies") {
77 "erf.shoc.transport_mode = tendencies has been removed for native SHOC. Use erf.shoc.transport_mode = state_update. Native SHOC now applies its coupled column increment before the dycore to avoid splitting theta and momentum from moisture.";
81 error_message =
"erf.shoc.transport_mode must be 'state_update'";
Referenced by read_shoc_transport_modes().
◆ read_shoc_transport_modes()
Read the native SHOC transport modes from the erf.shoc input namespace.
This is the single parse point shared by SolverChoice and the SHOC runtime options, so the dycore and the SHOC driver can never disagree about which component owns transport. Values that are absent from the inputs leave the incoming modes untouched.
121 amrex::ParmParse
pp(
"erf.shoc");
123 std::string transport_mode_string;
124 if (
pp.query(
"transport_mode", transport_mode_string)) {
125 std::string error_message;
129 amrex::Abort(error_message.c_str());
133 std::string momentum_transport_string;
134 if (
pp.query(
"momentum_transport", momentum_transport_string)) {
135 std::string error_message;
139 amrex::Abort(error_message.c_str());
bool parse_shoc_momentum_transport_string(std::string value, ShocMomentumTransport &mode, std::string &error_message)
Definition: ERF_ShocTransportStruct.H:86
bool parse_shoc_transport_mode_string(std::string value, ShocTransportMode &mode, std::string &error_message)
Definition: ERF_ShocTransportStruct.H:61
Referenced by SolverChoice::init_params(), and read_shoc_runtime_options().
◆ shoc_disables_momentum_transport()
◆ shoc_momentum_transport_name()
◆ shoc_to_lower()
| std::string shoc_to_lower |
( |
std::string |
value | ) |
|
|
inline |
◆ shoc_transport_mode_name()
◆ shoc_uses_momentum_state_update()