--- /dev/null
+//---------------------------- function_manifold_chart ---------------------------
+// Copyright (C) 2011 - 2015 by the mathLab team.
+//
+// This file is subject to LGPL 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.
+//
+//---------------------------- composition_manifold ---------------------------
+
+
+// Test the combination of simple ChartManifolds: SphericalManifold +
+// Rotation
+
+#include "../tests.h"
+#include <fstream>
+#include <deal.II/base/logstream.h>
+
+
+// all include files you need here
+#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/manifold_tools.h>
+
+
+int main ()
+{
+ initlog();
+ std::ostream &out = deallog.get_file_stream();
+
+ const int dim=2, spacedim=2;
+
+ SphericalManifold<1,2> F;
+ std::map<std::string, double> constants;
+ constants["k"] = numbers::PI/3;
+ FunctionManifold<2,2,2> G("cos( k)*x -sin( k)*y; sin( k)*x+cos( k)*y",
+ "cos(-k)*x -sin(-k)*y; sin(-k)*x+cos(-k)*y",
+ Point<2>(), constants);
+
+ CompositionManifold<2,2,2,2,1> manifold(F,G);
+
+ // Chart points.
+ Point<2> cp[2];
+ cp[0][0] = 1.0;
+ cp[1][0] = 1.0;
+ cp[1][1] = numbers::PI/2;
+
+ // Spacedim points
+ std::vector<Point<spacedim> > sp(2);
+
+ // Weights
+ std::vector<double> w(2);
+
+ sp[0] = manifold.push_forward(cp[0]);
+ sp[1] = manifold.push_forward(cp[1]);
+
+ for (unsigned int d=0; d<2; ++d)
+ if (cp[d].distance(manifold.pull_back(sp[d])) > 1e-10)
+ deallog << "Error!" << std::endl;
+
+ unsigned int n_intermediates = 16;
+
+ out << "set size ratio -1" << std::endl
+ << "plot '-' with vectors " << std::endl;
+
+ Point<2> center;
+
+ out << center << " "
+ << sp[0] << std::endl
+ << center << " "
+ << sp[1] << std::endl;
+
+ for (unsigned int i=0; i<n_intermediates+1; ++i)
+ {
+ w[0] = 1.0-(double)i/((double)n_intermediates);
+ w[1] = 1.0 - w[0];
+
+ Point<spacedim> ip = manifold.get_new_point(Quadrature<spacedim>(sp, w));
+ Tensor<1,spacedim> t1 = manifold.get_tangent_vector(ip, sp[0]);
+ Tensor<1,spacedim> t2 = manifold.get_tangent_vector(ip, sp[1]);
+
+ out << ip << " "
+ << t2 << std::endl;
+ }
+
+ out << "e" << std::endl;
+
+ return 0;
+}
+
--- /dev/null
+
+set size ratio -1
+plot '-' with vectors
+0.00000 0.00000 0.500000 0.866025
+0.00000 0.00000 -0.866025 0.500000
+0.500000 0.866025 -1.36035 0.785398
+0.412707 0.910864 -1.34136 0.607761
+0.321439 0.946930 -1.30151 0.441801
+0.227076 0.973877 -1.24293 0.289811
+0.130526 0.991445 -1.16802 0.153773
+0.0327191 0.999465 -1.07934 0.0353341
+-0.0654031 0.997859 -0.979646 -0.0642094
+-0.162895 0.986643 -0.871771 -0.143930
+-0.258819 0.965926 -0.758636 -0.203276
+-0.352250 0.935906 -0.643176 -0.242074
+-0.442289 0.896873 -0.528302 -0.260530
+-0.528068 0.849202 -0.416851 -0.259215
+-0.608761 0.793353 -0.311549 -0.239060
+-0.683592 0.729864 -0.214963 -0.201335
+-0.751840 0.659346 -0.129462 -0.147623
+-0.812847 0.582478 -0.0571846 -0.0798010
+-0.866025 0.500000 0.00000 0.00000
+e