45 XLO, YLO, ZLO, XHI, YHI, ZHI,
104 std::map<std::string, int> bcmap;
105 bcmap[
"BOGUS_BC"] = amrex::BCType::mathematicalBndryTypes::bogus;
106 bcmap[
"INT_DIR"] = amrex::BCType::mathematicalBndryTypes::int_dir;
107 bcmap[
"REFLECT_ODD"] = amrex::BCType::mathematicalBndryTypes::reflect_odd;
108 bcmap[
"INT_DIR"] = amrex::BCType::mathematicalBndryTypes::int_dir;
109 bcmap[
"REFLECT_EVEN"] = amrex::BCType::mathematicalBndryTypes::reflect_even;
110 bcmap[
"FOEXTRAP"] = amrex::BCType::mathematicalBndryTypes::foextrap;
111 bcmap[
"EXT_DIR"] = amrex::BCType::mathematicalBndryTypes::ext_dir;
112 bcmap[
"HOEXTRAP"] = amrex::BCType::mathematicalBndryTypes::hoextrap;
113 bcmap[
"Interior"] = amrex::BCType::mathematicalBndryTypes::int_dir;
114 bcmap[
"Inflow"] = amrex::BCType::mathematicalBndryTypes::ext_dir;
115 bcmap[
"Outflow"] = amrex::BCType::mathematicalBndryTypes::foextrap;
116 bcmap[
"Symmetry"] = amrex::BCType::mathematicalBndryTypes::reflect_even;
117 bcmap[
"SlipWall"] = amrex::BCType::mathematicalBndryTypes::ext_dir;
118 bcmap[
"NoSlipWall"] = amrex::BCType::mathematicalBndryTypes::ext_dir;
120 bcmap[
"interior"] = (int)amrex::LinOpBCType::interior;
121 bcmap[
"Dirichlet"] = (int)amrex::LinOpBCType::Dirichlet;
122 bcmap[
"dirichlet"] = (int)amrex::LinOpBCType::Dirichlet;
123 bcmap[
"Neumann"] = (int)amrex::LinOpBCType::Neumann;
124 bcmap[
"NEUMANN"] = (int)amrex::LinOpBCType::Neumann;
125 bcmap[
"neumann"] = (int)amrex::LinOpBCType::Neumann;
126 bcmap[
"reflect_odd"] = (int)amrex::LinOpBCType::reflect_odd;
127 bcmap[
"Marshak"] = (int)amrex::LinOpBCType::Marshak;
128 bcmap[
"SanchezPomraning"] = (int)amrex::LinOpBCType::SanchezPomraning;
129 bcmap[
"inflow"] = (int)amrex::LinOpBCType::inflow;
130 bcmap[
"Periodic"] = (int)amrex::LinOpBCType::Periodic;
131 bcmap[
"periodic"] = (int)amrex::LinOpBCType::Periodic;
137 std::vector<std::string> str;
139 for (
unsigned int i = 0; i < str.size(); i++)
if (!bcmap.count(str[i]))
Util::Abort(
INFO,
"Invalid BC: ", str[i]);
140 if (str.size() == value.
m_ncomp)
for (
unsigned int i = 0; i < value.
m_ncomp; i++) value.
m_bc_type[Face::XLO].push_back(bcmap[str[i]]);
141 else if (str.size() == 1) value.
m_bc_type[Face::XLO].resize(value.
m_ncomp, bcmap[str[0]]);
144 for (
unsigned int i = 0; i < str.size(); i++)
if (!bcmap.count(str[i]))
Util::Abort(
INFO,
"Invalid BC: ", str[i]);
145 if (str.size() == value.
m_ncomp)
for (
unsigned int i = 0; i < value.
m_ncomp; i++) value.
m_bc_type[Face::XHI].push_back(bcmap[str[i]]);
146 else if (str.size() == 1) value.
m_bc_type[Face::XHI].resize(value.
m_ncomp, bcmap[str[0]]);
149 for (
unsigned int i = 0; i < str.size(); i++)
if (!bcmap.count(str[i]))
Util::Abort(
INFO,
"Invalid BC: ", str[i]);
150 if (str.size() == value.
m_ncomp)
for (
unsigned int i = 0; i < value.
m_ncomp; i++) value.
m_bc_type[Face::YLO].push_back(bcmap[str[i]]);
151 else if (str.size() == 1) value.
m_bc_type[Face::YLO].resize(value.
m_ncomp, bcmap[str[0]]);
154 for (
unsigned int i = 0; i < str.size(); i++)
if (!bcmap.count(str[i]))
Util::Abort(
INFO,
"Invalid BC: ", str[i]);
155 if (str.size() == value.
m_ncomp)
for (
unsigned int i = 0; i < value.
m_ncomp; i++) value.
m_bc_type[Face::YHI].push_back(bcmap[str[i]]);
156 else if (str.size() == 1) value.
m_bc_type[Face::YHI].resize(value.
m_ncomp, bcmap[str[0]]);
160 for (
unsigned int i = 0; i < str.size(); i++)
if (!bcmap.count(str[i]))
Util::Abort(
INFO,
"Invalid BC: ", str[i]);
161 if (str.size() == value.
m_ncomp)
for (
unsigned int i = 0; i < value.
m_ncomp; i++) value.
m_bc_type[Face::ZLO].push_back(bcmap[str[i]]);
162 else if (str.size() == 1) value.
m_bc_type[Face::ZLO].resize(value.
m_ncomp, bcmap[str[0]]);
167 for (
unsigned int i = 0; i < str.size(); i++)
if (!bcmap.count(str[i]))
Util::Abort(
INFO,
"Invalid BC: ", str[i]);
168 if (str.size() == value.
m_ncomp)
for (
unsigned int i = 0; i < value.
m_ncomp; i++) value.
m_bc_type[Face::ZHI].push_back(bcmap[str[i]]);
169 else if (str.size() == 1) value.
m_bc_type[Face::ZHI].resize(value.
m_ncomp, bcmap[str[0]]);
174 std::vector<std::string> val;
175 for (
int face = 0; face != Face::INT; face++)
177 std::string querystr = std::string(
"val.") + std::string(facestr[face]);
179 else val.resize(value.
m_ncomp,
"0.0");
180 if (val.size() != value.
m_ncomp)
Util::Abort(
INFO,
"Incorrect number of expressions specified for ",querystr,
": expected 1 or ",value.
m_ncomp,
" but received ",val.size());
184 for (
unsigned int i = 0 ; i < value.
m_ncomp; i++)
195 std::vector<std::string> ignore_in_2d = {
197 "zhixlo",
"zloxlo",
"zhixhi",
"zloxhi",
"ylozlo",
"ylozhi",
"yhizlo",
"yhizhi",
198 "xloylozlo",
"xloylozhi",
"xloyhizlo",
"xloyhizhi",
"xhiylozlo",
"xhiylozhi",
"xhiyhizlo",
"xhiyhizhi"};
199 for (
unsigned int n = 0; n < ignore_in_2d.size(); n++)
201 std::string querystr = std::string(
"val.") + ignore_in_2d[n];
203 querystr = std::string(
"type.") + ignore_in_2d[n];