virtual
NumberCache
renumber_dofs (const std::vector<types::global_dof_index> &new_numbers) const = 0;
+
+ /**
+ * Renumber multilevel degrees of freedom on one level of a multigrid
+ * hierarchy. The second argument specifies the set of new DoF
+ * indices.
+ *
+ * Return an updated NumberCache for the specified level of the
+ * DoFHandler after renumbering.
+ */
+ virtual
+ NumberCache
+ renumber_mg_dofs (const unsigned int level,
+ const std::vector<types::global_dof_index> &new_numbers) const = 0;
};
NumberCache
renumber_dofs (const std::vector<types::global_dof_index> &new_numbers) const;
+ // documentation is inherited
+ virtual
+ NumberCache
+ renumber_mg_dofs (const unsigned int level,
+ const std::vector<types::global_dof_index> &new_numbers) const;
+
protected:
/**
* The DoFHandler object on which this policy object works.
SmartPointer<DoFHandlerType> dof_handler;
};
+
+
/**
* This class implements the policy for operations when we use a
* parallel::shared::Triangulation object.
NumberCache
renumber_dofs (const std::vector<types::global_dof_index> &new_numbers) const;
+ // documentation is inherited
+ virtual
+ NumberCache
+ renumber_mg_dofs (const unsigned int level,
+ const std::vector<types::global_dof_index> &new_numbers) const;
+
private:
/**
* The DoFHandler object on which this policy object works.
NumberCache
renumber_dofs (const std::vector<types::global_dof_index> &new_numbers) const;
+ // documentation is inherited
+ virtual
+ NumberCache
+ renumber_mg_dofs (const unsigned int level,
+ const std::vector<types::global_dof_index> &new_numbers) const;
+
private:
/**
* The DoFHandler object on which this policy object works.
}
+
+ template <typename DoFHandlerType>
+ NumberCache
+ Sequential<DoFHandlerType>::
+ renumber_mg_dofs (const unsigned int level,
+ const std::vector<types::global_dof_index> &new_numbers) const
+ {
+ Implementation::renumber_mg_dofs (new_numbers, IndexSet(0),
+ *dof_handler, level, true);
+
+ // return a sequential, complete index set
+ return NumberCache (new_numbers.size());
+ }
+
+
/* --------------------- class ParallelShared ---------------- */
// this is not currently implemented; the algorithm should work
// as above, though: first call the sequential numbering
// algorithm, then re-enumerate subdomain-wise
- Assert(false,ExcNotImplemented());
+ Assert(false, ExcNotImplemented());
return std::vector<NumberCache>();
}
+
+
template <int dim, int spacedim>
NumberCache
ParallelShared<dim,spacedim>::
#endif
}
+
+
+ template <int dim, int spacedim>
+ NumberCache
+ ParallelShared<dim,spacedim>::
+ renumber_mg_dofs (const unsigned int /*level*/,
+ const std::vector<types::global_dof_index> &/*new_numbers*/) const
+ {
+ // multigrid is not currently implemented for shared triangulations
+ Assert(false, ExcNotImplemented());
+
+ return NumberCache ();
+ }
+
+
+
/* --------------------- class ParallelDistributed ---------------- */
#ifdef DEAL_II_WITH_P4EST
return number_cache;
}
+
+
+
+ template <int dim, int spacedim>
+ NumberCache
+ ParallelDistributed<dim,spacedim>::
+ renumber_mg_dofs (const unsigned int /*level*/,
+ const std::vector<types::global_dof_index> &/*new_numbers*/) const
+ {
+ // this is not currently implemented, but should be simple to do by
+ // just calling the function like in the sequential case just with
+ // an appropriate index set argument
+ Assert(false, ExcNotImplemented());
+
+ return NumberCache ();
+ }
+
+
}
}
}