include/deal.II/grid/intergrid_map.h

00001 //---------------------------------------------------------------------------
00002 //    @f$Id: intergrid_map.h 25345 2012-03-31 08:37:04Z bangerth @f$
00003 //
00004 //    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 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__intergrid_map_h
00013 #define __deal2__intergrid_map_h
00014 
00015 #include <deal.II/base/config.h>
00016 #include <deal.II/base/smartpointer.h>
00017 #include <deal.II/dofs/dof_accessor.h>
00018 #include <deal.II/grid/tria_accessor.h>
00019 #include <deal.II/grid/tria_iterator.h>
00020 
00021 DEAL_II_NAMESPACE_OPEN
00022 
00023 
00114 template <class GridClass>
00115 class InterGridMap : public Subscriptor
00116 {
00117   public:
00118 
00123     typedef typename GridClass::cell_iterator cell_iterator;
00124 
00130     InterGridMap();
00131 
00136     void make_mapping (const GridClass &source_grid,
00137                        const GridClass &destination_grid);
00138 
00149     cell_iterator operator [] (const cell_iterator &source_cell) const;
00150 
00154     void clear ();
00155 
00160     const GridClass & get_source_grid () const;
00161 
00166     const GridClass & get_destination_grid () const;
00167 
00173     std::size_t memory_consumption () const;
00174 
00178     DeclException1 (ExcInvalidKey,
00179                     cell_iterator,
00180                     << "The iterator " << arg1 << " is not valid as key for "
00181                     << "this map.");
00185     DeclException0 (ExcIncompatibleGrids);
00186 
00187   private:
00192     std::vector<std::vector<cell_iterator> > mapping;
00193 
00197     SmartPointer<const GridClass,InterGridMap<GridClass> > source_grid;
00198 
00202     SmartPointer<const GridClass,InterGridMap<GridClass> > destination_grid;
00203 
00210     void set_mapping (const cell_iterator &src_cell,
00211                       const cell_iterator &dst_cell);
00212 
00225     void set_entries_to_cell (const cell_iterator &src_cell,
00226                               const cell_iterator &dst_cell);
00227 };
00228 
00229 
00230 DEAL_II_NAMESPACE_CLOSE
00231 
00232 #endif
00233 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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