Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
intergrid_map.h
1 // ---------------------------------------------------------------------
2 // @f$Id: intergrid_map.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 1999 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 #ifndef __deal2__intergrid_map_h
18 #define __deal2__intergrid_map_h
19 
20 #include <deal.II/base/config.h>
21 #include <deal.II/base/smartpointer.h>
22 #include <deal.II/dofs/dof_accessor.h>
23 #include <deal.II/grid/tria_accessor.h>
24 #include <deal.II/grid/tria_iterator.h>
25 
26 DEAL_II_NAMESPACE_OPEN
27 
28 
119 template <class GridClass>
120 class InterGridMap : public Subscriptor
121 {
122 public:
123 
128  typedef typename GridClass::cell_iterator cell_iterator;
129 
135  InterGridMap();
136 
141  void make_mapping (const GridClass &source_grid,
142  const GridClass &destination_grid);
143 
154  cell_iterator operator [] (const cell_iterator &source_cell) const;
155 
159  void clear ();
160 
165  const GridClass &get_source_grid () const;
166 
171  const GridClass &get_destination_grid () const;
172 
178  std::size_t memory_consumption () const;
179 
183  DeclException1 (ExcInvalidKey,
185  << "The iterator " << arg1 << " is not valid as key for "
186  << "this map.");
190  DeclException0 (ExcIncompatibleGrids);
191 
192 private:
197  std::vector<std::vector<cell_iterator> > mapping;
198 
203 
208 
215  void set_mapping (const cell_iterator &src_cell,
216  const cell_iterator &dst_cell);
217 
230  void set_entries_to_cell (const cell_iterator &src_cell,
231  const cell_iterator &dst_cell);
232 };
233 
234 
235 DEAL_II_NAMESPACE_CLOSE
236 
237 #endif
void set_entries_to_cell(const cell_iterator &src_cell, const cell_iterator &dst_cell)
std::size_t memory_consumption() const
SmartPointer< const GridClass, InterGridMap< GridClass > > source_grid
void set_mapping(const cell_iterator &src_cell, const cell_iterator &dst_cell)
const GridClass & get_source_grid() const
SmartPointer< const GridClass, InterGridMap< GridClass > > destination_grid
const GridClass & get_destination_grid() const
DeclException0(ExcIncompatibleGrids)
cell_iterator operator[](const cell_iterator &source_cell) const
void make_mapping(const GridClass &source_grid, const GridClass &destination_grid)
GridClass::cell_iterator cell_iterator
std::vector< std::vector< cell_iterator > > mapping
DeclException1(ExcInvalidKey, cell_iterator,<< "The iterator "<< arg1<< " is not valid as key for "<< "this map.")