*
* @note DoFHandler is not needed here, but is required by the interface.
*/
- template <class InVector, int spacedim>
+ template <class InVector>
void
- copy_to_mg(const DoFHandler<dim, spacedim> &dof_handler,
- MGLevelObject<VectorType> & dst,
- const InVector & src) const;
+ copy_to_mg(const DoFHandler<dim> & dof_handler,
+ MGLevelObject<VectorType> &dst,
+ const InVector & src) const;
/**
* Initialize internal vectors and copy the values on the finest
*
* @note DoFHandler is not needed here, but is required by the interface.
*/
- template <class OutVector, int spacedim>
+ template <class OutVector>
void
- copy_from_mg(const DoFHandler<dim, spacedim> &dof_handler,
+ copy_from_mg(const DoFHandler<dim> & dof_handler,
OutVector & dst,
const MGLevelObject<VectorType> &src) const;
* is required to be able to use MGTransferGlobalCoarsening and
* MGTransferMatrixFree as template argument.
*/
- template <class InVector, int spacedim>
+ template <class InVector>
void
- interpolate_to_mg(const DoFHandler<dim, spacedim> &dof_handler,
- MGLevelObject<VectorType> & dst,
- const InVector & src) const;
+ interpolate_to_mg(const DoFHandler<dim> & dof_handler,
+ MGLevelObject<VectorType> &dst,
+ const InVector & src) const;
/**
* Return the memory consumption of the allocated memory in this class.
template <int dim, typename VectorType>
-template <class InVector, int spacedim>
+template <class InVector>
void
MGTransferGlobalCoarsening<dim, VectorType>::copy_to_mg(
- const DoFHandler<dim, spacedim> &dof_handler,
- MGLevelObject<VectorType> & dst,
- const InVector & src) const
+ const DoFHandler<dim> & dof_handler,
+ MGLevelObject<VectorType> &dst,
+ const InVector & src) const
{
(void)dof_handler;
template <int dim, typename VectorType>
-template <class OutVector, int spacedim>
+template <class OutVector>
void
MGTransferGlobalCoarsening<dim, VectorType>::copy_from_mg(
- const DoFHandler<dim, spacedim> &dof_handler,
+ const DoFHandler<dim> & dof_handler,
OutVector & dst,
const MGLevelObject<VectorType> &src) const
{
template <int dim, typename VectorType>
-template <class InVector, int spacedim>
+template <class InVector>
void
MGTransferGlobalCoarsening<dim, VectorType>::interpolate_to_mg(
- const DoFHandler<dim, spacedim> &dof_handler,
- MGLevelObject<VectorType> & dst,
- const InVector & src) const
+ const DoFHandler<dim> & dof_handler,
+ MGLevelObject<VectorType> &dst,
+ const InVector & src) const
{
(void)dof_handler;
* ignored and internal variants are used instead.
*/
void
- build(const DoFHandler<dim, dim> &dof_handler,
+ build(const DoFHandler<dim> &dof_handler,
const std::vector<std::shared_ptr<const Utilities::MPI::Partitioner>>
&external_partitioners =
std::vector<std::shared_ptr<const Utilities::MPI::Partitioner>>());
* partitioners.
*/
void
- build(const DoFHandler<dim, dim> &dof_handler,
+ build(const DoFHandler<dim> &dof_handler,
const std::function<void(const unsigned int,
LinearAlgebra::distributed::Vector<Number> &)>
&initialize_dof_vector);
*
* The use of this function is demonstrated in step-66.
*/
- template <typename BlockVectorType2, int spacedim>
+ template <typename BlockVectorType2>
void
interpolate_to_mg(
- const DoFHandler<dim, spacedim> & dof_handler,
+ const DoFHandler<dim> & dof_handler,
MGLevelObject<LinearAlgebra::distributed::Vector<Number>> &dst,
const BlockVectorType2 & src) const;
* This function will initialize @p dst accordingly if needed as required by
* the Multigrid class.
*/
- template <typename BlockVectorType2, int spacedim>
+ template <typename BlockVectorType2>
void
copy_to_mg(
- const DoFHandler<dim, spacedim> & dof_handler,
+ const DoFHandler<dim> & dof_handler,
MGLevelObject<LinearAlgebra::distributed::BlockVector<Number>> &dst,
const BlockVectorType2 & src) const;
/**
* Same as above for the case that each block has its own DoFHandler.
*/
- template <typename BlockVectorType2, int spacedim>
+ template <typename BlockVectorType2>
void
copy_to_mg(
- const std::vector<const DoFHandler<dim, spacedim> *> & dof_handler,
+ const std::vector<const DoFHandler<dim> *> & dof_handler,
MGLevelObject<LinearAlgebra::distributed::BlockVector<Number>> &dst,
const BlockVectorType2 & src) const;
/**
* Transfer from multi-level block-vector to normal vector.
*/
- template <typename BlockVectorType2, int spacedim>
+ template <typename BlockVectorType2>
void
copy_from_mg(
- const DoFHandler<dim, spacedim> &dof_handler,
- BlockVectorType2 & dst,
+ const DoFHandler<dim> &dof_handler,
+ BlockVectorType2 & dst,
const MGLevelObject<LinearAlgebra::distributed::BlockVector<Number>> &src)
const;
/**
* Same as above for the case that each block has its own DoFHandler.
*/
- template <typename BlockVectorType2, int spacedim>
+ template <typename BlockVectorType2>
void
copy_from_mg(
- const std::vector<const DoFHandler<dim, spacedim> *> &dof_handler,
- BlockVectorType2 & dst,
+ const std::vector<const DoFHandler<dim> *> &dof_handler,
+ BlockVectorType2 & dst,
const MGLevelObject<LinearAlgebra::distributed::BlockVector<Number>> &src)
const;
* Actually build the information for the prolongation for each level.
*/
void
- build(const DoFHandler<dim, dim> &dof_handler);
+ build(const DoFHandler<dim> &dof_handler);
/**
* Same as above for the case that each block has its own DoFHandler.
*/
void
- build(const std::vector<const DoFHandler<dim, dim> *> &dof_handler);
+ build(const std::vector<const DoFHandler<dim> *> &dof_handler);
/**
* Memory used by this object.
template <int dim, typename Number>
-template <typename BlockVectorType2, int spacedim>
+template <typename BlockVectorType2>
void
MGTransferMatrixFree<dim, Number>::interpolate_to_mg(
- const DoFHandler<dim, spacedim> & dof_handler,
+ const DoFHandler<dim> & dof_handler,
MGLevelObject<LinearAlgebra::distributed::Vector<Number>> &dst,
const BlockVectorType2 & src) const
{
ExcDimensionMismatch(
max_level, dof_handler.get_triangulation().n_global_levels() - 1));
- const FiniteElement<dim, spacedim> &fe = dof_handler.get_fe();
+ const auto &fe = dof_handler.get_fe();
for (unsigned int level = min_level; level <= max_level; ++level)
if (dst[level].size() != dof_handler.n_dofs(level) ||
template <int dim, typename Number, typename TransferType>
-template <typename BlockVectorType2, int spacedim>
+template <typename BlockVectorType2>
void
MGTransferBlockMatrixFreeBase<dim, Number, TransferType>::copy_to_mg(
- const DoFHandler<dim, spacedim> & dof_handler,
+ const DoFHandler<dim> & dof_handler,
MGLevelObject<LinearAlgebra::distributed::BlockVector<Number>> &dst,
const BlockVectorType2 & src) const
{
"This object was initialized with support for usage with one "
"DoFHandler for each block, but this method assumes that "
"the same DoFHandler is used for all the blocks!"));
- const std::vector<const DoFHandler<dim, spacedim> *> mg_dofs(src.n_blocks(),
- &dof_handler);
+ const std::vector<const DoFHandler<dim> *> mg_dofs(src.n_blocks(),
+ &dof_handler);
copy_to_mg(mg_dofs, dst, src);
}
template <int dim, typename Number, typename TransferType>
-template <typename BlockVectorType2, int spacedim>
+template <typename BlockVectorType2>
void
MGTransferBlockMatrixFreeBase<dim, Number, TransferType>::copy_to_mg(
- const std::vector<const DoFHandler<dim, spacedim> *> & dof_handler,
+ const std::vector<const DoFHandler<dim> *> & dof_handler,
MGLevelObject<LinearAlgebra::distributed::BlockVector<Number>> &dst,
const BlockVectorType2 & src) const
{
}
template <int dim, typename Number, typename TransferType>
-template <typename BlockVectorType2, int spacedim>
+template <typename BlockVectorType2>
void
MGTransferBlockMatrixFreeBase<dim, Number, TransferType>::copy_from_mg(
- const DoFHandler<dim, spacedim> &dof_handler,
- BlockVectorType2 & dst,
+ const DoFHandler<dim> &dof_handler,
+ BlockVectorType2 & dst,
const MGLevelObject<LinearAlgebra::distributed::BlockVector<Number>> &src)
const
{
"This object was initialized with support for usage with one "
"DoFHandler for each block, but this method assumes that "
"the same DoFHandler is used for all the blocks!"));
- const std::vector<const DoFHandler<dim, spacedim> *> mg_dofs(dst.n_blocks(),
- &dof_handler);
+ const std::vector<const DoFHandler<dim> *> mg_dofs(dst.n_blocks(),
+ &dof_handler);
copy_from_mg(mg_dofs, dst, src);
}
template <int dim, typename Number, typename TransferType>
-template <typename BlockVectorType2, int spacedim>
+template <typename BlockVectorType2>
void
MGTransferBlockMatrixFreeBase<dim, Number, TransferType>::copy_from_mg(
- const std::vector<const DoFHandler<dim, spacedim> *> &dof_handler,
- BlockVectorType2 & dst,
+ const std::vector<const DoFHandler<dim> *> &dof_handler,
+ BlockVectorType2 & dst,
const MGLevelObject<LinearAlgebra::distributed::BlockVector<Number>> &src)
const
{
template <int dim, typename Number>
void
MGTransferMatrixFree<dim, Number>::build(
- const DoFHandler<dim, dim> &dof_handler,
+ const DoFHandler<dim> &dof_handler,
const std::vector<std::shared_ptr<const Utilities::MPI::Partitioner>>
&external_partitioners)
{
template <int dim, typename Number>
void
MGTransferMatrixFree<dim, Number>::build(
- const DoFHandler<dim, dim> &dof_handler,
+ const DoFHandler<dim> &dof_handler,
const std::function<void(const unsigned int,
LinearAlgebra::distributed::Vector<Number> &)>
&initialize_dof_vector)
template <int dim, typename Number>
void
MGTransferBlockMatrixFree<dim, Number>::build(
- const DoFHandler<dim, dim> &dof_handler)
+ const DoFHandler<dim> &dof_handler)
{
AssertDimension(this->matrix_free_transfer_vector.size(), 1);
this->matrix_free_transfer_vector[0].build(dof_handler);
template <int dim, typename Number>
void
MGTransferBlockMatrixFree<dim, Number>::build(
- const std::vector<const DoFHandler<dim, dim> *> &dof_handler)
+ const std::vector<const DoFHandler<dim> *> &dof_handler)
{
AssertDimension(this->matrix_free_transfer_vector.size(), dof_handler.size());
for (unsigned int i = 0; i < dof_handler.size(); ++i)