Reference documentation for deal.II version Git f0d9923401 2020-09-28 19:47:38 -0600
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
intergrid_map.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1999 - 2018 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.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_intergrid_map_h
17 #define dealii_intergrid_map_h
18 
19 #include <deal.II/base/config.h>
20 
22 
24 
27 
29 
30 
113 template <class MeshType>
114 class InterGridMap : public Subscriptor
115 {
116 public:
120  using cell_iterator = typename MeshType::cell_iterator;
121 
125  InterGridMap();
126 
130  void
131  make_mapping(const MeshType &source_grid, const MeshType &destination_grid);
132 
139  cell_iterator operator[](const cell_iterator &source_cell) const;
140 
144  void
145  clear();
146 
150  const MeshType &
151  get_source_grid() const;
152 
156  const MeshType &
157  get_destination_grid() const;
158 
163  std::size_t
164  memory_consumption() const;
165 
171  << "The iterator " << arg1 << " is not valid as key for "
172  << "this map.");
177 
178 private:
182  std::vector<std::vector<cell_iterator>> mapping;
183 
188 
193 
198  void
199  set_mapping(const cell_iterator &src_cell, const cell_iterator &dst_cell);
200 
208  void
209  set_entries_to_cell(const cell_iterator &src_cell,
210  const cell_iterator &dst_cell);
211 };
212 
213 
215 
216 #endif
SmartPointer< const MeshType, InterGridMap< MeshType > > source_grid
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)
typename MeshType::cell_iterator cell_iterator
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:515
std::vector< std::vector< cell_iterator > > mapping
static ::ExceptionBase & ExcIncompatibleGrids()
#define DeclException0(Exception0)
Definition: exceptions.h:470
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:363
void make_mapping(const MeshType &source_grid, const MeshType &destination_grid)
SmartPointer< const MeshType, InterGridMap< MeshType > > destination_grid
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:362
void set_mapping(const cell_iterator &src_cell, const cell_iterator &dst_cell)