From ed55c174c29cb98d20d4406e79175c3562e4e379 Mon Sep 17 00:00:00 2001 From: kanschat Date: Thu, 17 Jan 2008 17:46:10 +0000 Subject: [PATCH] use Quadrature::size() instead of n_quadrature_points git-svn-id: https://svn.dealii.org/trunk@15624 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/include/fe/fe_poly.templates.h | 14 ++++---- deal.II/deal.II/include/fe/fe_tools.h | 4 +-- deal.II/deal.II/include/fe/fe_values.h | 4 +-- deal.II/deal.II/include/hp/q_collection.h | 6 ++-- .../include/numerics/vectors.templates.h | 6 ++-- deal.II/deal.II/source/fe/fe.cc | 4 +-- deal.II/deal.II/source/fe/fe_abf.cc | 34 +++++++++---------- deal.II/deal.II/source/fe/fe_dgq.cc | 8 ++--- deal.II/deal.II/source/fe/fe_nedelec.cc | 14 ++++---- deal.II/deal.II/source/fe/fe_poly_tensor.cc | 10 +++--- .../deal.II/source/fe/fe_raviart_thomas.cc | 24 ++++++------- .../source/fe/fe_raviart_thomas_nodal.cc | 6 ++-- deal.II/deal.II/source/fe/fe_system.cc | 4 +-- deal.II/deal.II/source/fe/fe_tools.cc | 26 +++++++------- deal.II/deal.II/source/fe/fe_values.cc | 14 ++++---- deal.II/deal.II/source/fe/mapping_q.cc | 20 +++++------ deal.II/deal.II/source/fe/mapping_q1.cc | 16 ++++----- 17 files changed, 107 insertions(+), 107 deletions(-) diff --git a/deal.II/deal.II/include/fe/fe_poly.templates.h b/deal.II/deal.II/include/fe/fe_poly.templates.h index 00373c32be..91353175ef 100644 --- a/deal.II/deal.II/include/fe/fe_poly.templates.h +++ b/deal.II/deal.II/include/fe/fe_poly.templates.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2006, 2007 by the deal.II authors +// Copyright (C) 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -168,7 +168,7 @@ FE_Poly::get_data (const UpdateFlags update_flags, data->update_flags = data->update_once | data->update_each; const UpdateFlags flags(data->update_flags); - const unsigned int n_q_points = quadrature.n_quadrature_points; + const unsigned int n_q_points = quadrature.size(); // some scratch arrays std::vector values(0); @@ -250,7 +250,7 @@ FE_Poly::fill_fe_values (const Mapping &mapping for (unsigned int k=0; kdofs_per_cell; ++k) { if (flags & update_values) - for (unsigned int i=0; i::fill_fe_face_values (const Mapping &ma cell->face_orientation(face), cell->face_flip(face), cell->face_rotation(face), - quadrature.n_quadrature_points); + quadrature.size()); const UpdateFlags flags(fe_data.update_once | fe_data.update_each); for (unsigned int k=0; kdofs_per_cell; ++k) { if (flags & update_values) - for (unsigned int i=0; i::fill_fe_subface_values (const Mapping cell->face_orientation(face), cell->face_flip(face), cell->face_rotation(face), - quadrature.n_quadrature_points); + quadrature.size()); const UpdateFlags flags(fe_data.update_once | fe_data.update_each); for (unsigned int k=0; kdofs_per_cell; ++k) { if (flags & update_values) - for (unsigned int i=0; iuq, 0 <= q < - * Q:=quadrature.n_quadrature_points + * Q:=quadrature.size() * defined at the quadrature points of a * cell, with the points defined by the * given rhs_quadrature diff --git a/deal.II/deal.II/include/fe/fe_values.h b/deal.II/deal.II/include/fe/fe_values.h index b465618baa..b675d6e4d6 100644 --- a/deal.II/deal.II/include/fe/fe_values.h +++ b/deal.II/deal.II/include/fe/fe_values.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name: $ // -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -341,7 +341,7 @@ class FEValuesData * ++cell) * { * values.reinit(cell); - * for (unsigned int q=0; qn_quadrature_points > m) - m = quadratures[i]->n_quadrature_points; + if (quadratures[i]->size() > m) + m = quadratures[i]->size(); return m; } diff --git a/deal.II/deal.II/include/numerics/vectors.templates.h b/deal.II/deal.II/include/numerics/vectors.templates.h index 2a1c316714..773d2b0d76 100644 --- a/deal.II/deal.II/include/numerics/vectors.templates.h +++ b/deal.II/deal.II/include/numerics/vectors.templates.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name: $ // -// Copyright (C) 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -2438,7 +2438,7 @@ VectorTools::compute_mean_value (const Mapping &mapping, | update_values)); typename DoFHandler::active_cell_iterator c; - std::vector > values(quadrature.n_quadrature_points, + std::vector > values(quadrature.size(), Vector (dof.get_fe().n_components())); double mean = 0.; @@ -2448,7 +2448,7 @@ VectorTools::compute_mean_value (const Mapping &mapping, { fe.reinit (c); fe.get_function_values(v, values); - for (unsigned int k=0; k< quadrature.n_quadrature_points; ++k) + for (unsigned int k=0; k< quadrature.size(); ++k) { mean += fe.JxW(k) * values[k](component); area += fe.JxW(k); diff --git a/deal.II/deal.II/source/fe/fe.cc b/deal.II/deal.II/source/fe/fe.cc index 6b521a831a..2b7e92b6db 100644 --- a/deal.II/deal.II/source/fe/fe.cc +++ b/deal.II/deal.II/source/fe/fe.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -58,7 +58,7 @@ InternalDataBase::initialize_2nd (const FiniteElement *element, // number of evaluation points) // FEValues objects with slightly // shifted positions - std::vector > diff_points (quadrature.n_quadrature_points); + std::vector > diff_points (quadrature.size()); differences.resize(2*dim); for (unsigned int d=0; d::initialize_support_points (const unsigned int deg) QGauss cell_quadrature(deg+1); const unsigned int n_interior_points - = (deg>0) ? cell_quadrature.n_quadrature_points : 0; + = (deg>0) ? cell_quadrature.size() : 0; this->generalized_support_points.resize (2 + n_interior_points); @@ -170,7 +170,7 @@ FE_ABF::initialize_support_points (const unsigned int deg) interior_weights.reinit(TableIndices<3>(2+n_interior_points, 0, dim)); - for (unsigned int k=0;kgeneralized_support_points[current++] = cell_quadrature.point(k); Assert (current == this->generalized_support_points.size(), @@ -185,7 +185,7 @@ void FE_ABF::initialize_support_points (const unsigned int deg) { QGauss cell_quadrature(deg+2); - const unsigned int n_interior_points = cell_quadrature.n_quadrature_points; + const unsigned int n_interior_points = cell_quadrature.size(); unsigned int n_face_points = (dim>1) ? 1 : 0; // compute (deg+1)^(dim-1) @@ -223,7 +223,7 @@ FE_ABF::initialize_support_points (const unsigned int deg) boundary_weights.reinit(n_face_points, legendre.n()); -// Assert (face_points.n_quadrature_points == this->dofs_per_face, +// Assert (face_points.size() == this->dofs_per_face, // ExcInternalError()); for (unsigned int k=0;k::initialize_support_points (const unsigned int deg) // stem from applying the Gauss theorem to the nodal values, which // was necessary to cast the ABF elements into the deal.II framework // for vector valued elements. - boundary_weights_abf.reinit(faces.n_quadrature_points, polynomials_abf[0]->n() * dim); - for (unsigned int k=0;k < faces.n_quadrature_points;++k) + boundary_weights_abf.reinit(faces.size(), polynomials_abf[0]->n() * dim); + for (unsigned int k=0;k < faces.size();++k) { for (unsigned int i=0;in() * dim;++i) { @@ -284,7 +284,7 @@ FE_ABF::initialize_support_points (const unsigned int deg) interior_weights.reinit(TableIndices<3>(n_interior_points, polynomials[0]->n(), dim)); - for (unsigned int k=0;kn();++i) for (unsigned int d=0;d::initialize_support_points (const unsigned int deg) // Decouple the creation of the generalized support points // from computation of interior weights. - for (unsigned int k=0;kgeneralized_support_points[current++] = cell_quadrature.point(k); // Additional functionality for the ABF elements // TODO: Here the canonical extension of the principle // behind the ABF elements is implemented. It is unclear, // if this really leads to the ABF spaces in 3D! - interior_weights_abf.reinit(TableIndices<3>(cell_quadrature.n_quadrature_points, + interior_weights_abf.reinit(TableIndices<3>(cell_quadrature.size(), polynomials_abf[0]->n() * dim, dim)); Tensor<1, dim> poly_grad; - for (unsigned int k=0;kn() * dim;++i) { @@ -359,7 +359,7 @@ void FE_ABF::initialize_restriction() { QGauss q_base (rt_order+1); - const unsigned int n_face_points = q_base.n_quadrature_points; + const unsigned int n_face_points = q_base.size(); // First, compute interpolation on // subfaces for (unsigned int face=0;face::faces_per_cell;++face) @@ -373,8 +373,8 @@ FE_ABF::initialize_restriction() // Store shape values, since the // evaluation suffers if not // ordered by point - Table<2,double> cached_values(this->dofs_per_cell, q_face.n_quadrature_points); - for (unsigned int k=0;k cached_values(this->dofs_per_cell, q_face.size()); + for (unsigned int k=0;kdofs_per_cell; ++i) cached_values(i,k) = this->shape_value_component(i, q_face.point(k), @@ -446,8 +446,8 @@ FE_ABF::initialize_restriction() // Store shape values, since the // evaluation suffers if not // ordered by point - Table<3,double> cached_values(this->dofs_per_cell, q_cell.n_quadrature_points, dim); - for (unsigned int k=0;k cached_values(this->dofs_per_cell, q_cell.size(), dim); + for (unsigned int k=0;kdofs_per_cell; ++i) for (unsigned int d=0;dshape_value_component(i, q_cell.point(k), d); @@ -456,7 +456,7 @@ FE_ABF::initialize_restriction() { Quadrature q_sub = QProjector::project_to_child(q_cell, child); - for (unsigned int k=0;kdofs_per_cell; ++i_child) for (unsigned int d=0;dn();++i_weight) diff --git a/deal.II/deal.II/source/fe/fe_dgq.cc b/deal.II/deal.II/source/fe/fe_dgq.cc index 3b492aa9a0..3e7326db4f 100644 --- a/deal.II/deal.II/source/fe/fe_dgq.cc +++ b/deal.II/deal.II/source/fe/fe_dgq.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -196,10 +196,10 @@ FE_DGQ::FE_DGQ (const Quadrature<1>& points) : FE_Poly, dim> ( TensorProductPolynomials(Polynomials::Lagrange::generate_complete_basis(points.get_points())), - FiniteElementData(get_dpo_vector(points.n_quadrature_points-1), 1, points.n_quadrature_points-1, FiniteElementData::L2), - std::vector(FiniteElementData(get_dpo_vector(points.n_quadrature_points-1),1, points.n_quadrature_points-1).dofs_per_cell, true), + FiniteElementData(get_dpo_vector(points.size()-1), 1, points.size()-1, FiniteElementData::L2), + std::vector(FiniteElementData(get_dpo_vector(points.size()-1),1, points.size()-1).dofs_per_cell, true), std::vector >(FiniteElementData( - get_dpo_vector(points.n_quadrature_points-1),1, points.n_quadrature_points-1).dofs_per_cell, std::vector(1,true))) + get_dpo_vector(points.size()-1),1, points.size()-1).dofs_per_cell, std::vector(1,true))) { for (unsigned int i=0; i::children_per_cell; ++i) this->prolongation[i].reinit (this->dofs_per_cell, diff --git a/deal.II/deal.II/source/fe/fe_nedelec.cc b/deal.II/deal.II/source/fe/fe_nedelec.cc index 28b0b5cadf..34df091c8a 100644 --- a/deal.II/deal.II/source/fe/fe_nedelec.cc +++ b/deal.II/deal.II/source/fe/fe_nedelec.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -935,7 +935,7 @@ FE_Nedelec::get_data (const UpdateFlags update_flags, data->update_flags = data->update_once | data->update_each; const UpdateFlags flags(data->update_flags); - const unsigned int n_q_points = quadrature.n_quadrature_points; + const unsigned int n_q_points = quadrature.size(); // initialize fields only if really // necessary. otherwise, don't @@ -1005,7 +1005,7 @@ FE_Nedelec::fill_fe_values (const Mapping &mapping, // fields that have to be filled const UpdateFlags flags(fe_data.current_update_flags()); - const unsigned int n_q_points = quadrature.n_quadrature_points; + const unsigned int n_q_points = quadrature.size(); // fill shape function // values. these are vector-valued, @@ -1136,13 +1136,13 @@ FE_Nedelec::fill_fe_face_values (const Mapping &mapp cell->face_orientation(face), cell->face_flip(face), cell->face_rotation(face), - quadrature.n_quadrature_points)); + quadrature.size())); // get the flags indicating the // fields that have to be filled const UpdateFlags flags(fe_data.current_update_flags()); - const unsigned int n_q_points = quadrature.n_quadrature_points; + const unsigned int n_q_points = quadrature.size(); // fill shape function // values. these are vector-valued, @@ -1285,13 +1285,13 @@ FE_Nedelec::fill_fe_subface_values (const Mapping &m cell->face_orientation(face), cell->face_flip(face), cell->face_rotation(face), - quadrature.n_quadrature_points)); + quadrature.size())); // get the flags indicating the // fields that have to be filled const UpdateFlags flags(fe_data.current_update_flags()); - const unsigned int n_q_points = quadrature.n_quadrature_points; + const unsigned int n_q_points = quadrature.size(); // fill shape function // values. these are vector-valued, diff --git a/deal.II/deal.II/source/fe/fe_poly_tensor.cc b/deal.II/deal.II/source/fe/fe_poly_tensor.cc index 96cfb3563d..5a2d82d7a4 100644 --- a/deal.II/deal.II/source/fe/fe_poly_tensor.cc +++ b/deal.II/deal.II/source/fe/fe_poly_tensor.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -262,7 +262,7 @@ FE_PolyTensor::get_data (const UpdateFlags update_flags, data->update_flags = data->update_once | data->update_each; const UpdateFlags flags(data->update_flags); - const unsigned int n_q_points = quadrature.n_quadrature_points; + const unsigned int n_q_points = quadrature.size(); // some scratch arrays std::vector > values(0); @@ -364,7 +364,7 @@ FE_PolyTensor::fill_fe_values ( // && dynamic_cast*>(&mapping) != 0), // ExcNotImplemented()); - const unsigned int n_q_points = quadrature.n_quadrature_points; + const unsigned int n_q_points = quadrature.size(); const UpdateFlags flags(fe_data.current_update_flags()); Assert(!(flags & update_values) || fe_data.shape_values.size() == this->dofs_per_cell, @@ -529,7 +529,7 @@ FE_PolyTensor::fill_fe_face_values ( // possible InternalData &fe_data = dynamic_cast (fedata); - const unsigned int n_q_points = quadrature.n_quadrature_points; + const unsigned int n_q_points = quadrature.size(); // offset determines which data set // to take (all data sets for all // faces are stored contiguously) @@ -713,7 +713,7 @@ FE_PolyTensor::fill_fe_subface_values ( // possible InternalData &fe_data = dynamic_cast (fedata); - const unsigned int n_q_points = quadrature.n_quadrature_points; + const unsigned int n_q_points = quadrature.size(); // offset determines which data set // to take (all data sets for all // sub-faces are stored contiguously) diff --git a/deal.II/deal.II/source/fe/fe_raviart_thomas.cc b/deal.II/deal.II/source/fe/fe_raviart_thomas.cc index f1a157a08e..31f1456e89 100644 --- a/deal.II/deal.II/source/fe/fe_raviart_thomas.cc +++ b/deal.II/deal.II/source/fe/fe_raviart_thomas.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -141,7 +141,7 @@ FE_RaviartThomas::initialize_support_points (const unsigned int deg) QGauss cell_quadrature(deg+1); const unsigned int n_interior_points - = (deg>0) ? cell_quadrature.n_quadrature_points : 0; + = (deg>0) ? cell_quadrature.size() : 0; this->generalized_support_points.resize (2 + n_interior_points); @@ -153,7 +153,7 @@ FE_RaviartThomas::initialize_support_points (const unsigned int deg) interior_weights.reinit(TableIndices<3>(2+n_interior_points, 0, dim)); - for (unsigned int k=0;kgeneralized_support_points[current++] = cell_quadrature.point(k); Assert (current == this->generalized_support_points.size(), @@ -169,7 +169,7 @@ FE_RaviartThomas::initialize_support_points (const unsigned int deg) { QGauss cell_quadrature(deg+1); const unsigned int n_interior_points - = (deg>0) ? cell_quadrature.n_quadrature_points : 0; + = (deg>0) ? cell_quadrature.size() : 0; unsigned int n_face_points = (dim>1) ? 1 : 0; // compute (deg+1)^(dim-1) @@ -192,7 +192,7 @@ FE_RaviartThomas::initialize_support_points (const unsigned int deg) boundary_weights.reinit(n_face_points, legendre.n()); -// Assert (face_points.n_quadrature_points == this->dofs_per_face, +// Assert (face_points.size() == this->dofs_per_face, // ExcInternalError()); for (unsigned int k=0;k::initialize_support_points (const unsigned int deg) interior_weights.reinit(TableIndices<3>(n_interior_points, polynomials[0]->n(), dim)); - for (unsigned int k=0;kgeneralized_support_points[current++] = cell_quadrature.point(k); for (unsigned int i=0;in();++i) @@ -282,7 +282,7 @@ void FE_RaviartThomas::initialize_restriction() { QGauss q_base (rt_order+1); - const unsigned int n_face_points = q_base.n_quadrature_points; + const unsigned int n_face_points = q_base.size(); // First, compute interpolation on // subfaces for (unsigned int face=0;face::faces_per_cell;++face) @@ -296,8 +296,8 @@ FE_RaviartThomas::initialize_restriction() // Store shape values, since the // evaluation suffers if not // ordered by point - Table<2,double> cached_values(this->dofs_per_cell, q_face.n_quadrature_points); - for (unsigned int k=0;k cached_values(this->dofs_per_cell, q_face.size()); + for (unsigned int k=0;kdofs_per_cell; ++i) cached_values(i,k) = this->shape_value_component(i, q_face.point(k), @@ -369,8 +369,8 @@ FE_RaviartThomas::initialize_restriction() // Store shape values, since the // evaluation suffers if not // ordered by point - Table<3,double> cached_values(this->dofs_per_cell, q_cell.n_quadrature_points, dim); - for (unsigned int k=0;k cached_values(this->dofs_per_cell, q_cell.size(), dim); + for (unsigned int k=0;kdofs_per_cell; ++i) for (unsigned int d=0;dshape_value_component(i, q_cell.point(k), d); @@ -379,7 +379,7 @@ FE_RaviartThomas::initialize_restriction() { Quadrature q_sub = QProjector::project_to_child(q_cell, child); - for (unsigned int k=0;kdofs_per_cell; ++i_child) for (unsigned int d=0;dn();++i_weight) diff --git a/deal.II/deal.II/source/fe/fe_raviart_thomas_nodal.cc b/deal.II/deal.II/source/fe/fe_raviart_thomas_nodal.cc index 6d3c488574..58efbaade1 100644 --- a/deal.II/deal.II/source/fe/fe_raviart_thomas_nodal.cc +++ b/deal.II/deal.II/source/fe/fe_raviart_thomas_nodal.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -321,7 +321,7 @@ FE_RaviartThomasNodal::initialize_support_points (const unsigned int deg) if (dim>1) { QGauss face_points (deg+1); - Assert (face_points.n_quadrature_points == this->dofs_per_face, + Assert (face_points.size() == this->dofs_per_face, ExcInternalError()); for (unsigned int k=0;kdofs_per_face;++k) this->generalized_face_support_points[k] = face_points.point(k); @@ -357,7 +357,7 @@ FE_RaviartThomasNodal::initialize_support_points (const unsigned int deg) ((d==2) ? low : high)); Assert(dim<=3, ExcNotImplemented()); - for (unsigned int k=0;kn_quadrature_points;++k) + for (unsigned int k=0;ksize();++k) this->generalized_support_points[current++] = quadrature->point(k); delete quadrature; } diff --git a/deal.II/deal.II/source/fe/fe_system.cc b/deal.II/deal.II/source/fe/fe_system.cc index 3e21d7dc18..de5ed06659 100644 --- a/deal.II/deal.II/source/fe/fe_system.cc +++ b/deal.II/deal.II/source/fe/fe_system.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -724,7 +724,7 @@ compute_fill (const Mapping &mapping, typename Mapping::InternalDataBase &fedata, FEValuesData &data) const { - const unsigned int n_q_points = quadrature.n_quadrature_points; + const unsigned int n_q_points = quadrature.size(); // convert data object to internal // data for this class. fails with diff --git a/deal.II/deal.II/source/fe/fe_tools.cc b/deal.II/deal.II/source/fe/fe_tools.cc index f56f75ca49..ca84a9f80d 100644 --- a/deal.II/deal.II/source/fe/fe_tools.cc +++ b/deal.II/deal.II/source/fe/fe_tools.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -495,7 +495,7 @@ void FETools::get_projection_matrix (const FiniteElement &fe1, // This happens in the target space FullMatrix mass (n2, n2); - for (unsigned int k=0;k &fe1, { b = 0.; for (unsigned int i=0;i& fe, MappingCartesian mapping; QGauss q_fine(degree+1); - const unsigned int nq = q_fine.n_quadrature_points; + const unsigned int nq = q_fine.size(); FEValues fine (mapping, fe, q_fine, update_quadrature_points | update_JxW_values | update_values); @@ -725,7 +725,7 @@ FETools::compute_face_embedding_matrices(const FiniteElement& fe, QGauss q_gauss(degree+1); const Quadrature q_fine = QProjector::project_to_face(q_gauss, face_fine); - const unsigned int nq = q_fine.n_quadrature_points; + const unsigned int nq = q_fine.size(); // In order to make the loops below // simpler, we introduce vectors @@ -885,7 +885,7 @@ FETools::compute_projection_matrices(const FiniteElement& fe, MappingCartesian mapping; QGauss q_fine(degree+1); - const unsigned int nq = q_fine.n_quadrature_points; + const unsigned int nq = q_fine.size(); FEValues coarse (mapping, fe, q_fine, update_quadrature_points | update_JxW_values | update_values); @@ -1795,17 +1795,17 @@ compute_projection_from_quadrature_points_matrix (const FiniteElement &fe, // first build the matrices M and Q // described in the documentation FullMatrix M (fe.dofs_per_cell, fe.dofs_per_cell); - FullMatrix Q (fe.dofs_per_cell, rhs_quadrature.n_quadrature_points); + FullMatrix Q (fe.dofs_per_cell, rhs_quadrature.size()); for (unsigned int i=0; i &fe, M_inverse.invert (M); // finally compute the result - X.reinit (fe.dofs_per_cell, rhs_quadrature.n_quadrature_points); + X.reinit (fe.dofs_per_cell, rhs_quadrature.size()); M_inverse.mmult (X, Q); Assert (X.m() == fe.dofs_per_cell, ExcInternalError()); - Assert (X.n() == rhs_quadrature.n_quadrature_points, ExcInternalError()); + Assert (X.n() == rhs_quadrature.size(), ExcInternalError()); } @@ -1831,11 +1831,11 @@ compute_interpolation_to_quadrature_points_matrix (const FiniteElement &fe, FullMatrix &I_q) { Assert (fe.n_components() == 1, ExcNotImplemented()); - Assert (I_q.m() == quadrature.n_quadrature_points, + Assert (I_q.m() == quadrature.size(), ExcMessage ("Wrong matrix size")); Assert (I_q.n() == fe.dofs_per_cell, ExcMessage ("Wrong matrix size")); - for (unsigned int q=0; q::FEValues (const Mapping &mapping, const Quadrature &q, const UpdateFlags update_flags) : - FEValuesBase (q.n_quadrature_points, + FEValuesBase (q.size(), fe.dofs_per_cell, update_default, mapping, @@ -1215,7 +1215,7 @@ FEValues::FEValues (const FiniteElement &fe, const Quadrature &q, const UpdateFlags update_flags) : - FEValuesBase (q.n_quadrature_points, + FEValuesBase (q.size(), fe.dofs_per_cell, update_default, StaticMappingQ1::mapping, @@ -1469,7 +1469,7 @@ FEFaceValues::FEFaceValues (const Mapping &mapping, const Quadrature &quadrature, const UpdateFlags update_flags) : - FEFaceValuesBase (quadrature.n_quadrature_points, + FEFaceValuesBase (quadrature.size(), fe.dofs_per_cell, update_flags, mapping, @@ -1485,7 +1485,7 @@ FEFaceValues::FEFaceValues (const FiniteElement &fe, const Quadrature &quadrature, const UpdateFlags update_flags) : - FEFaceValuesBase (quadrature.n_quadrature_points, + FEFaceValuesBase (quadrature.size(), fe.dofs_per_cell, update_flags, StaticMappingQ1::mapping, @@ -1683,7 +1683,7 @@ FESubfaceValues::FESubfaceValues (const Mapping &mapping, const Quadrature &quadrature, const UpdateFlags update_flags) : - FEFaceValuesBase (quadrature.n_quadrature_points, + FEFaceValuesBase (quadrature.size(), fe.dofs_per_cell, update_flags, mapping, @@ -1699,7 +1699,7 @@ FESubfaceValues::FESubfaceValues (const FiniteElement &fe, const Quadrature &quadrature, const UpdateFlags update_flags) : - FEFaceValuesBase (quadrature.n_quadrature_points, + FEFaceValuesBase (quadrature.size(), fe.dofs_per_cell, update_flags, StaticMappingQ1::mapping, diff --git a/deal.II/deal.II/source/fe/mapping_q.cc b/deal.II/deal.II/source/fe/mapping_q.cc index 7b027cd1fc..1c5a3f210d 100644 --- a/deal.II/deal.II/source/fe/mapping_q.cc +++ b/deal.II/deal.II/source/fe/mapping_q.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -236,10 +236,10 @@ MappingQ::get_data (const UpdateFlags update_flags, { InternalData *data = new InternalData(n_shape_functions); this->compute_data (update_flags, quadrature, - quadrature.n_quadrature_points, *data); + quadrature.size(), *data); if (!use_mapping_q_on_all_cells) this->compute_data (update_flags, quadrature, - quadrature.n_quadrature_points, data->mapping_q1_data); + quadrature.size(), data->mapping_q1_data); return data; } @@ -253,10 +253,10 @@ MappingQ::get_face_data (const UpdateFlags update_flags, InternalData *data = new InternalData(n_shape_functions); const Quadrature q (QProjector::project_to_all_faces(quadrature)); this->compute_face_data (update_flags, q, - quadrature.n_quadrature_points, *data); + quadrature.size(), *data); if (!use_mapping_q_on_all_cells) this->compute_face_data (update_flags, q, - quadrature.n_quadrature_points, + quadrature.size(), data->mapping_q1_data); return data; } @@ -271,10 +271,10 @@ MappingQ::get_subface_data (const UpdateFlags update_flags, InternalData *data = new InternalData(n_shape_functions); const Quadrature q (QProjector::project_to_all_subfaces(quadrature)); this->compute_face_data (update_flags, q, - quadrature.n_quadrature_points, *data); + quadrature.size(), *data); if (!use_mapping_q_on_all_cells) this->compute_face_data (update_flags, q, - quadrature.n_quadrature_points, + quadrature.size(), data->mapping_q1_data); return data; } @@ -362,7 +362,7 @@ MappingQ::fill_fe_face_values (const typename Triangulation::cell_iter else p_data=&data; - const unsigned int n_q_points=q.n_quadrature_points; + const unsigned int n_q_points=q.size(); this->compute_fill_face (cell, face_no, false, n_q_points, QProjector::DataSetDescriptor:: @@ -426,7 +426,7 @@ MappingQ::fill_fe_subface_values (const typename Triangulation::cell_i else p_data=&data; - const unsigned int n_q_points=q.n_quadrature_points; + const unsigned int n_q_points=q.size(); this->compute_fill_face (cell, face_no, true, n_q_points, QProjector::DataSetDescriptor:: @@ -749,7 +749,7 @@ MappingQ::compute_laplace_vector(Table<2,double> &lvs) const // gradients at the quadrature // points on the unit cell const QGauss quadrature(degree+1); - const unsigned int n_q_points=quadrature.n_quadrature_points; + const unsigned int n_q_points=quadrature.size(); InternalData quadrature_data(n_shape_functions); quadrature_data.shape_derivatives.resize(n_shape_functions * n_q_points); diff --git a/deal.II/deal.II/source/fe/mapping_q1.cc b/deal.II/deal.II/source/fe/mapping_q1.cc index 49d1c05311..1393441f89 100644 --- a/deal.II/deal.II/source/fe/mapping_q1.cc +++ b/deal.II/deal.II/source/fe/mapping_q1.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -305,7 +305,7 @@ MappingQ1::compute_data (const UpdateFlags update_flags, const unsigned int n_original_q_points, InternalData &data) const { - const unsigned int n_q_points = q.n_quadrature_points; + const unsigned int n_q_points = q.size(); data.update_once = update_once(update_flags); data.update_each = update_each(update_flags); @@ -336,7 +336,7 @@ MappingQ1::get_data (const UpdateFlags update_flags, const Quadrature& q) const { InternalData* data = new InternalData(n_shape_functions); - compute_data (update_flags, q, q.n_quadrature_points, *data); + compute_data (update_flags, q, q.size(), *data); return data; } @@ -430,7 +430,7 @@ MappingQ1::get_face_data (const UpdateFlags update_flags, InternalData* data = new InternalData(n_shape_functions); compute_face_data (update_flags, QProjector::project_to_all_faces(quadrature), - quadrature.n_quadrature_points, + quadrature.size(), *data); return data; @@ -446,7 +446,7 @@ MappingQ1::get_subface_data (const UpdateFlags update_flags, InternalData* data = new InternalData(n_shape_functions); compute_face_data (update_flags, QProjector::project_to_all_subfaces(quadrature), - quadrature.n_quadrature_points, + quadrature.size(), *data); return data; @@ -570,7 +570,7 @@ MappingQ1::fill_fe_values (const typename Triangulation::cell_iterator Assert(data_ptr!=0, ExcInternalError()); InternalData &data=*data_ptr; - const unsigned int n_q_points=q.n_quadrature_points; + const unsigned int n_q_points=q.size(); compute_fill (cell, n_q_points, DataSetDescriptor::cell (), data, quadrature_points); @@ -718,7 +718,7 @@ MappingQ1::fill_fe_face_values (const typename Triangulation::cell_ite Assert(data_ptr!=0, ExcInternalError()); InternalData &data=*data_ptr; - const unsigned int n_q_points = q.n_quadrature_points; + const unsigned int n_q_points = q.size(); compute_fill_face (cell, face_no, false, n_q_points, @@ -754,7 +754,7 @@ MappingQ1::fill_fe_subface_values (const typename Triangulation::cell_ Assert(data_ptr!=0, ExcInternalError()); InternalData &data=*data_ptr; - const unsigned int n_q_points = q.n_quadrature_points; + const unsigned int n_q_points = q.size(); compute_fill_face (cell, face_no, true, n_q_points, -- 2.39.5