Reference documentation for deal.II version 9.0.0
intergrid_map.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1999 - 2017 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_intergrid_map_h
17 #define dealii_intergrid_map_h
18 
19 #include <deal.II/base/config.h>
20 #include <deal.II/base/smartpointer.h>
21 #include <deal.II/dofs/dof_accessor.h>
22 #include <deal.II/grid/tria_accessor.h>
23 #include <deal.II/grid/tria_iterator.h>
24 
25 DEAL_II_NAMESPACE_OPEN
26 
27 
111 template <class MeshType>
112 class InterGridMap : public Subscriptor
113 {
114 public:
115 
119  typedef typename MeshType::cell_iterator cell_iterator;
120 
124  InterGridMap();
125 
129  void make_mapping (const MeshType &source_grid,
130  const MeshType &destination_grid);
131 
138  cell_iterator operator [] (const cell_iterator &source_cell) const;
139 
143  void clear ();
144 
148  const MeshType &get_source_grid () const;
149 
153  const MeshType &get_destination_grid () const;
154 
159  std::size_t memory_consumption () const;
160 
166  << "The iterator " << arg1 << " is not valid as key for "
167  << "this map.");
172 
173 private:
177  std::vector<std::vector<cell_iterator> > mapping;
178 
183 
188 
193  void set_mapping (const cell_iterator &src_cell,
194  const cell_iterator &dst_cell);
195 
203  void set_entries_to_cell (const cell_iterator &src_cell,
204  const cell_iterator &dst_cell);
205 };
206 
207 
208 DEAL_II_NAMESPACE_CLOSE
209 
210 #endif
MeshType::cell_iterator cell_iterator
cell_iterator operator[](const cell_iterator &source_cell) const
const MeshType & get_destination_grid() const
void set_entries_to_cell(const cell_iterator &src_cell, const cell_iterator &dst_cell)
const MeshType & get_source_grid() const
static ::ExceptionBase & ExcInvalidKey(cell_iterator arg1)
std::size_t memory_consumption() const
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:346
std::vector< std::vector< cell_iterator > > mapping
static ::ExceptionBase & ExcIncompatibleGrids()
#define DeclException0(Exception0)
Definition: exceptions.h:323
void make_mapping(const MeshType &source_grid, const MeshType &destination_grid)
SmartPointer< const MeshType, InterGridMap< MeshType > > destination_grid
SmartPointer< const MeshType, InterGridMap< MeshType > > source_grid
void set_mapping(const cell_iterator &src_cell, const cell_iterator &dst_cell)