From 33cd098bb49e40194bdb750ab67355bb952b75df Mon Sep 17 00:00:00 2001 From: kanschat Date: Thu, 21 Oct 2010 15:25:40 +0000 Subject: [PATCH] change output to gnuplot git-svn-id: https://svn.dealii.org/trunk@22418 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/fe/nedelec.cc | 86 +- tests/fe/nedelec/cmp/generic | 2016 ++++------------------------------ tests/fe/nedelec_2.cc | 4 +- 3 files changed, 257 insertions(+), 1849 deletions(-) diff --git a/tests/fe/nedelec.cc b/tests/fe/nedelec.cc index e677817c92..123d8d921f 100644 --- a/tests/fe/nedelec.cc +++ b/tests/fe/nedelec.cc @@ -1,10 +1,27 @@ -// nedelec.cc,v 1.5 2003/04/21 16:22:48 wolf Exp -// (c) Wolfgang Bangerth +//---------------------------------------------------------------------- +// rt_1.cc,v 1.3 2003/06/09 16:00:38 wolf Exp +// Version: // +// Copyright (C) 2003, 2005, 2006 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. +// +//---------------------------------------------------------------------- + // Show the shape functions of the Nedelec element on a grid with only // one cell. This cell is rotated, stretched, scaled, etc, and on each // of these cells each time we evaluate the shape functions. +// Shape functions and their gradients are output in gnuplot format, +// prefixed by an identifier for the transformation. To produce a +// gnuplot file for the values of functions of degree K with +// transformation N, do + +// perl -n -e 'print if s/DEAL:NedelecK-TransformN::value//' nedelec/output + #include "../tests.h" #include #include @@ -91,7 +108,9 @@ plot_shape_functions(const unsigned int p) // triangulations for (unsigned int transform=0; transform<4; ++transform) { - deallog << "GRID TRANSFORMATION " << transform << std::endl; + std::ostringstream ost; + ost << "Nedelec" << p << "-Transform" << transform; + deallog.push(ost.str()); transform_grid (tr, transform); @@ -105,39 +124,42 @@ plot_shape_functions(const unsigned int p) FEValues fe(fe_ned, q, update_values|update_gradients|update_q_points); fe.reinit(c); - unsigned int q_point=0; - for (unsigned int mz=0;mz<=((dim>2) ? div : 0) ;++mz) - for (unsigned int my=0;my<=((dim>1) ? div : 0) ;++my) - for (unsigned int mx=0;mx<=div;++mx) + for (unsigned int q_point=0;q_point< q.size();++q_point) + { + // Output function in + // gnuplot readable format, + // namely x y z u0x u0y u0z u1x... + deallog << "value " << q_point << '\t' << fe.quadrature_point(q_point); + + for (unsigned int i=0;i #include #include +#include #include #include @@ -57,7 +58,8 @@ plot (const Triangulation &tr, const unsigned int p) QTrapez quadrature; std::vector > shape_values (quadrature.n_quadrature_points, Vector(dim)); - FEValues fe(fe_ned, quadrature, + MappingCartesian mapping; + FEValues fe(mapping, fe_ned, quadrature, update_values|update_q_points); for (typename DoFHandler::active_cell_iterator -- 2.39.5