From: Wolfgang Bangerth Date: Fri, 24 Feb 2006 16:43:23 +0000 (+0000) Subject: Get rid of the weird SelectFEValues class since we can now always use hp::FEValues... X-Git-Tag: v8.0.0~12185 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27ce150786e4d89ba3a21067edb0520a6e192e30;p=dealii.git Get rid of the weird SelectFEValues class since we can now always use hp::FEValues, irrespective of whether we actually have a hp::DoFHandler or not. git-svn-id: https://svn.dealii.org/trunk@12497 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/select_fe_values.h b/deal.II/deal.II/include/fe/select_fe_values.h deleted file mode 100644 index 42c48fe8a7..0000000000 --- a/deal.II/deal.II/include/fe/select_fe_values.h +++ /dev/null @@ -1,69 +0,0 @@ -//---------------------------- select_fe_values.h --------------------------- -// $Id$ -// Version: $Name$ -// -// Copyright (C) 2003, 2006 by the deal.II authors -// -// This file is subject to QPL and may not be distributed -// without copyright and license information. Please refer -// to the file deal.II/doc/license.html for the text and -// further information on this license. -// -//---------------------------- select_fe_values.h --------------------------- -#ifndef __deal2__select_fe_values_h -#define __deal2__select_fe_values_h - -#include - -template class DoFHandler; -namespace hp -{ - template class DoFHandler; -} - -template class FEValues; -template class FEFaceValues; -template class FESubfaceValues; - -namespace hp -{ - template class FEValues; - template class FEFaceValues; - template class FESubfaceValues; -} - - - -/** - * - * @ingroup hp - */ -template struct SelectFEValues; - -/** - * - * @ingroup hp - */ -template struct SelectFEValues > -{ - typedef FEValues FEValues; - typedef FEFaceValues FEFaceValues; - typedef FESubfaceValues FESubfaceValues; -}; - - -/** - * - * @ingroup hp - */ -template struct SelectFEValues > -{ - typedef hp::FEValues FEValues; - typedef hp::FEFaceValues FEFaceValues; - typedef hp::FESubfaceValues FESubfaceValues; -}; - - - - -#endif diff --git a/deal.II/deal.II/source/numerics/data_out.cc b/deal.II/deal.II/source/numerics/data_out.cc index e8e1ced268..40b1ff5033 100644 --- a/deal.II/deal.II/source/numerics/data_out.cc +++ b/deal.II/deal.II/source/numerics/data_out.cc @@ -29,7 +29,6 @@ #include #include #include -#include #include @@ -390,10 +389,24 @@ void DataOut::build_some_patches (Data &data) //TODO[?]: This is strange -- Data has a member 'mapping' that should //be used here, but it isn't. Rather, up until version 1.94, we were -//actually initializing a local mapping object and used that... - typename SelectFEValues >::FEValues - x_fe_patch_values (this->dofs->get_fe(), - patch_points, update_values); +//actually initializing a local mapping object and used that... While +//we use the mapping to transform the vertex coordinates, we do not +//use the mapping to transform the shape functions (necessary for +//example for Raviart-Thomas elements). This could lead to trouble +//when someone tries to use MappingEulerian with such elements + + // create collection objects from + // single quadratures, + // and finite elements. if we have + // an hp DoFHandler, + // dof_handler.get_fe() returns a + // collection of which we do a + // shallow copy instead + const hp::QCollection q_collection (patch_points); + const hp::FECollection fe_collection(this->dofs->get_fe()); + + hp::FEValues x_fe_patch_values (fe_collection, q_collection, + update_values); const unsigned int n_q_points = patch_points.n_quadrature_points; diff --git a/deal.II/deal.II/source/numerics/data_out_faces.cc b/deal.II/deal.II/source/numerics/data_out_faces.cc index 7b59a4f3c5..31b2424b95 100644 --- a/deal.II/deal.II/source/numerics/data_out_faces.cc +++ b/deal.II/deal.II/source/numerics/data_out_faces.cc @@ -24,7 +24,6 @@ #include #include #include -#include #include @@ -35,9 +34,26 @@ void DataOutFaces::build_some_patches (Data &data) QTrapez<1> q_trapez; QIterated patch_points (q_trapez, data.n_subdivisions); - typename SelectFEValues >::FEFaceValues - x_fe_patch_values (this->dofs->get_fe(), - patch_points, update_values); +//TODO[?]: This is strange -- Data has a member 'mapping' that should +//be used here, but it isn't. Rather, up until version 1.94, we were +//actually initializing a local mapping object and used that... While +//we use the mapping to transform the vertex coordinates, we do not +//use the mapping to transform the shape functions (necessary for +//example for Raviart-Thomas elements). This could lead to trouble +//when someone tries to use MappingEulerian with such elements + + // create collection objects from + // single quadratures, + // and finite elements. if we have + // an hp DoFHandler, + // dof_handler.get_fe() returns a + // collection of which we do a + // shallow copy instead + const hp::QCollection q_collection (patch_points); + const hp::FECollection fe_collection(this->dofs->get_fe()); + + hp::FEFaceValues x_fe_patch_values (fe_collection, q_collection, + update_values); const unsigned int n_q_points = patch_points.n_quadrature_points; diff --git a/deal.II/deal.II/source/numerics/data_out_rotation.cc b/deal.II/deal.II/source/numerics/data_out_rotation.cc index 5caa9afd7b..679f237a45 100644 --- a/deal.II/deal.II/source/numerics/data_out_rotation.cc +++ b/deal.II/deal.II/source/numerics/data_out_rotation.cc @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -38,14 +37,24 @@ void DataOutRotation::build_some_patches (Data &data) QTrapez<1> q_trapez; QIterated patch_points (q_trapez, data.n_subdivisions); + // create collection objects from + // single quadratures, + // and finite elements. if we have + // an hp DoFHandler, + // dof_handler.get_fe() returns a + // collection of which we do a + // shallow copy instead + // // since most output formats can't // handle cells that are not // transformed using a Q1 mapping, // we don't support anything else // as well - typename SelectFEValues >::FEValues - x_fe_patch_values (StaticMappingQ1::mapping, this->dofs->get_fe(), - patch_points, update_values); + const hp::QCollection q_collection (patch_points); + const hp::FECollection fe_collection(this->dofs->get_fe()); + + hp::FEValues x_fe_patch_values (fe_collection, q_collection, + update_values); const unsigned int n_patches_per_circle = data.n_patches_per_circle; diff --git a/deal.II/deal.II/source/numerics/data_out_stack.cc b/deal.II/deal.II/source/numerics/data_out_stack.cc index 41fb42845a..4a800adc67 100644 --- a/deal.II/deal.II/source/numerics/data_out_stack.cc +++ b/deal.II/deal.II/source/numerics/data_out_stack.cc @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -257,9 +256,19 @@ void DataOutStack::build_patches (const unsigned int n_subdivisions) QTrapez<1> q_trapez; QIterated patch_points (q_trapez, n_subdivisions); - typename SelectFEValues >::FEValues - x_fe_patch_values (dof_handler->get_fe(), - patch_points, update_values); + // create collection objects from + // single quadratures, + // and finite elements. if we have + // an hp DoFHandler, + // dof_handler.get_fe() returns a + // collection of which we do a + // shallow copy instead + const hp::QCollection q_collection (patch_points); + const hp::FECollection fe_collection(dof_handler->get_fe()); + + hp::FEValues x_fe_patch_values (fe_collection, q_collection, + update_values); + const unsigned int n_q_points = patch_points.n_quadrature_points; std::vector patch_values (n_q_points); std::vector > patch_values_system (n_q_points,