From: heltai Date: Wed, 15 Jan 2014 09:38:11 +0000 (+0000) Subject: Reverted all changes made to the examples directory, so that they are identical to... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=806134ae790702ec87e4b9f57f1aefc552876051;p=dealii-svn.git Reverted all changes made to the examples directory, so that they are identical to trunk. These changes can be applied later on, when we decide to switch to Manifolds. git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@32216 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-1/step-1.cc b/deal.II/examples/step-1/step-1.cc index 5d1e1ea971..96da272b2b 100644 --- a/deal.II/examples/step-1/step-1.cc +++ b/deal.II/examples/step-1/step-1.cc @@ -1,18 +1,20 @@ -// --------------------------------------------------------------------- -// $Id$ -// -// Copyright (C) 1999 - 2013 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE at -// the top level of the deal.II distribution. -// -// --------------------------------------------------------------------- +/* --------------------------------------------------------------------- + * $Id$ + * + * Copyright (C) 1999 - 2013 by the deal.II authors + * + * This file is part of the deal.II library. + * + * The deal.II library is free software; you can use it, redistribute + * it, and/or modify it under the terms of the GNU Lesser General + * Public License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * The full text of the license can be found in the file LICENSE at + * the top level of the deal.II distribution. + * + * --------------------------------------------------------------------- + + */ // @sect3{Include files} @@ -90,7 +92,7 @@ void second_grid () // We then fill it with a ring domain. The center of the ring shall be the // point (1,0), and inner and outer radius shall be 0.5 and 1. The number of // circumferential cells could be adjusted automatically by this function, - // but we choose to set it explicitely to 10 as the last argument: + // but we choose to set it explicitly to 10 as the last argument: const Point<2> center (1,0); const double inner_radius = 0.5, outer_radius = 1.0; @@ -122,12 +124,10 @@ void second_grid () // @ref GlossBoundaryIndicator "glossary entry on this topic".) const HyperShellBoundary<2> boundary_description(center); triangulation.set_boundary (0, boundary_description); - triangulation.refine_global(1); - // In order to demonstrate how to write a loop over all cells, we will // refine the grid in five steps towards the inner circle of the domain: - for (unsigned int step=0; step<0; ++step) + for (unsigned int step=0; step<5; ++step) { // Next, we need an iterator which points to a cell and which we will // move over all active cells one by one (active cells are those that diff --git a/deal.II/examples/step-10/step-10.cc b/deal.II/examples/step-10/step-10.cc index 17838b3c76..90c70d633b 100644 --- a/deal.II/examples/step-10/step-10.cc +++ b/deal.II/examples/step-10/step-10.cc @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -82,8 +82,8 @@ namespace Step10 // radius equals one. Triangulation triangulation; GridGenerator::hyper_ball (triangulation); - static const PolarManifold boundary; - triangulation.set_manifold (0, boundary); + static const HyperBallBoundary boundary; + triangulation.set_boundary (0, boundary); // Next generate output for this grid and for a once refined grid. Note // that we have hidden the mesh refinement in the loop header, which might @@ -216,8 +216,8 @@ namespace Step10 Triangulation triangulation; GridGenerator::hyper_ball (triangulation); - static const PolarManifold boundary; - triangulation.set_manifold (0, boundary); + static const HyperBallBoundary boundary; + triangulation.set_boundary (0, boundary); const MappingQ mapping (degree); @@ -352,8 +352,8 @@ namespace Step10 Triangulation triangulation; GridGenerator::hyper_ball (triangulation); - static const PolarManifold boundary; - triangulation.set_manifold (0, boundary); + static const HyperBallBoundary boundary; + triangulation.set_boundary (0, boundary); const MappingQ mapping (degree); const FE_Q fe (1); diff --git a/deal.II/examples/step-11/step-11.cc b/deal.II/examples/step-11/step-11.cc index 223219e3a7..c5b2276390 100644 --- a/deal.II/examples/step-11/step-11.cc +++ b/deal.II/examples/step-11/step-11.cc @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include @@ -414,8 +414,8 @@ namespace Step11 void LaplaceProblem::run () { GridGenerator::hyper_ball (triangulation); - static const PolarManifold boundary; - triangulation.set_manifold (0, boundary); + static const HyperBallBoundary boundary; + triangulation.set_boundary (0, boundary); for (unsigned int cycle=0; cycle<6; ++cycle, triangulation.refine_global(1)) { diff --git a/deal.II/examples/step-15/step-15.cc b/deal.II/examples/step-15/step-15.cc index 6dcc5c4c24..02ae8914e6 100644 --- a/deal.II/examples/step-15/step-15.cc +++ b/deal.II/examples/step-15/step-15.cc @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include @@ -628,8 +628,8 @@ namespace Step15 // the origin, created in the same way as shown in step-6. The mesh is // globally refined twice followed later on by several adaptive cycles: GridGenerator::hyper_ball (triangulation); - static const PolarManifold boundary; - triangulation.set_manifold (0, boundary); + static const HyperBallBoundary boundary; + triangulation.set_boundary (0, boundary); triangulation.refine_global(2); // The Newton iteration starts next. During the first step we do not have diff --git a/deal.II/examples/step-16/step-16.cc b/deal.II/examples/step-16/step-16.cc index 33ddf4d578..e03e244297 100644 --- a/deal.II/examples/step-16/step-16.cc +++ b/deal.II/examples/step-16/step-16.cc @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include @@ -768,8 +768,8 @@ namespace Step16 { GridGenerator::hyper_ball (triangulation); - static const PolarManifold boundary; - triangulation.set_manifold (0, boundary); + static const HyperBallBoundary boundary; + triangulation.set_boundary (0, boundary); triangulation.refine_global (1); } diff --git a/deal.II/examples/step-17/step-17.cc b/deal.II/examples/step-17/step-17.cc index 77306f52cc..9f072eea35 100644 --- a/deal.II/examples/step-17/step-17.cc +++ b/deal.II/examples/step-17/step-17.cc @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/deal.II/examples/step-18/step-18.cc b/deal.II/examples/step-18/step-18.cc index 6d9cf38039..ff5f5bb619 100644 --- a/deal.II/examples/step-18/step-18.cc +++ b/deal.II/examples/step-18/step-18.cc @@ -1738,6 +1738,17 @@ namespace Step18 // to the vertex we consider at present, as they may or may not be ordered // in the same order. // + // This inconvenience could be avoided if finite elements have support + // points on vertices (which the one here has; for the concept of support + // points, see @ref GlossSupport "support points"). For such a case, one + // could construct a custom quadrature rule using + // FiniteElement::get_unit_support_points(). The first + // GeometryInfo@::vertices_per_cell*fe.dofs_per_vertex + // quadrature points will then correspond to the vertices of the cell and + // are ordered consistent with cell-@>vertex(i), taking into + // account that support points for vector elements will be duplicated + // fe.dofs_per_vertex times. + // // Another point worth explaining about this short function is the way in // which the triangulation class exports information about its vertices: // through the Triangulation::n_vertices function, it diff --git a/deal.II/examples/step-2/step-2.cc b/deal.II/examples/step-2/step-2.cc index fed915ca51..b3c9d2debb 100644 --- a/deal.II/examples/step-2/step-2.cc +++ b/deal.II/examples/step-2/step-2.cc @@ -25,7 +25,7 @@ #include #include #include -#include +#include // However, the next file is new. We need this include file for the // association of degrees of freedom ("DoF"s) to vertices, lines, and cells: @@ -88,8 +88,8 @@ void make_grid (Triangulation<2> &triangulation) center, inner_radius, outer_radius, 10); - static const PolarManifold<2> boundary_description(center); - triangulation.set_manifold (0, boundary_description); + static const HyperShellBoundary<2> boundary_description(center); + triangulation.set_boundary (0, boundary_description); for (unsigned int step=0; step<5; ++step) { diff --git a/deal.II/examples/step-22/step-22.cc b/deal.II/examples/step-22/step-22.cc index ee118bbb5c..e63bae370c 100644 --- a/deal.II/examples/step-22/step-22.cc +++ b/deal.II/examples/step-22/step-22.cc @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include diff --git a/deal.II/examples/step-24/step-24.cc b/deal.II/examples/step-24/step-24.cc index f711c4e678..e44ea21f12 100644 --- a/deal.II/examples/step-24/step-24.cc +++ b/deal.II/examples/step-24/step-24.cc @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include @@ -271,8 +271,8 @@ namespace Step24 { const Point center; GridGenerator::hyper_ball (triangulation, center, 1.); - static const PolarManifold boundary_description (center); - triangulation.set_manifold (0,boundary_description); + static const HyperBallBoundary boundary_description (center, 1.); + triangulation.set_boundary (0,boundary_description); triangulation.refine_global (7); time_step = GridTools::minimal_cell_diameter(triangulation) / diff --git a/deal.II/examples/step-28/step-28.cc b/deal.II/examples/step-28/step-28.cc index d2d542941f..5e108c3b19 100644 --- a/deal.II/examples/step-28/step-28.cc +++ b/deal.II/examples/step-28/step-28.cc @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/deal.II/examples/step-29/step-29.cc b/deal.II/examples/step-29/step-29.cc index e581ff9685..de6f652035 100644 --- a/deal.II/examples/step-29/step-29.cc +++ b/deal.II/examples/step-29/step-29.cc @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include @@ -500,8 +500,8 @@ namespace Step29 // program and thereby longer than the triangulation object we will // associated with it. We then assign this boundary-object to the part of // the boundary with boundary indicator 1: - static const PolarManifold boundary(focal_point); - triangulation.set_manifold (1, boundary); + static const HyperBallBoundary boundary(focal_point, radius); + triangulation.set_boundary(1, boundary); // Now global refinement is executed. Cells near the transducer location // will be automatically refined according to the circle shaped boundary diff --git a/deal.II/examples/step-32/step-32.cc b/deal.II/examples/step-32/step-32.cc index 27e895b355..cd2207025f 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include @@ -3527,9 +3527,9 @@ namespace Step32 EquationData::R1, (dim==3) ? 96 : 12, true); - static PolarManifold boundary; - triangulation.set_manifold (0, boundary); - triangulation.set_manifold (1, boundary); + static HyperShellBoundary boundary; + triangulation.set_boundary (0, boundary); + triangulation.set_boundary (1, boundary); global_Omega_diameter = GridTools::diameter (triangulation); diff --git a/deal.II/examples/step-34/step-34.cc b/deal.II/examples/step-34/step-34.cc index af97f95038..f675772db7 100644 --- a/deal.II/examples/step-34/step-34.cc +++ b/deal.II/examples/step-34/step-34.cc @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include @@ -184,7 +184,7 @@ namespace Step34 // // Experimenting a little with the computation of the angles gives very // accurate results for simpler geometries. To verify this you can comment - // out, in the read_domain() method, the tria.set_manifold (1, boundary) + // out, in the read_domain() method, the tria.set_boundary(1, boundary) // line, and check the alpha that is generated by the program. By removing // this call, whenever the mesh is refined new nodes will be placed along // the straight lines that made up the coarse mesh, rather than be pulled @@ -496,7 +496,7 @@ namespace Step34 void BEMProblem::read_domain() { static const Point center = Point(); - static const PolarManifold boundary(center); + static const HyperBallBoundary boundary(center,1.); std::ifstream in; switch (dim) @@ -517,7 +517,7 @@ namespace Step34 gi.attach_triangulation (tria); gi.read_ucd (in); - tria.set_manifold (1, boundary); + tria.set_boundary(1, boundary); } diff --git a/deal.II/examples/step-35/step-35.cc b/deal.II/examples/step-35/step-35.cc index 61a93f8ee5..cd9d97906e 100644 --- a/deal.II/examples/step-35/step-35.cc +++ b/deal.II/examples/step-35/step-35.cc @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include diff --git a/deal.II/examples/step-37/step-37.cc b/deal.II/examples/step-37/step-37.cc index a4a3a9ca88..9cf1b00a84 100644 --- a/deal.II/examples/step-37/step-37.cc +++ b/deal.II/examples/step-37/step-37.cc @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include diff --git a/deal.II/examples/step-38/step-38.cc b/deal.II/examples/step-38/step-38.cc index 00ca34117a..a88ebe3865 100644 --- a/deal.II/examples/step-38/step-38.cc +++ b/deal.II/examples/step-38/step-38.cc @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include @@ -318,8 +318,8 @@ namespace Step38 template void LaplaceBeltramiProblem::make_grid_and_dofs () { - static PolarManifold surface_description; - triangulation.set_manifold (0, surface_description); + static HyperBallBoundary surface_description; + triangulation.set_boundary (0, surface_description); { Triangulation volume_mesh; diff --git a/deal.II/examples/step-42/step-42.cc b/deal.II/examples/step-42/step-42.cc index 75e4100b86..64cd41d3be 100644 --- a/deal.II/examples/step-42/step-42.cc +++ b/deal.II/examples/step-42/step-42.cc @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include @@ -912,8 +912,8 @@ namespace Step42 GridTools::transform(&rotate_half_sphere, triangulation); GridTools::shift(Point(0.5, 0.5, 0.5), triangulation); - static PolarManifold boundary_description(Point(0.5, 0.5, 0.5)); - triangulation.set_manifold(0, boundary_description); + static HyperBallBoundary boundary_description(Point(0.5, 0.5, 0.5), radius); + triangulation.set_boundary(0, boundary_description); } // Alternatively, create a hypercube mesh. After creating it, // assign boundary indicators as follows: diff --git a/deal.II/examples/step-44/step-44.cc b/deal.II/examples/step-44/step-44.cc index f7b59a2f17..80413f114f 100644 --- a/deal.II/examples/step-44/step-44.cc +++ b/deal.II/examples/step-44/step-44.cc @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include diff --git a/deal.II/examples/step-49/step-49.cc b/deal.II/examples/step-49/step-49.cc index a7f36f260d..a1139eb765 100644 --- a/deal.II/examples/step-49/step-49.cc +++ b/deal.II/examples/step-49/step-49.cc @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include @@ -194,8 +194,8 @@ void grid_3 () // an object that describes a circle (i.e., a hyper ball) with appropriate // center and radius and assign it to the triangulation. We can then refine // twice: - const PolarManifold<2> boundary_description(Point<2>(0,0)); - triangulation.set_manifold (1, boundary_description); + const HyperBallBoundary<2> boundary_description(Point<2>(0,0), 0.25); + triangulation.set_boundary (1, boundary_description); triangulation.refine_global(2); // The mesh so generated is then passed to the function that generates @@ -204,7 +204,7 @@ void grid_3 () // object is destroyed first in this function since it was declared after // the triangulation). mesh_info (triangulation, "grid-3.eps"); - triangulation.set_manifold (1); + triangulation.set_boundary (1); } // There is one snag to doing things as shown above: If one moves the nodes on diff --git a/deal.II/examples/step-5/step-5.cc b/deal.II/examples/step-5/step-5.cc index 27f0e2dbbb..f1d146935b 100644 --- a/deal.II/examples/step-5/step-5.cc +++ b/deal.II/examples/step-5/step-5.cc @@ -50,7 +50,7 @@ // We will use a circular domain, and the object describing the boundary of it // comes from this file: -#include +#include // This is C++ ... #include @@ -599,8 +599,8 @@ void Step5::run () // the first example. Note that the HyperBallBoundary constructor takes two // parameters, the center of the ball and the radius, but that their default // (the origin and 1.0) are the ones which we would like to use here. - static const PolarManifold boundary; - triangulation.set_manifold (0, boundary); + static const HyperBallBoundary boundary; + triangulation.set_boundary (0, boundary); for (unsigned int cycle=0; cycle<6; ++cycle) { diff --git a/deal.II/examples/step-50/step-50.cc b/deal.II/examples/step-50/step-50.cc index 8d13f6af44..768281e4e7 100644 --- a/deal.II/examples/step-50/step-50.cc +++ b/deal.II/examples/step-50/step-50.cc @@ -61,7 +61,7 @@ #include #include #include -#include +#include #include #include diff --git a/deal.II/examples/step-51/step-51.cc b/deal.II/examples/step-51/step-51.cc index c8b7a4ffcd..14be9e7875 100644 --- a/deal.II/examples/step-51/step-51.cc +++ b/deal.II/examples/step-51/step-51.cc @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/deal.II/examples/step-6/step-6.cc b/deal.II/examples/step-6/step-6.cc index 8ad4fcb9d8..e3fca00b1e 100644 --- a/deal.II/examples/step-6/step-6.cc +++ b/deal.II/examples/step-6/step-6.cc @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include @@ -676,8 +676,8 @@ void Step6::run () { GridGenerator::hyper_ball (triangulation); - static const PolarManifold boundary; - triangulation.set_manifold (0, boundary); + static const HyperBallBoundary boundary; + triangulation.set_boundary (0, boundary); triangulation.refine_global (1); } diff --git a/deal.II/examples/step-7/step-7.cc b/deal.II/examples/step-7/step-7.cc index 0bce558c82..058e7cf1cd 100644 --- a/deal.II/examples/step-7/step-7.cc +++ b/deal.II/examples/step-7/step-7.cc @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/deal.II/examples/step-8/step-8.cc b/deal.II/examples/step-8/step-8.cc index f588f3272b..fbc9051c67 100644 --- a/deal.II/examples/step-8/step-8.cc +++ b/deal.II/examples/step-8/step-8.cc @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/deal.II/examples/step-9/step-9.cc b/deal.II/examples/step-9/step-9.cc index e162811691..c1be309814 100644 --- a/deal.II/examples/step-9/step-9.cc +++ b/deal.II/examples/step-9/step-9.cc @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include