ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_EBStruct.H
Go to the documentation of this file.
1 #ifndef ERF_EB_STRUCT_H_
2 #define ERF_EB_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 
11 /**
12  * @brief Boundary condition model applied on embedded-boundary surfaces.
13  */
14 enum struct EBBoundaryType {
16 };
17 
18 /**
19  * @brief Embedded-boundary stress component indices.
20  */
21 enum EBTauType {
23 };
24 
25 /**
26  * @brief Grid centering used for embedded-boundary data.
27  */
28 enum EBGridType {
30 };
31 
32 /**
33  * Container holding EB-related choices
34  */
35 
36 struct EBChoice {
37  public:
38  /**
39  * @brief Read embedded-boundary options from the input parameter database.
40  * @param pp_prefix ParmParse prefix for the ERF input namespace.
41  */
42  void init_params(std::string pp_prefix)
43  {
44  amrex::ParmParse pp(pp_prefix);
45 
46  static std::string eb_boundary_type_string = "NoSlipWall";
47  pp.query("eb_boundary_type",eb_boundary_type_string);
48 
49  if (!eb_boundary_type_string.compare("SlipWall")) {
51  } else if (!eb_boundary_type_string.compare("NoSlipWall")) {
53  } else if (!eb_boundary_type_string.compare("SurfaceLayer")) {
55  } else {
56  amrex::Error("Don't know this eb_boundary_type");
57  }
58  }
59 
60  /**
61  * @brief Print the configured embedded-boundary options.
62  */
63  void display()
64  {
65  amrex::Print() << "EB choices: " << std::endl;
67  amrex::Print() << " eb_boundary_type : SlipWall" << std::endl;
69  amrex::Print() << " eb_boundary_type : NoSlipWall" << std::endl;
71  amrex::Print() << " eb_boundary_type : SurfaceLayer" << std::endl;
72  }
73  }
74 
76 };
77 
78 /**
79  * @var EBChoice::eb_boundary_type
80  * @brief Boundary condition model applied on embedded-boundary surfaces.
81  */
82 #endif
EBTauType
Embedded-boundary stress component indices.
Definition: ERF_EBStruct.H:21
@ tau_eb23
Definition: ERF_EBStruct.H:22
@ tau_eb13
Definition: ERF_EBStruct.H:22
EBBoundaryType
Boundary condition model applied on embedded-boundary surfaces.
Definition: ERF_EBStruct.H:14
EBGridType
Grid centering used for embedded-boundary data.
Definition: ERF_EBStruct.H:28
@ yface
Definition: ERF_EBStruct.H:29
@ zface
Definition: ERF_EBStruct.H:29
@ xface
Definition: ERF_EBStruct.H:29
ParmParse pp("prob")
Definition: ERF_SurfaceLayer.H:34
Definition: ERF_EBStruct.H:36
void init_params(std::string pp_prefix)
Read embedded-boundary options from the input parameter database.
Definition: ERF_EBStruct.H:42
void display()
Print the configured embedded-boundary options.
Definition: ERF_EBStruct.H:63
EBBoundaryType eb_boundary_type
Boundary condition model applied on embedded-boundary surfaces.
Definition: ERF_EBStruct.H:75