include/deal.II/grid/grid_refinement.h

00001 //---------------------------------------------------------------------------
00002 //    @f$Id: grid_refinement.h 25345 2012-03-31 08:37:04Z bangerth @f$
00003 //
00004 //    Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 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__grid_refinement_h
00013 #define __deal2__grid_refinement_h
00014 
00015 
00016 #include <deal.II/base/config.h>
00017 #include <deal.II/base/exceptions.h>
00018 #include <deal.II/grid/tria.h>
00019 
00020 #include <vector>
00021 #include <limits>
00022 
00023 DEAL_II_NAMESPACE_OPEN
00024 
00025 // forward declarations
00026 template <int dim, int spacedim> class Triangulation;
00027 template <class T> class Vector;
00028 
00029 
00045 namespace GridRefinement
00046 {
00111     template <int dim, class Vector, int spacedim>
00112     void
00113     refine_and_coarsen_fixed_number (
00114       Triangulation<dim,spacedim> &tria,
00115       const Vector                &criteria,
00116       const double                top_fraction_of_cells,
00117       const double                bottom_fraction_of_cells,
00118       const unsigned int          max_n_cells = std::numeric_limits<unsigned int>::max());
00119 
00173     template <int dim, class Vector, int spacedim>
00174     void
00175     refine_and_coarsen_fixed_fraction (
00176       Triangulation<dim,spacedim> &tria,
00177       const Vector                &criteria,
00178       const double                top_fraction,
00179       const double                bottom_fraction,
00180       const unsigned int          max_n_cells = std::numeric_limits<unsigned int>::max());
00181 
00182 
00183 
00208     template <int dim, class Vector, int spacedim>
00209     void
00210     refine_and_coarsen_optimize (Triangulation<dim,spacedim> &tria,
00211                                  const Vector                &criteria,
00212                                  const unsigned int           order=2);
00213 
00229     template <int dim, class Vector, int spacedim>
00230     void refine (Triangulation<dim,spacedim> &tria,
00231                  const Vector                &criteria,
00232                  const double                threshold);
00233 
00249     template <int dim, class Vector, int spacedim>
00250     void coarsen (Triangulation<dim,spacedim> &tria,
00251                   const Vector                &criteria,
00252                   const double                threshold);
00253 
00259   DeclException0(ExcNegativeCriteria);
00260 
00267   DeclException0 (ExcInvalidParameterValue);
00268 }
00269 
00270 
00271 
00272 DEAL_II_NAMESPACE_CLOSE
00273 
00274 #endif //__deal2__grid_refinement_h
00275 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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