ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_AdvStruct.H
Go to the documentation of this file.
1 #ifndef ERF_ADV_STRUCT_H_
2 #define ERF_ADV_STRUCT_H_
3 
4 #include <string>
5 #include <iostream>
6 
7 #include <AMReX_ParmParse.H>
8 #include <AMReX_Print.H>
9 #include <AMReX_Gpu.H>
10 #include <AMReX_Geometry.H>
11 
12 #include <ERF_NumericalConstants.H>
13 #include <ERF_IndexDefines.H>
14 
15 /**
16  * Container holding the advection-related choices
17  */
18 
19 struct AdvChoice {
20  public:
21  /**
22  * @brief Read advection options from the input parameter database.
23  * @param pp_prefix ParmParse prefix for the ERF input namespace.
24  */
25  void init_params (std::string pp_prefix)
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  }
240 
241  /**
242  * @brief Print the configured advection choices.
243  * @param pp_prefix ParmParse prefix used to recover input strings for display.
244  */
245  void display (std::string& pp_prefix)
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  }
327 
328  /**
329  * @brief Convert an advection type enum to the corresponding input string.
330  * @param adv_int Advection type enum value.
331  * @return String representation of the advection type.
332  */
333  std::string
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  }
366 
367  /**
368  * @brief Convert an input advection string to the corresponding enum value.
369  * @param adv_string User-facing advection type string.
370  * @return Matching advection type, or AdvType::Unknown if no match is found.
371  */
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  }
404 
405  /**
406  * @brief Check whether the selected momentum WENO schemes are compatible with embedded boundaries.
407  * @param use_embedded_boundary Whether the run uses embedded-boundary terrain.
408  */
409  void validate_weno_momentum_compatibility (bool use_embedded_boundary)
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  }
439 
440  // Order and type of spatial discretizations used in advection
441  // Defaults given below but these can be over-written at run-time
449 
450  // Blending between upwind and the next-highest order central scheme
451  // Note: This is used by both Upwind_* and Blended_* schemes -- the default
452  // is a pure upwind scheme
459 
460  // Thin immersed bodies
461  amrex::Vector<amrex::IntVect> zero_xflux;
462  amrex::Vector<amrex::IntVect> zero_yflux;
463  amrex::Vector<amrex::IntVect> zero_zflux;
464  bool have_zero_flux_faces = false;
465 };
466 
467 /**
468  * @var AdvChoice::use_efficient_advection
469  * @brief Whether to use the efficient advection implementation.
470  * @var AdvChoice::dycore_horiz_adv_type
471  * @brief Horizontal advection scheme for dynamical-core variables.
472  * @var AdvChoice::dycore_vert_adv_type
473  * @brief Vertical advection scheme for dynamical-core variables.
474  * @var AdvChoice::dryscal_horiz_adv_type
475  * @brief Horizontal advection scheme for dry scalar variables.
476  * @var AdvChoice::dryscal_vert_adv_type
477  * @brief Vertical advection scheme for dry scalar variables.
478  * @var AdvChoice::moistscal_horiz_adv_type
479  * @brief Horizontal advection scheme for moist scalar variables.
480  * @var AdvChoice::moistscal_vert_adv_type
481  * @brief Vertical advection scheme for moist scalar variables.
482  * @var AdvChoice::dycore_horiz_upw_frac
483  * @brief Upwind blending fraction for horizontal dynamical-core advection.
484  * @var AdvChoice::dycore_vert_upw_frac
485  * @brief Upwind blending fraction for vertical dynamical-core advection.
486  * @var AdvChoice::dryscal_horiz_upw_frac
487  * @brief Upwind blending fraction for horizontal dry scalar advection.
488  * @var AdvChoice::dryscal_vert_upw_frac
489  * @brief Upwind blending fraction for vertical dry scalar advection.
490  * @var AdvChoice::moistscal_horiz_upw_frac
491  * @brief Upwind blending fraction for horizontal moist scalar advection.
492  * @var AdvChoice::moistscal_vert_upw_frac
493  * @brief Upwind blending fraction for vertical moist scalar advection.
494  * @var AdvChoice::zero_xflux
495  * @brief Thin immersed-body x-face indices where fluxes are forced to zero.
496  * @var AdvChoice::zero_yflux
497  * @brief Thin immersed-body y-face indices where fluxes are forced to zero.
498  * @var AdvChoice::zero_zflux
499  * @brief Thin immersed-body z-face indices where fluxes are forced to zero.
500  * @var AdvChoice::have_zero_flux_faces
501  * @brief Whether any zero-flux thin immersed-body faces were specified.
502  */
503 #endif
AdvType
Definition: ERF_IndexDefines.H:352
@ Upwind_3rd_SL
@ Centered_4th
@ Centered_6th
@ Centered_2nd
ParmParse pp("prob")
Dimensionless numeric literals and pure mathematical constants.
constexpr amrex::Real one
Definition: ERF_NumericalConstants.H:37
constexpr amrex::Real zero
Definition: ERF_NumericalConstants.H:36
amrex::Real Real
Definition: ERF_ShocInterface.H:19
AMREX_ASSERT_WITH_MESSAGE(wbar_cutoff_min > wbar_cutoff_max, "ERROR: wbar_cutoff_min < wbar_cutoff_max")
Definition: ERF_AdvStruct.H:19
amrex::Real dryscal_horiz_upw_frac
Upwind blending fraction for horizontal dry scalar advection.
Definition: ERF_AdvStruct.H:455
void display(std::string &pp_prefix)
Print the configured advection choices.
Definition: ERF_AdvStruct.H:245
void init_params(std::string pp_prefix)
Read advection options from the input parameter database.
Definition: ERF_AdvStruct.H:25
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
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
amrex::Vector< amrex::IntVect > zero_yflux
Thin immersed-body y-face indices where fluxes are forced to zero.
Definition: ERF_AdvStruct.H:462
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
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
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