From: Martin Kronbichler Date: Tue, 7 Aug 2018 11:23:59 +0000 (+0200) Subject: Remove old logfile from tests. X-Git-Tag: v9.1.0-rc1~841^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7034%2Fhead;p=dealii.git Remove old logfile from tests. --- diff --git a/tests/matrix_free/inverse_mass_01.cc b/tests/matrix_free/inverse_mass_01.cc index e1e87c6ccc..d7de6315b9 100644 --- a/tests/matrix_free/inverse_mass_01.cc +++ b/tests/matrix_free/inverse_mass_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2014 - 2017 by the deal.II authors +// Copyright (C) 2014 - 2018 by the deal.II authors // // This file is part of the deal.II library. // @@ -40,9 +40,6 @@ #include "../tests.h" -std::ofstream logfile("output"); - - template &dof) mf.apply_inverse(inverse, in); - SolverControl control(1000, 1e-12); - // do not output iteration numbers to log file because these are too - // sensitive - std::ostringstream stream; - deallog.attach(stream); + SolverControl control(1000, 1e-12); SolverCG> solver(control); solver.solve(mf, reference, in, PreconditionIdentity()); - deallog.attach(logfile); inverse -= reference; const double diff_norm = inverse.linfty_norm() / reference.linfty_norm(); @@ -223,9 +215,12 @@ test() int main() { - deallog.attach(logfile); + initlog(); deallog << std::setprecision(3); + // do not output CG iteration numbers to log file because these are too + // sensitive + deallog.depth_file(2); { deallog.push("2d"); diff --git a/tests/matrix_free/inverse_mass_01.output b/tests/matrix_free/inverse_mass_01.output index fec289a4b0..19887e1814 100644 --- a/tests/matrix_free/inverse_mass_01.output +++ b/tests/matrix_free/inverse_mass_01.output @@ -1,33 +1,16 @@ DEAL:2d::Testing FE_DGQ<2>(1) - -DEAL:2d::Norm of difference: 0 +DEAL:2d::Norm of difference: 2.21e-13 DEAL:2d:: -DEAL:2d:float::Testing FE_DGQ<2>(1) - -DEAL:2d:float::Norm of difference: 0 -DEAL:2d:float:: DEAL:2d::Testing FE_DGQ<2>(2) - -DEAL:2d::Norm of difference: 0 +DEAL:2d::Norm of difference: 1.29e-13 DEAL:2d:: -DEAL:2d:float::Testing FE_DGQ<2>(2) - -DEAL:2d:float::Norm of difference: 0 -DEAL:2d:float:: DEAL:2d::Testing FE_DGQ<2>(4) - -DEAL:2d::Norm of difference: 0 +DEAL:2d::Norm of difference: 4.60e-14 DEAL:2d:: -DEAL:2d:float::Testing FE_DGQ<2>(4) - -DEAL:2d:float::Norm of difference: 0 -DEAL:2d:float:: DEAL:3d::Testing FE_DGQ<3>(1) - -DEAL:3d::Norm of difference: 0 +DEAL:3d::Norm of difference: 3.27e-14 DEAL:3d:: DEAL:3d::Testing FE_DGQ<3>(2) - -DEAL:3d::Norm of difference: 0 +DEAL:3d::Norm of difference: 1.03e-15 DEAL:3d:: diff --git a/tests/matrix_free/inverse_mass_02.cc b/tests/matrix_free/inverse_mass_02.cc index d105f4f30c..fb3bcad473 100644 --- a/tests/matrix_free/inverse_mass_02.cc +++ b/tests/matrix_free/inverse_mass_02.cc @@ -40,9 +40,6 @@ #include "../tests.h" -std::ofstream logfile("output"); - - template &dof) mf.apply_inverse(inverse, in); - SolverControl control(1000, 1e-12); - std::ostringstream stream; - deallog.attach(stream); + SolverControl control(1000, 1e-12); SolverCG> solver(control); solver.solve(mf, reference, in, PreconditionIdentity()); - deallog.attach(logfile); inverse -= reference; const double diff_norm = inverse.linfty_norm() / reference.linfty_norm(); @@ -207,9 +201,10 @@ test() int main() { - deallog.attach(logfile); + initlog(); deallog << std::setprecision(3); + deallog.depth_file(2); { deallog.push("2d"); diff --git a/tests/matrix_free/inverse_mass_02.output b/tests/matrix_free/inverse_mass_02.output index 7d5a4feb9e..07daa53eb6 100644 --- a/tests/matrix_free/inverse_mass_02.output +++ b/tests/matrix_free/inverse_mass_02.output @@ -1,21 +1,16 @@ DEAL:2d::Testing FESystem<2>[FE_DGQ<2>(1)^2] - -DEAL:2d::Norm of difference: 0 +DEAL:2d::Norm of difference: 5.67e-16 DEAL:2d:: DEAL:2d::Testing FESystem<2>[FE_DGQ<2>(2)^2] - -DEAL:2d::Norm of difference: 0 +DEAL:2d::Norm of difference: 1.01e-14 DEAL:2d:: DEAL:2d::Testing FESystem<2>[FE_DGQ<2>(4)^2] - -DEAL:2d::Norm of difference: 0 +DEAL:2d::Norm of difference: 9.43e-16 DEAL:2d:: DEAL:3d::Testing FESystem<3>[FE_DGQ<3>(1)^3] - -DEAL:3d::Norm of difference: 0 +DEAL:3d::Norm of difference: 1.23e-15 DEAL:3d:: DEAL:3d::Testing FESystem<3>[FE_DGQ<3>(2)^3] - -DEAL:3d::Norm of difference: 0 +DEAL:3d::Norm of difference: 2.30e-15 DEAL:3d:: diff --git a/tests/matrix_free/inverse_mass_03.cc b/tests/matrix_free/inverse_mass_03.cc index f2d3571119..82d5942d67 100644 --- a/tests/matrix_free/inverse_mass_03.cc +++ b/tests/matrix_free/inverse_mass_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2014 - 2017 by the deal.II authors +// Copyright (C) 2014 - 2018 by the deal.II authors // // This file is part of the deal.II library. // @@ -41,9 +41,6 @@ #include "../tests.h" -std::ofstream logfile("output"); - - template &dof) mf.apply_inverse(inverse, in); - SolverControl control(10000, 1e-12); - std::ostringstream stream; - deallog.attach(stream); + SolverControl control(10000, 1e-12); SolverCG> solver(control); solver.solve(mf, reference, in, PreconditionIdentity()); - deallog.attach(logfile); inverse -= reference; const double diff_norm = inverse.linfty_norm() / reference.linfty_norm(); @@ -230,10 +224,14 @@ test() int main() { - deallog.attach(logfile); + initlog(); deallog << std::setprecision(3); + // do not output CG iteration numbers to log file because these are too + // sensitive + deallog.depth_file(2); + { deallog.push("2d"); test<2, 1>(); diff --git a/tests/matrix_free/inverse_mass_03.output b/tests/matrix_free/inverse_mass_03.output index d7d939486b..c0c239bd09 100644 --- a/tests/matrix_free/inverse_mass_03.output +++ b/tests/matrix_free/inverse_mass_03.output @@ -1,21 +1,16 @@ DEAL:2d::Testing FESystem<2>[FE_DGQ<2>(1)^3] - -DEAL:2d::Norm of difference: 0 +DEAL:2d::Norm of difference: 1.57e-13 DEAL:2d:: DEAL:2d::Testing FESystem<2>[FE_DGQ<2>(2)^3] - -DEAL:2d::Norm of difference: 0 +DEAL:2d::Norm of difference: 4.92e-14 DEAL:2d:: DEAL:2d::Testing FESystem<2>[FE_DGQ<2>(4)^3] - -DEAL:2d::Norm of difference: 0 +DEAL:2d::Norm of difference: 6.71e-14 DEAL:2d:: DEAL:3d::Testing FESystem<3>[FE_DGQ<3>(1)^3] - -DEAL:3d::Norm of difference: 0 +DEAL:3d::Norm of difference: 7.04e-14 DEAL:3d:: DEAL:3d::Testing FESystem<3>[FE_DGQ<3>(2)^3] - -DEAL:3d::Norm of difference: 0 +DEAL:3d::Norm of difference: 4.85e-14 DEAL:3d::