]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Added get_fe_from_name.cc test. NOT WORKING.
authorLuca Heltai <luca.heltai@sissa.it>
Mon, 14 Mar 2005 14:58:30 +0000 (14:58 +0000)
committerLuca Heltai <luca.heltai@sissa.it>
Mon, 14 Mar 2005 14:58:30 +0000 (14:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@10123 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/Makefile
tests/bits/get_fe_from_name.cc [new file with mode: 0644]

index 13dcc9de1cc27a55846967974a4696653a5bf43a..ba02314110a55b15b2328baee1e8f320ab38bf3d 100644 (file)
@@ -67,7 +67,8 @@ tests_x = anna_? \
          umfpack_* \
          fe_q_3d* \
           rt_* \
-         nedelec_*
+         nedelec_* \
+         get_fe_from_name
 
 # tests for the hp branch:
 #        fe_collection_*
@@ -99,4 +100,4 @@ include ../Makefile.rules
 include Makefile.depend
 include Makefile.tests
 
-.PHONY: default
\ No newline at end of file
+.PHONY: default
diff --git a/tests/bits/get_fe_from_name.cc b/tests/bits/get_fe_from_name.cc
new file mode 100644 (file)
index 0000000..a7634b0
--- /dev/null
@@ -0,0 +1,49 @@
+//----------------------------  get_fe_from_name.cc  ---------------------------
+//    $Id$
+//    Version: $Name$ 
+//
+//    Copyright (C) 2005 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.
+//
+//----------------------------  get_fe_from_name.cc  ---------------------------
+// Test the get_fe_from_name function of the fe_tools. 
+
+#include "../tests.h"
+#include <fstream>
+#include <base/logstream.h>
+#include <fe/fe.h>
+#include <fe/fe_tools.h>
+
+int main () 
+{ 
+  std::ofstream logfile("get_fe_from_name.output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  
+  FiniteElement<1> * fe1;
+  FiniteElement<2> * fe2;
+  FiniteElement<3> * fe3;
+  
+  std::string name;
+  name = "FE_Q(1)";
+  fe1 = FETools::get_fe_from_name(name);
+  fe2 = FETools::get_fe_from_name(name);
+  fe3 = FETools::get_fe_from_name(name);
+  
+  deallog << "Read " << name << std::endl;
+  deallog << "Generated :" << std::endl;
+  deallog << fe1->get_name()  << std::endl;
+  deallog << fe2->get_name()  << std::endl;
+  deallog << fe3->get_name()  << std::endl;
+  
+  delete fe1;
+  delete fe2;
+  delete fe3;
+  
+  return 0;
+}
+    

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.