From: heltai Date: Wed, 21 Aug 2013 18:45:49 +0000 (+0000) Subject: Fixed compilation issue X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e38dfd894f9814d5b9ed907a7c7753b3b1e7591;p=dealii-svn.git Fixed compilation issue git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@30379 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 6019451d59..eb44c75af1 100644 --- a/deal.II/examples/step-1/step-1.cc +++ b/deal.II/examples/step-1/step-1.cc @@ -29,7 +29,7 @@ #include // We would like to use boundaries which are not straight lines, so we import // some classes which predefine some boundary descriptions: -#include +#include // Output of grids in various graphics formats: #include @@ -123,8 +123,8 @@ void second_grid () // complicated topic; if you're confused about what exactly is happening // here, you may want to look at the // @ref GlossBoundaryIndicator "glossary entry on this topic".) - const HyperShellBoundary<2> boundary_description(center); - triangulation.set_boundary (0, boundary_description); + const PolarManifold<2> boundary_description(center); + triangulation.set_manifold (0, boundary_description); // 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: @@ -200,7 +200,7 @@ void second_grid () // follows. Note that this sets the boundary object used for part "0" of the // boundary back to a default object, over which the triangulation has full // control. - triangulation.set_boundary (0); + triangulation.set_manifold (0); // An alternative to doing so, and one that is frequently more convenient, // would have been to declare the boundary object before the triangulation // object. In that case, the triangulation would have let lose of the diff --git a/deal.II/include/deal.II/grid/manifold_lib.h b/deal.II/include/deal.II/grid/manifold_lib.h index 3b1d7ac599..97d203e8fc 100644 --- a/deal.II/include/deal.II/grid/manifold_lib.h +++ b/deal.II/include/deal.II/grid/manifold_lib.h @@ -31,7 +31,7 @@ DEAL_II_NAMESPACE_OPEN * and returns its space representation. */ template -class PolarManifold : public ManifoldChart +class PolarManifold : public FlatManifold { public: PolarManifold(const Point center = Point()); @@ -41,12 +41,6 @@ class PolarManifold : public ManifoldChart const std::vector &weights) const; - virtual Point - pull_back (const Point &space_point) const; - - virtual Point - push_forward (const Point &chart_point) const; - private: Point center; }; diff --git a/deal.II/include/deal.II/grid/tria.h b/deal.II/include/deal.II/grid/tria.h index db9f3669d6..e74d18321d 100644 --- a/deal.II/include/deal.II/grid/tria.h +++ b/deal.II/include/deal.II/grid/tria.h @@ -1593,7 +1593,7 @@ public: virtual void create_notification (const Triangulation &tria); - } DEAL_II_DEPRECATED; + }; // DEAL_II_DEPRECATED; /** * A structure that is used as an diff --git a/deal.II/source/grid/CMakeLists.txt b/deal.II/source/grid/CMakeLists.txt index 4968dd0fe6..7c20b596ce 100644 --- a/deal.II/source/grid/CMakeLists.txt +++ b/deal.II/source/grid/CMakeLists.txt @@ -48,6 +48,7 @@ SET(_inst grid_tools.inst.in intergrid_map.inst.in manifold.inst.in + manifold_lib.inst.in tria_accessor.inst.in tria_boundary.inst.in tria_boundary_lib.inst.in diff --git a/deal.II/source/grid/manifold_lib.cc b/deal.II/source/grid/manifold_lib.cc index d69c3164af..c7dae42946 100644 --- a/deal.II/source/grid/manifold_lib.cc +++ b/deal.II/source/grid/manifold_lib.cc @@ -29,18 +29,29 @@ PolarManifold::PolarManifold(const Point center): {} -template -Point -PolarManifold::push_forward (const Point &chart_point) const -{ - return chart_point; -} template Point -PolarManifold::pull_back (const Point &space_point) const +PolarManifold:: +get_new_point (const std::vector > &surrounding_points, + const std::vector &weights) const { - return space_point; + Assert(surrounding_points.size() == weights.size(), + ExcDimensionMismatch(surrounding_points.size(), weights.size())); + + double radius = 0; + for(unsigned int i=0; i p = FlatManifold::get_new_point(surrounding_points, weights); + + p = p*(radius/p.norm()); + return p; } + + +// explicit instantiations +#include "manifold_lib.inst" + DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/grid/manifold_lib.inst.in b/deal.II/source/grid/manifold_lib.inst.in new file mode 100644 index 0000000000..5349d55ec2 --- /dev/null +++ b/deal.II/source/grid/manifold_lib.inst.in @@ -0,0 +1,35 @@ +// --------------------------------------------------------------------- +// $Id: tria_boundary_lib.inst.in 30130 2013-07-23 13:01:18Z heltai $ +// +// 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. +// +// --------------------------------------------------------------------- + + +for (deal_II_dimension : DIMENSIONS) + { + template class PolarManifold; +// template class ConeBoundary; +// template class HyperBallBoundary; +// template class HalfHyperBallBoundary; +// template class HyperShellBoundary; +// template class HalfHyperShellBoundary; +// +// #if deal_II_dimension != 3 +// template class HyperBallBoundary; +// #endif +// #if deal_II_dimension == 3 +// template class CylinderBoundary; +// #endif + } + +