From: Guido Kanschat Date: Wed, 24 Oct 2007 19:53:13 +0000 (+0000) Subject: temporary fix for boundary projection in 3D X-Git-Tag: v8.0.0~9715 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c375088838f01f03af61608aee4f90baf611859d;p=dealii.git temporary fix for boundary projection in 3D 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 --- diff --git a/deal.II/deal.II/include/numerics/matrices.h b/deal.II/deal.II/include/numerics/matrices.h index ad58be94fa..53b0ba74a4 100644 --- a/deal.II/deal.II/include/numerics/matrices.h +++ b/deal.II/deal.II/include/numerics/matrices.h @@ -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 static diff --git a/deal.II/deal.II/include/numerics/vectors.templates.h b/deal.II/deal.II/include/numerics/vectors.templates.h index 804cb2d158..ff2247e251 100644 --- a/deal.II/deal.II/include/numerics/vectors.templates.h +++ b/deal.II/deal.II/include/numerics/vectors.templates.h @@ -1712,11 +1712,29 @@ VectorTools::project_boundary_values (const Mapping &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::active_cell_iterator cell = dof.begin_active(); + cell != dof.end(); ++cell) + for (unsigned int f=0;f::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 mass_matrix(sparsity);