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.
333  {
334  if (adv_int == AdvType::Centered_2nd) {
335  return "Centered_2nd";
336  } else if (adv_int == AdvType::Upwind_3rd) {
337  return "Upwind_3rd";
338  } else if (adv_int == AdvType::Upwind_3rd_SL) {
339  return "Upwind_3rd_SL";
340  } else if (adv_int == AdvType::Centered_4th) {
341  return "Centered_4th";
342  } else if (adv_int == AdvType::Upwind_5th) {
343  return "Upwind_5th";
344  } else if (adv_int == AdvType::Centered_6th) {
345  return "Centered_6th";
346  } else if (adv_int == AdvType::Weno_3) {
347  return "WENO3";
348  } else if (adv_int == AdvType::Weno_3Z) {
349  return "WENOZ3";
350  } else if (adv_int == AdvType::Weno_5) {
351  return "WENO5";
352  } else if (adv_int == AdvType::Weno_5Z) {
353  return "WENOZ5";
354  } else if (adv_int == AdvType::Weno_3MZQ) {
355  return "WENOMZQ3";
356  } else if (adv_int == AdvType::Weno_7) {
357  return "WENO7";
358  } else if (adv_int == AdvType::Weno_7Z) {
359  return "WENOZ7";
360  } else {
361  return "Unknown";
362  }
363  }
@ 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.
371  {
372  if (adv_string == "Centered_2nd") {
373  return AdvType::Centered_2nd;
374  } else if ((adv_string == "Upwind_3rd") || (adv_string == "Blended_3rd4th")) {
375  return AdvType::Upwind_3rd;
376  } else if (adv_string == "Upwind_3rd_SL") {
377  return AdvType::Upwind_3rd_SL;
378  } else if (adv_string == "Centered_4th") {
379  return AdvType::Centered_4th;
380  } else if (adv_string == "Upwind_5th" || (adv_string == "Blended_5th6th")) {
381  return AdvType::Upwind_5th;
382  } else if (adv_string == "Centered_6th") {
383  return AdvType::Centered_6th;
384  } else if (adv_string == "WENO3") {
385  return AdvType::Weno_3;
386  } else if (adv_string == "WENOZ3") {
387  return AdvType::Weno_3Z;
388  } else if (adv_string == "WENO5") {
389  return AdvType::Weno_5;
390  } else if (adv_string == "WENOZ5") {
391  return AdvType::Weno_5Z;
392  } else if (adv_string == "WENOMZQ3") {
393  return AdvType::Weno_3MZQ;
394  } else if (adv_string == "WENO7") {
395  return AdvType::Weno_7;
396  } else if (adv_string == "WENOZ7") {
397  return AdvType::Weno_7Z;
398  } else {
399  return AdvType::Unknown;
400  }
401  }

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

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.query("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.query("dycore_horiz_adv_type" , dycore_horiz_adv_string);
34  pp.query("dycore_vert_adv_type" , dycore_vert_adv_string);
35  pp.query("dryscal_horiz_adv_type" , dryscal_horiz_adv_string);
36  pp.query("dryscal_vert_adv_type" , dryscal_vert_adv_string);
37 
38  std::string moistscal_horiz_adv_string = ""; std::string moistscal_vert_adv_string = "";
39  pp.query("moistscal_horiz_adv_type", moistscal_horiz_adv_string);
40  pp.query("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.query("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.query("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.query("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.query("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.query("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.query("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 == "WENO5" ) ||
105  (dycore_horiz_adv_string == "WENOZ5" ) ||
106  (dycore_horiz_adv_string == "WENO7" ) ||
107  (dycore_horiz_adv_string == "WENOZ7" ))
108  {
110  } else {
111  amrex::Error("Don't know this dycore_horiz_adv_string");
112  }
113  }
114 
115  if (dycore_vert_adv_string != "") {
116  if ( (dycore_vert_adv_string == "Centered_2nd") ||
117  (dycore_vert_adv_string == "Upwind_3rd" ) ||
118  (dycore_vert_adv_string == "Blended_3rd4th") ||
119  (dycore_vert_adv_string == "Centered_4th") ||
120  (dycore_vert_adv_string == "Upwind_5th" ) ||
121  (dycore_vert_adv_string == "Blended_5th6th") ||
122  (dycore_vert_adv_string == "Centered_6th") ||
123  (dycore_vert_adv_string == "WENO3" ) ||
124  (dycore_vert_adv_string == "WENOZ3" ) ||
125  (dycore_vert_adv_string == "WENO5" ) ||
126  (dycore_vert_adv_string == "WENOZ5" ) ||
127  (dycore_vert_adv_string == "WENO7" ) ||
128  (dycore_vert_adv_string == "WENOZ7" ))
129  {
131  } else {
132  amrex::Error("Don't know this dycore_vert_adv_string");
133  }
134  }
135 
136  if (dryscal_horiz_adv_string != "") {
137  if ( (dryscal_horiz_adv_string == "Centered_2nd") ||
138  (dryscal_horiz_adv_string == "Upwind_3rd" ) ||
139  (dryscal_horiz_adv_string == "Upwind_3rd_SL") ||
140  (dryscal_horiz_adv_string == "Blended_3rd4th") ||
141  (dryscal_horiz_adv_string == "Centered_4th") ||
142  (dryscal_horiz_adv_string == "Upwind_5th" ) ||
143  (dryscal_horiz_adv_string == "Blended_5th6th") ||
144  (dryscal_horiz_adv_string == "Centered_6th") ||
145  (dryscal_horiz_adv_string == "WENO3" ) ||
146  (dryscal_horiz_adv_string == "WENOZ3" ) ||
147  (dryscal_horiz_adv_string == "WENOMZQ3" ) ||
148  (dryscal_horiz_adv_string == "WENO5" ) ||
149  (dryscal_horiz_adv_string == "WENOZ5" ) ||
150  (dryscal_horiz_adv_string == "WENO7" ) ||
151  (dryscal_horiz_adv_string == "WENOZ7" ) )
152  {
154  } else {
155  amrex::Error("Don't know this dryscal_horiz_adv_string");
156  }
157  }
158 
159  if (dryscal_vert_adv_string != "") {
160  if ( (dryscal_vert_adv_string == "Centered_2nd") ||
161  (dryscal_vert_adv_string == "Upwind_3rd" ) ||
162  (dryscal_vert_adv_string == "Upwind_3rd_SL") ||
163  (dryscal_vert_adv_string == "Blended_3rd4th") ||
164  (dryscal_vert_adv_string == "Centered_4th") ||
165  (dryscal_vert_adv_string == "Upwind_5th" ) ||
166  (dryscal_vert_adv_string == "Blended_5th6th") ||
167  (dryscal_vert_adv_string == "Centered_6th") ||
168  (dryscal_vert_adv_string == "WENO3" ) ||
169  (dryscal_vert_adv_string == "WENOZ3" ) ||
170  (dryscal_vert_adv_string == "WENOMZQ3" ) ||
171  (dryscal_vert_adv_string == "WENO5" ) ||
172  (dryscal_vert_adv_string == "WENOZ5" ) ||
173  (dryscal_vert_adv_string == "WENO7" ) ||
174  (dryscal_vert_adv_string == "WENOZ7" ))
175  {
177  } else {
178  amrex::Error("Don't know this dryscal_vert_adv_string");
179  }
180  }
181 
182  if (moistscal_horiz_adv_string != "") {
183  if ( (moistscal_horiz_adv_string == "Centered_2nd") ||
184  (moistscal_horiz_adv_string == "Upwind_3rd" ) ||
185  (moistscal_horiz_adv_string == "Upwind_3rd_SL" ) ||
186  (moistscal_horiz_adv_string == "Blended_3rd4th") ||
187  (moistscal_horiz_adv_string == "Centered_4th") ||
188  (moistscal_horiz_adv_string == "Upwind_5th" ) ||
189  (moistscal_horiz_adv_string == "Blended_5th6th") ||
190  (moistscal_horiz_adv_string == "Centered_6th") ||
191  (moistscal_horiz_adv_string == "WENO3" ) ||
192  (moistscal_horiz_adv_string == "WENOZ3" ) ||
193  (moistscal_horiz_adv_string == "WENOMZQ3" ) ||
194  (moistscal_horiz_adv_string == "WENO5" ) ||
195  (moistscal_horiz_adv_string == "WENOZ5" ) ||
196  (moistscal_horiz_adv_string == "WENO7" ) ||
197  (moistscal_horiz_adv_string == "WENOZ7" ))
198  {
199  moistscal_horiz_adv_type = adv_type_convert_string_to_advtype(moistscal_horiz_adv_string);
200  } else {
201  amrex::Error("Don't know this moistscal_horiz_adv_string");
202  }
203  }
204 
205  if (moistscal_vert_adv_string != "") {
206  if ( (moistscal_vert_adv_string == "Centered_2nd") ||
207  (moistscal_vert_adv_string == "Upwind_3rd" ) ||
208  (moistscal_vert_adv_string == "Upwind_3rd_SL" ) ||
209  (moistscal_vert_adv_string == "Blended_3rd4th") ||
210  (moistscal_vert_adv_string == "Centered_4th") ||
211  (moistscal_vert_adv_string == "Upwind_5th" ) ||
212  (moistscal_vert_adv_string == "Blended_5th6th") ||
213  (moistscal_vert_adv_string == "Centered_6th") ||
214  (moistscal_vert_adv_string == "WENO3" ) ||
215  (moistscal_vert_adv_string == "WENOZ3" ) ||
216  (moistscal_vert_adv_string == "WENOMZQ3" ) ||
217  (moistscal_vert_adv_string == "WENO5" ) ||
218  (moistscal_vert_adv_string == "WENOZ5" ) ||
219  (moistscal_vert_adv_string == "WENO7" ) ||
220  (moistscal_vert_adv_string == "WENOZ7" ))
221  {
222  moistscal_vert_adv_type = adv_type_convert_string_to_advtype(moistscal_vert_adv_string);
223  } else {
224  amrex::Error("Don't know this moistscal_vert_adv_string");
225  }
226  }
227 
228  // We can can't use weno with Embedded Boundaries (for now)
229  std::string terrain_type;
230  pp.query("terrain_type", terrain_type);
231  validate_weno_momentum_compatibility(terrain_type == "EB");
232 
233  pp.queryarr("zero_xflux_faces", zero_xflux);
234  pp.queryarr("zero_yflux_faces", zero_yflux);
235  pp.queryarr("zero_zflux_faces", zero_zflux);
236  have_zero_flux_faces = ((zero_xflux.size() > 0) || (zero_yflux.size() > 0) || (zero_zflux.size() > 0));
237  }
constexpr amrex::Real one
Definition: ERF_Constants.H:9
constexpr amrex::Real zero
Definition: ERF_Constants.H:8
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:462
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:407
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:370
amrex::Vector< amrex::IntVect > zero_yflux
Thin immersed-body y-face indices where fluxes are forced to zero.
Definition: ERF_AdvStruct.H:460
amrex::Vector< amrex::IntVect > zero_zflux
Thin immersed-body z-face indices where fluxes are forced to zero.
Definition: ERF_AdvStruct.H:461
bool use_efficient_advection
Whether to use the efficient advection implementation.
Definition: ERF_AdvStruct.H:440
amrex::Vector< amrex::IntVect > zero_xflux
Thin immersed-body x-face indices where fluxes are forced to zero.
Definition: ERF_AdvStruct.H:459

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.
408  {
409  // Check if any WENO momentum advection is being used
410  bool using_weno_momentum =
425 
426  // Check embedded boundary incompatibility
427  amrex::ignore_unused(use_embedded_boundary, using_weno_momentum);
428  AMREX_ASSERT_WITH_MESSAGE(!using_weno_momentum || !use_embedded_boundary,
429  "WENO momentum advection schemes are not yet implemented for embedded boundaries. "
430  "Please use traditional momentum advection schemes when using embedded boundaries:\n"
431  " - Centered_2nd\n"
432  " - Upwind_3rd\n"
433  " - Centered_4th\n"
434  " - Upwind_5th\n"
435  " - Centered_6th");
436  }

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::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 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::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 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: