From 209cf6c28b951e939f1341de8e0e88ca637853c2 Mon Sep 17 00:00:00 2001 From: kanschat Date: Thu, 23 Sep 2010 22:28:52 +0000 Subject: [PATCH] copy flow to higher number git-svn-id: https://svn.dealii.org/trunk@22140 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/base/functions_01.cc | 279 +-------- tests/base/functions_01/cmp/generic | 842 --------------------------- tests/base/functions_04.cc | 313 +++++++++++ tests/base/functions_04/cmp/generic | 843 ++++++++++++++++++++++++++++ 4 files changed, 1159 insertions(+), 1118 deletions(-) create mode 100644 tests/base/functions_04.cc create mode 100644 tests/base/functions_04/cmp/generic diff --git a/tests/base/functions_01.cc b/tests/base/functions_01.cc index 7673b8ef6b..8467588754 100644 --- a/tests/base/functions_01.cc +++ b/tests/base/functions_01.cc @@ -16,297 +16,24 @@ #include "../tests.h" #include #include +#include #include #include #include #include #include +#include "functions.h" + #include #include #include #include - -/** - * A class replacing the implemented derivatives of a function with - * difference quotients. This way, the correctness of the - * implementation can be tested. - */ -template -class DerivativeTestFunction : - public AutoDerivativeFunction -{ - public: - DerivativeTestFunction(const Function&, const double h); - ~DerivativeTestFunction(); - - virtual void vector_value (const Point& points, Vector& value) const; - virtual double value (const Point& points, const unsigned int component) const; - virtual void vector_value_list (const std::vector< Point< dim > > &points, - std::vector< Vector< double > > &values) const; - - private: - const Function& func; -}; - - -template -void -check_function(const Functions::FlowFunction& f, - unsigned int sub, - std::ostream& out) -{ - DerivativeTestFunction dtest1(f, 1.e-2); - DerivativeTestFunction dtest2(f, 2.e-2); - // Prepare a vector with a single - // patch stretching over the cube - // [-1,1]^dim - std::vector > patches(1); - unsigned int vertex_number = 0; - for (unsigned int iz=0;iz < ((dim>2) ? 2 : 1) ;++iz) - for (unsigned int iy=0;iy < ((dim>1) ? 2 : 1) ;++iy) - for (unsigned int ix=0;ix < 2 ;++ix) - { - if (dim>0) patches[0].vertices[vertex_number](0) = -1. + 2.*ix; - if (dim>1) patches[0].vertices[vertex_number](1) = -1. + 2.*iy; - if (dim>2) patches[0].vertices[vertex_number](2) = -1. + 2.*iz; - ++vertex_number; - } - for (unsigned int i=0;i::faces_per_cell;++i) - patches[0].neighbors[i] = numbers::invalid_unsigned_int; - patches[0].patch_index = 0; - patches[0].n_subdivisions = sub; - patches[0].points_are_available = false; - - vertex_number = 1; - for (unsigned int d=0;d > points(vertex_number); - const double h = 2./sub; - vertex_number = 0; - for (unsigned int iz=0;iz <= ((dim>2) ? sub : 0) ;++iz) - for (unsigned int iy=0;iy <= ((dim>1) ? sub : 0) ;++iy) - for (unsigned int ix=0;ix <= sub ;++ix) - { - if (dim>0) points[vertex_number](0) = -1.+ix*h; - if (dim>1) points[vertex_number](1) = -1.+iy*h; - if (dim>2) points[vertex_number](2) = -1.+iz*h; - ++vertex_number; - } - - std::vector > values(points.size(), Vector(f.n_components)); - std::vector > values2(f.n_components, - std::vector(points.size())); - f.vector_value_list(points, values); - f.vector_values(points, values2); - for (unsigned int i=0;i 1e-10) - patches[0].data(j, i) = values[i](j); - else - patches[0].data(j, i) = 0; - if (values[i](j) != values2[j][i]) - deallog << "Error values (" << i << ',' << j << ") : " - << values[i](j) << " != " << values2[j][i] << std::endl; - } - - deallog << "Gradients "; - // Compute gradients and difference approximations - std::vector > > - gradients(f.n_components, std::vector >(points.size())); - std::vector > > - gradients1(points.size(), std::vector >(f.n_components)); - std::vector > > - gradients2(points.size(), std::vector >(f.n_components)); - - f.vector_gradients(points, gradients); - dtest1.vector_gradient_list(points, gradients1); - dtest2.vector_gradient_list(points, gradients2); - - // Compare gradients and difference quotients - for (unsigned int k=0;k d1 = gradients1[i][k] - gradients[k][i]; - Tensor<1,dim> d2 = gradients2[i][k] - gradients[k][i]; - - // If the difference is - // already small, we are fine - if (d1.norm() > 1.e-13) - { - // Check for - // convergence. For full - // 4th order, gradients2 - // should be 16 times as - // large, so let's be a - // bit generous - if (d2.norm() < 12.* d1.norm()) - { - deallog << "Gradient error: point " << i - << " (" << points[i] << " )" - << " comp " << k -// << " norms " << d1.norm() << " " << d2.norm() - << std::endl; - for (unsigned int d=0;d 1.e-13) - deallog << "Divergence " << k << " " - << div << std::endl; - } - deallog << "tested" << std::endl; - - f.vector_laplacian_list(points, values); - f.vector_laplacians(points, values2); - double sum = 0.; - for (unsigned int i=0;i names(f.n_components); - for (unsigned int i=0;i > vectors; - if (dim==2) - dout.write_gnuplot(patches, names, vectors, gflags, out); - else - dout.write_dx(patches, names, vectors, dxflags, out); -} - - int main() { std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output"); std::ofstream logfile(logname.c_str()); deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); - - if (true) - { - deallog << " Functions::StokesCosine<2>" << std::endl; - Functions::StokesCosine<2> f(1.); - check_function(f, 4, logfile); - } - - if (true) - { - deallog << " Functions::StokesCosine<3>" << std::endl; - Functions::StokesCosine<3> f(1.); - check_function(f, 4, logfile); - } - - if (true) - { - deallog << "Functions::StokesLSingularity" << std::endl; - Functions::StokesLSingularity f; - // Use odd number of points to - // avoid lines with - // discontinuous derivatives. - check_function(f, 5, logfile); - } - - if (true) - { - deallog << "Functions::Kovasznay" << std::endl; - Functions::Kovasznay f(10.); - check_function(f, 4, logfile); - } - - if (true) - { - deallog << "Functions::PoisseuilleFlow<2>" << std::endl; - Functions::PoisseuilleFlow<2> f(.8, 10.); - check_function(f, 4, logfile); - } - - if (true) - { - deallog << "Functions::PoisseuilleFlow<3>" << std::endl; - Functions::PoisseuilleFlow<3> f(.8, 10.); - check_function(f, 4, logfile); - } -} - - -template -DerivativeTestFunction::DerivativeTestFunction(const Function& f, - const double h) - : - AutoDerivativeFunction(h, f.n_components), - func(f) -{ - this->set_formula(AutoDerivativeFunction::FourthOrder); -} - - -template -DerivativeTestFunction::~DerivativeTestFunction() -{} - - -template -void -DerivativeTestFunction::vector_value_list ( - const std::vector< Point< dim > > &points, - std::vector< Vector< double > > &values) const -{ - func.vector_value_list(points, values); -} - - -template -void DerivativeTestFunction::vector_value ( - const Point& point, - Vector& value) const -{ - func.vector_value(point, value); -} - - -template -double DerivativeTestFunction::value ( - const Point& point, - const unsigned int comp) const -{ -// std::cerr << '[' << point << '!' << func.value(point, comp) << ']'; - - return func.value(point, comp); } diff --git a/tests/base/functions_01/cmp/generic b/tests/base/functions_01/cmp/generic index 77be59b82a..8b13789179 100644 --- a/tests/base/functions_01/cmp/generic +++ b/tests/base/functions_01/cmp/generic @@ -1,843 +1 @@ -DEAL:: Functions::StokesCosine<2> -DEAL::Gradients tested -DEAL::Divergence tested -DEAL::Laplacians 0.719980 -# This file was generated by the deal.II library. - - -# -# For a description of the GNUPLOT format see the GNUPLOT manual. -# -# --1.00000 -1.00000 0.00000 0.00000 0.00000 --0.500000 -1.00000 0.00000 0.00000 0.00000 -0.00000 -1.00000 0.00000 0.00000 0.00000 -0.500000 -1.00000 0.00000 0.00000 0.00000 -1.00000 -1.00000 0.00000 0.00000 0.00000 - --1.00000 -0.500000 0.00000 0.00000 0.00000 --0.500000 -0.500000 -0.250000 0.250000 0.250000 -0.00000 -0.500000 -0.500000 0.00000 0.00000 -0.500000 -0.500000 -0.250000 -0.250000 -0.250000 -1.00000 -0.500000 0.00000 0.00000 0.00000 - --1.00000 0.00000 0.00000 0.00000 0.00000 --0.500000 0.00000 0.00000 0.500000 0.00000 -0.00000 0.00000 0.00000 0.00000 0.00000 -0.500000 0.00000 0.00000 -0.500000 0.00000 -1.00000 0.00000 0.00000 0.00000 0.00000 - --1.00000 0.500000 0.00000 0.00000 0.00000 --0.500000 0.500000 0.250000 0.250000 -0.250000 -0.00000 0.500000 0.500000 0.00000 0.00000 -0.500000 0.500000 0.250000 -0.250000 0.250000 -1.00000 0.500000 0.00000 0.00000 0.00000 - --1.00000 1.00000 0.00000 0.00000 0.00000 --0.500000 1.00000 0.00000 0.00000 0.00000 -0.00000 1.00000 0.00000 0.00000 0.00000 -0.500000 1.00000 0.00000 0.00000 0.00000 -1.00000 1.00000 0.00000 0.00000 0.00000 - - -DEAL:: Functions::StokesCosine<3> -DEAL::Gradients tested -DEAL::Divergence tested -DEAL::Laplacians 0.119270 -object "vertices" class array type float rank 1 shape 3 items 125 data follows --1.00000 -1.00000 -1.00000 --0.500000 -1.00000 -1.00000 -0.00000 -1.00000 -1.00000 -0.500000 -1.00000 -1.00000 -1.00000 -1.00000 -1.00000 --1.00000 -0.500000 -1.00000 --0.500000 -0.500000 -1.00000 -0.00000 -0.500000 -1.00000 -0.500000 -0.500000 -1.00000 -1.00000 -0.500000 -1.00000 --1.00000 0.00000 -1.00000 --0.500000 0.00000 -1.00000 -0.00000 0.00000 -1.00000 -0.500000 0.00000 -1.00000 -1.00000 0.00000 -1.00000 --1.00000 0.500000 -1.00000 --0.500000 0.500000 -1.00000 -0.00000 0.500000 -1.00000 -0.500000 0.500000 -1.00000 -1.00000 0.500000 -1.00000 --1.00000 1.00000 -1.00000 --0.500000 1.00000 -1.00000 -0.00000 1.00000 -1.00000 -0.500000 1.00000 -1.00000 -1.00000 1.00000 -1.00000 --1.00000 -1.00000 -0.500000 --0.500000 -1.00000 -0.500000 -0.00000 -1.00000 -0.500000 -0.500000 -1.00000 -0.500000 -1.00000 -1.00000 -0.500000 --1.00000 -0.500000 -0.500000 --0.500000 -0.500000 -0.500000 -0.00000 -0.500000 -0.500000 -0.500000 -0.500000 -0.500000 -1.00000 -0.500000 -0.500000 --1.00000 0.00000 -0.500000 --0.500000 0.00000 -0.500000 -0.00000 0.00000 -0.500000 -0.500000 0.00000 -0.500000 -1.00000 0.00000 -0.500000 --1.00000 0.500000 -0.500000 --0.500000 0.500000 -0.500000 -0.00000 0.500000 -0.500000 -0.500000 0.500000 -0.500000 -1.00000 0.500000 -0.500000 --1.00000 1.00000 -0.500000 --0.500000 1.00000 -0.500000 -0.00000 1.00000 -0.500000 -0.500000 1.00000 -0.500000 -1.00000 1.00000 -0.500000 --1.00000 -1.00000 0.00000 --0.500000 -1.00000 0.00000 -0.00000 -1.00000 0.00000 -0.500000 -1.00000 0.00000 -1.00000 -1.00000 0.00000 --1.00000 -0.500000 0.00000 --0.500000 -0.500000 0.00000 -0.00000 -0.500000 0.00000 -0.500000 -0.500000 0.00000 -1.00000 -0.500000 0.00000 --1.00000 0.00000 0.00000 --0.500000 0.00000 0.00000 -0.00000 0.00000 0.00000 -0.500000 0.00000 0.00000 -1.00000 0.00000 0.00000 --1.00000 0.500000 0.00000 --0.500000 0.500000 0.00000 -0.00000 0.500000 0.00000 -0.500000 0.500000 0.00000 -1.00000 0.500000 0.00000 --1.00000 1.00000 0.00000 --0.500000 1.00000 0.00000 -0.00000 1.00000 0.00000 -0.500000 1.00000 0.00000 -1.00000 1.00000 0.00000 --1.00000 -1.00000 0.500000 --0.500000 -1.00000 0.500000 -0.00000 -1.00000 0.500000 -0.500000 -1.00000 0.500000 -1.00000 -1.00000 0.500000 --1.00000 -0.500000 0.500000 --0.500000 -0.500000 0.500000 -0.00000 -0.500000 0.500000 -0.500000 -0.500000 0.500000 -1.00000 -0.500000 0.500000 --1.00000 0.00000 0.500000 --0.500000 0.00000 0.500000 -0.00000 0.00000 0.500000 -0.500000 0.00000 0.500000 -1.00000 0.00000 0.500000 --1.00000 0.500000 0.500000 --0.500000 0.500000 0.500000 -0.00000 0.500000 0.500000 -0.500000 0.500000 0.500000 -1.00000 0.500000 0.500000 --1.00000 1.00000 0.500000 --0.500000 1.00000 0.500000 -0.00000 1.00000 0.500000 -0.500000 1.00000 0.500000 -1.00000 1.00000 0.500000 --1.00000 -1.00000 1.00000 --0.500000 -1.00000 1.00000 -0.00000 -1.00000 1.00000 -0.500000 -1.00000 1.00000 -1.00000 -1.00000 1.00000 --1.00000 -0.500000 1.00000 --0.500000 -0.500000 1.00000 -0.00000 -0.500000 1.00000 -0.500000 -0.500000 1.00000 -1.00000 -0.500000 1.00000 --1.00000 0.00000 1.00000 --0.500000 0.00000 1.00000 -0.00000 0.00000 1.00000 -0.500000 0.00000 1.00000 -1.00000 0.00000 1.00000 --1.00000 0.500000 1.00000 --0.500000 0.500000 1.00000 -0.00000 0.500000 1.00000 -0.500000 0.500000 1.00000 -1.00000 0.500000 1.00000 --1.00000 1.00000 1.00000 --0.500000 1.00000 1.00000 -0.00000 1.00000 1.00000 -0.500000 1.00000 1.00000 -1.00000 1.00000 1.00000 -object "cells" class array type int rank 1 shape 8 items 64 data follows -0 25 5 30 1 26 6 31 -1 26 6 31 2 27 7 32 -2 27 7 32 3 28 8 33 -3 28 8 33 4 29 9 34 -5 30 10 35 6 31 11 36 -6 31 11 36 7 32 12 37 -7 32 12 37 8 33 13 38 -8 33 13 38 9 34 14 39 -10 35 15 40 11 36 16 41 -11 36 16 41 12 37 17 42 -12 37 17 42 13 38 18 43 -13 38 18 43 14 39 19 44 -15 40 20 45 16 41 21 46 -16 41 21 46 17 42 22 47 -17 42 22 47 18 43 23 48 -18 43 23 48 19 44 24 49 -25 50 30 55 26 51 31 56 -26 51 31 56 27 52 32 57 -27 52 32 57 28 53 33 58 -28 53 33 58 29 54 34 59 -30 55 35 60 31 56 36 61 -31 56 36 61 32 57 37 62 -32 57 37 62 33 58 38 63 -33 58 38 63 34 59 39 64 -35 60 40 65 36 61 41 66 -36 61 41 66 37 62 42 67 -37 62 42 67 38 63 43 68 -38 63 43 68 39 64 44 69 -40 65 45 70 41 66 46 71 -41 66 46 71 42 67 47 72 -42 67 47 72 43 68 48 73 -43 68 48 73 44 69 49 74 -50 75 55 80 51 76 56 81 -51 76 56 81 52 77 57 82 -52 77 57 82 53 78 58 83 -53 78 58 83 54 79 59 84 -55 80 60 85 56 81 61 86 -56 81 61 86 57 82 62 87 -57 82 62 87 58 83 63 88 -58 83 63 88 59 84 64 89 -60 85 65 90 61 86 66 91 -61 86 66 91 62 87 67 92 -62 87 67 92 63 88 68 93 -63 88 68 93 64 89 69 94 -65 90 70 95 66 91 71 96 -66 91 71 96 67 92 72 97 -67 92 72 97 68 93 73 98 -68 93 73 98 69 94 74 99 -75 100 80 105 76 101 81 106 -76 101 81 106 77 102 82 107 -77 102 82 107 78 103 83 108 -78 103 83 108 79 104 84 109 -80 105 85 110 81 106 86 111 -81 106 86 111 82 107 87 112 -82 107 87 112 83 108 88 113 -83 108 88 113 84 109 89 114 -85 110 90 115 86 111 91 116 -86 111 91 116 87 112 92 117 -87 112 92 117 88 113 93 118 -88 113 93 118 89 114 94 119 -90 115 95 120 91 116 96 121 -91 116 96 121 92 117 97 122 -92 117 97 122 93 118 98 123 -93 118 98 123 94 119 99 124 - -attribute "element type" string "cubes" -attribute "ref" string "positions" -object "data" class array type float rank 1 shape 4 items 125 data follows - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.125000 0.125000 -0.250000 -0.125000 - 0.250000 0.00000 0.00000 0.00000 - 0.125000 -0.125000 0.250000 0.125000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.250000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 -0.250000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - -0.125000 0.125000 0.250000 0.125000 - -0.250000 0.00000 0.00000 0.00000 - -0.125000 -0.125000 -0.250000 -0.125000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 -0.500000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.500000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.500000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 -0.500000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - -0.125000 -0.125000 -0.250000 0.125000 - -0.250000 0.00000 0.00000 0.00000 - -0.125000 0.125000 0.250000 -0.125000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 -0.250000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.250000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.125000 -0.125000 0.250000 -0.125000 - 0.250000 0.00000 0.00000 0.00000 - 0.125000 0.125000 -0.250000 0.125000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 - 0.00000 0.00000 0.00000 0.00000 -attribute "dep" string "positions" -object "deal data" class field -component "positions" value "vertices" -component "connections" value "cells" -component "data" value "data" -attribute -end -DEAL::Functions::StokesLSingularity -DEAL::Gradients tested -DEAL::Divergence tested -DEAL::Laplacians 0 -# This file was generated by the deal.II library. - - -# -# For a description of the GNUPLOT format see the GNUPLOT manual. -# -# --1.00000 -1.00000 4.26453 -4.26453 0.00000 --0.600000 -1.00000 4.09873 -3.41727 -0.473831 --0.200000 -1.00000 3.84003 -2.45659 -1.19703 -0.200000 -1.00000 3.41329 -1.55228 -1.95790 -0.600000 -1.00000 2.90816 -0.922336 -2.41631 -1.00000 -1.00000 2.47239 -0.566216 -2.55657 - --1.00000 -0.600000 3.41727 -4.09873 0.473831 --0.600000 -0.600000 3.22908 -3.22908 0.00000 --0.200000 -0.600000 2.98575 -2.10725 -1.17869 -0.200000 -0.600000 2.45684 -0.989538 -2.71696 -0.600000 -0.600000 1.87208 -0.428735 -3.22637 -1.00000 -0.600000 1.49487 -0.221862 -3.13156 - --1.00000 -0.200000 2.45659 -3.84003 1.19703 --0.600000 -0.200000 2.10725 -2.98575 1.17869 --0.200000 -0.200000 1.77539 -1.77539 0.00000 -0.200000 -0.200000 1.02929 -0.235724 -5.32170 -0.600000 -0.200000 0.609245 -0.0505464 -4.49620 -1.00000 -0.200000 0.467523 -0.0228120 -3.76482 - --1.00000 0.200000 1.55228 -3.41329 1.95790 --0.600000 0.200000 0.989538 -2.45684 2.71696 --0.200000 0.200000 0.235724 -1.02929 5.32170 -0.200000 0.200000 0.00000 0.00000 0.00000 -0.600000 0.200000 0.00000 0.00000 0.00000 -1.00000 0.200000 0.00000 0.00000 0.00000 - --1.00000 0.600000 0.922336 -2.90816 2.41631 --0.600000 0.600000 0.428735 -1.87208 3.22637 --0.200000 0.600000 0.0505464 -0.609245 4.49620 -0.200000 0.600000 0.00000 0.00000 0.00000 -0.600000 0.600000 0.00000 0.00000 0.00000 -1.00000 0.600000 0.00000 0.00000 0.00000 - --1.00000 1.00000 0.566216 -2.47239 2.55657 --0.600000 1.00000 0.221862 -1.49487 3.13156 --0.200000 1.00000 0.0228120 -0.467523 3.76482 -0.200000 1.00000 0.00000 0.00000 0.00000 -0.600000 1.00000 0.00000 0.00000 0.00000 -1.00000 1.00000 0.00000 0.00000 0.00000 - - -DEAL::Functions::Kovasznay -DEAL::Gradients tested -DEAL::Divergence tested -DEAL::Laplacians 0 -# This file was generated by the deal.II library. - - -# -# For a description of the GNUPLOT format see the GNUPLOT manual. -# -# --1.00000 -1.00000 -19.6940 0.00000 -213.268 --0.500000 -1.00000 -3.54907 0.00000 -9.49326 -0.00000 -1.00000 0.00000 0.00000 0.353753 -0.500000 -1.00000 0.780175 0.00000 0.829592 -1.00000 -1.00000 0.951677 0.00000 0.852586 - --1.00000 -0.500000 21.6940 0.00000 -213.268 --0.500000 -0.500000 5.54907 0.00000 -9.49326 -0.00000 -0.500000 2.00000 0.00000 0.353753 -0.500000 -0.500000 1.21983 0.00000 0.829592 -1.00000 -0.500000 1.04832 0.00000 0.852586 - --1.00000 0.00000 -19.6940 0.00000 -213.268 --0.500000 0.00000 -3.54907 0.00000 -9.49326 -0.00000 0.00000 0.00000 0.00000 0.353753 -0.500000 0.00000 0.780175 0.00000 0.829592 -1.00000 0.00000 0.951677 0.00000 0.852586 - --1.00000 0.500000 21.6940 0.00000 -213.268 --0.500000 0.500000 5.54907 0.00000 -9.49326 -0.00000 0.500000 2.00000 0.00000 0.353753 -0.500000 0.500000 1.21983 0.00000 0.829592 -1.00000 0.500000 1.04832 0.00000 0.852586 - --1.00000 1.00000 -19.6940 0.00000 -213.268 --0.500000 1.00000 -3.54907 0.00000 -9.49326 -0.00000 1.00000 0.00000 0.00000 0.353753 -0.500000 1.00000 0.780175 0.00000 0.829592 -1.00000 1.00000 0.951677 0.00000 0.852586 - - -DEAL::Functions::PoisseuilleFlow<2> -DEAL::Gradients tested -DEAL::Divergence tested -DEAL::Laplacians 0 -# This file was generated by the deal.II library. - - -# -# For a description of the GNUPLOT format see the GNUPLOT manual. -# -# --1.00000 -1.00000 -0.562500 0.00000 0.312500 --0.500000 -1.00000 -0.562500 0.00000 0.156250 -0.00000 -1.00000 -0.562500 0.00000 0.00000 -0.500000 -1.00000 -0.562500 0.00000 -0.156250 -1.00000 -1.00000 -0.562500 0.00000 -0.312500 - --1.00000 -0.500000 0.609375 0.00000 0.312500 --0.500000 -0.500000 0.609375 0.00000 0.156250 -0.00000 -0.500000 0.609375 0.00000 0.00000 -0.500000 -0.500000 0.609375 0.00000 -0.156250 -1.00000 -0.500000 0.609375 0.00000 -0.312500 - --1.00000 0.00000 1.00000 0.00000 0.312500 --0.500000 0.00000 1.00000 0.00000 0.156250 -0.00000 0.00000 1.00000 0.00000 0.00000 -0.500000 0.00000 1.00000 0.00000 -0.156250 -1.00000 0.00000 1.00000 0.00000 -0.312500 - --1.00000 0.500000 0.609375 0.00000 0.312500 --0.500000 0.500000 0.609375 0.00000 0.156250 -0.00000 0.500000 0.609375 0.00000 0.00000 -0.500000 0.500000 0.609375 0.00000 -0.156250 -1.00000 0.500000 0.609375 0.00000 -0.312500 - --1.00000 1.00000 -0.562500 0.00000 0.312500 --0.500000 1.00000 -0.562500 0.00000 0.156250 -0.00000 1.00000 -0.562500 0.00000 0.00000 -0.500000 1.00000 -0.562500 0.00000 -0.156250 -1.00000 1.00000 -0.562500 0.00000 -0.312500 - - -DEAL::Functions::PoisseuilleFlow<3> -DEAL::Gradients tested -DEAL::Divergence tested -DEAL::Laplacians 0 -object "vertices" class array type float rank 1 shape 3 items 125 data follows --1.00000 -1.00000 -1.00000 --0.500000 -1.00000 -1.00000 -0.00000 -1.00000 -1.00000 -0.500000 -1.00000 -1.00000 -1.00000 -1.00000 -1.00000 --1.00000 -0.500000 -1.00000 --0.500000 -0.500000 -1.00000 -0.00000 -0.500000 -1.00000 -0.500000 -0.500000 -1.00000 -1.00000 -0.500000 -1.00000 --1.00000 0.00000 -1.00000 --0.500000 0.00000 -1.00000 -0.00000 0.00000 -1.00000 -0.500000 0.00000 -1.00000 -1.00000 0.00000 -1.00000 --1.00000 0.500000 -1.00000 --0.500000 0.500000 -1.00000 -0.00000 0.500000 -1.00000 -0.500000 0.500000 -1.00000 -1.00000 0.500000 -1.00000 --1.00000 1.00000 -1.00000 --0.500000 1.00000 -1.00000 -0.00000 1.00000 -1.00000 -0.500000 1.00000 -1.00000 -1.00000 1.00000 -1.00000 --1.00000 -1.00000 -0.500000 --0.500000 -1.00000 -0.500000 -0.00000 -1.00000 -0.500000 -0.500000 -1.00000 -0.500000 -1.00000 -1.00000 -0.500000 --1.00000 -0.500000 -0.500000 --0.500000 -0.500000 -0.500000 -0.00000 -0.500000 -0.500000 -0.500000 -0.500000 -0.500000 -1.00000 -0.500000 -0.500000 --1.00000 0.00000 -0.500000 --0.500000 0.00000 -0.500000 -0.00000 0.00000 -0.500000 -0.500000 0.00000 -0.500000 -1.00000 0.00000 -0.500000 --1.00000 0.500000 -0.500000 --0.500000 0.500000 -0.500000 -0.00000 0.500000 -0.500000 -0.500000 0.500000 -0.500000 -1.00000 0.500000 -0.500000 --1.00000 1.00000 -0.500000 --0.500000 1.00000 -0.500000 -0.00000 1.00000 -0.500000 -0.500000 1.00000 -0.500000 -1.00000 1.00000 -0.500000 --1.00000 -1.00000 0.00000 --0.500000 -1.00000 0.00000 -0.00000 -1.00000 0.00000 -0.500000 -1.00000 0.00000 -1.00000 -1.00000 0.00000 --1.00000 -0.500000 0.00000 --0.500000 -0.500000 0.00000 -0.00000 -0.500000 0.00000 -0.500000 -0.500000 0.00000 -1.00000 -0.500000 0.00000 --1.00000 0.00000 0.00000 --0.500000 0.00000 0.00000 -0.00000 0.00000 0.00000 -0.500000 0.00000 0.00000 -1.00000 0.00000 0.00000 --1.00000 0.500000 0.00000 --0.500000 0.500000 0.00000 -0.00000 0.500000 0.00000 -0.500000 0.500000 0.00000 -1.00000 0.500000 0.00000 --1.00000 1.00000 0.00000 --0.500000 1.00000 0.00000 -0.00000 1.00000 0.00000 -0.500000 1.00000 0.00000 -1.00000 1.00000 0.00000 --1.00000 -1.00000 0.500000 --0.500000 -1.00000 0.500000 -0.00000 -1.00000 0.500000 -0.500000 -1.00000 0.500000 -1.00000 -1.00000 0.500000 --1.00000 -0.500000 0.500000 --0.500000 -0.500000 0.500000 -0.00000 -0.500000 0.500000 -0.500000 -0.500000 0.500000 -1.00000 -0.500000 0.500000 --1.00000 0.00000 0.500000 --0.500000 0.00000 0.500000 -0.00000 0.00000 0.500000 -0.500000 0.00000 0.500000 -1.00000 0.00000 0.500000 --1.00000 0.500000 0.500000 --0.500000 0.500000 0.500000 -0.00000 0.500000 0.500000 -0.500000 0.500000 0.500000 -1.00000 0.500000 0.500000 --1.00000 1.00000 0.500000 --0.500000 1.00000 0.500000 -0.00000 1.00000 0.500000 -0.500000 1.00000 0.500000 -1.00000 1.00000 0.500000 --1.00000 -1.00000 1.00000 --0.500000 -1.00000 1.00000 -0.00000 -1.00000 1.00000 -0.500000 -1.00000 1.00000 -1.00000 -1.00000 1.00000 --1.00000 -0.500000 1.00000 --0.500000 -0.500000 1.00000 -0.00000 -0.500000 1.00000 -0.500000 -0.500000 1.00000 -1.00000 -0.500000 1.00000 --1.00000 0.00000 1.00000 --0.500000 0.00000 1.00000 -0.00000 0.00000 1.00000 -0.500000 0.00000 1.00000 -1.00000 0.00000 1.00000 --1.00000 0.500000 1.00000 --0.500000 0.500000 1.00000 -0.00000 0.500000 1.00000 -0.500000 0.500000 1.00000 -1.00000 0.500000 1.00000 --1.00000 1.00000 1.00000 --0.500000 1.00000 1.00000 -0.00000 1.00000 1.00000 -0.500000 1.00000 1.00000 -1.00000 1.00000 1.00000 -object "cells" class array type int rank 1 shape 8 items 64 data follows -0 25 5 30 1 26 6 31 -1 26 6 31 2 27 7 32 -2 27 7 32 3 28 8 33 -3 28 8 33 4 29 9 34 -5 30 10 35 6 31 11 36 -6 31 11 36 7 32 12 37 -7 32 12 37 8 33 13 38 -8 33 13 38 9 34 14 39 -10 35 15 40 11 36 16 41 -11 36 16 41 12 37 17 42 -12 37 17 42 13 38 18 43 -13 38 18 43 14 39 19 44 -15 40 20 45 16 41 21 46 -16 41 21 46 17 42 22 47 -17 42 22 47 18 43 23 48 -18 43 23 48 19 44 24 49 -25 50 30 55 26 51 31 56 -26 51 31 56 27 52 32 57 -27 52 32 57 28 53 33 58 -28 53 33 58 29 54 34 59 -30 55 35 60 31 56 36 61 -31 56 36 61 32 57 37 62 -32 57 37 62 33 58 38 63 -33 58 38 63 34 59 39 64 -35 60 40 65 36 61 41 66 -36 61 41 66 37 62 42 67 -37 62 42 67 38 63 43 68 -38 63 43 68 39 64 44 69 -40 65 45 70 41 66 46 71 -41 66 46 71 42 67 47 72 -42 67 47 72 43 68 48 73 -43 68 48 73 44 69 49 74 -50 75 55 80 51 76 56 81 -51 76 56 81 52 77 57 82 -52 77 57 82 53 78 58 83 -53 78 58 83 54 79 59 84 -55 80 60 85 56 81 61 86 -56 81 61 86 57 82 62 87 -57 82 62 87 58 83 63 88 -58 83 63 88 59 84 64 89 -60 85 65 90 61 86 66 91 -61 86 66 91 62 87 67 92 -62 87 67 92 63 88 68 93 -63 88 68 93 64 89 69 94 -65 90 70 95 66 91 71 96 -66 91 71 96 67 92 72 97 -67 92 72 97 68 93 73 98 -68 93 73 98 69 94 74 99 -75 100 80 105 76 101 81 106 -76 101 81 106 77 102 82 107 -77 102 82 107 78 103 83 108 -78 103 83 108 79 104 84 109 -80 105 85 110 81 106 86 111 -81 106 86 111 82 107 87 112 -82 107 87 112 83 108 88 113 -83 108 88 113 84 109 89 114 -85 110 90 115 86 111 91 116 -86 111 91 116 87 112 92 117 -87 112 92 117 88 113 93 118 -88 113 93 118 89 114 94 119 -90 115 95 120 91 116 96 121 -91 116 96 121 92 117 97 122 -92 117 97 122 93 118 98 123 -93 118 98 123 94 119 99 124 - -attribute "element type" string "cubes" -attribute "ref" string "positions" -object "data" class array type float rank 1 shape 4 items 125 data follows - -2.12500 0.00000 0.00000 0.625000 - -2.12500 0.00000 0.00000 0.312500 - -2.12500 0.00000 0.00000 0.00000 - -2.12500 0.00000 0.00000 -0.312500 - -2.12500 0.00000 0.00000 -0.625000 - -0.953125 0.00000 0.00000 0.625000 - -0.953125 0.00000 0.00000 0.312500 - -0.953125 0.00000 0.00000 0.00000 - -0.953125 0.00000 0.00000 -0.312500 - -0.953125 0.00000 0.00000 -0.625000 - -0.562500 0.00000 0.00000 0.625000 - -0.562500 0.00000 0.00000 0.312500 - -0.562500 0.00000 0.00000 0.00000 - -0.562500 0.00000 0.00000 -0.312500 - -0.562500 0.00000 0.00000 -0.625000 - -0.953125 0.00000 0.00000 0.625000 - -0.953125 0.00000 0.00000 0.312500 - -0.953125 0.00000 0.00000 0.00000 - -0.953125 0.00000 0.00000 -0.312500 - -0.953125 0.00000 0.00000 -0.625000 - -2.12500 0.00000 0.00000 0.625000 - -2.12500 0.00000 0.00000 0.312500 - -2.12500 0.00000 0.00000 0.00000 - -2.12500 0.00000 0.00000 -0.312500 - -2.12500 0.00000 0.00000 -0.625000 - -0.953125 0.00000 0.00000 0.625000 - -0.953125 0.00000 0.00000 0.312500 - -0.953125 0.00000 0.00000 0.00000 - -0.953125 0.00000 0.00000 -0.312500 - -0.953125 0.00000 0.00000 -0.625000 - 0.218750 0.00000 0.00000 0.625000 - 0.218750 0.00000 0.00000 0.312500 - 0.218750 0.00000 0.00000 0.00000 - 0.218750 0.00000 0.00000 -0.312500 - 0.218750 0.00000 0.00000 -0.625000 - 0.609375 0.00000 0.00000 0.625000 - 0.609375 0.00000 0.00000 0.312500 - 0.609375 0.00000 0.00000 0.00000 - 0.609375 0.00000 0.00000 -0.312500 - 0.609375 0.00000 0.00000 -0.625000 - 0.218750 0.00000 0.00000 0.625000 - 0.218750 0.00000 0.00000 0.312500 - 0.218750 0.00000 0.00000 0.00000 - 0.218750 0.00000 0.00000 -0.312500 - 0.218750 0.00000 0.00000 -0.625000 - -0.953125 0.00000 0.00000 0.625000 - -0.953125 0.00000 0.00000 0.312500 - -0.953125 0.00000 0.00000 0.00000 - -0.953125 0.00000 0.00000 -0.312500 - -0.953125 0.00000 0.00000 -0.625000 - -0.562500 0.00000 0.00000 0.625000 - -0.562500 0.00000 0.00000 0.312500 - -0.562500 0.00000 0.00000 0.00000 - -0.562500 0.00000 0.00000 -0.312500 - -0.562500 0.00000 0.00000 -0.625000 - 0.609375 0.00000 0.00000 0.625000 - 0.609375 0.00000 0.00000 0.312500 - 0.609375 0.00000 0.00000 0.00000 - 0.609375 0.00000 0.00000 -0.312500 - 0.609375 0.00000 0.00000 -0.625000 - 1.00000 0.00000 0.00000 0.625000 - 1.00000 0.00000 0.00000 0.312500 - 1.00000 0.00000 0.00000 0.00000 - 1.00000 0.00000 0.00000 -0.312500 - 1.00000 0.00000 0.00000 -0.625000 - 0.609375 0.00000 0.00000 0.625000 - 0.609375 0.00000 0.00000 0.312500 - 0.609375 0.00000 0.00000 0.00000 - 0.609375 0.00000 0.00000 -0.312500 - 0.609375 0.00000 0.00000 -0.625000 - -0.562500 0.00000 0.00000 0.625000 - -0.562500 0.00000 0.00000 0.312500 - -0.562500 0.00000 0.00000 0.00000 - -0.562500 0.00000 0.00000 -0.312500 - -0.562500 0.00000 0.00000 -0.625000 - -0.953125 0.00000 0.00000 0.625000 - -0.953125 0.00000 0.00000 0.312500 - -0.953125 0.00000 0.00000 0.00000 - -0.953125 0.00000 0.00000 -0.312500 - -0.953125 0.00000 0.00000 -0.625000 - 0.218750 0.00000 0.00000 0.625000 - 0.218750 0.00000 0.00000 0.312500 - 0.218750 0.00000 0.00000 0.00000 - 0.218750 0.00000 0.00000 -0.312500 - 0.218750 0.00000 0.00000 -0.625000 - 0.609375 0.00000 0.00000 0.625000 - 0.609375 0.00000 0.00000 0.312500 - 0.609375 0.00000 0.00000 0.00000 - 0.609375 0.00000 0.00000 -0.312500 - 0.609375 0.00000 0.00000 -0.625000 - 0.218750 0.00000 0.00000 0.625000 - 0.218750 0.00000 0.00000 0.312500 - 0.218750 0.00000 0.00000 0.00000 - 0.218750 0.00000 0.00000 -0.312500 - 0.218750 0.00000 0.00000 -0.625000 - -0.953125 0.00000 0.00000 0.625000 - -0.953125 0.00000 0.00000 0.312500 - -0.953125 0.00000 0.00000 0.00000 - -0.953125 0.00000 0.00000 -0.312500 - -0.953125 0.00000 0.00000 -0.625000 - -2.12500 0.00000 0.00000 0.625000 - -2.12500 0.00000 0.00000 0.312500 - -2.12500 0.00000 0.00000 0.00000 - -2.12500 0.00000 0.00000 -0.312500 - -2.12500 0.00000 0.00000 -0.625000 - -0.953125 0.00000 0.00000 0.625000 - -0.953125 0.00000 0.00000 0.312500 - -0.953125 0.00000 0.00000 0.00000 - -0.953125 0.00000 0.00000 -0.312500 - -0.953125 0.00000 0.00000 -0.625000 - -0.562500 0.00000 0.00000 0.625000 - -0.562500 0.00000 0.00000 0.312500 - -0.562500 0.00000 0.00000 0.00000 - -0.562500 0.00000 0.00000 -0.312500 - -0.562500 0.00000 0.00000 -0.625000 - -0.953125 0.00000 0.00000 0.625000 - -0.953125 0.00000 0.00000 0.312500 - -0.953125 0.00000 0.00000 0.00000 - -0.953125 0.00000 0.00000 -0.312500 - -0.953125 0.00000 0.00000 -0.625000 - -2.12500 0.00000 0.00000 0.625000 - -2.12500 0.00000 0.00000 0.312500 - -2.12500 0.00000 0.00000 0.00000 - -2.12500 0.00000 0.00000 -0.312500 - -2.12500 0.00000 0.00000 -0.625000 -attribute "dep" string "positions" -object "deal data" class field -component "positions" value "vertices" -component "connections" value "cells" -component "data" value "data" -attribute -end diff --git a/tests/base/functions_04.cc b/tests/base/functions_04.cc new file mode 100644 index 0000000000..aedbe826cd --- /dev/null +++ b/tests/base/functions_04.cc @@ -0,0 +1,313 @@ +//----------------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2007, 2008, 2010 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. +// +//----------------------------------------------------------------------------- + +// Plot flow functions in library and check their consistency + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +/** + * A class replacing the implemented derivatives of a function with + * difference quotients. This way, the correctness of the + * implementation can be tested. + */ +template +class DerivativeTestFunction : + public AutoDerivativeFunction +{ + public: + DerivativeTestFunction(const Function&, const double h); + ~DerivativeTestFunction(); + + virtual void vector_value (const Point& points, Vector& value) const; + virtual double value (const Point& points, const unsigned int component) const; + virtual void vector_value_list (const std::vector< Point< dim > > &points, + std::vector< Vector< double > > &values) const; + + private: + const Function& func; +}; + + +template +void +check_function(const Functions::FlowFunction& f, + unsigned int sub, + std::ostream& out) +{ + DerivativeTestFunction dtest1(f, 1.e-2); + DerivativeTestFunction dtest2(f, 2.e-2); + // Prepare a vector with a single + // patch stretching over the cube + // [-1,1]^dim + std::vector > patches(1); + unsigned int vertex_number = 0; + for (unsigned int iz=0;iz < ((dim>2) ? 2 : 1) ;++iz) + for (unsigned int iy=0;iy < ((dim>1) ? 2 : 1) ;++iy) + for (unsigned int ix=0;ix < 2 ;++ix) + { + if (dim>0) patches[0].vertices[vertex_number](0) = -1. + 2.*ix; + if (dim>1) patches[0].vertices[vertex_number](1) = -1. + 2.*iy; + if (dim>2) patches[0].vertices[vertex_number](2) = -1. + 2.*iz; + ++vertex_number; + } + for (unsigned int i=0;i::faces_per_cell;++i) + patches[0].neighbors[i] = numbers::invalid_unsigned_int; + patches[0].patch_index = 0; + patches[0].n_subdivisions = sub; + patches[0].points_are_available = false; + + vertex_number = 1; + for (unsigned int d=0;d > points(vertex_number); + const double h = 2./sub; + vertex_number = 0; + for (unsigned int iz=0;iz <= ((dim>2) ? sub : 0) ;++iz) + for (unsigned int iy=0;iy <= ((dim>1) ? sub : 0) ;++iy) + for (unsigned int ix=0;ix <= sub ;++ix) + { + if (dim>0) points[vertex_number](0) = -1.+ix*h; + if (dim>1) points[vertex_number](1) = -1.+iy*h; + if (dim>2) points[vertex_number](2) = -1.+iz*h; + ++vertex_number; + } + + std::vector > values(points.size(), Vector(f.n_components)); + std::vector > values2(f.n_components, + std::vector(points.size())); + f.vector_value_list(points, values); + f.vector_values(points, values2); + for (unsigned int i=0;i 1e-10) + patches[0].data(j, i) = values[i](j); + else + patches[0].data(j, i) = 0; + if (values[i](j) != values2[j][i]) + deallog << "Error values (" << i << ',' << j << ") : " + << values[i](j) << " != " << values2[j][i] << std::endl; + } + + deallog << "Gradients "; + // Compute gradients and difference approximations + std::vector > > + gradients(f.n_components, std::vector >(points.size())); + std::vector > > + gradients1(points.size(), std::vector >(f.n_components)); + std::vector > > + gradients2(points.size(), std::vector >(f.n_components)); + + f.vector_gradients(points, gradients); + dtest1.vector_gradient_list(points, gradients1); + dtest2.vector_gradient_list(points, gradients2); + + // Compare gradients and difference quotients + for (unsigned int k=0;k d1 = gradients1[i][k] - gradients[k][i]; + Tensor<1,dim> d2 = gradients2[i][k] - gradients[k][i]; + + // If the difference is + // already small, we are fine + if (d1.norm() > 1.e-13) + { + // Check for + // convergence. For full + // 4th order, gradients2 + // should be 16 times as + // large, so let's be a + // bit generous + if (d2.norm() < 12.* d1.norm()) + { + deallog << "Gradient error: point " << i + << " (" << points[i] << " )" + << " comp " << k +// << " norms " << d1.norm() << " " << d2.norm() + << std::endl; + for (unsigned int d=0;d 1.e-13) + deallog << "Divergence " << k << " " + << div << std::endl; + } + deallog << "tested" << std::endl; + + f.vector_laplacian_list(points, values); + f.vector_laplacians(points, values2); + double sum = 0.; + for (unsigned int i=0;i names(f.n_components); + for (unsigned int i=0;i > vectors; + if (dim==2) + dout.write_gnuplot(patches, names, vectors, gflags, out); + else + dout.write_dx(patches, names, vectors, dxflags, out); +} + + +int main() +{ + std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output"); + std::ofstream logfile(logname.c_str()); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + if (true) + { + deallog << " Functions::StokesCosine<2>" << std::endl; + Functions::StokesCosine<2> f(1.); + check_function(f, 4, logfile); + } + + if (true) + { + deallog << " Functions::StokesCosine<3>" << std::endl; + Functions::StokesCosine<3> f(1.); + check_function(f, 4, logfile); + } + + if (true) + { + deallog << "Functions::StokesLSingularity" << std::endl; + Functions::StokesLSingularity f; + // Use odd number of points to + // avoid lines with + // discontinuous derivatives. + check_function(f, 5, logfile); + } + + if (true) + { + deallog << "Functions::Kovasznay" << std::endl; + Functions::Kovasznay f(10.); + check_function(f, 4, logfile); + } + + if (true) + { + deallog << "Functions::PoisseuilleFlow<2>" << std::endl; + Functions::PoisseuilleFlow<2> f(.8, 10.); + check_function(f, 4, logfile); + } + + if (true) + { + deallog << "Functions::PoisseuilleFlow<3>" << std::endl; + Functions::PoisseuilleFlow<3> f(.8, 10.); + check_function(f, 4, logfile); + } +} + + +template +DerivativeTestFunction::DerivativeTestFunction(const Function& f, + const double h) + : + AutoDerivativeFunction(h, f.n_components), + func(f) +{ + this->set_formula(AutoDerivativeFunction::FourthOrder); +} + + +template +DerivativeTestFunction::~DerivativeTestFunction() +{} + + +template +void +DerivativeTestFunction::vector_value_list ( + const std::vector< Point< dim > > &points, + std::vector< Vector< double > > &values) const +{ + func.vector_value_list(points, values); +} + + +template +void DerivativeTestFunction::vector_value ( + const Point& point, + Vector& value) const +{ + func.vector_value(point, value); +} + + +template +double DerivativeTestFunction::value ( + const Point& point, + const unsigned int comp) const +{ +// std::cerr << '[' << point << '!' << func.value(point, comp) << ']'; + + return func.value(point, comp); +} diff --git a/tests/base/functions_04/cmp/generic b/tests/base/functions_04/cmp/generic new file mode 100644 index 0000000000..77be59b82a --- /dev/null +++ b/tests/base/functions_04/cmp/generic @@ -0,0 +1,843 @@ + +DEAL:: Functions::StokesCosine<2> +DEAL::Gradients tested +DEAL::Divergence tested +DEAL::Laplacians 0.719980 +# This file was generated by the deal.II library. + + +# +# For a description of the GNUPLOT format see the GNUPLOT manual. +# +# +-1.00000 -1.00000 0.00000 0.00000 0.00000 +-0.500000 -1.00000 0.00000 0.00000 0.00000 +0.00000 -1.00000 0.00000 0.00000 0.00000 +0.500000 -1.00000 0.00000 0.00000 0.00000 +1.00000 -1.00000 0.00000 0.00000 0.00000 + +-1.00000 -0.500000 0.00000 0.00000 0.00000 +-0.500000 -0.500000 -0.250000 0.250000 0.250000 +0.00000 -0.500000 -0.500000 0.00000 0.00000 +0.500000 -0.500000 -0.250000 -0.250000 -0.250000 +1.00000 -0.500000 0.00000 0.00000 0.00000 + +-1.00000 0.00000 0.00000 0.00000 0.00000 +-0.500000 0.00000 0.00000 0.500000 0.00000 +0.00000 0.00000 0.00000 0.00000 0.00000 +0.500000 0.00000 0.00000 -0.500000 0.00000 +1.00000 0.00000 0.00000 0.00000 0.00000 + +-1.00000 0.500000 0.00000 0.00000 0.00000 +-0.500000 0.500000 0.250000 0.250000 -0.250000 +0.00000 0.500000 0.500000 0.00000 0.00000 +0.500000 0.500000 0.250000 -0.250000 0.250000 +1.00000 0.500000 0.00000 0.00000 0.00000 + +-1.00000 1.00000 0.00000 0.00000 0.00000 +-0.500000 1.00000 0.00000 0.00000 0.00000 +0.00000 1.00000 0.00000 0.00000 0.00000 +0.500000 1.00000 0.00000 0.00000 0.00000 +1.00000 1.00000 0.00000 0.00000 0.00000 + + +DEAL:: Functions::StokesCosine<3> +DEAL::Gradients tested +DEAL::Divergence tested +DEAL::Laplacians 0.119270 +object "vertices" class array type float rank 1 shape 3 items 125 data follows +-1.00000 -1.00000 -1.00000 +-0.500000 -1.00000 -1.00000 +0.00000 -1.00000 -1.00000 +0.500000 -1.00000 -1.00000 +1.00000 -1.00000 -1.00000 +-1.00000 -0.500000 -1.00000 +-0.500000 -0.500000 -1.00000 +0.00000 -0.500000 -1.00000 +0.500000 -0.500000 -1.00000 +1.00000 -0.500000 -1.00000 +-1.00000 0.00000 -1.00000 +-0.500000 0.00000 -1.00000 +0.00000 0.00000 -1.00000 +0.500000 0.00000 -1.00000 +1.00000 0.00000 -1.00000 +-1.00000 0.500000 -1.00000 +-0.500000 0.500000 -1.00000 +0.00000 0.500000 -1.00000 +0.500000 0.500000 -1.00000 +1.00000 0.500000 -1.00000 +-1.00000 1.00000 -1.00000 +-0.500000 1.00000 -1.00000 +0.00000 1.00000 -1.00000 +0.500000 1.00000 -1.00000 +1.00000 1.00000 -1.00000 +-1.00000 -1.00000 -0.500000 +-0.500000 -1.00000 -0.500000 +0.00000 -1.00000 -0.500000 +0.500000 -1.00000 -0.500000 +1.00000 -1.00000 -0.500000 +-1.00000 -0.500000 -0.500000 +-0.500000 -0.500000 -0.500000 +0.00000 -0.500000 -0.500000 +0.500000 -0.500000 -0.500000 +1.00000 -0.500000 -0.500000 +-1.00000 0.00000 -0.500000 +-0.500000 0.00000 -0.500000 +0.00000 0.00000 -0.500000 +0.500000 0.00000 -0.500000 +1.00000 0.00000 -0.500000 +-1.00000 0.500000 -0.500000 +-0.500000 0.500000 -0.500000 +0.00000 0.500000 -0.500000 +0.500000 0.500000 -0.500000 +1.00000 0.500000 -0.500000 +-1.00000 1.00000 -0.500000 +-0.500000 1.00000 -0.500000 +0.00000 1.00000 -0.500000 +0.500000 1.00000 -0.500000 +1.00000 1.00000 -0.500000 +-1.00000 -1.00000 0.00000 +-0.500000 -1.00000 0.00000 +0.00000 -1.00000 0.00000 +0.500000 -1.00000 0.00000 +1.00000 -1.00000 0.00000 +-1.00000 -0.500000 0.00000 +-0.500000 -0.500000 0.00000 +0.00000 -0.500000 0.00000 +0.500000 -0.500000 0.00000 +1.00000 -0.500000 0.00000 +-1.00000 0.00000 0.00000 +-0.500000 0.00000 0.00000 +0.00000 0.00000 0.00000 +0.500000 0.00000 0.00000 +1.00000 0.00000 0.00000 +-1.00000 0.500000 0.00000 +-0.500000 0.500000 0.00000 +0.00000 0.500000 0.00000 +0.500000 0.500000 0.00000 +1.00000 0.500000 0.00000 +-1.00000 1.00000 0.00000 +-0.500000 1.00000 0.00000 +0.00000 1.00000 0.00000 +0.500000 1.00000 0.00000 +1.00000 1.00000 0.00000 +-1.00000 -1.00000 0.500000 +-0.500000 -1.00000 0.500000 +0.00000 -1.00000 0.500000 +0.500000 -1.00000 0.500000 +1.00000 -1.00000 0.500000 +-1.00000 -0.500000 0.500000 +-0.500000 -0.500000 0.500000 +0.00000 -0.500000 0.500000 +0.500000 -0.500000 0.500000 +1.00000 -0.500000 0.500000 +-1.00000 0.00000 0.500000 +-0.500000 0.00000 0.500000 +0.00000 0.00000 0.500000 +0.500000 0.00000 0.500000 +1.00000 0.00000 0.500000 +-1.00000 0.500000 0.500000 +-0.500000 0.500000 0.500000 +0.00000 0.500000 0.500000 +0.500000 0.500000 0.500000 +1.00000 0.500000 0.500000 +-1.00000 1.00000 0.500000 +-0.500000 1.00000 0.500000 +0.00000 1.00000 0.500000 +0.500000 1.00000 0.500000 +1.00000 1.00000 0.500000 +-1.00000 -1.00000 1.00000 +-0.500000 -1.00000 1.00000 +0.00000 -1.00000 1.00000 +0.500000 -1.00000 1.00000 +1.00000 -1.00000 1.00000 +-1.00000 -0.500000 1.00000 +-0.500000 -0.500000 1.00000 +0.00000 -0.500000 1.00000 +0.500000 -0.500000 1.00000 +1.00000 -0.500000 1.00000 +-1.00000 0.00000 1.00000 +-0.500000 0.00000 1.00000 +0.00000 0.00000 1.00000 +0.500000 0.00000 1.00000 +1.00000 0.00000 1.00000 +-1.00000 0.500000 1.00000 +-0.500000 0.500000 1.00000 +0.00000 0.500000 1.00000 +0.500000 0.500000 1.00000 +1.00000 0.500000 1.00000 +-1.00000 1.00000 1.00000 +-0.500000 1.00000 1.00000 +0.00000 1.00000 1.00000 +0.500000 1.00000 1.00000 +1.00000 1.00000 1.00000 +object "cells" class array type int rank 1 shape 8 items 64 data follows +0 25 5 30 1 26 6 31 +1 26 6 31 2 27 7 32 +2 27 7 32 3 28 8 33 +3 28 8 33 4 29 9 34 +5 30 10 35 6 31 11 36 +6 31 11 36 7 32 12 37 +7 32 12 37 8 33 13 38 +8 33 13 38 9 34 14 39 +10 35 15 40 11 36 16 41 +11 36 16 41 12 37 17 42 +12 37 17 42 13 38 18 43 +13 38 18 43 14 39 19 44 +15 40 20 45 16 41 21 46 +16 41 21 46 17 42 22 47 +17 42 22 47 18 43 23 48 +18 43 23 48 19 44 24 49 +25 50 30 55 26 51 31 56 +26 51 31 56 27 52 32 57 +27 52 32 57 28 53 33 58 +28 53 33 58 29 54 34 59 +30 55 35 60 31 56 36 61 +31 56 36 61 32 57 37 62 +32 57 37 62 33 58 38 63 +33 58 38 63 34 59 39 64 +35 60 40 65 36 61 41 66 +36 61 41 66 37 62 42 67 +37 62 42 67 38 63 43 68 +38 63 43 68 39 64 44 69 +40 65 45 70 41 66 46 71 +41 66 46 71 42 67 47 72 +42 67 47 72 43 68 48 73 +43 68 48 73 44 69 49 74 +50 75 55 80 51 76 56 81 +51 76 56 81 52 77 57 82 +52 77 57 82 53 78 58 83 +53 78 58 83 54 79 59 84 +55 80 60 85 56 81 61 86 +56 81 61 86 57 82 62 87 +57 82 62 87 58 83 63 88 +58 83 63 88 59 84 64 89 +60 85 65 90 61 86 66 91 +61 86 66 91 62 87 67 92 +62 87 67 92 63 88 68 93 +63 88 68 93 64 89 69 94 +65 90 70 95 66 91 71 96 +66 91 71 96 67 92 72 97 +67 92 72 97 68 93 73 98 +68 93 73 98 69 94 74 99 +75 100 80 105 76 101 81 106 +76 101 81 106 77 102 82 107 +77 102 82 107 78 103 83 108 +78 103 83 108 79 104 84 109 +80 105 85 110 81 106 86 111 +81 106 86 111 82 107 87 112 +82 107 87 112 83 108 88 113 +83 108 88 113 84 109 89 114 +85 110 90 115 86 111 91 116 +86 111 91 116 87 112 92 117 +87 112 92 117 88 113 93 118 +88 113 93 118 89 114 94 119 +90 115 95 120 91 116 96 121 +91 116 96 121 92 117 97 122 +92 117 97 122 93 118 98 123 +93 118 98 123 94 119 99 124 + +attribute "element type" string "cubes" +attribute "ref" string "positions" +object "data" class array type float rank 1 shape 4 items 125 data follows + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.125000 0.125000 -0.250000 -0.125000 + 0.250000 0.00000 0.00000 0.00000 + 0.125000 -0.125000 0.250000 0.125000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.250000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 -0.250000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + -0.125000 0.125000 0.250000 0.125000 + -0.250000 0.00000 0.00000 0.00000 + -0.125000 -0.125000 -0.250000 -0.125000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 -0.500000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.500000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.500000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 -0.500000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + -0.125000 -0.125000 -0.250000 0.125000 + -0.250000 0.00000 0.00000 0.00000 + -0.125000 0.125000 0.250000 -0.125000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 -0.250000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.250000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.125000 -0.125000 0.250000 -0.125000 + 0.250000 0.00000 0.00000 0.00000 + 0.125000 0.125000 -0.250000 0.125000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 0.00000 +attribute "dep" string "positions" +object "deal data" class field +component "positions" value "vertices" +component "connections" value "cells" +component "data" value "data" +attribute +end +DEAL::Functions::StokesLSingularity +DEAL::Gradients tested +DEAL::Divergence tested +DEAL::Laplacians 0 +# This file was generated by the deal.II library. + + +# +# For a description of the GNUPLOT format see the GNUPLOT manual. +# +# +-1.00000 -1.00000 4.26453 -4.26453 0.00000 +-0.600000 -1.00000 4.09873 -3.41727 -0.473831 +-0.200000 -1.00000 3.84003 -2.45659 -1.19703 +0.200000 -1.00000 3.41329 -1.55228 -1.95790 +0.600000 -1.00000 2.90816 -0.922336 -2.41631 +1.00000 -1.00000 2.47239 -0.566216 -2.55657 + +-1.00000 -0.600000 3.41727 -4.09873 0.473831 +-0.600000 -0.600000 3.22908 -3.22908 0.00000 +-0.200000 -0.600000 2.98575 -2.10725 -1.17869 +0.200000 -0.600000 2.45684 -0.989538 -2.71696 +0.600000 -0.600000 1.87208 -0.428735 -3.22637 +1.00000 -0.600000 1.49487 -0.221862 -3.13156 + +-1.00000 -0.200000 2.45659 -3.84003 1.19703 +-0.600000 -0.200000 2.10725 -2.98575 1.17869 +-0.200000 -0.200000 1.77539 -1.77539 0.00000 +0.200000 -0.200000 1.02929 -0.235724 -5.32170 +0.600000 -0.200000 0.609245 -0.0505464 -4.49620 +1.00000 -0.200000 0.467523 -0.0228120 -3.76482 + +-1.00000 0.200000 1.55228 -3.41329 1.95790 +-0.600000 0.200000 0.989538 -2.45684 2.71696 +-0.200000 0.200000 0.235724 -1.02929 5.32170 +0.200000 0.200000 0.00000 0.00000 0.00000 +0.600000 0.200000 0.00000 0.00000 0.00000 +1.00000 0.200000 0.00000 0.00000 0.00000 + +-1.00000 0.600000 0.922336 -2.90816 2.41631 +-0.600000 0.600000 0.428735 -1.87208 3.22637 +-0.200000 0.600000 0.0505464 -0.609245 4.49620 +0.200000 0.600000 0.00000 0.00000 0.00000 +0.600000 0.600000 0.00000 0.00000 0.00000 +1.00000 0.600000 0.00000 0.00000 0.00000 + +-1.00000 1.00000 0.566216 -2.47239 2.55657 +-0.600000 1.00000 0.221862 -1.49487 3.13156 +-0.200000 1.00000 0.0228120 -0.467523 3.76482 +0.200000 1.00000 0.00000 0.00000 0.00000 +0.600000 1.00000 0.00000 0.00000 0.00000 +1.00000 1.00000 0.00000 0.00000 0.00000 + + +DEAL::Functions::Kovasznay +DEAL::Gradients tested +DEAL::Divergence tested +DEAL::Laplacians 0 +# This file was generated by the deal.II library. + + +# +# For a description of the GNUPLOT format see the GNUPLOT manual. +# +# +-1.00000 -1.00000 -19.6940 0.00000 -213.268 +-0.500000 -1.00000 -3.54907 0.00000 -9.49326 +0.00000 -1.00000 0.00000 0.00000 0.353753 +0.500000 -1.00000 0.780175 0.00000 0.829592 +1.00000 -1.00000 0.951677 0.00000 0.852586 + +-1.00000 -0.500000 21.6940 0.00000 -213.268 +-0.500000 -0.500000 5.54907 0.00000 -9.49326 +0.00000 -0.500000 2.00000 0.00000 0.353753 +0.500000 -0.500000 1.21983 0.00000 0.829592 +1.00000 -0.500000 1.04832 0.00000 0.852586 + +-1.00000 0.00000 -19.6940 0.00000 -213.268 +-0.500000 0.00000 -3.54907 0.00000 -9.49326 +0.00000 0.00000 0.00000 0.00000 0.353753 +0.500000 0.00000 0.780175 0.00000 0.829592 +1.00000 0.00000 0.951677 0.00000 0.852586 + +-1.00000 0.500000 21.6940 0.00000 -213.268 +-0.500000 0.500000 5.54907 0.00000 -9.49326 +0.00000 0.500000 2.00000 0.00000 0.353753 +0.500000 0.500000 1.21983 0.00000 0.829592 +1.00000 0.500000 1.04832 0.00000 0.852586 + +-1.00000 1.00000 -19.6940 0.00000 -213.268 +-0.500000 1.00000 -3.54907 0.00000 -9.49326 +0.00000 1.00000 0.00000 0.00000 0.353753 +0.500000 1.00000 0.780175 0.00000 0.829592 +1.00000 1.00000 0.951677 0.00000 0.852586 + + +DEAL::Functions::PoisseuilleFlow<2> +DEAL::Gradients tested +DEAL::Divergence tested +DEAL::Laplacians 0 +# This file was generated by the deal.II library. + + +# +# For a description of the GNUPLOT format see the GNUPLOT manual. +# +# +-1.00000 -1.00000 -0.562500 0.00000 0.312500 +-0.500000 -1.00000 -0.562500 0.00000 0.156250 +0.00000 -1.00000 -0.562500 0.00000 0.00000 +0.500000 -1.00000 -0.562500 0.00000 -0.156250 +1.00000 -1.00000 -0.562500 0.00000 -0.312500 + +-1.00000 -0.500000 0.609375 0.00000 0.312500 +-0.500000 -0.500000 0.609375 0.00000 0.156250 +0.00000 -0.500000 0.609375 0.00000 0.00000 +0.500000 -0.500000 0.609375 0.00000 -0.156250 +1.00000 -0.500000 0.609375 0.00000 -0.312500 + +-1.00000 0.00000 1.00000 0.00000 0.312500 +-0.500000 0.00000 1.00000 0.00000 0.156250 +0.00000 0.00000 1.00000 0.00000 0.00000 +0.500000 0.00000 1.00000 0.00000 -0.156250 +1.00000 0.00000 1.00000 0.00000 -0.312500 + +-1.00000 0.500000 0.609375 0.00000 0.312500 +-0.500000 0.500000 0.609375 0.00000 0.156250 +0.00000 0.500000 0.609375 0.00000 0.00000 +0.500000 0.500000 0.609375 0.00000 -0.156250 +1.00000 0.500000 0.609375 0.00000 -0.312500 + +-1.00000 1.00000 -0.562500 0.00000 0.312500 +-0.500000 1.00000 -0.562500 0.00000 0.156250 +0.00000 1.00000 -0.562500 0.00000 0.00000 +0.500000 1.00000 -0.562500 0.00000 -0.156250 +1.00000 1.00000 -0.562500 0.00000 -0.312500 + + +DEAL::Functions::PoisseuilleFlow<3> +DEAL::Gradients tested +DEAL::Divergence tested +DEAL::Laplacians 0 +object "vertices" class array type float rank 1 shape 3 items 125 data follows +-1.00000 -1.00000 -1.00000 +-0.500000 -1.00000 -1.00000 +0.00000 -1.00000 -1.00000 +0.500000 -1.00000 -1.00000 +1.00000 -1.00000 -1.00000 +-1.00000 -0.500000 -1.00000 +-0.500000 -0.500000 -1.00000 +0.00000 -0.500000 -1.00000 +0.500000 -0.500000 -1.00000 +1.00000 -0.500000 -1.00000 +-1.00000 0.00000 -1.00000 +-0.500000 0.00000 -1.00000 +0.00000 0.00000 -1.00000 +0.500000 0.00000 -1.00000 +1.00000 0.00000 -1.00000 +-1.00000 0.500000 -1.00000 +-0.500000 0.500000 -1.00000 +0.00000 0.500000 -1.00000 +0.500000 0.500000 -1.00000 +1.00000 0.500000 -1.00000 +-1.00000 1.00000 -1.00000 +-0.500000 1.00000 -1.00000 +0.00000 1.00000 -1.00000 +0.500000 1.00000 -1.00000 +1.00000 1.00000 -1.00000 +-1.00000 -1.00000 -0.500000 +-0.500000 -1.00000 -0.500000 +0.00000 -1.00000 -0.500000 +0.500000 -1.00000 -0.500000 +1.00000 -1.00000 -0.500000 +-1.00000 -0.500000 -0.500000 +-0.500000 -0.500000 -0.500000 +0.00000 -0.500000 -0.500000 +0.500000 -0.500000 -0.500000 +1.00000 -0.500000 -0.500000 +-1.00000 0.00000 -0.500000 +-0.500000 0.00000 -0.500000 +0.00000 0.00000 -0.500000 +0.500000 0.00000 -0.500000 +1.00000 0.00000 -0.500000 +-1.00000 0.500000 -0.500000 +-0.500000 0.500000 -0.500000 +0.00000 0.500000 -0.500000 +0.500000 0.500000 -0.500000 +1.00000 0.500000 -0.500000 +-1.00000 1.00000 -0.500000 +-0.500000 1.00000 -0.500000 +0.00000 1.00000 -0.500000 +0.500000 1.00000 -0.500000 +1.00000 1.00000 -0.500000 +-1.00000 -1.00000 0.00000 +-0.500000 -1.00000 0.00000 +0.00000 -1.00000 0.00000 +0.500000 -1.00000 0.00000 +1.00000 -1.00000 0.00000 +-1.00000 -0.500000 0.00000 +-0.500000 -0.500000 0.00000 +0.00000 -0.500000 0.00000 +0.500000 -0.500000 0.00000 +1.00000 -0.500000 0.00000 +-1.00000 0.00000 0.00000 +-0.500000 0.00000 0.00000 +0.00000 0.00000 0.00000 +0.500000 0.00000 0.00000 +1.00000 0.00000 0.00000 +-1.00000 0.500000 0.00000 +-0.500000 0.500000 0.00000 +0.00000 0.500000 0.00000 +0.500000 0.500000 0.00000 +1.00000 0.500000 0.00000 +-1.00000 1.00000 0.00000 +-0.500000 1.00000 0.00000 +0.00000 1.00000 0.00000 +0.500000 1.00000 0.00000 +1.00000 1.00000 0.00000 +-1.00000 -1.00000 0.500000 +-0.500000 -1.00000 0.500000 +0.00000 -1.00000 0.500000 +0.500000 -1.00000 0.500000 +1.00000 -1.00000 0.500000 +-1.00000 -0.500000 0.500000 +-0.500000 -0.500000 0.500000 +0.00000 -0.500000 0.500000 +0.500000 -0.500000 0.500000 +1.00000 -0.500000 0.500000 +-1.00000 0.00000 0.500000 +-0.500000 0.00000 0.500000 +0.00000 0.00000 0.500000 +0.500000 0.00000 0.500000 +1.00000 0.00000 0.500000 +-1.00000 0.500000 0.500000 +-0.500000 0.500000 0.500000 +0.00000 0.500000 0.500000 +0.500000 0.500000 0.500000 +1.00000 0.500000 0.500000 +-1.00000 1.00000 0.500000 +-0.500000 1.00000 0.500000 +0.00000 1.00000 0.500000 +0.500000 1.00000 0.500000 +1.00000 1.00000 0.500000 +-1.00000 -1.00000 1.00000 +-0.500000 -1.00000 1.00000 +0.00000 -1.00000 1.00000 +0.500000 -1.00000 1.00000 +1.00000 -1.00000 1.00000 +-1.00000 -0.500000 1.00000 +-0.500000 -0.500000 1.00000 +0.00000 -0.500000 1.00000 +0.500000 -0.500000 1.00000 +1.00000 -0.500000 1.00000 +-1.00000 0.00000 1.00000 +-0.500000 0.00000 1.00000 +0.00000 0.00000 1.00000 +0.500000 0.00000 1.00000 +1.00000 0.00000 1.00000 +-1.00000 0.500000 1.00000 +-0.500000 0.500000 1.00000 +0.00000 0.500000 1.00000 +0.500000 0.500000 1.00000 +1.00000 0.500000 1.00000 +-1.00000 1.00000 1.00000 +-0.500000 1.00000 1.00000 +0.00000 1.00000 1.00000 +0.500000 1.00000 1.00000 +1.00000 1.00000 1.00000 +object "cells" class array type int rank 1 shape 8 items 64 data follows +0 25 5 30 1 26 6 31 +1 26 6 31 2 27 7 32 +2 27 7 32 3 28 8 33 +3 28 8 33 4 29 9 34 +5 30 10 35 6 31 11 36 +6 31 11 36 7 32 12 37 +7 32 12 37 8 33 13 38 +8 33 13 38 9 34 14 39 +10 35 15 40 11 36 16 41 +11 36 16 41 12 37 17 42 +12 37 17 42 13 38 18 43 +13 38 18 43 14 39 19 44 +15 40 20 45 16 41 21 46 +16 41 21 46 17 42 22 47 +17 42 22 47 18 43 23 48 +18 43 23 48 19 44 24 49 +25 50 30 55 26 51 31 56 +26 51 31 56 27 52 32 57 +27 52 32 57 28 53 33 58 +28 53 33 58 29 54 34 59 +30 55 35 60 31 56 36 61 +31 56 36 61 32 57 37 62 +32 57 37 62 33 58 38 63 +33 58 38 63 34 59 39 64 +35 60 40 65 36 61 41 66 +36 61 41 66 37 62 42 67 +37 62 42 67 38 63 43 68 +38 63 43 68 39 64 44 69 +40 65 45 70 41 66 46 71 +41 66 46 71 42 67 47 72 +42 67 47 72 43 68 48 73 +43 68 48 73 44 69 49 74 +50 75 55 80 51 76 56 81 +51 76 56 81 52 77 57 82 +52 77 57 82 53 78 58 83 +53 78 58 83 54 79 59 84 +55 80 60 85 56 81 61 86 +56 81 61 86 57 82 62 87 +57 82 62 87 58 83 63 88 +58 83 63 88 59 84 64 89 +60 85 65 90 61 86 66 91 +61 86 66 91 62 87 67 92 +62 87 67 92 63 88 68 93 +63 88 68 93 64 89 69 94 +65 90 70 95 66 91 71 96 +66 91 71 96 67 92 72 97 +67 92 72 97 68 93 73 98 +68 93 73 98 69 94 74 99 +75 100 80 105 76 101 81 106 +76 101 81 106 77 102 82 107 +77 102 82 107 78 103 83 108 +78 103 83 108 79 104 84 109 +80 105 85 110 81 106 86 111 +81 106 86 111 82 107 87 112 +82 107 87 112 83 108 88 113 +83 108 88 113 84 109 89 114 +85 110 90 115 86 111 91 116 +86 111 91 116 87 112 92 117 +87 112 92 117 88 113 93 118 +88 113 93 118 89 114 94 119 +90 115 95 120 91 116 96 121 +91 116 96 121 92 117 97 122 +92 117 97 122 93 118 98 123 +93 118 98 123 94 119 99 124 + +attribute "element type" string "cubes" +attribute "ref" string "positions" +object "data" class array type float rank 1 shape 4 items 125 data follows + -2.12500 0.00000 0.00000 0.625000 + -2.12500 0.00000 0.00000 0.312500 + -2.12500 0.00000 0.00000 0.00000 + -2.12500 0.00000 0.00000 -0.312500 + -2.12500 0.00000 0.00000 -0.625000 + -0.953125 0.00000 0.00000 0.625000 + -0.953125 0.00000 0.00000 0.312500 + -0.953125 0.00000 0.00000 0.00000 + -0.953125 0.00000 0.00000 -0.312500 + -0.953125 0.00000 0.00000 -0.625000 + -0.562500 0.00000 0.00000 0.625000 + -0.562500 0.00000 0.00000 0.312500 + -0.562500 0.00000 0.00000 0.00000 + -0.562500 0.00000 0.00000 -0.312500 + -0.562500 0.00000 0.00000 -0.625000 + -0.953125 0.00000 0.00000 0.625000 + -0.953125 0.00000 0.00000 0.312500 + -0.953125 0.00000 0.00000 0.00000 + -0.953125 0.00000 0.00000 -0.312500 + -0.953125 0.00000 0.00000 -0.625000 + -2.12500 0.00000 0.00000 0.625000 + -2.12500 0.00000 0.00000 0.312500 + -2.12500 0.00000 0.00000 0.00000 + -2.12500 0.00000 0.00000 -0.312500 + -2.12500 0.00000 0.00000 -0.625000 + -0.953125 0.00000 0.00000 0.625000 + -0.953125 0.00000 0.00000 0.312500 + -0.953125 0.00000 0.00000 0.00000 + -0.953125 0.00000 0.00000 -0.312500 + -0.953125 0.00000 0.00000 -0.625000 + 0.218750 0.00000 0.00000 0.625000 + 0.218750 0.00000 0.00000 0.312500 + 0.218750 0.00000 0.00000 0.00000 + 0.218750 0.00000 0.00000 -0.312500 + 0.218750 0.00000 0.00000 -0.625000 + 0.609375 0.00000 0.00000 0.625000 + 0.609375 0.00000 0.00000 0.312500 + 0.609375 0.00000 0.00000 0.00000 + 0.609375 0.00000 0.00000 -0.312500 + 0.609375 0.00000 0.00000 -0.625000 + 0.218750 0.00000 0.00000 0.625000 + 0.218750 0.00000 0.00000 0.312500 + 0.218750 0.00000 0.00000 0.00000 + 0.218750 0.00000 0.00000 -0.312500 + 0.218750 0.00000 0.00000 -0.625000 + -0.953125 0.00000 0.00000 0.625000 + -0.953125 0.00000 0.00000 0.312500 + -0.953125 0.00000 0.00000 0.00000 + -0.953125 0.00000 0.00000 -0.312500 + -0.953125 0.00000 0.00000 -0.625000 + -0.562500 0.00000 0.00000 0.625000 + -0.562500 0.00000 0.00000 0.312500 + -0.562500 0.00000 0.00000 0.00000 + -0.562500 0.00000 0.00000 -0.312500 + -0.562500 0.00000 0.00000 -0.625000 + 0.609375 0.00000 0.00000 0.625000 + 0.609375 0.00000 0.00000 0.312500 + 0.609375 0.00000 0.00000 0.00000 + 0.609375 0.00000 0.00000 -0.312500 + 0.609375 0.00000 0.00000 -0.625000 + 1.00000 0.00000 0.00000 0.625000 + 1.00000 0.00000 0.00000 0.312500 + 1.00000 0.00000 0.00000 0.00000 + 1.00000 0.00000 0.00000 -0.312500 + 1.00000 0.00000 0.00000 -0.625000 + 0.609375 0.00000 0.00000 0.625000 + 0.609375 0.00000 0.00000 0.312500 + 0.609375 0.00000 0.00000 0.00000 + 0.609375 0.00000 0.00000 -0.312500 + 0.609375 0.00000 0.00000 -0.625000 + -0.562500 0.00000 0.00000 0.625000 + -0.562500 0.00000 0.00000 0.312500 + -0.562500 0.00000 0.00000 0.00000 + -0.562500 0.00000 0.00000 -0.312500 + -0.562500 0.00000 0.00000 -0.625000 + -0.953125 0.00000 0.00000 0.625000 + -0.953125 0.00000 0.00000 0.312500 + -0.953125 0.00000 0.00000 0.00000 + -0.953125 0.00000 0.00000 -0.312500 + -0.953125 0.00000 0.00000 -0.625000 + 0.218750 0.00000 0.00000 0.625000 + 0.218750 0.00000 0.00000 0.312500 + 0.218750 0.00000 0.00000 0.00000 + 0.218750 0.00000 0.00000 -0.312500 + 0.218750 0.00000 0.00000 -0.625000 + 0.609375 0.00000 0.00000 0.625000 + 0.609375 0.00000 0.00000 0.312500 + 0.609375 0.00000 0.00000 0.00000 + 0.609375 0.00000 0.00000 -0.312500 + 0.609375 0.00000 0.00000 -0.625000 + 0.218750 0.00000 0.00000 0.625000 + 0.218750 0.00000 0.00000 0.312500 + 0.218750 0.00000 0.00000 0.00000 + 0.218750 0.00000 0.00000 -0.312500 + 0.218750 0.00000 0.00000 -0.625000 + -0.953125 0.00000 0.00000 0.625000 + -0.953125 0.00000 0.00000 0.312500 + -0.953125 0.00000 0.00000 0.00000 + -0.953125 0.00000 0.00000 -0.312500 + -0.953125 0.00000 0.00000 -0.625000 + -2.12500 0.00000 0.00000 0.625000 + -2.12500 0.00000 0.00000 0.312500 + -2.12500 0.00000 0.00000 0.00000 + -2.12500 0.00000 0.00000 -0.312500 + -2.12500 0.00000 0.00000 -0.625000 + -0.953125 0.00000 0.00000 0.625000 + -0.953125 0.00000 0.00000 0.312500 + -0.953125 0.00000 0.00000 0.00000 + -0.953125 0.00000 0.00000 -0.312500 + -0.953125 0.00000 0.00000 -0.625000 + -0.562500 0.00000 0.00000 0.625000 + -0.562500 0.00000 0.00000 0.312500 + -0.562500 0.00000 0.00000 0.00000 + -0.562500 0.00000 0.00000 -0.312500 + -0.562500 0.00000 0.00000 -0.625000 + -0.953125 0.00000 0.00000 0.625000 + -0.953125 0.00000 0.00000 0.312500 + -0.953125 0.00000 0.00000 0.00000 + -0.953125 0.00000 0.00000 -0.312500 + -0.953125 0.00000 0.00000 -0.625000 + -2.12500 0.00000 0.00000 0.625000 + -2.12500 0.00000 0.00000 0.312500 + -2.12500 0.00000 0.00000 0.00000 + -2.12500 0.00000 0.00000 -0.312500 + -2.12500 0.00000 0.00000 -0.625000 +attribute "dep" string "positions" +object "deal data" class field +component "positions" value "vertices" +component "connections" value "cells" +component "data" value "data" +attribute +end -- 2.39.5