45 XLO, YLO, ZLO, XHI, YHI, ZHI,
100 std::map<std::string, int> bcmap;
101 bcmap[
"BOGUS_BC"] = amrex::BCType::mathematicalBndryTypes::bogus;
102 bcmap[
"INT_DIR"] = amrex::BCType::mathematicalBndryTypes::int_dir;
103 bcmap[
"REFLECT_ODD"] = amrex::BCType::mathematicalBndryTypes::reflect_odd;
104 bcmap[
"INT_DIR"] = amrex::BCType::mathematicalBndryTypes::int_dir;
105 bcmap[
"REFLECT_EVEN"] = amrex::BCType::mathematicalBndryTypes::reflect_even;
106 bcmap[
"FOEXTRAP"] = amrex::BCType::mathematicalBndryTypes::foextrap;
107 bcmap[
"EXT_DIR"] = amrex::BCType::mathematicalBndryTypes::ext_dir;
108 bcmap[
"HOEXTRAP"] = amrex::BCType::mathematicalBndryTypes::hoextrap;
109 bcmap[
"Interior"] = amrex::BCType::mathematicalBndryTypes::int_dir;
110 bcmap[
"Inflow"] = amrex::BCType::mathematicalBndryTypes::ext_dir;
111 bcmap[
"Outflow"] = amrex::BCType::mathematicalBndryTypes::foextrap;
112 bcmap[
"Symmetry"] = amrex::BCType::mathematicalBndryTypes::reflect_even;
113 bcmap[
"SlipWall"] = amrex::BCType::mathematicalBndryTypes::ext_dir;
114 bcmap[
"NoSlipWall"] = amrex::BCType::mathematicalBndryTypes::ext_dir;
116 bcmap[
"interior"] = (int)amrex::LinOpBCType::interior;
117 bcmap[
"Dirichlet"] = (int)amrex::LinOpBCType::Dirichlet;
118 bcmap[
"dirichlet"] = (int)amrex::LinOpBCType::Dirichlet;
119 bcmap[
"Neumann"] = (int)amrex::LinOpBCType::Neumann;
120 bcmap[
"NEUMANN"] = (int)amrex::LinOpBCType::Neumann;
121 bcmap[
"neumann"] = (int)amrex::LinOpBCType::Neumann;
122 bcmap[
"reflect_odd"] = (int)amrex::LinOpBCType::reflect_odd;
123 bcmap[
"Marshak"] = (int)amrex::LinOpBCType::Marshak;
124 bcmap[
"SanchezPomraning"] = (int)amrex::LinOpBCType::SanchezPomraning;
125 bcmap[
"inflow"] = (int)amrex::LinOpBCType::inflow;
126 bcmap[
"Periodic"] = (int)amrex::LinOpBCType::Periodic;
127 bcmap[
"periodic"] = (int)amrex::LinOpBCType::Periodic;
133 std::vector<std::string> str;
135 for (
unsigned int i = 0; i < str.size(); i++)
if (!bcmap.count(str[i]))
Util::Abort(
INFO,
"Invalid BC: ", str[i]);
136 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]]);
137 else if (str.size() == 1) value.
m_bc_type[Face::XLO].resize(value.
m_ncomp, bcmap[str[0]]);
140 for (
unsigned int i = 0; i < str.size(); i++)
if (!bcmap.count(str[i]))
Util::Abort(
INFO,
"Invalid BC: ", str[i]);
141 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]]);
142 else if (str.size() == 1) value.
m_bc_type[Face::XHI].resize(value.
m_ncomp, bcmap[str[0]]);
145 for (
unsigned int i = 0; i < str.size(); i++)
if (!bcmap.count(str[i]))
Util::Abort(
INFO,
"Invalid BC: ", str[i]);
146 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]]);
147 else if (str.size() == 1) value.
m_bc_type[Face::YLO].resize(value.
m_ncomp, bcmap[str[0]]);
150 for (
unsigned int i = 0; i < str.size(); i++)
if (!bcmap.count(str[i]))
Util::Abort(
INFO,
"Invalid BC: ", str[i]);
151 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]]);
152 else if (str.size() == 1) value.
m_bc_type[Face::YHI].resize(value.
m_ncomp, bcmap[str[0]]);
156 for (
unsigned int i = 0; i < str.size(); i++)
if (!bcmap.count(str[i]))
Util::Abort(
INFO,
"Invalid BC: ", str[i]);
157 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]]);
158 else if (str.size() == 1) value.
m_bc_type[Face::ZLO].resize(value.
m_ncomp, bcmap[str[0]]);
163 for (
unsigned int i = 0; i < str.size(); i++)
if (!bcmap.count(str[i]))
Util::Abort(
INFO,
"Invalid BC: ", str[i]);
164 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]]);
165 else if (str.size() == 1) value.
m_bc_type[Face::ZHI].resize(value.
m_ncomp, bcmap[str[0]]);
170 std::vector<std::string> val;
171 for (
int face = 0; face != Face::INT; face++)
173 std::string querystr = std::string(
"val.") + std::string(facestr[face]);
175 else val.resize(value.
m_ncomp,
"0.0");
176 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());
180 for (
unsigned int i = 0 ; i < value.
m_ncomp; i++)
191 std::vector<std::string> ignore_in_2d = {
193 "zhixlo",
"zloxlo",
"zhixhi",
"zloxhi",
"ylozlo",
"ylozhi",
"yhizlo",
"yhizhi",
194 "xloylozlo",
"xloylozhi",
"xloyhizlo",
"xloyhizhi",
"xhiylozlo",
"xhiylozhi",
"xhiyhizlo",
"xhiyhizhi"};
195 for (
unsigned int n = 0; n < ignore_in_2d.size(); n++)
197 std::string querystr = std::string(
"val.") + ignore_in_2d[n];
199 querystr = std::string(
"type.") + ignore_in_2d[n];