68 s.setDomainBc(1, 3, 0.0, 0.0, 0.0);
70 s.setDomainBc(f, 1, 0.0, 0.0, 0.0);
121int main(
int argc,
char** argv) {
122 Kokkos::initialize(argc, argv);
125 const Result empty = run<peclet::flow::IbmSolver>(0.0,
false);
126 const Result clear = run<peclet::flow::IbmSolver>(0.5 *
NX,
true);
127 const Result cutOut = run<peclet::flow::IbmSolver>(
NX - 0.5,
true);
128 const Result cutIn = run<peclet::flow::IbmSolver>(-0.5,
true);
129 const char* fmt =
"[openbc-solid] staggered %-26s iters %3ld projected max|div| %.3e\n";
130 std::printf(fmt,
"all-fluid duct:", empty.iters, empty.divp);
131 std::printf(fmt,
"sphere clear of the faces:", clear.iters, clear.divp);
132 std::printf(fmt,
"sphere cutting the OUTLET:", cutOut.iters, cutOut.divp);
133 std::printf(fmt,
"sphere cutting the INLET:", cutIn.iters, cutIn.divp);
135 const Result all[4] = {empty, clear, cutOut, cutIn};
136 for (
const Result& r : all) {
138 CHECK(r.divp < 1e-7);
144 const Result ablated = run<peclet::flow::IbmSolver>(
NX - 0.5,
true,
false);
146 "[openbc-solid] staggered %-26s iters %3ld projected max|div| %.3e (the defect)\n",
147 "OUTLET, literal-1.0 row:", ablated.iters, ablated.divp);
148 CHECK(ablated.divp > 1e-4);
150 CHECK(sealedPocketRejected<peclet::flow::IbmSolver>());
168 const Result cEmpty = run<Colo>(0.0,
false);
169 const Result cClear = run<Colo>(0.5 *
NX,
true);
170 const Result cCutOut = run<Colo>(
NX - 0.5,
true);
171 const Result cCutIn = run<Colo>(-0.5,
true);
172 const char* cfmt =
"[openbc-solid] collocated %-26s iters %3ld max|div| %.3e\n";
173 std::printf(cfmt,
"all-fluid duct:", cEmpty.iters, cEmpty.divp);
174 std::printf(cfmt,
"sphere clear of the faces:", cClear.iters, cClear.divp);
175 std::printf(cfmt,
"sphere cutting the OUTLET:", cCutOut.iters, cCutOut.divp);
176 std::printf(cfmt,
"sphere cutting the INLET:", cCutIn.iters, cCutIn.divp);
177 const Result cAll[4] = {cEmpty, cClear, cCutOut, cCutIn};
178 for (
const Result& r : cAll)
180 CHECK(sealedPocketRejected<Colo>());
183 std::printf(
"[openbc-solid] OK\n");