//---------------------------------------------------------------------------
// $Id$
-// Version: $Name$
//
// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors
//
-template <class VECTOR>
-template <int dim, class InVector, int spacedim>
-void
-MGTransferPrebuilt<VECTOR>::copy_to_mg (
- const MGDoFHandler<dim,spacedim>& mg_dof_handler,
- MGLevelObject<VECTOR>& dst,
- const InVector& src) const
-{
- reinit_vector(mg_dof_handler, component_to_block_map, dst);
- bool first = true;
- for (unsigned int level=mg_dof_handler.get_tria().n_levels();level != 0;)
- {
- --level;
- VECTOR& dst_level = dst[level];
-
- typedef std::vector<std::pair<unsigned int, unsigned int> >::const_iterator IT;
- for (IT i= copy_indices[level].begin();
- i != copy_indices[level].end();++i)
- dst_level(i->second) = src(i->first);
-
- // For non-DG: degrees of
- // freedom in the refinement
- // face may need special
- // attention, since they belong
- // to the coarse level, but
- // have fine level basis
- // functions
- if (!first)
- restrict_and_add (level+1, dst[level], dst[level+1]);
-
- first = false;
- }
-}
-
-
-
template <typename VECTOR>
template <int dim, int spacedim>
void MGTransferPrebuilt<VECTOR>::build_matrices (
//---------------------------------------------------------------------------
// $Id$
-// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
//---------------------------------------------------------------------------
-for (deal_II_dimension : DIMENSIONS)
+for (deal_II_dimension : DIMENSIONS; V1 : SERIAL_VECTORS)
{
-//TODO: Use template expander script
-
-template
-void MGTransferPrebuilt<Vector<float> >::build_matrices<deal_II_dimension>
-(const MGDoFHandler<deal_II_dimension> &mg_dof);
-
-template
-void MGTransferPrebuilt<Vector<double> >::build_matrices<deal_II_dimension>
-(const MGDoFHandler<deal_II_dimension> &mg_dof);
-
-template
-void MGTransferPrebuilt<BlockVector<float> >::build_matrices<deal_II_dimension>
-(const MGDoFHandler<deal_II_dimension> &mg_dof);
-
-template
-void MGTransferPrebuilt<BlockVector<double> >::build_matrices<deal_II_dimension>
-(const MGDoFHandler<deal_II_dimension> &mg_dof);
-
-template void
-MGTransferPrebuilt<Vector<float> >::copy_to_mg (
- const MGDoFHandler<deal_II_dimension>&,
- MGLevelObject<Vector<float> >&,
- const Vector<double>&) const;
-template void
-MGTransferPrebuilt<Vector<float> >::copy_to_mg (
- const MGDoFHandler<deal_II_dimension>&,
- MGLevelObject<Vector<float> >&,
- const BlockVector<double>&) const;
-template void
-MGTransferPrebuilt<Vector<float> >::copy_from_mg (
- const MGDoFHandler<deal_II_dimension>&,
- Vector<double>&,
- const MGLevelObject<Vector<float> >&) const;
-template void
-MGTransferPrebuilt<Vector<float> >::copy_from_mg (
- const MGDoFHandler<deal_II_dimension>&,
- BlockVector<double>&,
- const MGLevelObject<Vector<float> >&) const;
-template void
-MGTransferPrebuilt<Vector<float> >::copy_from_mg_add (
- const MGDoFHandler<deal_II_dimension>&,
- Vector<double>&,
- const MGLevelObject<Vector<float> >&) const;
-template void
-MGTransferPrebuilt<Vector<float> >::copy_from_mg_add (
- const MGDoFHandler<deal_II_dimension>&,
- BlockVector<double>&,
- const MGLevelObject<Vector<float> >&) const;
-
-template void
-MGTransferPrebuilt<BlockVector<float> >::copy_to_mg (
- const MGDoFHandler<deal_II_dimension>&,
- MGLevelObject<BlockVector<float> >&,
- const Vector<double>&) const;
-template void
-MGTransferPrebuilt<BlockVector<float> >::copy_to_mg (
- const MGDoFHandler<deal_II_dimension>&,
- MGLevelObject<BlockVector<float> >&,
- const BlockVector<double>&) const;
-template void
-MGTransferPrebuilt<BlockVector<float> >::copy_from_mg (
- const MGDoFHandler<deal_II_dimension>&,
- Vector<double>&,
- const MGLevelObject<BlockVector<float> >&) const;
-template void
-MGTransferPrebuilt<BlockVector<float> >::copy_from_mg (
- const MGDoFHandler<deal_II_dimension>&,
- BlockVector<double>&,
- const MGLevelObject<BlockVector<float> >&) const;
-template void
-MGTransferPrebuilt<BlockVector<float> >::copy_from_mg_add (
- const MGDoFHandler<deal_II_dimension>&,
- Vector<double>&,
- const MGLevelObject<BlockVector<float> >&) const;
-template void
-MGTransferPrebuilt<BlockVector<float> >::copy_from_mg_add (
- const MGDoFHandler<deal_II_dimension>&,
- BlockVector<double>&,
- const MGLevelObject<BlockVector<float> >&) const;
-
-template void
-MGTransferPrebuilt<Vector<double> >::copy_to_mg (
- const MGDoFHandler<deal_II_dimension>&,
- MGLevelObject<Vector<double> >&,
- const Vector<double>&) const;
-template void
-MGTransferPrebuilt<Vector<double> >::copy_to_mg (
- const MGDoFHandler<deal_II_dimension>&,
- MGLevelObject<Vector<double> >&,
- const BlockVector<double>&) const;
-template void
-MGTransferPrebuilt<Vector<double> >::copy_from_mg (
- const MGDoFHandler<deal_II_dimension>&,
- Vector<double>&,
- const MGLevelObject<Vector<double> >&) const;
-template void
-MGTransferPrebuilt<Vector<double> >::copy_from_mg (
- const MGDoFHandler<deal_II_dimension>&,
- BlockVector<double>&,
- const MGLevelObject<Vector<double> >&) const;
-template void
-MGTransferPrebuilt<Vector<double> >::copy_from_mg_add (
- const MGDoFHandler<deal_II_dimension>&,
- Vector<double>&,
- const MGLevelObject<Vector<double> >&) const;
-template void
-MGTransferPrebuilt<Vector<double> >::copy_from_mg_add (
- const MGDoFHandler<deal_II_dimension>&,
- BlockVector<double>&,
- const MGLevelObject<Vector<double> >&) const;
+ template
+ void MGTransferPrebuilt<V1 >::build_matrices<deal_II_dimension>(
+ const MGDoFHandler<deal_II_dimension> &mg_dof);
+ }
-template void
-MGTransferPrebuilt<BlockVector<double> >::copy_to_mg (
- const MGDoFHandler<deal_II_dimension>&,
- MGLevelObject<BlockVector<double> >&,
- const Vector<double>&) const;
-template void
-MGTransferPrebuilt<BlockVector<double> >::copy_to_mg (
- const MGDoFHandler<deal_II_dimension>&,
- MGLevelObject<BlockVector<double> >&,
- const BlockVector<double>&) const;
-template void
-MGTransferPrebuilt<BlockVector<double> >::copy_from_mg (
- const MGDoFHandler<deal_II_dimension>&,
- Vector<double>&,
- const MGLevelObject<BlockVector<double> >&) const;
-template void
-MGTransferPrebuilt<BlockVector<double> >::copy_from_mg (
- const MGDoFHandler<deal_II_dimension>&,
- BlockVector<double>&,
- const MGLevelObject<BlockVector<double> >&) const;
-template void
-MGTransferPrebuilt<BlockVector<double> >::copy_from_mg_add (
- const MGDoFHandler<deal_II_dimension>&,
- Vector<double>&,
- const MGLevelObject<BlockVector<double> >&) const;
-template void
-MGTransferPrebuilt<BlockVector<double> >::copy_from_mg_add (
- const MGDoFHandler<deal_II_dimension>&,
- BlockVector<double>&,
- const MGLevelObject<BlockVector<double> >&) const;
+for (deal_II_dimension : DIMENSIONS; V1,V2 : SERIAL_VECTORS)
+ {
+ template void
+ MGTransferPrebuilt<V1 >::copy_to_mg (
+ const MGDoFHandler<deal_II_dimension>&, MGLevelObject<V1 >&, const V2&) const;
+ template void
+ MGTransferPrebuilt<V1 >::copy_from_mg (const MGDoFHandler<deal_II_dimension>&, V2&,
+ const MGLevelObject<V1 >&) const;
+ template void
+ MGTransferPrebuilt<V1 >::copy_from_mg_add (const MGDoFHandler<deal_II_dimension>&, V2&,
+ const MGLevelObject<V1 >&) const;
}