MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / testTransformations

Function testTransformations

Tests/Particles/ParticleTransformations/main.cpp:671–719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

669}
670
671void testTransformations ()
672{
673 BL_PROFILE("testTransformations");
674 TestParams params;
675 get_test_params(params, "transform");
676
677 RealBox real_box;
678 for (int n = 0; n < BL_SPACEDIM; n++)
679 {
680 real_box.setLo(n, 0.0);
681 real_box.setHi(n, params.size[n]);
682 }
683
684 IntVect domain_lo(AMREX_D_DECL(0, 0, 0));
685 IntVect domain_hi(AMREX_D_DECL(params.size[0]-1,params.size[1]-1,params.size[2]-1));
686 const Box domain(domain_lo, domain_hi);
687
688 int coord = 0;
689 int is_per[] = {AMREX_D_DECL(1,1,1)};
690 Geometry geom(domain, &real_box, coord, is_per);
691
692 BoxArray ba(domain);
693 ba.maxSize(params.max_grid_size);
694 DistributionMapping dm(ba);
695
696 TestParticleContainer pc(geom, dm, ba);
697
698 IntVect nppc(params.num_ppc);
699
700 if (ParallelDescriptor::MyProc() == dm[0]) {
701 amrex::Print() << "About to initialize particles \n";
702 }
703
704 pc.InitParticles(nppc);
705
706 testTransform(pc);
707
708 testFilter(pc);
709
710 testFilterAndTransform(pc);
711
712 testFilterAndTransformWithOffsets(pc);
713
714 testTwoWayTransform(pc);
715
716 testTwoWayFilterAndTransform(pc);
717
718 amrex::Print() << "pass \n";
719}

Callers 1

mainFunction · 0.85

Calls 12

PrintClass · 0.85
testTransformFunction · 0.85
testFilterFunction · 0.85
testFilterAndTransformFunction · 0.85
testTwoWayTransformFunction · 0.85
get_test_paramsFunction · 0.70
MyProcFunction · 0.50
setLoMethod · 0.45
setHiMethod · 0.45
InitParticlesMethod · 0.45

Tested by

no test coverage detected