include/deal.II/dofs/dof_levels.h

00001 //---------------------------------------------------------------------------
00002 //    @f$Id: dof_levels.h 25345 2012-03-31 08:37:04Z bangerth @f$
00003 //
00004 //    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2010, 2011, 2012 by the deal.II authors
00005 //
00006 //    This file is subject to QPL and may not be  distributed
00007 //    without copyright and license information. Please refer
00008 //    to the file deal.II/doc/license.html for the  text  and
00009 //    further information on this license.
00010 //
00011 //---------------------------------------------------------------------------
00012 #ifndef __deal2__dof_levels_h
00013 #define __deal2__dof_levels_h
00014 
00015 
00016 #include <deal.II/base/config.h>
00017 #include <deal.II/base/exceptions.h>
00018 #include <deal.II/dofs/dof_objects.h>
00019 #include <vector>
00020 
00021 
00022 DEAL_II_NAMESPACE_OPEN
00023 
00024 template <int, int> class DoFHandler;
00025 template <int, int> class MGDoFHandler;
00026 
00027 
00028 namespace internal
00029 {
00030   namespace DoFHandler
00031   {
00032 
00033 
00080     template <int N>
00081     class DoFLevel
00082     {
00083       private:
00089         DoFLevel ();
00090     };
00091 
00092 
00093 
00099     template <>
00100     class DoFLevel<0>
00101     {
00102       public:
00111         std::vector<unsigned int> cell_dof_indices_cache;
00112 
00113 
00119         std::size_t memory_consumption () const;
00120 
00125         template <class Archive>
00126         void serialize(Archive & ar,
00127                        const unsigned int version);
00128     };
00129 
00136     template <>
00137     class DoFLevel<1> : public DoFLevel<0>
00138     {
00139       public:
00144         DoFObjects<1> lines;
00145 
00151         std::size_t memory_consumption () const;
00152 
00157         template <class Archive>
00158         void serialize(Archive & ar,
00159                        const unsigned int version);
00160     };
00161 
00162 
00169     template <>
00170     class DoFLevel<2> : public DoFLevel<0>
00171     {
00172       public:
00177         internal::DoFHandler::DoFObjects<2> quads;
00178 
00184         std::size_t memory_consumption () const;
00185 
00190         template <class Archive>
00191         void serialize(Archive & ar,
00192                        const unsigned int version);
00193     };
00194 
00195 
00202     template <>
00203     class DoFLevel<3> : public DoFLevel<0>
00204     {
00205       public:
00210         internal::DoFHandler::DoFObjects<3> hexes;
00211 
00217         std::size_t memory_consumption () const;
00218 
00223         template <class Archive>
00224         void serialize(Archive & ar,
00225                        const unsigned int version);
00226     };
00227 
00228 
00229 
00230     template <class Archive>
00231     void DoFLevel<0>::serialize (Archive &ar,
00232                                  const unsigned int)
00233     {
00234       ar & cell_dof_indices_cache;
00235     }
00236 
00237 
00238 
00239     template <class Archive>
00240     void DoFLevel<1>::serialize (Archive &ar,
00241                                  const unsigned int version)
00242     {
00243       this->DoFLevel<0>::serialize (ar, version);
00244       ar & lines;
00245     }
00246 
00247 
00248     template <class Archive>
00249     void DoFLevel<2>::serialize (Archive &ar,
00250                                  const unsigned int version)
00251     {
00252       this->DoFLevel<0>::serialize (ar, version);
00253       ar & quads;
00254     }
00255 
00256 
00257     template <class Archive>
00258     void DoFLevel<3>::serialize (Archive &ar,
00259                                  const unsigned int version)
00260     {
00261       this->DoFLevel<0>::serialize (ar, version);
00262       ar & hexes;
00263     }
00264   }
00265 }
00266 
00267 DEAL_II_NAMESPACE_CLOSE
00268 
00269 #endif
00270 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Tue May 22 2012 12:06:07 by doxygen 1.7.3