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

#include <ERF_AdvStruct.H>

Collaboration diagram for AdvChoice:

Public Member Functions

void init_params (std::string pp_prefix)
 Read advection options from the input parameter database. More...
 
void display (std::string &pp_prefix)
 Print the configured advection choices. More...
 
std::string adv_type_convert_int_to_string (AdvType adv_int)
 Convert an advection type enum to the corresponding input string. More...
 
AdvType adv_type_convert_string_to_advtype (std::string adv_string)
 Convert an input advection string to the corresponding enum value. More...
 
void validate_weno_momentum_compatibility (bool use_embedded_boundary)
 Check whether the selected momentum WENO schemes are compatible with embedded boundaries. More...
 

Public Attributes

bool use_efficient_advection = false
 Whether to use the efficient advection implementation. More...
 
AdvType dycore_horiz_adv_type = AdvType::Upwind_3rd
 Horizontal advection scheme for dynamical-core variables. More...
 
AdvType dycore_vert_adv_type = AdvType::Upwind_3rd
 Vertical advection scheme for dynamical-core variables. More...
 
AdvType dryscal_horiz_adv_type = AdvType::Upwind_3rd
 Horizontal advection scheme for dry scalar variables. More...
 
AdvType dryscal_vert_adv_type = AdvType::Upwind_3rd
 Vertical advection scheme for dry scalar variables. More...
 
AdvType moistscal_horiz_adv_type = AdvType::Weno_3
 Horizontal advection scheme for moist scalar variables. More...
 
AdvType moistscal_vert_adv_type = AdvType::Weno_3
 Vertical advection scheme for moist scalar variables. More...
 
amrex::Real dycore_horiz_upw_frac = one
 Upwind blending fraction for horizontal dynamical-core advection. More...
 
amrex::Real dycore_vert_upw_frac = one
 Upwind blending fraction for vertical dynamical-core advection. More...
 
amrex::Real dryscal_horiz_upw_frac = one
 Upwind blending fraction for horizontal dry scalar advection. More...
 
amrex::Real dryscal_vert_upw_frac = one
 Upwind blending fraction for vertical dry scalar advection. More...
 
amrex::Real moistscal_horiz_upw_frac = one
 Upwind blending fraction for horizontal moist scalar advection. More...
 
amrex::Real moistscal_vert_upw_frac = one
 Upwind blending fraction for vertical moist scalar advection. More...
 
amrex::Vector< amrex::IntVect > zero_xflux
 Thin immersed-body x-face indices where fluxes are forced to zero. More...
 
amrex::Vector< amrex::IntVect > zero_yflux
 Thin immersed-body y-face indices where fluxes are forced to zero. More...
 
amrex::Vector< amrex::IntVect > zero_zflux
 Thin immersed-body z-face indices where fluxes are forced to zero. More...
 
bool have_zero_flux_faces = false
 Whether any zero-flux thin immersed-body faces were specified. More...
 

Detailed Description

Container holding the advection-related choices

Member Function Documentation

◆ adv_type_convert_int_to_string()

std::string AdvChoice::adv_type_convert_int_to_string ( AdvType  adv_int)
inline

Convert an advection type enum to the corresponding input string.

Parameters
adv_intAdvection type enum value.
Returns
String representation of the advection type.
335  {
336  if (adv_int == AdvType::Centered_2nd) {
337  return "Centered_2nd";
338  } else if (adv_int == AdvType::Upwind_3rd) {
339  return "Upwind_3rd";
340  } else if (adv_int == AdvType::Upwind_3rd_SL) {
341  return "Upwind_3rd_SL";
342  } else if (adv_int == AdvType::Centered_4th) {
343  return "Centered_4th";
344  } else if (adv_int == AdvType::Upwind_5th) {
345  return "Upwind_5th";
346  } else if (adv_int == AdvType::Centered_6th) {
347  return "Centered_6th";
348  } else if (adv_int == AdvType::Weno_3) {
349  return "WENO3";
350  } else if (adv_int == AdvType::Weno_3Z) {
351  return "WENOZ3";
352  } else if (adv_int == AdvType::Weno_5) {
353  return "WENO5";
354  } else if (adv_int == AdvType::Weno_5Z) {
355  return "WENOZ5";
356  } else if (adv_int == AdvType::Weno_3MZQ) {
357  return "WENOMZQ3";
358  } else if (adv_int == AdvType::Weno_7) {
359  return "WENO7";
360  } else if (adv_int == AdvType::Weno_7Z) {
361  return "WENOZ7";
362  } else {
363  return "Unknown";
364  }
365  }
@ Upwind_3rd_SL
@ Centered_4th
@ Centered_6th
@ Centered_2nd

Referenced by display().

Here is the caller graph for this function:

◆ adv_type_convert_string_to_advtype()

AdvType AdvChoice::adv_type_convert_string_to_advtype ( std::string  adv_string)
inline

Convert an input advection string to the corresponding enum value.

Parameters
adv_stringUser-facing advection type string.
Returns
Matching advection type, or AdvType::Unknown if no match is found.
373  {
374  if (adv_string == "Centered_2nd") {
375  return AdvType::Centered_2nd;
376  } else if ((adv_string == "Upwind_3rd") || (adv_string == "Blended_3rd4th")) {
377  return AdvType::Upwind_3rd;
378  } else if (adv_string == "Upwind_3rd_SL") {
379  return AdvType::Upwind_3rd_SL;
380  } else if (adv_string == "Centered_4th") {
381  return AdvType::Centered_4th;
382  } else if (adv_string == "Upwind_5th" || (adv_string == "Blended_5th6th")) {
383  return AdvType::Upwind_5th;
384  } else if (adv_string == "Centered_6th") {
385  return AdvType::Centered_6th;
386  } else if (adv_string == "WENO3") {
387  return AdvType::Weno_3;
388  } else if (adv_string == "WENOZ3") {
389  return AdvType::Weno_3Z;
390  } else if (adv_string == "WENO5") {
391  return AdvType::Weno_5;
392  } else if (adv_string == "WENOZ5") {
393  return AdvType::Weno_5Z;
394  } else if (adv_string == "WENOMZQ3") {
395  return AdvType::Weno_3MZQ;
396  } else if (adv_string == "WENO7") {
397  return AdvType::Weno_7;
398  } else if (adv_string == "WENOZ7") {
399  return AdvType::Weno_7Z;
400  } else {
401  return AdvType::Unknown;
402  }
403  }

Referenced by init_params().

Here is the caller graph for this function:

◆ display()

void AdvChoice::display ( std::string &  pp_prefix)
inline

Print the configured advection choices.

Parameters
pp_prefixParmParse prefix used to recover input strings for display.
246  {
247  amrex::Print() << "Advection Choices: " << std::endl;
248 
249  // We read these again here just as a convenience to avoid passing them
250  amrex::ParmParse pp(pp_prefix);
251  std::string dycore_horiz_adv_string = "" ; std::string dycore_vert_adv_string = "";
252  std::string dryscal_horiz_adv_string = "" ; std::string dryscal_vert_adv_string = "";
253  pp.queryAdd("dycore_horiz_adv_type" , dycore_horiz_adv_string);
254  pp.queryAdd("dycore_vert_adv_type" , dycore_vert_adv_string);
255  pp.queryAdd("dryscal_horiz_adv_type" , dryscal_horiz_adv_string);
256  pp.queryAdd("dryscal_vert_adv_type" , dryscal_vert_adv_string);
257  std::string moistscal_horiz_adv_string = ""; std::string moistscal_vert_adv_string = "";
258  pp.queryAdd("moistscal_horiz_adv_type", moistscal_horiz_adv_string);
259  pp.queryAdd("moistscal_vert_adv_type" , moistscal_vert_adv_string);
260 
261  if (dycore_horiz_adv_string != "") {
262  amrex::Print() << " dycore_horiz_adv_type : " << dycore_horiz_adv_string;
263  } else {
264  amrex::Print() << " dycore_horiz_adv_type : " << adv_type_convert_int_to_string(dycore_horiz_adv_type);
265  }
266  if ( (dycore_horiz_adv_string == "Blended_3rd4th") ||
267  (dycore_horiz_adv_string == "Blended_5th6th") ) {
268  amrex::Print() << " with " << 100*dycore_horiz_upw_frac << "% upwinding";
269  }
270  amrex::Print() << std::endl;
271 
272  if (dycore_vert_adv_string != "") {
273  amrex::Print() << " dycore_vert_adv_type : " << dycore_vert_adv_string;
274  } else {
275  amrex::Print() << " dycore_vert_adv_type : " << adv_type_convert_int_to_string(dycore_vert_adv_type);
276  }
277  if ( (dycore_vert_adv_string == "Blended_3rd4th") ||
278  (dycore_vert_adv_string == "Blended_5th6th") ) {
279  amrex::Print() << " with " << 100*dycore_vert_upw_frac << "% upwinding";
280  }
281  amrex::Print() << std::endl;
282 
283  if (dryscal_horiz_adv_string != "") {
284  amrex::Print() << " dryscal_horiz_adv_type : " << dryscal_horiz_adv_string;
285  } else {
286  amrex::Print() << " dryscal_horiz_adv_type : " << adv_type_convert_int_to_string(dryscal_horiz_adv_type);
287  }
288  if ( (dryscal_horiz_adv_string == "Blended_3rd4th") ||
289  (dryscal_horiz_adv_string == "Blended_5th6th") ) {
290  amrex::Print() << " with " << 100*dryscal_horiz_upw_frac << "% upwinding";
291  }
292  amrex::Print() << std::endl;
293 
294  if (dryscal_vert_adv_string != "") {
295  amrex::Print() << " dryscal_vert_adv_type : " << dryscal_vert_adv_string;
296  } else {
297  amrex::Print() << " dryscal_vert_adv_type : " << adv_type_convert_int_to_string(dryscal_vert_adv_type);
298  }
299  if ( (dryscal_vert_adv_string == "Blended_3rd4th") ||
300  (dryscal_vert_adv_string == "Blended_5th6th") ) {
301  amrex::Print() << " with " << 100*dryscal_vert_upw_frac << "% upwinding";
302  }
303  amrex::Print() << std::endl;
304 
305  if (moistscal_horiz_adv_string != "") {
306  amrex::Print() << " moistscal_horiz_adv_type : " << moistscal_horiz_adv_string;
307  } else {
308  amrex::Print() << " moistscal_horiz_adv_type : " << adv_type_convert_int_to_string(moistscal_horiz_adv_type);
309  }
310  if ( (moistscal_horiz_adv_string == "Blended_3rd4th") ||
311  (moistscal_horiz_adv_string == "Blended_5th6th") ) {
312  amrex::Print() << " with " << 100*moistscal_horiz_upw_frac << "% upwinding";
313  }
314  amrex::Print() << std::endl;
315 
316  if (moistscal_vert_adv_string != "") {
317  amrex::Print() << " moistscal_vert_adv_type : " << moistscal_vert_adv_string;
318  } else {
319  amrex::Print() << " moistscal_vert_adv_type : " << adv_type_convert_int_to_string(moistscal_vert_adv_type);
320  }
321  if ( (moistscal_vert_adv_string == "Blended_3rd4th") ||
322  (moistscal_vert_adv_string == "Blended_5th6th") ) {
323  amrex::Print() << " with " << 100*moistscal_vert_upw_frac << "% upwinding";
324  }
325  amrex::Print() << std::endl;
326  }
ParmParse pp("prob")
amrex::Real dryscal_horiz_upw_frac
Upwind blending fraction for horizontal dry scalar advection.
Definition: ERF_AdvStruct.H:455
AdvType dycore_vert_adv_type
Vertical advection scheme for dynamical-core variables.
Definition: ERF_AdvStruct.H:444
AdvType moistscal_vert_adv_type
Vertical advection scheme for moist scalar variables.
Definition: ERF_AdvStruct.H:448
AdvType dryscal_horiz_adv_type
Horizontal advection scheme for dry scalar variables.
Definition: ERF_AdvStruct.H:445
amrex::Real moistscal_horiz_upw_frac
Upwind blending fraction for horizontal moist scalar advection.
Definition: ERF_AdvStruct.H:457
AdvType dycore_horiz_adv_type
Horizontal advection scheme for dynamical-core variables.
Definition: ERF_AdvStruct.H:443
AdvType moistscal_horiz_adv_type
Horizontal advection scheme for moist scalar variables.
Definition: ERF_AdvStruct.H:447
amrex::Real dycore_vert_upw_frac
Upwind blending fraction for vertical dynamical-core advection.
Definition: ERF_AdvStruct.H:454
amrex::Real moistscal_vert_upw_frac
Upwind blending fraction for vertical moist scalar advection.
Definition: ERF_AdvStruct.H:458
amrex::Real dycore_horiz_upw_frac
Upwind blending fraction for horizontal dynamical-core advection.
Definition: ERF_AdvStruct.H:453
std::string adv_type_convert_int_to_string(AdvType adv_int)
Convert an advection type enum to the corresponding input string.
Definition: ERF_AdvStruct.H:334
amrex::Real dryscal_vert_upw_frac
Upwind blending fraction for vertical dry scalar advection.
Definition: ERF_AdvStruct.H:456
AdvType dryscal_vert_adv_type
Vertical advection scheme for dry scalar variables.
Definition: ERF_AdvStruct.H:446

Referenced by SolverChoice::display().

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

◆ init_params()

void AdvChoice::init_params ( std::string  pp_prefix)
inline

Read advection options from the input parameter database.

Parameters
pp_prefixParmParse prefix for the ERF input namespace.
26  {
27  amrex::ParmParse pp(pp_prefix);
28 
29  // Order and type of spatial discretizations used in advection
30  pp.queryAdd("use_efficient_advection", use_efficient_advection);
31  std::string dycore_horiz_adv_string = "" ; std::string dycore_vert_adv_string = "";
32  std::string dryscal_horiz_adv_string = "" ; std::string dryscal_vert_adv_string = "";
33  pp.queryAdd("dycore_horiz_adv_type" , dycore_horiz_adv_string);
34  pp.queryAdd("dycore_vert_adv_type" , dycore_vert_adv_string);
35  pp.queryAdd("dryscal_horiz_adv_type" , dryscal_horiz_adv_string);
36  pp.queryAdd("dryscal_vert_adv_type" , dryscal_vert_adv_string);
37 
38  std::string moistscal_horiz_adv_string = ""; std::string moistscal_vert_adv_string = "";
39  pp.queryAdd("moistscal_horiz_adv_type", moistscal_horiz_adv_string);
40  pp.queryAdd("moistscal_vert_adv_type" , moistscal_vert_adv_string);
41 
43  amrex::Print() << "Using efficient advection scheme" << std::endl;
44  }
45 
46  if ( (dycore_horiz_adv_string == "Blended_3rd4th") ||
47  (dycore_horiz_adv_string == "Blended_5th6th") )
48  {
49  pp.queryAdd("dycore_horiz_upw_frac" , dycore_horiz_upw_frac);
51  "The dycore horizontal upwinding fraction must be between 0 and 1");
52  }
53 
54  if ( (dycore_vert_adv_string == "Blended_3rd4th") ||
55  (dycore_vert_adv_string == "Blended_5th6th") )
56  {
57  pp.queryAdd("dycore_vert_upw_frac" , dycore_vert_upw_frac);
59  "The dycore vertical upwinding fraction must be between 0 and 1");
60  }
61 
62  if ( (dryscal_horiz_adv_string == "Blended_3rd4th") ||
63  (dryscal_horiz_adv_string == "Blended_5th6th") )
64  {
65  pp.queryAdd("dryscal_horiz_upw_frac" , dryscal_horiz_upw_frac);
67  "The dry scalar horizontal upwinding fraction must be between 0 and 1");
68  }
69 
70  if ( (dryscal_vert_adv_string == "Blended_3rd4th") ||
71  (dryscal_vert_adv_string == "Blended_5th6th") )
72  {
73  pp.queryAdd("dryscal_vert_upw_frac" , dryscal_vert_upw_frac);
75  "The dry scalar vertical upwinding fraction must be between 0 and 1");
76  }
77 
78  if ( (moistscal_horiz_adv_string == "Blended_3rd4th") ||
79  (moistscal_horiz_adv_string == "Blended_5th6th") )
80  {
81  pp.queryAdd("moistscal_horiz_upw_frac" , moistscal_horiz_upw_frac);
83  "The moist scalar horizontal upwinding fraction must be between 0 and 1");
84  }
85 
86  if ( (moistscal_vert_adv_string == "Blended_3rd4th") ||
87  (moistscal_vert_adv_string == "Blended_5th6th") )
88  {
89  pp.queryAdd("moistscal_vert_upw_frac" , moistscal_vert_upw_frac);
91  "The moist scalar vertical upwinding fraction must be between 0 and 1");
92  }
93 
94  if (dycore_horiz_adv_string != "") {
95  if ( (dycore_horiz_adv_string == "Centered_2nd") ||
96  (dycore_horiz_adv_string == "Upwind_3rd" ) ||
97  (dycore_horiz_adv_string == "Blended_3rd4th") ||
98  (dycore_horiz_adv_string == "Centered_4th") ||
99  (dycore_horiz_adv_string == "Upwind_5th" ) ||
100  (dycore_horiz_adv_string == "Blended_5th6th") ||
101  (dycore_horiz_adv_string == "Centered_6th") ||
102  (dycore_horiz_adv_string == "WENO3" ) ||
103  (dycore_horiz_adv_string == "WENOZ3" ) ||
104  (dycore_horiz_adv_string == "WENOMZQ3" ) ||
105  (dycore_horiz_adv_string == "WENO5" ) ||
106  (dycore_horiz_adv_string == "WENOZ5" ) ||
107  (dycore_horiz_adv_string == "WENO7" ) ||
108  (dycore_horiz_adv_string == "WENOZ7" ))
109  {
111  } else {
112  amrex::Error("Don't know this dycore_horiz_adv_string");
113  }
114  }
115 
116  if (dycore_vert_adv_string != "") {
117  if ( (dycore_vert_adv_string == "Centered_2nd") ||
118  (dycore_vert_adv_string == "Upwind_3rd" ) ||
119  (dycore_vert_adv_string == "Blended_3rd4th") ||
120  (dycore_vert_adv_string == "Centered_4th") ||
121  (dycore_vert_adv_string == "Upwind_5th" ) ||
122  (dycore_vert_adv_string == "Blended_5th6th") ||
123  (dycore_vert_adv_string == "Centered_6th") ||
124  (dycore_vert_adv_string == "WENO3" ) ||
125  (dycore_vert_adv_string == "WENOZ3" ) ||
126  (dycore_vert_adv_string == "WENOMZQ3" ) ||
127  (dycore_vert_adv_string == "WENO5" ) ||
128  (dycore_vert_adv_string == "WENOZ5" ) ||
129  (dycore_vert_adv_string == "WENO7" ) ||
130  (dycore_vert_adv_string == "WENOZ7" ))
131  {
133  } else {
134  amrex::Error("Don't know this dycore_vert_adv_string");
135  }
136  }
137 
138  if (dryscal_horiz_adv_string != "") {
139  if ( (dryscal_horiz_adv_string == "Centered_2nd") ||
140  (dryscal_horiz_adv_string == "Upwind_3rd" ) ||
141  (dryscal_horiz_adv_string == "Upwind_3rd_SL") ||
142  (dryscal_horiz_adv_string == "Blended_3rd4th") ||
143  (dryscal_horiz_adv_string == "Centered_4th") ||
144  (dryscal_horiz_adv_string == "Upwind_5th" ) ||
145  (dryscal_horiz_adv_string == "Blended_5th6th") ||
146  (dryscal_horiz_adv_string == "Centered_6th") ||
147  (dryscal_horiz_adv_string == "WENO3" ) ||
148  (dryscal_horiz_adv_string == "WENOZ3" ) ||
149  (dryscal_horiz_adv_string == "WENOMZQ3" ) ||
150  (dryscal_horiz_adv_string == "WENO5" ) ||
151  (dryscal_horiz_adv_string == "WENOZ5" ) ||
152  (dryscal_horiz_adv_string == "WENO7" ) ||
153  (dryscal_horiz_adv_string == "WENOZ7" ) )
154  {
156  } else {
157  amrex::Error("Don't know this dryscal_horiz_adv_string");
158  }
159  }
160 
161  if (dryscal_vert_adv_string != "") {
162  if ( (dryscal_vert_adv_string == "Centered_2nd") ||
163  (dryscal_vert_adv_string == "Upwind_3rd" ) ||
164  (dryscal_vert_adv_string == "Upwind_3rd_SL") ||
165  (dryscal_vert_adv_string == "Blended_3rd4th") ||
166  (dryscal_vert_adv_string == "Centered_4th") ||
167  (dryscal_vert_adv_string == "Upwind_5th" ) ||
168  (dryscal_vert_adv_string == "Blended_5th6th") ||
169  (dryscal_vert_adv_string == "Centered_6th") ||
170  (dryscal_vert_adv_string == "WENO3" ) ||
171  (dryscal_vert_adv_string == "WENOZ3" ) ||
172  (dryscal_vert_adv_string == "WENOMZQ3" ) ||
173  (dryscal_vert_adv_string == "WENO5" ) ||
174  (dryscal_vert_adv_string == "WENOZ5" ) ||
175  (dryscal_vert_adv_string == "WENO7" ) ||
176  (dryscal_vert_adv_string == "WENOZ7" ))
177  {
179  } else {
180  amrex::Error("Don't know this dryscal_vert_adv_string");
181  }
182  }
183 
184  if (moistscal_horiz_adv_string != "") {
185  if ( (moistscal_horiz_adv_string == "Centered_2nd") ||
186  (moistscal_horiz_adv_string == "Upwind_3rd" ) ||
187  (moistscal_horiz_adv_string == "Upwind_3rd_SL" ) ||
188  (moistscal_horiz_adv_string == "Blended_3rd4th") ||
189  (moistscal_horiz_adv_string == "Centered_4th") ||
190  (moistscal_horiz_adv_string == "Upwind_5th" ) ||
191  (moistscal_horiz_adv_string == "Blended_5th6th") ||
192  (moistscal_horiz_adv_string == "Centered_6th") ||
193  (moistscal_horiz_adv_string == "WENO3" ) ||
194  (moistscal_horiz_adv_string == "WENOZ3" ) ||
195  (moistscal_horiz_adv_string == "WENOMZQ3" ) ||
196  (moistscal_horiz_adv_string == "WENO5" ) ||
197  (moistscal_horiz_adv_string == "WENOZ5" ) ||
198  (moistscal_horiz_adv_string == "WENO7" ) ||
199  (moistscal_horiz_adv_string == "WENOZ7" ))
200  {
201  moistscal_horiz_adv_type = adv_type_convert_string_to_advtype(moistscal_horiz_adv_string);
202  } else {
203  amrex::Error("Don't know this moistscal_horiz_adv_string");
204  }
205  }
206 
207  if (moistscal_vert_adv_string != "") {
208  if ( (moistscal_vert_adv_string == "Centered_2nd") ||
209  (moistscal_vert_adv_string == "Upwind_3rd" ) ||
210  (moistscal_vert_adv_string == "Upwind_3rd_SL" ) ||
211  (moistscal_vert_adv_string == "Blended_3rd4th") ||
212  (moistscal_vert_adv_string == "Centered_4th") ||
213  (moistscal_vert_adv_string == "Upwind_5th" ) ||
214  (moistscal_vert_adv_string == "Blended_5th6th") ||
215  (moistscal_vert_adv_string == "Centered_6th") ||
216  (moistscal_vert_adv_string == "WENO3" ) ||
217  (moistscal_vert_adv_string == "WENOZ3" ) ||
218  (moistscal_vert_adv_string == "WENOMZQ3" ) ||
219  (moistscal_vert_adv_string == "WENO5" ) ||
220  (moistscal_vert_adv_string == "WENOZ5" ) ||
221  (moistscal_vert_adv_string == "WENO7" ) ||
222  (moistscal_vert_adv_string == "WENOZ7" ))
223  {
224  moistscal_vert_adv_type = adv_type_convert_string_to_advtype(moistscal_vert_adv_string);
225  } else {
226  amrex::Error("Don't know this moistscal_vert_adv_string");
227  }
228  }
229 
230  // We can can't use weno with Embedded Boundaries (for now)
231  std::string terrain_type;
232  pp.queryAdd("terrain_type", terrain_type);
233  validate_weno_momentum_compatibility(terrain_type == "EB");
234 
235  pp.queryarr("zero_xflux_faces", zero_xflux);
236  pp.queryarr("zero_yflux_faces", zero_yflux);
237  pp.queryarr("zero_zflux_faces", zero_zflux);
238  have_zero_flux_faces = ((zero_xflux.size() > 0) || (zero_yflux.size() > 0) || (zero_zflux.size() > 0));
239  }
constexpr amrex::Real one
Definition: ERF_NumericalConstants.H:37
constexpr amrex::Real zero
Definition: ERF_NumericalConstants.H:36
AMREX_ASSERT_WITH_MESSAGE(wbar_cutoff_min > wbar_cutoff_max, "ERROR: wbar_cutoff_min < wbar_cutoff_max")
bool have_zero_flux_faces
Whether any zero-flux thin immersed-body faces were specified.
Definition: ERF_AdvStruct.H:464
void validate_weno_momentum_compatibility(bool use_embedded_boundary)
Check whether the selected momentum WENO schemes are compatible with embedded boundaries.
Definition: ERF_AdvStruct.H:409
AdvType adv_type_convert_string_to_advtype(std::string adv_string)
Convert an input advection string to the corresponding enum value.
Definition: ERF_AdvStruct.H:372
amrex::Vector< amrex::IntVect > zero_yflux
Thin immersed-body y-face indices where fluxes are forced to zero.
Definition: ERF_AdvStruct.H:462
amrex::Vector< amrex::IntVect > zero_zflux
Thin immersed-body z-face indices where fluxes are forced to zero.
Definition: ERF_AdvStruct.H:463
bool use_efficient_advection
Whether to use the efficient advection implementation.
Definition: ERF_AdvStruct.H:442
amrex::Vector< amrex::IntVect > zero_xflux
Thin immersed-body x-face indices where fluxes are forced to zero.
Definition: ERF_AdvStruct.H:461

Referenced by SolverChoice::init_params().

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

◆ validate_weno_momentum_compatibility()

void AdvChoice::validate_weno_momentum_compatibility ( bool  use_embedded_boundary)
inline

Check whether the selected momentum WENO schemes are compatible with embedded boundaries.

Parameters
use_embedded_boundaryWhether the run uses embedded-boundary terrain.
410  {
411  // Check if any WENO momentum advection is being used
412  bool using_weno_momentum =
427 
428  // Check embedded boundary incompatibility
429  amrex::ignore_unused(use_embedded_boundary, using_weno_momentum);
430  AMREX_ASSERT_WITH_MESSAGE(!using_weno_momentum || !use_embedded_boundary,
431  "WENO momentum advection schemes are not yet implemented for embedded boundaries. "
432  "Please use traditional momentum advection schemes when using embedded boundaries:\n"
433  " - Centered_2nd\n"
434  " - Upwind_3rd\n"
435  " - Centered_4th\n"
436  " - Upwind_5th\n"
437  " - Centered_6th");
438  }

Referenced by init_params().

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

Member Data Documentation

◆ dryscal_horiz_adv_type

AdvChoice::dryscal_horiz_adv_type = AdvType::Upwind_3rd

Horizontal advection scheme for dry scalar variables.

Referenced by erf_auxiliary::AuxiliaryInertTracer::advance_stage(), ERF::ComputeGhostCells(), display(), and init_params().

◆ dryscal_horiz_upw_frac

AdvChoice::dryscal_horiz_upw_frac = one

Upwind blending fraction for horizontal dry scalar advection.

Referenced by erf_auxiliary::AuxiliaryInertTracer::advance_stage(), display(), and init_params().

◆ dryscal_vert_adv_type

AdvChoice::dryscal_vert_adv_type = AdvType::Upwind_3rd

Vertical advection scheme for dry scalar variables.

Referenced by erf_auxiliary::AuxiliaryInertTracer::advance_stage(), ERF::ComputeGhostCells(), display(), and init_params().

◆ dryscal_vert_upw_frac

AdvChoice::dryscal_vert_upw_frac = one

Upwind blending fraction for vertical dry scalar advection.

Referenced by erf_auxiliary::AuxiliaryInertTracer::advance_stage(), display(), and init_params().

◆ dycore_horiz_adv_type

AdvChoice::dycore_horiz_adv_type = AdvType::Upwind_3rd

Horizontal advection scheme for dynamical-core variables.

Referenced by ERF::ComputeGhostCells(), display(), erf_slow_rhs_pre(), init_params(), and validate_weno_momentum_compatibility().

◆ dycore_horiz_upw_frac

AdvChoice::dycore_horiz_upw_frac = one

Upwind blending fraction for horizontal dynamical-core advection.

Referenced by display(), erf_slow_rhs_pre(), and init_params().

◆ dycore_vert_adv_type

AdvChoice::dycore_vert_adv_type = AdvType::Upwind_3rd

Vertical advection scheme for dynamical-core variables.

Referenced by ERF::ComputeGhostCells(), display(), erf_slow_rhs_pre(), init_params(), and validate_weno_momentum_compatibility().

◆ dycore_vert_upw_frac

AdvChoice::dycore_vert_upw_frac = one

Upwind blending fraction for vertical dynamical-core advection.

Referenced by display(), erf_slow_rhs_pre(), and init_params().

◆ have_zero_flux_faces

AdvChoice::have_zero_flux_faces = false

Whether any zero-flux thin immersed-body faces were specified.

Referenced by init_params().

◆ moistscal_horiz_adv_type

AdvChoice::moistscal_horiz_adv_type = AdvType::Weno_3

Horizontal advection scheme for moist scalar variables.

Referenced by ERF::ComputeGhostCells(), display(), and init_params().

◆ moistscal_horiz_upw_frac

AdvChoice::moistscal_horiz_upw_frac = one

Upwind blending fraction for horizontal moist scalar advection.

Referenced by display(), and init_params().

◆ moistscal_vert_adv_type

AdvChoice::moistscal_vert_adv_type = AdvType::Weno_3

Vertical advection scheme for moist scalar variables.

Referenced by ERF::ComputeGhostCells(), display(), and init_params().

◆ moistscal_vert_upw_frac

AdvChoice::moistscal_vert_upw_frac = one

Upwind blending fraction for vertical moist scalar advection.

Referenced by display(), and init_params().

◆ use_efficient_advection

AdvChoice::use_efficient_advection = false

Whether to use the efficient advection implementation.

Referenced by init_params().

◆ zero_xflux

AdvChoice::zero_xflux

Thin immersed-body x-face indices where fluxes are forced to zero.

Referenced by init_params().

◆ zero_yflux

AdvChoice::zero_yflux

Thin immersed-body y-face indices where fluxes are forced to zero.

Referenced by init_params().

◆ zero_zflux

AdvChoice::zero_zflux

Thin immersed-body z-face indices where fluxes are forced to zero.

Referenced by init_params().


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