--- /dev/null
+//---------------------------- q_2.cc ---------------------------
+// q_2.cc,v 1.1 2003/05/05 13:49:41 wolf Exp
+// Version:
+//
+// Copyright (C) 2003, 2004 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
+// fuqher information on this license.
+//
+//---------------------------- q_2.cc ---------------------------
+
+
+// Just output the embedding matrices of the FE_Q element. Test
+// introduced when we started to compute them on the fly, rather than
+// precomputing them for a number of elements and storing them in a
+// table
+
+#include "../tests.h"
+#include <base/logstream.h>
+#include <fe/fe_dgp_monomial.h>
+
+#include <fstream>
+#include <string>
+
+#define PRECISION 5
+
+
+
+template<int dim>
+void
+test(const unsigned int degree)
+{
+ deallog << "FE_DGPMonomial<" << dim << "> (" << degree << ")"
+ << std::endl;
+
+ FE_DGPMonomial<dim> fe_q(degree);
+
+ for (unsigned int c=0; c<GeometryInfo<dim>::children_per_cell; ++c)
+ {
+ const FullMatrix<double> & m = fe_q.get_prolongation_matrix(c);
+
+ for (unsigned int i=0; i<m.m(); ++i)
+ {
+ for (unsigned int j=0; j<m.n(); ++j)
+ deallog << m(i,j) << ' ';
+ deallog << std::endl;
+ }
+
+ deallog << std::endl;
+ }
+
+ deallog << std::endl;
+}
+
+
+int
+main()
+{
+ std::ofstream logfile ("dgp_monomial_1.output");
+ logfile.precision (PRECISION);
+ logfile.setf(std::ios::fixed);
+ deallog.attach(logfile);
+ deallog.depth_console(0);
+
+ // we had the matrices precomputed
+ // up to Q4 for 1d, Q3 for 2d and
+ // Q2 for 3d
+ for (unsigned int degree=1; degree<=4; ++degree)
+ test<1>(degree);
+
+ for (unsigned int degree=1; degree<=4; ++degree)
+ test<2>(degree);
+
+ for (unsigned int degree=1; degree<=2; ++degree)
+ test<3>(degree);
+
+ return 0;
+}
+
+
+
--- /dev/null
+//---------------------------- q_4.cc ---------------------------
+// q_4.cc,v 1.1 2003/05/08 14:54:41 wolf Exp
+// Version:
+//
+// Copyright (C) 2003 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
+// fuqher information on this license.
+//
+//---------------------------- q_4.cc ---------------------------
+
+
+// previously, the FETools::get_interpolation_matrix function would
+// compute its result itself by interpolation. now, the different
+// finite elements do that themselves, if they can. make sure the
+// result doesn't change
+
+#include "../tests.h"
+#include <base/logstream.h>
+#include <fe/fe_dgp_monomial.h>
+#include <fe/fe_tools.h>
+
+#include <fstream>
+#include <string>
+
+#define PRECISION 5
+
+
+
+template<int dim>
+void
+test(const unsigned int degree1,
+ const unsigned int degree2)
+{
+ deallog << "FE_DGPMonomial" << dim << "> (" << degree1 << ")"
+ << " to FE_DGPMonomial<" << dim << "> (" << degree2 << ")"
+ << std::endl;
+
+ FE_DGPMonomial<dim> fe1(degree1);
+ FE_DGPMonomial<dim> fe2(degree2);
+
+ FullMatrix<float> m (fe2.dofs_per_cell,
+ fe1.dofs_per_cell);
+ FETools::get_interpolation_matrix (fe1, fe2, m);
+
+ for (unsigned int i=0; i<m.m(); ++i)
+ {
+ for (unsigned int j=0; j<m.n(); ++j)
+ deallog << m(i,j) << ' ';
+
+ deallog << std::endl;
+ }
+
+ deallog << std::endl;
+}
+
+
+int
+main()
+{
+ std::ofstream logfile ("dgp_monomial_2.output");
+ logfile.precision (PRECISION);
+ logfile.setf(std::ios::fixed);
+ deallog.attach(logfile);
+ deallog.depth_console(0);
+
+ for (unsigned int degree1=1; degree1<=4; ++degree1)
+ for (unsigned int degree2=1; degree2<=4; ++degree2)
+ test<1>(degree1, degree2);
+ for (unsigned int degree1=1; degree1<=3; ++degree1)
+ for (unsigned int degree2=1; degree2<=3; ++degree2)
+ test<2>(degree1, degree2);
+ for (unsigned int degree1=1; degree1<=2; ++degree1)
+ for (unsigned int degree2=1; degree2<=2; ++degree2)
+ test<3>(degree1, degree2);
+
+ return 0;
+}
+
+
+