* the object given as last argument.
*/
virtual
- NumberCache
- distribute_dofs (dealii::DoFHandler<dim,spacedim> &dof_handler) const = 0;
+ void
+ distribute_dofs (dealii::DoFHandler<dim,spacedim> &dof_handler,
+ NumberCache &number_cache) const = 0;
/**
* Distribute the multigrid dofs on each level
* specified by the first argument.
*/
virtual
- NumberCache
+ void
renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
- dealii::DoFHandler<dim,spacedim> &dof_handler) const = 0;
+ dealii::DoFHandler<dim,spacedim> &dof_handler,
+ NumberCache & number_cache) const = 0;
};
* the object given as last argument.
*/
virtual
- NumberCache
- distribute_dofs (dealii::DoFHandler<dim,spacedim> &dof_handler) const;
+ void
+ distribute_dofs (dealii::DoFHandler<dim,spacedim> &dof_handler,
+ NumberCache &number_cache) const;
/**
* Distribute multigrid DoFs.
* specified by the first argument.
*/
virtual
- NumberCache
+ void
renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
- dealii::DoFHandler<dim,spacedim> &dof_handler) const;
+ dealii::DoFHandler<dim,spacedim> &dof_handler,
+ NumberCache & number_cache) const;
};
template <int dim, int spacedim>
{
public:
virtual
- NumberCache
- distribute_dofs (dealii::DoFHandler<dim,spacedim> &dof_handler) const;
+ void
+ distribute_dofs (dealii::DoFHandler<dim,spacedim> &dof_handler,
+ NumberCache & number_cache) const;
virtual
void
std::vector<NumberCache> &number_caches) const;
virtual
- NumberCache
+ void
renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
- dealii::DoFHandler<dim,spacedim> &dof_handler) const;
+ dealii::DoFHandler<dim,spacedim> &dof_handler,
+ NumberCache & number_cache) const;
};
* the object given as last argument.
*/
virtual
- NumberCache
- distribute_dofs (dealii::DoFHandler<dim,spacedim> &dof_handler) const;
+ void
+ distribute_dofs (dealii::DoFHandler<dim,spacedim> &dof_handler,
+ NumberCache &number_cache) const;
/**
* Distribute multigrid DoFs.
* specified by the first argument.
*/
virtual
- NumberCache
+ void
renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
- dealii::DoFHandler<dim,spacedim> &dof_handler) const;
+ dealii::DoFHandler<dim,spacedim> &dof_handler,
+ NumberCache &number_cache) const;
};
}
}
template <int dim, int spacedim>
- NumberCache
+ void
Sequential<dim,spacedim>::
- distribute_dofs (DoFHandler<dim,spacedim> &dof_handler) const
+ distribute_dofs (DoFHandler<dim,spacedim> &dof_handler,
+ NumberCache & number_cache ) const
{
const types::global_dof_index n_dofs =
Implementation::distribute_dofs (0,
// now set the elements of the
// number cache appropriately
- NumberCache number_cache;
number_cache.n_global_dofs = n_dofs;
number_cache.n_locally_owned_dofs = number_cache.n_global_dofs;
number_cache.locally_owned_dofs_per_processor
= std::vector<IndexSet> (1,
number_cache.locally_owned_dofs);
- return number_cache;
}
}
template <int dim, int spacedim>
- NumberCache
+ void
Sequential<dim,spacedim>::
renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
- dealii::DoFHandler<dim,spacedim> &dof_handler) const
+ dealii::DoFHandler<dim,spacedim> &dof_handler,
+ NumberCache &number_cache) const
{
Implementation::renumber_dofs (new_numbers, IndexSet(0),
dof_handler, true);
// have to set the elements
// of the structure
// appropriately anyway
- NumberCache number_cache;
number_cache.n_global_dofs = dof_handler.n_dofs();
number_cache.n_locally_owned_dofs = number_cache.n_global_dofs;
number_cache.locally_owned_dofs_per_processor
= std::vector<IndexSet> (1,
number_cache.locally_owned_dofs);
- return number_cache;
}
/* --------------------- class ParallelSequential ---------------- */
template <int dim, int spacedim>
- NumberCache
+ void
ParallelShared<dim,spacedim>::
- distribute_dofs (DoFHandler<dim,spacedim> &dof_handler) const
+ distribute_dofs (DoFHandler<dim,spacedim> &dof_handler,
+ NumberCache & number_cache) const
{
- NumberCache number_cache = Sequential<dim,spacedim>::distribute_dofs (dof_handler);
- return number_cache;
+ Sequential<dim,spacedim>::distribute_dofs (dof_handler,number_cache);
}
template <int dim, int spacedim>
}
template <int dim, int spacedim>
- NumberCache
+ void
ParallelShared<dim,spacedim>::
renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
- dealii::DoFHandler<dim,spacedim> &dof_handler) const
+ dealii::DoFHandler<dim,spacedim> &dof_handler,
+ NumberCache &number_cache) const
{
- NumberCache number_cache = Sequential<dim,spacedim>::renumber_dofs (new_numbers,dof_handler);
+ Sequential<dim,spacedim>::renumber_dofs (new_numbers,dof_handler,number_cache);
//correct number_cache:
number_cache.locally_owned_dofs = dealii::DoFTools::locally_owned_dofs_with_subdomain(dof_handler,dof_handler.get_tria().locally_owned_subdomain() );
- return number_cache;
}
/* --------------------- class ParallelDistributed ---------------- */
template <int dim, int spacedim>
- NumberCache
+ void
ParallelDistributed<dim, spacedim>::
- distribute_dofs (DoFHandler<dim,spacedim> &dof_handler) const
+ distribute_dofs (DoFHandler<dim,spacedim> &dof_handler,
+ NumberCache &number_cache) const
{
- NumberCache number_cache;
#ifndef DEAL_II_WITH_P4EST
(void)dof_handler;
#endif // DEBUG
#endif // DEAL_II_WITH_P4EST
- return number_cache;
}
template <int dim, int spacedim>
- NumberCache
+ void
ParallelDistributed<dim, spacedim>::
renumber_dofs (const std::vector<dealii::types::global_dof_index> &new_numbers,
- dealii::DoFHandler<dim,spacedim> &dof_handler) const
+ dealii::DoFHandler<dim,spacedim> &dof_handler,
+ NumberCache &number_cache) const
{
Assert (new_numbers.size() == dof_handler.locally_owned_dofs().n_elements(),
ExcInternalError());
- NumberCache number_cache;
#ifndef DEAL_II_WITH_P4EST
Assert (false, ExcNotImplemented());
}
#endif
- return number_cache;
}
}
}