From: bangerth Date: Wed, 17 Jan 2007 00:17:36 +0000 (+0000) Subject: Make all functions of QCollection inline, since we need to have them for dim and... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b284ff135f12baf90bba6b8bc2b0a1a3abb7b47;p=dealii-svn.git Make all functions of QCollection inline, since we need to have them for dim and dim-1 (for face quadratures) and instantiating them out of line for multiple dimensions appears not to work on Mac OS X. git-svn-id: https://svn.dealii.org/trunk@14320 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/q_collection.h b/deal.II/deal.II/include/fe/q_collection.h index 7aeb9a0135..51dd2bc99f 100644 --- a/deal.II/deal.II/include/fe/q_collection.h +++ b/deal.II/deal.II/include/fe/q_collection.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -189,6 +190,66 @@ namespace hp ExcIndexRange (index, 0, quadratures.size ())); return *quadratures[index]; } + + + + template + inline + QCollection::QCollection () + {} + + + + template + inline + QCollection::QCollection (const Quadrature &quadrature) + { + quadratures + .push_back (boost::shared_ptr >(new Quadrature(quadrature))); + } + + + + template + inline + QCollection:: + QCollection (const QCollection &q_collection) + : + Subscriptor (), + // copy the array + // of shared + // pointers. nothing + // bad should + // happen -- they + // simply all point + // to the same + // objects, and the + // last one to die + // will delete the + // mappings + quadratures (q_collection.quadratures) + {} + + + + template + inline + unsigned int + QCollection::memory_consumption () const + { + return (sizeof(*this) + + MemoryConsumption::memory_consumption (quadratures)); + } + + + template + inline + void + QCollection::push_back (const Quadrature &new_quadrature) + { + quadratures + .push_back (boost::shared_ptr >(new Quadrature(new_quadrature))); + } } // namespace hp diff --git a/deal.II/deal.II/source/fe/q_collection.cc b/deal.II/deal.II/source/fe/q_collection.cc deleted file mode 100644 index c39e9bb424..0000000000 --- a/deal.II/deal.II/source/fe/q_collection.cc +++ /dev/null @@ -1,84 +0,0 @@ -//---------------------------- q_collection.cc ---------------------------- -// $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. -// -//---------------------------- q_collection.cc ---------------------------- - -#include -#include - -DEAL_II_NAMESPACE_OPEN - - -namespace hp -{ - - template - QCollection::QCollection () - {} - - - template - QCollection::QCollection (const Quadrature &quadrature) - { - quadratures - .push_back (boost::shared_ptr >(new Quadrature(quadrature))); - } - - - - template - QCollection:: - QCollection (const QCollection &q_collection) - : - Subscriptor (), - // copy the array - // of shared - // pointers. nothing - // bad should - // happen -- they - // simply all point - // to the same - // objects, and the - // last one to die - // will delete the - // mappings - quadratures (q_collection.quadratures) - {} - - - - template - unsigned int - QCollection::memory_consumption () const - { - return (sizeof(*this) + - MemoryConsumption::memory_consumption (quadratures)); - } - - - template - void - QCollection::push_back (const Quadrature &new_quadrature) - { - quadratures - .push_back (boost::shared_ptr >(new Quadrature(new_quadrature))); - } - - -// explicit instantiations - template class QCollection; -#if deal_II_dimension >= 2 - template class QCollection; -#endif - - -} -DEAL_II_NAMESPACE_CLOSE