]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
temporary fix for boundary projection in 3D
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 24 Oct 2007 19:53:13 +0000 (19:53 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 24 Oct 2007 19:53:13 +0000 (19:53 +0000)
boundary mass matrix must be reprogrammed in order to allow for transformed shape functions

git-svn-id: https://svn.dealii.org/trunk@15376 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/matrices.h
deal.II/deal.II/include/numerics/vectors.templates.h

index ad58be94fa8dea16194b82f788144be2743cfa2f..53b0ba74a430b358ca7adc169fc320b5a9ba5aef 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -323,8 +323,9 @@ class MatrixCreator
                                      * to use multithreading, this
                                      * function works in parallel.
                                      *
-                                     * See the general doc of this
-                                     * class for more information.
+                                     * @todo This function does not
+                                     * work for finite elements with
+                                     * cell-dependent shape functions.
                                      */
     template <int dim>
     static
index 804cb2d158db2976287847cc920fd29968f67865..ff2247e25176d43297d83aef632deb0b2f55fa38 100644 (file)
@@ -1712,11 +1712,29 @@ VectorTools::project_boundary_values (const Mapping<dim>       &mapping,
                                   // needs to use another indirection. There
                                   // should be not many technical problems,
                                   // but it needs to be implemented
-  if (dim<3)
-    sparsity.compress();
-  else
-    Assert (false, ExcNotImplemented());
-
+  if (dim>=3)
+    {
+#ifdef DEBUG
+// Assert that there are no hanging nodes at the boundary
+      int level = -1;
+      for (typename DoFHandler<dim>::active_cell_iterator cell = dof.begin_active();
+          cell != dof.end(); ++cell)
+       for (unsigned int f=0;f<GeometryInfo<dim>::faces_per_cell;++f)
+         {
+           if (cell->at_boundary(f))
+             {
+               if (level == -1)
+                 level = cell->level();
+               else
+                 {                       
+                   Assert (level == cell->level(), ExcNotImplemented());
+                 }
+             }
+         }
+#endif
+    }
+  sparsity.compress();
+  
 
                                   // make mass matrix and right hand side
   SparseMatrix<double> mass_matrix(sparsity);

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.