diff --git a/.gitignore b/.gitignore index 8875dedda98..55c63525107 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,11 @@ BLProfParser.lex.yy.cpp BLProfParser.tab.H BLProfParser.tab.cpp BLProfParserNC.y + +# Regtests +ChangeLog.AMReX +git.AMReX.HEAD +git.AMReX.out +fboxinfo.make.out +fcompare.make.out +fsnapshot.make.out diff --git a/Tests/LinearSolvers/CellEB2/MyTest.H b/Tests/LinearSolvers/CellEB2/MyTest.H index c91c3d5cc11..d1e32f567e0 100644 --- a/Tests/LinearSolvers/CellEB2/MyTest.H +++ b/Tests/LinearSolvers/CellEB2/MyTest.H @@ -28,6 +28,9 @@ private: int max_level = 0; int ref_ratio = 2; int n_cell = 128; + int n_cell_x = 128; + int n_cell_y = 128; + int n_cell_z = 128; int max_grid_size = 64; int prob_type = 2; diff --git a/Tests/LinearSolvers/CellEB2/MyTest.cpp b/Tests/LinearSolvers/CellEB2/MyTest.cpp index 8b9bb19d38b..beeb3ee90b4 100644 --- a/Tests/LinearSolvers/CellEB2/MyTest.cpp +++ b/Tests/LinearSolvers/CellEB2/MyTest.cpp @@ -170,7 +170,7 @@ MyTest::solve () MultiFab::Multiply(mf, vfrc, 0, 0, 1, 0); Real norminf = mf.norm0(); - Real norm1 = mf.norm1()*AMREX_D_TERM((1.0/n_cell), *(1.0/n_cell), *(1.0/n_cell)); + Real norm1 = mf.norm1()*AMREX_D_TERM((1.0/n_cell_x), *(1.0/n_cell_y), *(1.0/n_cell_z)); amrex::Print() << "Level " << ilev << ": weighted max and 1 norms " << norminf << ", " << norm1 << '\n'; } } @@ -231,6 +231,15 @@ MyTest::readParameters () ParmParse pp; pp.query("max_level", max_level); pp.query("n_cell", n_cell); + if (!pp.query("n_cell_x", n_cell_x)) { + n_cell_x = n_cell; + } + if (!pp.query("n_cell_y", n_cell_y)) { + n_cell_y = n_cell; + } + if (!pp.query("n_cell_z", n_cell_z)) { + n_cell_z = n_cell; + } pp.query("max_grid_size", max_grid_size); pp.query("prob_type", prob_type); @@ -276,7 +285,7 @@ MyTest::initGrids () RealBox rb({AMREX_D_DECL(0.,0.,0.)}, {AMREX_D_DECL(1.,1.,1.)}); std::array isperiodic{AMREX_D_DECL(0,0,0)}; Geometry::Setup(&rb, 0, isperiodic.data()); - Box domain0(IntVect{AMREX_D_DECL(0,0,0)}, IntVect{AMREX_D_DECL(n_cell-1,n_cell-1,n_cell-1)}); + Box domain0(IntVect{AMREX_D_DECL(0,0,0)}, IntVect{AMREX_D_DECL(n_cell_x-1,n_cell_y-1,n_cell_z-1)}); Box domain = domain0; for (int ilev = 0; ilev < nlevels; ++ilev) { diff --git a/Tests/LinearSolvers/CellEB2/inputs.rt.2d.aniso b/Tests/LinearSolvers/CellEB2/inputs.rt.2d.aniso new file mode 100644 index 00000000000..764765d36d6 --- /dev/null +++ b/Tests/LinearSolvers/CellEB2/inputs.rt.2d.aniso @@ -0,0 +1,34 @@ +amrex.fpe_trap_invalid = 1 + +composite_solve = 0 + +#max_coarsening_level = 0 +reltol = 1.e-12 + +prob_type = 1 + +max_level = 1 + +n_cell_x = 96 +n_cell_y = 176 + +max_grid_size = 64 +eb2.max_grid_size = 32 +eb2.num_coarsen_opt = 3 + +eb2.geom_type = sphere +eb2.sphere_center = 0.5 0.5 0.5 +eb2.sphere_radius = 0.4 +eb2.sphere_has_fluid_inside = 1 + +eb2.geom_type = box +eb2.box_lo = 0.2 0.2 0.2 +eb2.box_hi = 0.8 0.8 0.8 +eb2.box_has_fluid_inside = 1 + +eb2.geom_type = flower + +eb2.geom_type = rotated_box + +# choose geom_type +eb2.geom_type = flower diff --git a/Tests/LinearSolvers/CellEB2/inputs.rt.3d.aniso b/Tests/LinearSolvers/CellEB2/inputs.rt.3d.aniso new file mode 100644 index 00000000000..c0e3603216c --- /dev/null +++ b/Tests/LinearSolvers/CellEB2/inputs.rt.3d.aniso @@ -0,0 +1,35 @@ +amrex.fpe_trap_invalid = 1 + +composite_solve = 1 + +#max_coarsening_level = 0 +reltol = 1.e-12 + +prob_type = 2 + +max_level = 1 + +n_cell_x = 96 +n_cell_y = 176 +n_cell_z = 128 + +max_grid_size = 64 +eb2.max_grid_size = 32 +eb2.num_coarsen_opt = 3 + +eb2.geom_type = sphere +eb2.sphere_center = 0.5 0.5 0.5 +eb2.sphere_radius = 0.4 +eb2.sphere_has_fluid_inside = 1 + +eb2.geom_type = box +eb2.box_lo = 0.2 0.2 0.2 +eb2.box_hi = 0.8 0.8 0.8 +eb2.box_has_fluid_inside = 1 + +eb2.geom_type = flower + +eb2.geom_type = rotated_box + +# choose geom_type +eb2.geom_type = flower diff --git a/Tools/RegressionTesting/AMReX-cuda-tests.ini b/Tools/RegressionTesting/AMReX-cuda-tests.ini index 21ed2381a30..66867f9fabf 100644 --- a/Tools/RegressionTesting/AMReX-cuda-tests.ini +++ b/Tools/RegressionTesting/AMReX-cuda-tests.ini @@ -143,6 +143,23 @@ doVis = 0 outputFile = plot testSrcTree = C_Src +[EB_Cell_Dir_2D_Aniso] +addToCompileString = USE_CUDA=TRUE +tolerance = 6.e-11 +runtime_params = gpu_regtest=1 +buildDir = Tests/LinearSolvers/CellEB2 +inputFile = inputs.rt.2d.aniso +dim = 2 +restartTest = 0 +useMPI = 1 +numprocs = 2 +useOMP = 0 +numthreads = 2 +compileTest = 0 +doVis = 0 +outputFile = plot +testSrcTree = C_Src + [EB_Cell_Dir_3D] addToCompileString = USE_CUDA=TRUE tolerance = 1.e-13 @@ -160,6 +177,23 @@ doVis = 0 outputFile = plot testSrcTree = C_Src +[EB_Cell_Dir_3D_Aniso] +addToCompileString = USE_CUDA=TRUE +tolerance = 1.e-13 +runtime_params = eb2.geom_type=rotated_box gpu_regtest=1 +buildDir = Tests/LinearSolvers/CellEB2 +inputFile = inputs.rt.3d.aniso +dim = 3 +restartTest = 0 +useMPI = 1 +numprocs = 4 +useOMP = 0 +numthreads = 2 +compileTest = 0 +doVis = 0 +outputFile = plot +testSrcTree = C_Src + [EB_Cell_Neu_2D] addToCompileString = USE_CUDA=TRUE tolerance = 1.e-12 diff --git a/Tools/RegressionTesting/AMReX-hip-tests.ini b/Tools/RegressionTesting/AMReX-hip-tests.ini index cb7f7bef4b2..6358b893fce 100644 --- a/Tools/RegressionTesting/AMReX-hip-tests.ini +++ b/Tools/RegressionTesting/AMReX-hip-tests.ini @@ -141,6 +141,23 @@ doVis = 0 outputFile = plot testSrcTree = C_Src +[EB_Cell_Dir_2D_Aniso] +addToCompileString = USE_CUDA=FALSE USE_HIP=TRUE +tolerance = 3.e-8 +runtime_params = gpu_regtest=1 +buildDir = Tests/LinearSolvers/CellEB2 +inputFile = inputs.rt.2d.aniso +dim = 2 +restartTest = 0 +useMPI = 0 +numprocs = 2 +useOMP = 0 +numthreads = 2 +compileTest = 0 +doVis = 0 +outputFile = plot +testSrcTree = C_Src + [EB_Cell_Dir_3D] addToCompileString = USE_CUDA=FALSE USE_HIP=TRUE tolerance = 3.e-13 @@ -158,6 +175,23 @@ doVis = 0 outputFile = plot testSrcTree = C_Src +[EB_Cell_Dir_3D_Aniso] +addToCompileString = USE_CUDA=FALSE USE_HIP=TRUE +tolerance = 3.e-13 +runtime_params = eb2.geom_type=rotated_box gpu_regtest=1 +buildDir = Tests/LinearSolvers/CellEB2 +inputFile = inputs.rt.3d.aniso +dim = 3 +restartTest = 0 +useMPI = 0 +numprocs = 4 +useOMP = 0 +numthreads = 2 +compileTest = 0 +doVis = 0 +outputFile = plot +testSrcTree = C_Src + [EB_Cell_Neu_2D] addToCompileString = USE_CUDA=FALSE USE_HIP=TRUE tolerance = 1.e-12 diff --git a/Tools/RegressionTesting/AMReX-sycl-tests.ini b/Tools/RegressionTesting/AMReX-sycl-tests.ini index 0f23ab8140f..9594701f502 100644 --- a/Tools/RegressionTesting/AMReX-sycl-tests.ini +++ b/Tools/RegressionTesting/AMReX-sycl-tests.ini @@ -90,6 +90,23 @@ doVis = 0 outputFile = plot testSrcTree = C_Src +[EB_Cell_Dir_2D_Aniso] +addToCompileString = USE_CUDA=FALSE USE_HIP=FALSE USE_SYCL=TRUE +tolerance = 2.e-12 +runtime_params = gpu_regtest=1 +buildDir = Tests/LinearSolvers/CellEB2 +inputFile = inputs.rt.2d.aniso +dim = 2 +restartTest = 0 +useMPI = 0 +numprocs = 2 +useOMP = 0 +numthreads = 2 +compileTest = 0 +doVis = 0 +outputFile = plot +testSrcTree = C_Src + [EB_Cell_Dir_3D] addToCompileString = USE_CUDA=FALSE USE_SYCL=TRUE tolerance = 2.e-11 @@ -107,6 +124,23 @@ doVis = 0 outputFile = plot testSrcTree = C_Src +[EB_Cell_Dir_3D_Aniso] +addToCompileString = USE_CUDA=FALSE USE_SYCL=TRUE +tolerance = 2.e-11 +runtime_params = eb2.geom_type=rotated_box gpu_regtest=1 +buildDir = Tests/LinearSolvers/CellEB2 +inputFile = inputs.rt.3d.aniso +dim = 3 +restartTest = 0 +useMPI = 0 +numprocs = 4 +useOMP = 0 +numthreads = 2 +compileTest = 0 +doVis = 0 +outputFile = plot +testSrcTree = C_Src + [EB_Cell_Neu_2D] addToCompileString = USE_CUDA=FALSE USE_SYCL=TRUE tolerance = 7.e-12 diff --git a/Tools/RegressionTesting/AMReX-tests.ini b/Tools/RegressionTesting/AMReX-tests.ini index c80ebd35e4a..3f6f33c2b2a 100644 --- a/Tools/RegressionTesting/AMReX-tests.ini +++ b/Tools/RegressionTesting/AMReX-tests.ini @@ -259,6 +259,20 @@ doVis = 0 outputFile = plot testSrcTree = C_Src +[EB_Cell_Dir_2D_Aniso] +buildDir = Tests/LinearSolvers/CellEB2 +inputFile = inputs.rt.2d.aniso +dim = 2 +restartTest = 0 +useMPI = 1 +numprocs = 2 +useOMP = 0 +numthreads = 2 +compileTest = 0 +doVis = 0 +outputFile = plot +testSrcTree = C_Src + [EB_Cell_Dir_3D] buildDir = Tests/LinearSolvers/CellEB2 inputFile = inputs.rt.3d @@ -273,6 +287,20 @@ doVis = 0 outputFile = plot testSrcTree = C_Src +[EB_Cell_Dir_3D_Aniso] +buildDir = Tests/LinearSolvers/CellEB2 +inputFile = inputs.rt.3d.aniso +dim = 3 +restartTest = 0 +useMPI = 1 +numprocs = 2 +useOMP = 1 +numthreads = 2 +compileTest = 0 +doVis = 0 +outputFile = plot +testSrcTree = C_Src + [EB_Cell_Dir_3D_Hypre] buildDir = Tests/LinearSolvers/CellEB2 inputFile = inputs.rt.hypre