From: Daniel Arndt Date: Wed, 11 Jul 2018 11:46:24 +0000 (+0200) Subject: Fix quick_tests X-Git-Tag: v9.1.0-rc1~924^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff70b7e0e3ac97afdc3ec07be1c735e13ff2580d;p=dealii.git Fix quick_tests --- diff --git a/tests/quick_tests/hdf5.cc b/tests/quick_tests/hdf5.cc index 8ff072827d..595a616a9d 100644 --- a/tests/quick_tests/hdf5.cc +++ b/tests/quick_tests/hdf5.cc @@ -16,10 +16,11 @@ // Test HDF5. Copy-paste from // https://support.hdfgroup.org/HDF5/Tutor/crtfile.html +#include + #include #include - int main() { @@ -31,5 +32,6 @@ main() /* Terminate access to the file. */ status = H5Fclose(file_id); + AssertThrow(status >= 0, dealii::ExcInternalError()); std::remove("file.h5"); } diff --git a/tests/quick_tests/step-petsc.cc b/tests/quick_tests/step-petsc.cc index b620e8b967..b9a2f90ef8 100644 --- a/tests/quick_tests/step-petsc.cc +++ b/tests/quick_tests/step-petsc.cc @@ -66,9 +66,9 @@ private: FE_Q<2> fe; DoFHandler<2> dof_handler; - PETScWrappers::SparseMatrix A; - PETScWrappers::MPI::Vector b, x; - AffineConstraints constraints; + PETScWrappers::SparseMatrix A; + PETScWrappers::MPI::Vector b, x; + AffineConstraints constraints; TableHandler output_table; }; @@ -111,8 +111,8 @@ LaplaceProblem::assemble_system() const unsigned int dofs_per_cell = fe.dofs_per_cell; const unsigned int n_q_points = quadrature_formula.size(); - FullMatrix cell_A(dofs_per_cell, dofs_per_cell); - Vector cell_b(dofs_per_cell); + FullMatrix cell_A(dofs_per_cell, dofs_per_cell); + Vector cell_b(dofs_per_cell); std::vector local_dof_indices(dofs_per_cell); diff --git a/tests/quick_tests/step-slepc.cc b/tests/quick_tests/step-slepc.cc index 7150d84e5f..e07fc5fb91 100644 --- a/tests/quick_tests/step-slepc.cc +++ b/tests/quick_tests/step-slepc.cc @@ -67,8 +67,8 @@ private: PETScWrappers::SparseMatrix A, B; std::vector x; - std::vector lambda; - AffineConstraints constraints; + std::vector lambda; + AffineConstraints constraints; TableHandler output_table; }; @@ -117,8 +117,8 @@ LaplaceEigenspectrumProblem::assemble_system() const unsigned int dofs_per_cell = fe.dofs_per_cell; const unsigned int n_q_points = quadrature_formula.size(); - FullMatrix cell_A(dofs_per_cell, dofs_per_cell); - FullMatrix cell_B(dofs_per_cell, dofs_per_cell); + FullMatrix cell_A(dofs_per_cell, dofs_per_cell); + FullMatrix cell_B(dofs_per_cell, dofs_per_cell); std::vector local_dof_indices(dofs_per_cell); @@ -187,8 +187,8 @@ LaplaceEigenspectrumProblem::solve() // some output - output_table.add_value("lambda", lambda[0]); - output_table.add_value("error", std::fabs(2. - lambda[0])); + output_table.add_value("lambda", std::abs(lambda[0])); + output_table.add_value("error", std::fabs(2. - std::abs(lambda[0]))); } void @@ -209,9 +209,9 @@ LaplaceEigenspectrumProblem::run() solve(); // check energy convergence with previous result - AssertThrow(lambda[0] < old_lambda, + AssertThrow(std::abs(lambda[0]) < old_lambda, ExcMessage("solution is not converging")); - old_lambda = lambda[0]; + old_lambda = std::abs(lambda[0]); } // push back analytic result diff --git a/tests/quick_tests/sundials-ida.cc b/tests/quick_tests/sundials-ida.cc index b8c8a15217..38d9878a3d 100644 --- a/tests/quick_tests/sundials-ida.cc +++ b/tests/quick_tests/sundials-ida.cc @@ -74,7 +74,7 @@ public: typedef Vector VectorType; - time_stepper.residual = [&](const double t, + time_stepper.residual = [&](const double /*t*/, const VectorType &y, const VectorType &y_dot, VectorType & res) -> int { @@ -105,10 +105,10 @@ public: return 0; }; - time_stepper.output_step = [&](const double t, - const VectorType & sol, - const VectorType & sol_dot, - const unsigned int step_number) -> int { + time_stepper.output_step = [&](const double /*t*/, + const VectorType & /*sol*/, + const VectorType & /*sol_dot*/, + const unsigned int /*step_number*/) -> int { // In this test, don't output anything. return 0; }; diff --git a/tests/quick_tests/tbb.cc b/tests/quick_tests/tbb.cc index 7c84bcd09f..8afd0b10df 100644 --- a/tests/quick_tests/tbb.cc +++ b/tests/quick_tests/tbb.cc @@ -51,8 +51,8 @@ struct copy_data void assemble(const std::vector::iterator &it, - scratch_data & scratch, - copy_data & data) + scratch_data & /*scratch*/, + copy_data &data) { data.value = (*it); }