]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add new test
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 26 Jun 2007 05:14:49 +0000 (05:14 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 26 Jun 2007 05:14:49 +0000 (05:14 +0000)
git-svn-id: https://svn.dealii.org/trunk@14815 0785d39b-7218-0410-832d-ea1e28bc413d

tests/base/utilities_02.cc [new file with mode: 0644]
tests/base/utilities_02/cmp/generic [new file with mode: 0644]

diff --git a/tests/base/utilities_02.cc b/tests/base/utilities_02.cc
new file mode 100644 (file)
index 0000000..7a738fe
--- /dev/null
@@ -0,0 +1,49 @@
+//-----------------------------------------------------------------------------
+//    $Id$
+//    Version: $Name$ 
+//
+//    Copyright (C) 2005, 2006, 2007 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//-----------------------------------------------------------------------------
+
+// test Utilities::fixed_power
+
+#include "../tests.h"
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <cmath>
+
+#include <base/utilities.h>
+
+
+template <int dim>
+void test () 
+{
+  deallog << Utilities::fixed_power<dim> (2) << std::endl;
+  deallog << Utilities::fixed_power<dim> (-2) << std::endl;
+  deallog << Utilities::fixed_power<dim> (2.5) << std::endl;
+  deallog << Utilities::fixed_power<dim> (-2.5) << std::endl;
+  deallog << std::endl;
+}
+
+  
+  
+
+int main()
+{
+  std::ofstream logfile("utilities_02/output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  test<1> ();
+  test<2> ();
+  test<3> ();
+  test<4> ();
+}
diff --git a/tests/base/utilities_02/cmp/generic b/tests/base/utilities_02/cmp/generic
new file mode 100644 (file)
index 0000000..779d725
--- /dev/null
@@ -0,0 +1,21 @@
+
+DEAL::2
+DEAL::-2
+DEAL::2.50000
+DEAL::-2.50000
+DEAL::
+DEAL::4
+DEAL::4
+DEAL::6.25000
+DEAL::6.25000
+DEAL::
+DEAL::8
+DEAL::-8
+DEAL::15.6250
+DEAL::-15.6250
+DEAL::
+DEAL::16
+DEAL::16
+DEAL::39.0625
+DEAL::39.0625
+DEAL::

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.