From 0fba28fb8dd768c037b60a02bd6a20bb7814bb92 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 2 Jul 2023 16:57:12 -0500 Subject: [PATCH] Test fe/fe_enriched_color_07: make test less expensive --- tests/fe/fe_enriched_color_07.cc | 261 ++++++++---------- ...omplex=false.with_gsl=true.mpirun=2.output | 7 - 2 files changed, 111 insertions(+), 157 deletions(-) diff --git a/tests/fe/fe_enriched_color_07.cc b/tests/fe/fe_enriched_color_07.cc index e4cbd66b02..fc2488ad4c 100644 --- a/tests/fe/fe_enriched_color_07.cc +++ b/tests/fe/fe_enriched_color_07.cc @@ -1846,158 +1846,119 @@ main(int argc, char **argv) { Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); MPILogInitAll all; - { - /* - * Case 1: single source with known solution - */ - { - ParameterCollection prm( - 2, // dimension - 2, // domain size - 1, // cube shape - 3, // global refinement - 5, // num of cycles grid is refined and solved again - 1, // fe base degree - 1, // fe enriched degree - 50000, // max iterations - 1e-9, // tolerance - // rhs value - "-(exp(-(x*x + y*y)/(2*sigma*sigma))*(- 2*sigma*sigma + x*x + y*y))/(2*sigma*sigma*sigma*sigma*sigma*sigma*pi)", - // boundary value - "1.0/(2*pi*sigma*sigma)*exp(-(x*x + y*y)/(2*sigma*sigma))", - // rhs value for radial problem solved to find enrichment function - "-(exp(-(x*x)/(2*sigma*sigma))*(- 2*sigma*sigma + x*x))/(2*sigma*sigma*sigma*sigma*sigma*sigma*pi)", - // boundary value for radial problem - "1.0/(2*pi*sigma*sigma)*exp(-(x*x)/(2*sigma*sigma))", - // exact solution expression. If null nothing is done - "1.0/(2*pi*sigma*sigma)*exp(-(x*x + y*y)/(2*sigma*sigma))", - 1, // patches - 1, // debug level - 1, // num enrichments - // enrichment points interpreted 2 at a time if dimension is 2 - {0, 0}, - // radii defining different predicates - {0.4}, - // sigmas defining different predicates - {0.1}); - - - if (prm.dim == 2) - { - LaplaceProblem<2> problem(prm); - problem.run(); - } - else if (prm.dim == 3) - { - LaplaceProblem<3> problem(prm); - problem.run(); - } - else - AssertThrow(false, - ExcMessage("Dimension incorrect. dim can be 2 or 3")); - } - + /* + * Case 1: single source with known solution + */ + { + ParameterCollection prm( + 2, // dimension + 2, // domain size + 1, // cube shape + 3, // global refinement + 2, // num of cycles grid is refined and solved again + 1, // fe base degree + 1, // fe enriched degree + 50000, // max iterations + 1e-9, // tolerance + // rhs value + "-(exp(-(x*x + y*y)/(2*sigma*sigma))*(- 2*sigma*sigma + x*x + y*y))/(2*sigma*sigma*sigma*sigma*sigma*sigma*pi)", + // boundary value + "1.0/(2*pi*sigma*sigma)*exp(-(x*x + y*y)/(2*sigma*sigma))", + // rhs value for radial problem solved to find enrichment function + "-(exp(-(x*x)/(2*sigma*sigma))*(- 2*sigma*sigma + x*x))/(2*sigma*sigma*sigma*sigma*sigma*sigma*pi)", + // boundary value for radial problem + "1.0/(2*pi*sigma*sigma)*exp(-(x*x)/(2*sigma*sigma))", + // exact solution expression. If null nothing is done + "1.0/(2*pi*sigma*sigma)*exp(-(x*x + y*y)/(2*sigma*sigma))", + 1, // patches + 1, // debug level + 1, // num enrichments + // enrichment points interpreted 2 at a time if dimension is 2 + {0, 0}, + // radii defining different predicates + {0.4}, + // sigmas defining different predicates + {0.1}); + + LaplaceProblem<2> problem(prm); + problem.run(); + } - /* - * Case 2: 3 sources - */ - { - ParameterCollection prm( - 2, // dimension - 4, // domain size - 1, // cube shape - 3, // global refinement - 4, // num of cycles grid is refined and solved again - 1, // fe base degree - 1, // fe enriched degree - 50000, // max iterations - 1e-9, // tolerance - // rhs value - "1.0/(2*pi*sigma*sigma)*exp(-(x*x + y*y)/(2*sigma*sigma))", - // boundary value - "0", - // rhs value for radial problem solved to find enrichment function - "1.0/(2*pi*sigma*sigma)*exp(-(x*x)/(2*sigma*sigma))", - // boundary value for radial problem - "0", - // exact solution expression. If null nothing is done - "", - 1, // patches - 1, // debug level - 3, // num enrichments - // enrichment points interpreted 2 at a time if dimension is 2 - {0.5, 0.5, 0, 0, -1, -1}, - // radii defining different predicates - {0.4, 0.4, 0.4}, - // sigmas defining different predicates - {0.1, 0.1, 0.1}); - - - if (prm.dim == 2) - { - LaplaceProblem<2> problem(prm); - problem.run(); - } - else if (prm.dim == 3) - { - LaplaceProblem<3> problem(prm); - problem.run(); - } - else - AssertThrow(false, - ExcMessage("Dimension incorrect. dim can be 2 or 3")); - } - + /* + * Case 2: 3 sources + */ + { + ParameterCollection prm( + 2, // dimension + 4, // domain size + 1, // cube shape + 3, // global refinement + 1, // num of cycles grid is refined and solved again + 1, // fe base degree + 1, // fe enriched degree + 50000, // max iterations + 1e-9, // tolerance + // rhs value + "1.0/(2*pi*sigma*sigma)*exp(-(x*x + y*y)/(2*sigma*sigma))", + // boundary value + "0", + // rhs value for radial problem solved to find enrichment function + "1.0/(2*pi*sigma*sigma)*exp(-(x*x)/(2*sigma*sigma))", + // boundary value for radial problem + "0", + // exact solution expression. If null nothing is done + "", + 1, // patches + 1, // debug level + 3, // num enrichments + // enrichment points interpreted 2 at a time if dimension is 2 + {0.5, 0.5, 0, 0, -1, -1}, + // radii defining different predicates + {0.4, 0.4, 0.4}, + // sigmas defining different predicates + {0.1, 0.1, 0.1}); + + + LaplaceProblem<2> problem(prm); + problem.run(); + } - /* - * Case 3: five sources 3d - */ - { - ParameterCollection prm( - 3, // dimension - 8, // domain size - 1, // cube shape - 4, // global refinement - 2, // num of cycles grid is refined and solved again - 1, // fe base degree - 1, // fe enriched degree - 50000, // max iterations - 1e-9, // tolerance - // rhs value - "1.0/(2*pi*sigma*sigma)*exp(-(x*x + y*y + z*z)/(2*sigma*sigma))", - // boundary value - "0", - // rhs value for radial problem solved to find enrichment function - "1.0/(2*pi*sigma*sigma)*exp(-(x*x)/(2*sigma*sigma))", - // boundary value for radial problem - "0", - // exact solution expression. If null nothing is done - "", - 1, // patches - 1, // debug level - 5, // num enrichments - // enrichment points interpreted 3 at a time if dimension is 3 - {1.5, 1.5, 1.5, 1, 1, 1, 0, 0, 0, -1, -1, -1, 1, -1, -1}, - // radii defining different predicates - {0.45, 0.45, 0.45, 0.45, 0.45}, - // sigmas defining different predicates - {0.1, 0.1, 0.1, 0.1, 0.1}); - - - if (prm.dim == 2) - { - LaplaceProblem<2> problem(prm); - problem.run(); - } - else if (prm.dim == 3) - { - LaplaceProblem<3> problem(prm); - problem.run(); - } - else - AssertThrow(false, - ExcMessage("Dimension incorrect. dim can be 2 or 3")); - } + /* + * Case 3: five sources 3d + */ + { + ParameterCollection prm( + 3, // dimension + 8, // domain size + 1, // cube shape + 4, // global refinement + 0, // num of cycles grid is refined and solved again + 1, // fe base degree + 1, // fe enriched degree + 50000, // max iterations + 1e-9, // tolerance + // rhs value + "1.0/(2*pi*sigma*sigma)*exp(-(x*x + y*y + z*z)/(2*sigma*sigma))", + // boundary value + "0", + // rhs value for radial problem solved to find enrichment function + "1.0/(2*pi*sigma*sigma)*exp(-(x*x)/(2*sigma*sigma))", + // boundary value for radial problem + "0", + // exact solution expression. If null nothing is done + "", + 1, // patches + 1, // debug level + 5, // num enrichments + // enrichment points interpreted 3 at a time if dimension is 3 + {1.5, 1.5, 1.5, 1, 1, 1, 0, 0, 0, -1, -1, -1, 1, -1, -1}, + // radii defining different predicates + {0.45, 0.45, 0.45, 0.45, 0.45}, + // sigmas defining different predicates + {0.1, 0.1, 0.1, 0.1, 0.1}); + + LaplaceProblem<3> problem(prm); + problem.run(); } } diff --git a/tests/fe/fe_enriched_color_07.with_trilinos=true.with_muparser=true.with_trilinos_with_zoltan=true.with_petsc=true.with_petsc_with_complex=false.with_gsl=true.mpirun=2.output b/tests/fe/fe_enriched_color_07.with_trilinos=true.with_muparser=true.with_trilinos_with_zoltan=true.with_petsc=true.with_petsc_with_complex=false.with_gsl=true.mpirun=2.output index c5bd2f26c5..ddb84419f2 100644 --- a/tests/fe/fe_enriched_color_07.with_trilinos=true.with_muparser=true.with_trilinos_with_zoltan=true.with_petsc=true.with_petsc_with_complex=false.with_gsl=true.mpirun=2.output +++ b/tests/fe/fe_enriched_color_07.with_trilinos=true.with_muparser=true.with_trilinos_with_zoltan=true.with_petsc=true.with_petsc_with_complex=false.with_gsl=true.mpirun=2.output @@ -1,14 +1,7 @@ DEAL:0::Solving problem with number of sources: 1 DEAL:0::1 -DEAL:0::1 -DEAL:0::1 -DEAL:0::1 DEAL:0::Solving problem with number of sources: 3 -DEAL:0::1 -DEAL:0::1 -DEAL:0::1 DEAL:0::Solving problem with number of sources: 5 -DEAL:0::1 -- 2.39.5