include/deal.II/dofs/dof_handler_policy.h

00001 //---------------------------------------------------------------------------
00002 //    @f$Id: dof_handler_policy.h 25345 2012-03-31 08:37:04Z bangerth @f$
00003 //
00004 //    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 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_handler_policy_h
00013 #define __deal2__dof_handler_policy_h
00014 
00015 
00016 
00017 #include <deal.II/base/config.h>
00018 #include <deal.II/base/exceptions.h>
00019 #include <deal.II/base/template_constraints.h>
00020 
00021 #include <vector>
00022 #include <map>
00023 #include <set>
00024 
00025 DEAL_II_NAMESPACE_OPEN
00026 
00027 template <int, int> class FiniteElement;
00028 template <int, int> class DoFHandler;
00029 
00030 
00031 namespace internal
00032 {
00033   namespace DoFHandler
00034   {
00035     struct NumberCache;
00036 
00043     namespace Policy
00044     {
00045       struct Implementation;
00046 
00053       template <int dim, int spacedim>
00054       class PolicyBase
00055       {
00056         public:
00060           virtual ~PolicyBase ();
00061 
00066           virtual
00067           NumberCache
00068           distribute_dofs (const unsigned int        offset,
00069                            ::DoFHandler<dim,spacedim> &dof_handler) const = 0;
00070 
00075           virtual
00076           NumberCache
00077           renumber_dofs (const std::vector<unsigned int>  &new_numbers,
00078                          ::DoFHandler<dim,spacedim> &dof_handler) const = 0;
00079       };
00080 
00081 
00088       template <int dim, int spacedim>
00089       class Sequential : public PolicyBase<dim,spacedim>
00090       {
00091         public:
00096           virtual
00097           NumberCache
00098           distribute_dofs (const unsigned int        offset,
00099                            ::DoFHandler<dim,spacedim> &dof_handler) const;
00100 
00105           virtual
00106           NumberCache
00107           renumber_dofs (const std::vector<unsigned int>  &new_numbers,
00108                          ::DoFHandler<dim,spacedim> &dof_handler) const;
00109       };
00110 
00111 
00119       template <int dim, int spacedim>
00120       class ParallelDistributed : public PolicyBase<dim,spacedim>
00121       {
00122         public:
00127           virtual
00128           NumberCache
00129           distribute_dofs (const unsigned int        offset,
00130                            ::DoFHandler<dim,spacedim> &dof_handler) const;
00131 
00136           virtual
00137           NumberCache
00138           renumber_dofs (const std::vector<unsigned int>  &new_numbers,
00139                          ::DoFHandler<dim,spacedim> &dof_handler) const;
00140       };
00141     }
00142   }
00143 }
00144 
00145 
00146 
00147 DEAL_II_NAMESPACE_CLOSE
00148 
00149 /*----------------------------   dof_handler_policy.h     ---------------------------*/
00150 #endif
00151 /*----------------------------   dof_handler_policy.h     ---------------------------*/
00152 
 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