From: Luca Heltai Date: Mon, 27 Apr 2009 17:33:40 +0000 (+0000) Subject: Fixed mappingq1eulerian to work with codim one meshes X-Git-Tag: v8.0.0~7743 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=440d3afbea01337fa5f0db59b3273acbf15664c2;p=dealii.git Fixed mappingq1eulerian to work with codim one meshes git-svn-id: https://svn.dealii.org/trunk@18757 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/mapping_q1_eulerian.h b/deal.II/deal.II/include/fe/mapping_q1_eulerian.h index 4fb9edd627..6ac156bb14 100644 --- a/deal.II/deal.II/include/fe/mapping_q1_eulerian.h +++ b/deal.II/deal.II/include/fe/mapping_q1_eulerian.h @@ -111,7 +111,7 @@ class MappingQ1Eulerian : public MappingQ1 * DoFAccessor::set_dof_values(). */ MappingQ1Eulerian (const EulerVectorType &euler_transform_vectors, - const DoFHandler &shiftmap_dof_handler); + const DoFHandler &shiftmap_dof_handler); /** * Return a pointer to a copy of the @@ -172,7 +172,7 @@ class MappingQ1Eulerian : public MappingQ1 * which the mapping vector is * associated. */ - const SmartPointer > shiftmap_dof_handler; + const SmartPointer > shiftmap_dof_handler; private: @@ -183,8 +183,8 @@ class MappingQ1Eulerian : public MappingQ1 * are the vertices. */ virtual void compute_mapping_support_points( - const typename Triangulation::cell_iterator &cell, - std::vector > &a) const; + const typename Triangulation::cell_iterator &cell, + std::vector > &a) const; }; diff --git a/deal.II/deal.II/source/fe/mapping_q1_eulerian.cc b/deal.II/deal.II/source/fe/mapping_q1_eulerian.cc index 15cb638043..4444b1bab8 100644 --- a/deal.II/deal.II/source/fe/mapping_q1_eulerian.cc +++ b/deal.II/deal.II/source/fe/mapping_q1_eulerian.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -26,7 +26,7 @@ DEAL_II_NAMESPACE_OPEN template MappingQ1Eulerian:: MappingQ1Eulerian (const EulerVectorType &euler_transform_vectors, - const DoFHandler &shiftmap_dof_handler) + const DoFHandler &shiftmap_dof_handler) : euler_transform_vectors(euler_transform_vectors), shiftmap_dof_handler(&shiftmap_dof_handler) @@ -37,8 +37,8 @@ MappingQ1Eulerian (const EulerVectorType &euler_transform_vectors, template void MappingQ1Eulerian:: -compute_mapping_support_points(const typename Triangulation::cell_iterator &cell, - std::vector > &a) const +compute_mapping_support_points(const typename Triangulation::cell_iterator &cell, + std::vector > &a) const { // The assertions can not be in the @@ -48,9 +48,9 @@ compute_mapping_support_points(const typename Triangulation::cell_iterator // *before* the mapping object is // constructed, which is not // necessarily what we want. - Assert (dim == shiftmap_dof_handler->get_fe().n_dofs_per_vertex(), + Assert (spacedim == shiftmap_dof_handler->get_fe().n_dofs_per_vertex(), ExcWrongNoOfComponents()); - Assert (shiftmap_dof_handler->get_fe().n_components() == dim, + Assert (shiftmap_dof_handler->get_fe().n_components() == spacedim, ExcWrongNoOfComponents()); Assert (shiftmap_dof_handler->n_dofs() == euler_transform_vectors.size(), @@ -63,8 +63,8 @@ compute_mapping_support_points(const typename Triangulation::cell_iterator // DoFHandler::cell_iterator // which is necessary for access to // DoFCellAccessor::get_dof_values() - typename DoFHandler::cell_iterator - dof_cell (const_cast *> (&(cell->get_triangulation())), + typename DoFHandler::cell_iterator + dof_cell (const_cast *> (&(cell->get_triangulation())), cell->level(), cell->index(), shiftmap_dof_handler); @@ -87,15 +87,15 @@ compute_mapping_support_points(const typename Triangulation::cell_iterator for (unsigned int i=0; i::vertices_per_cell; ++i) { - Point shift_vector; + Point shift_vector; // pick out the value of the // shift vector at the present // vertex. since vertex dofs // are always numbered first, // we can access them easily - for (unsigned int j=0; j >; template class MappingQ1Eulerian; #endif +// Explicit instantiation for codimension one problems. +#if deal_II_dimension != 3 +template class MappingQ1Eulerian, deal_II_dimension+1 >; +# ifdef DEAL_II_USE_PETSC +template class MappingQ1Eulerian; +# endif +#endif + DEAL_II_NAMESPACE_CLOSE