* Delete all data of this class.
*/
void clear ();
+
+ /**
+ * Return a pointer to the source
+ * grid.
+ */
+ const GridClass<dim> & get_source_grid () const;
+
+ /**
+ * Return a pointer to the
+ * destination grid.
+ */
+ const GridClass<dim> & get_destination_grid () const;
/**
* Exception
*/
vector<vector<cell_iterator> > mapping;
+ /**
+ * Store a pointer to the source grid.
+ */
+ SmartPointer<const GridClass<dim> > source_grid;
+
+ /**
+ * Likewise for the destination grid.
+ */
+ SmartPointer<const GridClass<dim> > destination_grid;
+
/**
* Set the mapping for the pair of
* cells given. These shall match
// test, but better than nothing
Assert (coarse_grid.get_tria().n_cells(0) == fine_grid.get_tria().n_cells(0),
ExcGridsDontMatch());
+
+ // check whether the map correlates
+ // the right objects
+ Assert (&coarse_to_fine_grid_map.get_source_grid() == &coarse_grid,
+ ExcGridsDontMatch ());
+ Assert (&coarse_to_fine_grid_map.get_destination_grid() == &fine_grid,
+ ExcGridsDontMatch ());
+
// check whether component numbers
// are valid
// first delete all contents
clear ();
+ // next store pointers to grids
+ this->source_grid = &source_grid;
+ this->destination_grid = &destination_grid;
// then set up the containers from
// scratch and fill them with end-iterators
};
+
template <template <int> class GridClass, int dim>
void
InterGridMap<GridClass,dim>::set_mapping (const cell_iterator &src_cell,
};
+
template <template <int> class GridClass, int dim>
void
InterGridMap<GridClass,dim>::set_entries_to_cell (const cell_iterator &src_cell,
};
+
template <template <int> class GridClass, int dim>
void InterGridMap<GridClass,dim>::clear ()
{
mapping.clear ();
+ source_grid = 0;
+ destination_grid = 0;
+};
+
+
+
+template <template <int> class GridClass, int dim>
+const GridClass<dim> &
+InterGridMap<GridClass,dim>::get_source_grid () const
+{
+ return *source_grid;
+};
+
+
+
+template <template <int> class GridClass, int dim>
+const GridClass<dim> &
+InterGridMap<GridClass,dim>::get_destination_grid () const
+{
+ return *destination_grid;
};
+
+
// explicit instantiations
template class InterGridMap<Triangulation, deal_II_dimension>;
template class InterGridMap<DoFHandler, deal_II_dimension>;