]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make FEFaceValues in 1d also work with MappingCartesian.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 12 Aug 2011 23:09:22 +0000 (23:09 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 12 Aug 2011 23:09:22 +0000 (23:09 +0000)
git-svn-id: https://svn.dealii.org/trunk@24056 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/quadrature.h
deal.II/source/fe/mapping_cartesian.cc

index 1b94cf5c322eadd330df27d8d741501e52d0caef..a2aba45f49278e44a16dbc6a9fead9de20a6c34f 100644 (file)
@@ -1,7 +1,7 @@
 //---------------------------------------------------------------------------
 //    $Id$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 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
@@ -386,7 +386,6 @@ inline
 const Point<dim> &
 Quadrature<dim>::point (const unsigned int i) const
 {
-  Assert (dim != 0, ExcNotImplemented());
   AssertIndexRange(i, size());
   return quadrature_points[i];
 }
@@ -397,7 +396,6 @@ template <int dim>
 double
 Quadrature<dim>::weight (const unsigned int i) const
 {
-  Assert (dim != 0, ExcNotImplemented());
   AssertIndexRange(i, size());
   return weights[i];
 }
@@ -409,7 +407,6 @@ inline
 const std::vector<Point<dim> > &
 Quadrature<dim>::get_points () const
 {
-  Assert (dim > 0, ExcInternalError());
   return quadrature_points;
 }
 
index 5fdb56212f273bf8d41fe9e3e3ad8d627c4d4c96..2e5d400b9e45b082845be89326c520d286e7b7fb 100644 (file)
@@ -258,6 +258,18 @@ MappingCartesian<dim, spacedim>::compute_fill (const typename Triangulation<dim,
 
       switch (dim)
         {
+         case 1:
+         {
+            static const Point<dim>
+              normals[GeometryInfo<1>::faces_per_cell]
+              = { Point<dim>(-1.),
+                  Point<dim>( 1.) };
+            std::fill (normal_vectors.begin(),
+                       normal_vectors.end(),
+                       normals[face_no]);
+            break;
+          }
+           
           case 2:
           {
             static const Point<dim>

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.