202 using namespace amrex;
230 #ifndef AMREX_USE_GPU
231 if (a_dry_run) { Print() <<
"P1: v0--v1: add vIP to F1, F5 and F7 :: " << vIP[0] <<
"\n"; }
240 if ( almostEqual(distIP, 0.0) ) {
241 #ifndef AMREX_USE_GPU
242 if (a_dry_run) { Print() <<
"P1: v0--v1: intersection ~ 0 :: add vIP to F4\n"; }
247 }
else if ( almostEqual(distIP, 1.0) ) {
248 #ifndef AMREX_USE_GPU
249 if (a_dry_run) { Print() <<
"P1: v0--v1: intersection ~ 1 :: add vIP to F2\n"; }
259 #ifndef AMREX_USE_GPU
260 if (a_dry_run) { Print() <<
"P1: Add v1 to F1, F2 and F5\n"; }
274 #ifndef AMREX_USE_GPU
275 if (a_dry_run) { Print() <<
"P1: v1--v4: add vIP to F2, F5 and F7 :: " << vIP[2] <<
"\n"; }
284 if ( almostEqual(distIP, 0.0) ) {
285 #ifndef AMREX_USE_GPU
286 if (a_dry_run) { Print() <<
"P1: v1--v4: intersection ~ 0 :: add vIP to F1\n"; }
291 }
else if ( almostEqual(distIP, 1.0) ) {
292 #ifndef AMREX_USE_GPU
293 if (a_dry_run) { Print() <<
"P1: v1--v4: intersection ~ 1 :: add vIP to F3\n"; }
303 #ifndef AMREX_USE_GPU
304 if (a_dry_run) { Print() <<
"P1: Add v4 to F2, F3 and F5\n"; }
318 #ifndef AMREX_USE_GPU
319 if (a_dry_run) { Print() <<
"P1: v4--v7: add vIP to F2, F3 and F7 :: " << vIP[1] <<
"\n"; }
328 if ( almostEqual(distIP, 0.0)) {
329 #ifndef AMREX_USE_GPU
330 if (a_dry_run) { Print() <<
"P1: v4--v7: intersection ~ 0 :: add vIP to F5\n"; }
335 }
else if ( almostEqual(distIP, 1.0)) {
336 #ifndef AMREX_USE_GPU
337 if (a_dry_run) { Print() <<
"P1: v4--v7: intersection ~ 1 :: add vIP to F6\n"; }
344 if (cuts == 2 && add_v7) {
346 #ifndef AMREX_USE_GPU
347 if (a_dry_run) { Print() <<
"P1: Add v7 to F2, F3 and F6\n"; }
363 #ifndef AMREX_USE_GPU
364 if (a_dry_run) { Print() <<
"P4: v1--v5: add vIP to F1, F2 and F7 :: " << vIP[1] <<
"\n"; }
373 if ( almostEqual(distIP, 0.0)) {
374 #ifndef AMREX_USE_GPU
375 if (a_dry_run) { Print() <<
"P1: v1--v5: intersection ~ 0 :: add vIP to F5\n"; }
380 }
else if ( almostEqual(distIP, 1.0)) {
381 #ifndef AMREX_USE_GPU
382 if (a_dry_run) { Print() <<
"P1: v1--v5: intersection ~ 1 :: add vIP to F6\n"; }
397 #ifndef AMREX_USE_GPU
398 if (a_dry_run) { Print() <<
"P2: v0--v2: add vIP to F1, F4 and F7 :: " << vIP[1] <<
"\n"; }
407 if ( almostEqual(distIP, 0.0)) {
408 #ifndef AMREX_USE_GPU
409 if (a_dry_run) { Print() <<
"P2: v0--v2: intersection ~ 0 :: add vIP to F5\n"; }
414 }
else if ( almostEqual(distIP, 1.0)) {
415 #ifndef AMREX_USE_GPU
416 if (a_dry_run) { Print() <<
"P2: v0--v2: intersection ~ 1 :: add vIP to F6\n"; }
426 #ifndef AMREX_USE_GPU
427 if (a_dry_run) { Print() <<
"P2: Add v2 to F1, F4, F6\n"; }
441 #ifndef AMREX_USE_GPU
442 if (a_dry_run) { Print() <<
"P2: v2--v5: add vIP to F1, F6 and F7 :: " << vIP[0] <<
"\n"; }
451 if ( almostEqual(distIP, 0.0)) {
452 #ifndef AMREX_USE_GPU
453 if (a_dry_run) { Print() <<
"P2: v2--v5: intersection ~ 0 :: add vIP to F4\n"; }
458 }
else if ( almostEqual(distIP, 1.0)) {
459 #ifndef AMREX_USE_GPU
460 if (a_dry_run) { Print() <<
"P2: v2--v5: intersection ~ 1 :: add vIP to F2\n"; }
469 #ifndef AMREX_USE_GPU
470 if (a_dry_run) { Print() <<
"P2: Add v5 to F1, F2 and F6\n"; }
484 #ifndef AMREX_USE_GPU
485 if (a_dry_run) { Print() <<
"P2: v5--v7: add vIP to F2, F6 and F7 :: " << vIP[2] <<
"\n"; }
494 if ( almostEqual(distIP, 0.0)) {
495 #ifndef AMREX_USE_GPU
496 if (a_dry_run) { Print() <<
"P2: v5--v7: intersection ~ 0 :: add vIP to F1\n"; }
501 }
else if ( almostEqual(distIP, 1.0)) {
502 #ifndef AMREX_USE_GPU
503 if (a_dry_run) { Print() <<
"P2: v5--v7: intersection ~ 1 :: add vIP to F3\n"; }
510 if (cuts == 2 && add_v7) {
512 #ifndef AMREX_USE_GPU
513 if (a_dry_run) { Print() <<
"P2: Add v7 to F2, F3 and F6\n"; }
530 #ifndef AMREX_USE_GPU
531 if (a_dry_run) { Print() <<
"P5: v2--v6: add vIP to F4, F6 and F7 :: " << vIP[2] <<
"\n"; }
540 if ( almostEqual(distIP, 0.0)) {
541 #ifndef AMREX_USE_GPU
542 if (a_dry_run) { Print() <<
"P5: v2--v6: intersection ~ 0 :: add vIP to F1\n"; }
547 }
else if ( almostEqual(distIP, 1.0)) {
548 #ifndef AMREX_USE_GPU
549 if (a_dry_run) { Print() <<
"P5: v2--v6: intersection ~ 1 :: add vIP to F3\n"; }
564 #ifndef AMREX_USE_GPU
565 if (a_dry_run) { Print() <<
"P3: v0--v3: add vIP to F4, F5 and F7 :: " << vIP[2] <<
"\n"; }
574 if ( almostEqual(distIP, 0.0)) {
575 #ifndef AMREX_USE_GPU
576 if (a_dry_run) { Print() <<
"P3: v0--v3: intersection ~ 0 :: add vIP to F1\n"; }
581 }
else if ( almostEqual(distIP, 1.0)) {
582 #ifndef AMREX_USE_GPU
583 if (a_dry_run) { Print() <<
"P3: v0--v3: intersection ~ 1 :: add vIP to F3\n"; }
593 #ifndef AMREX_USE_GPU
594 if (a_dry_run) { Print() <<
"P3: Add v3 to F3, F4 and F5\n"; }
608 #ifndef AMREX_USE_GPU
609 if (a_dry_run) { Print() <<
"P3: v3--v6: add vIP to F3, F4 and F7 :: " << vIP[1] <<
"\n"; }
618 if ( almostEqual(distIP, 0.0)) {
619 #ifndef AMREX_USE_GPU
620 if (a_dry_run) { Print() <<
"P3: v3--v6: intersection ~ 0 :: add vIP to F5\n"; }
625 }
else if ( almostEqual(distIP, 1.0)) {
626 #ifndef AMREX_USE_GPU
627 if (a_dry_run) { Print() <<
"P3: v3--v6: intersection ~ 1 :: add vIP to F6\n"; }
637 #ifndef AMREX_USE_GPU
638 if (a_dry_run) { Print() <<
"P3: Add v6 to F3, F4 and F6\n"; }
652 #ifndef AMREX_USE_GPU
653 if (a_dry_run) { Print() <<
"P3: v6--v7: add vIP to F3, F6 and F7 :: " << vIP[0] <<
"\n"; }
662 if ( almostEqual(distIP, 0.0)) {
663 #ifndef AMREX_USE_GPU
664 if (a_dry_run) { Print() <<
"P3: v6--v7: intersection ~ 0 :: add vIP to F4\n"; }
669 }
else if ( almostEqual(distIP, 1.0)) {
670 #ifndef AMREX_USE_GPU
671 if (a_dry_run) { Print() <<
"P3: v6--v7: intersection ~ 1 :: add vIP to F2\n"; }
678 if (cuts == 2 && add_v7) {
680 #ifndef AMREX_USE_GPU
681 if (a_dry_run) { Print() <<
"P1: Add v7 to F2, F3 and F6\n"; }
696 #ifndef AMREX_USE_GPU
697 if (a_dry_run) { Print() <<
"P6: v3--v4: add vIP to F3, F5 and F7 :: " << vIP[0] <<
"\n"; }
706 if ( almostEqual(distIP, 0.0)) {
707 #ifndef AMREX_USE_GPU
708 if (a_dry_run) { Print() <<
"P6: v3--v4: intersection ~ 0 :: add vIP to F4\n"; }
713 }
else if ( almostEqual(distIP, 1.0)) {
714 #ifndef AMREX_USE_GPU
715 if (a_dry_run) { Print() <<
"P6: v3--v4: intersection ~ 1 :: add vIP to F2\n"; }
AMREX_GPU_HOST_DEVICE void add_vertex(amrex::RealVect const &a_v)
Definition: ERF_EBPolygon.H:43
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int intersect_plane_edge(amrex::RealVect const &a_plane_point, amrex::RealVect const &a_plane_normal, amrex::RealVect const &a_edge_point0, amrex::RealVect const &a_edge_point1, amrex::RealVect &a_intersection_point, amrex::Real &a_intersection_dist)
Definition: ERF_EBUtils.H:30