]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed anisotropic refinement in codim one.
authorLuca Heltai <luca.heltai@sissa.it>
Thu, 31 Mar 2011 07:46:24 +0000 (07:46 +0000)
committerLuca Heltai <luca.heltai@sissa.it>
Thu, 31 Mar 2011 07:46:24 +0000 (07:46 +0000)
git-svn-id: https://svn.dealii.org/trunk@23548 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/source/grid/tria.cc
deal.II/source/grid/tria_accessor.cc

index 1aba483bfa15e40058bebe3686bda74b6649c6d3..bac4a0b86ec8ff1fed4f19b04e1e46fd37ca3c75 100644 (file)
@@ -28,6 +28,12 @@ inconvenience this causes.
 <a name="general"></a>
 <h3>General</h3>
 
+<ol>
+<li> Fixed: Added some instantiations to make anisotropic refinement work 
+in codimension one.
+<br>
+(Luca Heltai, 2011/03/31)
+
 <ol>
 <li> Fixed: Corrections in the creation of the face and subface
 interpolation matrices in the class FE_Nedelec.
index 4124a4dc835e179a5678a20cc4ef60130ab8f274..65bcdc65a0392313a4def46ad8116dd5292f04bb 100644 (file)
@@ -8944,11 +8944,17 @@ namespace internal
        void
        prevent_distorted_boundary_cells (const Triangulation<1,spacedim> &);
 
+       
        template <int dim, int spacedim>
        static
        void
        prevent_distorted_boundary_cells (Triangulation<dim,spacedim> &triangulation)
          {
+                                            // If the codimension is
+                                            // one, we cannot perform
+                                            // this check yet.
+           if(spacedim>dim) return;
+           
            for (typename Triangulation<dim,spacedim>::cell_iterator
                   cell=triangulation.begin(); cell!=triangulation.end(); ++cell)
              if (cell->at_boundary() &&
index 7be71bc7ee108247ff354c4f74ec00f1940dfb0e..ef944f8d6d83e9a0ebd43a411f6e1cfc2bde03b9 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -1018,6 +1018,15 @@ double TriaAccessor<1,1,1>::extent_in_direction(const unsigned int axis) const
 }
 
 
+template <>
+double TriaAccessor<1,1,2>::extent_in_direction(const unsigned int axis) const
+{
+  Assert (axis == 0, ExcIndexRange (axis, 0, 1));
+
+  return this->diameter();
+}
+
+
 template <>
 double TriaAccessor<2,2,2>::extent_in_direction(const unsigned int axis) const
 {
@@ -1030,6 +1039,18 @@ double TriaAccessor<2,2,2>::extent_in_direction(const unsigned int axis) const
                  this->line(lines[axis][1])->diameter());
 }
 
+template <>
+double TriaAccessor<2,2,3>::extent_in_direction(const unsigned int axis) const
+{
+  const unsigned int lines[2][2] = {{2,3}, /// Lines along x-axis, see GeometryInfo
+                                   {0,1}};/// Lines along y-axis
+
+  Assert (axis < 2, ExcIndexRange (axis, 0, 2));
+
+  return std::max(this->line(lines[axis][0])->diameter(),
+                 this->line(lines[axis][1])->diameter());
+}
+
 
 template <>
 double TriaAccessor<3,3,3>::extent_in_direction(const unsigned int axis) const

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.