From: Jaeryun Yim Date: Fri, 30 Sep 2016 07:21:09 +0000 (+0900) Subject: Edit the codes for the tests. X-Git-Tag: v8.5.0-rc1~624^2~5 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a43ee18af731eeac5b8d6b6ad13c9d7faffeee93;p=dealii.git Edit the codes for the tests. - remove the macros: '#define PRECISION' - edit spacings --- diff --git a/tests/fe/p1nc_01.cc b/tests/fe/p1nc_01.cc index f6412b254a..21dc20174f 100644 --- a/tests/fe/p1nc_01.cc +++ b/tests/fe/p1nc_01.cc @@ -30,8 +30,6 @@ #include #include -#define PRECISION 5 - template @@ -64,7 +62,7 @@ int main() { std::ofstream logfile ("output"); - deallog << std::setprecision(PRECISION); + deallog << std::setprecision(5); deallog << std::fixed; deallog.attach(logfile); deallog.depth_console(0); @@ -72,6 +70,3 @@ main() check<2>(); } - - - diff --git a/tests/fe/p1nc_02.cc b/tests/fe/p1nc_02.cc index 89662baaed..fc506d383f 100644 --- a/tests/fe/p1nc_02.cc +++ b/tests/fe/p1nc_02.cc @@ -31,16 +31,15 @@ #include #include -#define PRECISION 5 template Point stretch (const Point &p) { - Point q = p ; - q(dim-1) *= 2. ; + Point q = p; + q(dim-1) *= 2.; - return q ; + return q; } @@ -51,7 +50,7 @@ check() { Triangulation triangulation; GridGenerator::hyper_cube (triangulation, 0., 5.); - GridTools::transform (&stretch, triangulation) ; + GridTools::transform (&stretch, triangulation); FE_P1NC fe; DoFHandler dof_handler (triangulation); @@ -76,7 +75,7 @@ int main() { std::ofstream logfile ("output"); - deallog << std::setprecision(PRECISION); + deallog << std::setprecision(5); deallog << std::fixed; deallog.attach(logfile); deallog.depth_console(0); @@ -84,6 +83,3 @@ main() check<2>(); } - - - diff --git a/tests/fe/p1nc_03.cc b/tests/fe/p1nc_03.cc index 277926a11a..d77119f3a4 100644 --- a/tests/fe/p1nc_03.cc +++ b/tests/fe/p1nc_03.cc @@ -31,20 +31,19 @@ #include #include -#define PRECISION 5 template Point affine (const Point &p) { - Point q = p ; + Point q = p; if (dim>=2) { - q(0) = 2.*p(0) + p(1) ; - q(1) = p(0) + 3.*p(1) ; + q(0) = 2.*p(0) + p(1); + q(1) = p(0) + 3.*p(1); } - return q ; + return q; } @@ -55,7 +54,7 @@ check() { Triangulation triangulation; GridGenerator::hyper_cube (triangulation, 0., 1.); - GridTools::transform (&affine, triangulation) ; + GridTools::transform (&affine, triangulation); FE_P1NC fe; DoFHandler dof_handler (triangulation); @@ -80,7 +79,7 @@ int main() { std::ofstream logfile ("output"); - deallog << std::setprecision(PRECISION); + deallog << std::setprecision(5); deallog << std::fixed; deallog.attach(logfile); deallog.depth_console(0); @@ -88,6 +87,3 @@ main() check<2>(); } - - - diff --git a/tests/fe/p1nc_04.cc b/tests/fe/p1nc_04.cc index cd6644681f..6c4a78ba5d 100644 --- a/tests/fe/p1nc_04.cc +++ b/tests/fe/p1nc_04.cc @@ -15,7 +15,7 @@ -// check the P1NC element on a genuine quadrilateral. +// check the P1NC element on a general quadrilateral. #include "../tests.h" #include @@ -31,20 +31,19 @@ #include #include -#define PRECISION 5 template Point bilinear (const Point &p) { - Point q = p ; + Point q = p; if (dim>=2) { - q(0) = 16.*p(0) +4.*p(1) -10.*p(0)*p(1) ; - q(1) = 6.*p(1) +4.*p(0)*p(1) ; + q(0) = 16.*p(0) +4.*p(1) -10.*p(0)*p(1); + q(1) = 6.*p(1) +4.*p(0)*p(1); } - return q ; + return q; } @@ -55,7 +54,7 @@ check() { Triangulation triangulation; GridGenerator::hyper_cube (triangulation, 0., 1.); - GridTools::transform (&bilinear, triangulation) ; + GridTools::transform (&bilinear, triangulation); FE_P1NC fe; DoFHandler dof_handler (triangulation); @@ -80,7 +79,7 @@ int main() { std::ofstream logfile ("output"); - deallog << std::setprecision(PRECISION); + deallog << std::setprecision(5); deallog << std::fixed; deallog.attach(logfile); deallog.depth_console(0); @@ -88,6 +87,3 @@ main() check<2>(); } - - - diff --git a/tests/fe/p1nc_05.cc b/tests/fe/p1nc_05.cc index 2b398210c1..32b09a22ce 100644 --- a/tests/fe/p1nc_05.cc +++ b/tests/fe/p1nc_05.cc @@ -30,8 +30,6 @@ #include #include -#define PRECISION 5 - template @@ -64,7 +62,7 @@ int main() { std::ofstream logfile ("output"); - deallog << std::setprecision(PRECISION); + deallog << std::setprecision(5); deallog << std::fixed; deallog.attach(logfile); deallog.depth_console(0); @@ -72,6 +70,3 @@ main() check<2>(); } - - - diff --git a/tests/fe/p1nc_06.cc b/tests/fe/p1nc_06.cc index 2fe5c5e7e1..81902b8223 100644 --- a/tests/fe/p1nc_06.cc +++ b/tests/fe/p1nc_06.cc @@ -31,16 +31,15 @@ #include #include -#define PRECISION 5 template Point stretch (const Point &p) { - Point q = p ; - q(dim-1) *= 2. ; + Point q = p; + q(dim-1) *= 2.; - return q ; + return q; } @@ -51,7 +50,7 @@ check() { Triangulation triangulation; GridGenerator::hyper_cube (triangulation, 0., 5.); - GridTools::transform (&stretch, triangulation) ; + GridTools::transform (&stretch, triangulation); FE_P1NC fe; DoFHandler dof_handler (triangulation); @@ -76,7 +75,7 @@ int main() { std::ofstream logfile ("output"); - deallog << std::setprecision(PRECISION); + deallog << std::setprecision(5); deallog << std::fixed; deallog.attach(logfile); deallog.depth_console(0); @@ -84,6 +83,3 @@ main() check<2>(); } - - - diff --git a/tests/fe/p1nc_07.cc b/tests/fe/p1nc_07.cc index 119c74ff6d..e582cfb42a 100644 --- a/tests/fe/p1nc_07.cc +++ b/tests/fe/p1nc_07.cc @@ -31,20 +31,19 @@ #include #include -#define PRECISION 5 template Point affine (const Point &p) { - Point q = p ; + Point q = p; if (dim>=2) { - q(0) = 2.*p(0) + p(1) ; - q(1) = p(0) + 3.*p(1) ; + q(0) = 2.*p(0) + p(1); + q(1) = p(0) + 3.*p(1); } - return q ; + return q; } @@ -55,7 +54,7 @@ check() { Triangulation triangulation; GridGenerator::hyper_cube (triangulation, 0., 1.); - GridTools::transform (&affine, triangulation) ; + GridTools::transform (&affine, triangulation); FE_P1NC fe; DoFHandler dof_handler (triangulation); @@ -80,7 +79,7 @@ int main() { std::ofstream logfile ("output"); - deallog << std::setprecision(PRECISION); + deallog << std::setprecision(5); deallog << std::fixed; deallog.attach(logfile); deallog.depth_console(0); @@ -88,6 +87,3 @@ main() check<2>(); } - - - diff --git a/tests/fe/p1nc_08.cc b/tests/fe/p1nc_08.cc index 8a5a3babbf..e229680a24 100644 --- a/tests/fe/p1nc_08.cc +++ b/tests/fe/p1nc_08.cc @@ -31,20 +31,19 @@ #include #include -#define PRECISION 5 template Point bilinear (const Point &p) { - Point q = p ; + Point q = p; if (dim>=2) { - q(0) = 16.*p(0) +4.*p(1) -10.*p(0)*p(1) ; - q(1) = 6.*p(1) +4.*p(0)*p(1) ; + q(0) = 16.*p(0) +4.*p(1) -10.*p(0)*p(1); + q(1) = 6.*p(1) +4.*p(0)*p(1); } - return q ; + return q; } @@ -55,7 +54,7 @@ check() { Triangulation triangulation; GridGenerator::hyper_cube (triangulation, 0., 1.); - GridTools::transform (&bilinear, triangulation) ; + GridTools::transform (&bilinear, triangulation); FE_P1NC fe; DoFHandler dof_handler (triangulation); @@ -80,7 +79,7 @@ int main() { std::ofstream logfile ("output"); - deallog << std::setprecision(PRECISION); + deallog << std::setprecision(5); deallog << std::fixed; deallog.attach(logfile); deallog.depth_console(0); @@ -88,6 +87,3 @@ main() check<2>(); } - - -