From: Martin Kronbichler Date: Sun, 19 Nov 2017 14:54:59 +0000 (+0100) Subject: Add test. X-Git-Tag: v9.0.0-rc1~753^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5caa136997358f36d53016c5188f9e17452a950;p=dealii.git Add test. --- diff --git a/tests/base/convergence_table_05.cc b/tests/base/convergence_table_05.cc new file mode 100644 index 0000000000..49cfe536a1 --- /dev/null +++ b/tests/base/convergence_table_05.cc @@ -0,0 +1,42 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2010 - 2015 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + +#include "../tests.h" +#include +#include +#include + +#include +#include + +// test the method evaluate_convergence_rates with key column given by +// unsigned long long int + +int main () +{ + initlog(); + + ConvergenceTable t; + + const unsigned long long int t1 = 100; + const unsigned long long int t2 = 400; + t.add_value("cells", t1); + t.add_value("error", 0.1); + t.add_value("cells", t2); + t.add_value("error", 0.025); + t.evaluate_convergence_rates("error", "cells", ConvergenceTable::reduction_rate_log2, 2); + t.write_text(deallog.get_file_stream()); +} diff --git a/tests/base/convergence_table_05.output b/tests/base/convergence_table_05.output new file mode 100644 index 0000000000..686e1e9619 --- /dev/null +++ b/tests/base/convergence_table_05.output @@ -0,0 +1,4 @@ + +cells error +100 0.1000 - +400 0.0250 2.00