if (dynamic_cast<const typename dealii::internal::DoFHandler::Policy::Sequential<dealii::DoFHandler<dim,spacedim> >*>(&policy)
|| dynamic_cast<const typename dealii::internal::DoFHandler::Policy::Sequential<dealii::hp::DoFHandler<dim,spacedim> >*>(&policy))
policy_name = "Policy::Sequential<";
- else if (dynamic_cast<const typename dealii::internal::DoFHandler::Policy::ParallelDistributed<dim,spacedim>*>(&policy))
+ else if (dynamic_cast<const typename dealii::internal::DoFHandler::Policy::ParallelDistributed<dealii::DoFHandler<dim,spacedim> >*>(&policy)
+ || dynamic_cast<const typename dealii::internal::DoFHandler::Policy::ParallelDistributed<dealii::hp::DoFHandler<dim,spacedim> >*>(&policy))
policy_name = "Policy::ParallelDistributed<";
else if (dynamic_cast<const typename dealii::internal::DoFHandler::Policy::ParallelShared<dealii::DoFHandler<dim,spacedim> >*>(&policy))
policy_name = "Policy::ParallelShared<";
== nullptr)
policy.reset (new internal::DoFHandler::Policy::Sequential<DoFHandler<dim,spacedim> >(*this));
else
- policy.reset (new internal::DoFHandler::Policy::ParallelDistributed<dim,spacedim>(*this));
+ policy.reset (new internal::DoFHandler::Policy::ParallelDistributed<DoFHandler<dim,spacedim> >(*this));
}
if (dynamic_cast<const parallel::shared::Triangulation< dim, spacedim>*> (&t) != nullptr)
policy.reset (new internal::DoFHandler::Policy::ParallelShared<DoFHandler<dim,spacedim> >(*this));
else if (dynamic_cast<const parallel::distributed::Triangulation< dim, spacedim >*> (&t) != nullptr)
- policy.reset (new internal::DoFHandler::Policy::ParallelDistributed<dim,spacedim>(*this));
+ policy.reset (new internal::DoFHandler::Policy::ParallelDistributed<DoFHandler<dim,spacedim> >(*this));
else
policy.reset (new internal::DoFHandler::Policy::Sequential<DoFHandler<dim,spacedim> >(*this));
- template <int dim, int spacedim>
- ParallelDistributed<dim,spacedim>::
- ParallelDistributed (dealii::DoFHandler<dim,spacedim> &dof_handler)
+ template <typename DoFHandlerType>
+ ParallelDistributed<DoFHandlerType>::
+ ParallelDistributed (DoFHandlerType &dof_handler)
:
dof_handler (&dof_handler)
{}
- template <int dim, int spacedim>
+ template <typename DoFHandlerType>
NumberCache
- ParallelDistributed<dim, spacedim>::
+ ParallelDistributed<DoFHandlerType>::
distribute_dofs () const
{
NumberCache number_cache;
#ifndef DEAL_II_WITH_P4EST
Assert (false, ExcNotImplemented());
#else
+ const unsigned int dim = DoFHandlerType::dimension;
+ const unsigned int spacedim = DoFHandlerType::space_dimension;
parallel::distributed::Triangulation< dim, spacedim > *tr
= (dynamic_cast<parallel::distributed::Triangulation<dim,spacedim>*>
{
std::vector<dealii::types::global_dof_index> local_dof_indices;
- typename DoFHandler<dim,spacedim>::active_cell_iterator
+ typename DoFHandlerType::active_cell_iterator
cell = dof_handler->begin_active(),
endc = dof_handler->end();
tr->clear_user_flags ();
// mark all own cells for transfer
- for (typename DoFHandler<dim,spacedim>::active_cell_iterator cell = dof_handler->begin_active();
+ for (typename DoFHandlerType::active_cell_iterator cell = dof_handler->begin_active();
cell != dof_handler->end(); ++cell)
if (!cell->is_artificial())
cell->set_user_flag();
{
std::vector<dealii::types::global_dof_index> local_dof_indices;
- for (typename DoFHandler<dim,spacedim>::active_cell_iterator cell = dof_handler->begin_active();
+ for (typename DoFHandlerType::active_cell_iterator cell = dof_handler->begin_active();
cell != dof_handler->end(); ++cell)
if (!cell->is_artificial())
{
- template <int dim, int spacedim>
+ template <typename DoFHandlerType>
std::vector<NumberCache>
- ParallelDistributed<dim, spacedim>::
+ ParallelDistributed<DoFHandlerType>::
distribute_mg_dofs () const
{
#ifndef DEAL_II_WITH_P4EST
Assert (false, ExcNotImplemented());
return std::vector<NumberCache>();
#else
+ const unsigned int dim = DoFHandlerType::dimension;
+ const unsigned int spacedim = DoFHandlerType::space_dimension;
parallel::distributed::Triangulation< dim, spacedim > *tr
= (dynamic_cast<parallel::distributed::Triangulation<dim,spacedim>*>
{
std::vector<dealii::types::global_dof_index> local_dof_indices;
- typename DoFHandler<dim,spacedim>::level_cell_iterator
+ typename DoFHandlerType::level_cell_iterator
cell = dof_handler->begin(level),
endc = dof_handler->end(level);
// mark all ghost cells for transfer
{
- typename DoFHandler<dim,spacedim>::level_cell_iterator
+ typename DoFHandlerType::level_cell_iterator
cell, endc = dof_handler->end();
for (cell = dof_handler->begin(); cell != endc; ++cell)
if (cell->level_subdomain_id() != dealii::numbers::artificial_subdomain_id
#ifdef DEBUG
// make sure we have removed all flags:
{
- typename DoFHandler<dim,spacedim>::level_cell_iterator
+ typename DoFHandlerType::level_cell_iterator
cell, endc = dof_handler->end();
for (cell = dof_handler->begin(); cell != endc; ++cell)
if (cell->level_subdomain_id() != dealii::numbers::artificial_subdomain_id
// check that we are really done
{
std::vector<dealii::types::global_dof_index> local_dof_indices;
- typename DoFHandler<dim,spacedim>::level_cell_iterator
+ typename DoFHandlerType::level_cell_iterator
cell, endc = dof_handler->end();
for (cell = dof_handler->begin(); cell != endc; ++cell)
}
- template <int dim, int spacedim>
+ template <typename DoFHandlerType>
NumberCache
- ParallelDistributed<dim, spacedim>::
+ ParallelDistributed<DoFHandlerType>::
renumber_dofs (const std::vector<dealii::types::global_dof_index> &new_numbers) const
{
(void)new_numbers;
#ifndef DEAL_II_WITH_P4EST
Assert (false, ExcNotImplemented());
#else
-
+ const unsigned int dim = DoFHandlerType::dimension;
+ const unsigned int spacedim = DoFHandlerType::space_dimension;
// calculate new IndexSet. First try to find out if the new indices
// are contiguous blocks. This avoids inserting each index
{
std::vector<dealii::types::global_dof_index> local_dof_indices;
- typename DoFHandler<dim,spacedim>::active_cell_iterator
+ typename DoFHandlerType::active_cell_iterator
cell = dof_handler->begin_active(),
endc = dof_handler->end();
tr->clear_user_flags ();
// mark all own cells for transfer
- typename DoFHandler<dim,spacedim>::active_cell_iterator
+ typename DoFHandlerType::active_cell_iterator
cell, endc = dof_handler->end();
for (cell = dof_handler->begin_active(); cell != endc; ++cell)
if (!cell->is_artificial())
- template <int dim, int spacedim>
+ template <typename DoFHandlerType>
NumberCache
- ParallelDistributed<dim,spacedim>::
+ ParallelDistributed<DoFHandlerType>::
renumber_mg_dofs (const unsigned int /*level*/,
const std::vector<types::global_dof_index> &/*new_numbers*/) const
{