Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement PreconditionMG::get_multigrid() #12733

Merged
merged 1 commit into from
Sep 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 28 additions & 0 deletions include/deal.II/multigrid/multigrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,18 @@ class PreconditionMG : public Subscriptor
boost::signals2::connection
connect_transfer_to_global(const std::function<void(bool)> &slot);

/**
* Return the Multigrid object passed to the constructor.
*/
Multigrid<VectorType> &
get_multigrid();

/**
* Return the Multigrid object passed to the constructor.
*/
const Multigrid<VectorType> &
get_multigrid() const;

private:
/**
* Associated @p DoFHandler.
Expand Down Expand Up @@ -963,6 +975,22 @@ PreconditionMG<dim, VectorType, TRANSFER>::Tvmult_add(
Assert(false, ExcNotImplemented());
}


template <int dim, typename VectorType, class TRANSFER>
Multigrid<VectorType> &
PreconditionMG<dim, VectorType, TRANSFER>::get_multigrid()
{
return *this->multigrid;
}


template <int dim, typename VectorType, class TRANSFER>
const Multigrid<VectorType> &
PreconditionMG<dim, VectorType, TRANSFER>::get_multigrid() const
{
return *this->multigrid;
}

#endif // DOXYGEN

DEAL_II_NAMESPACE_CLOSE
Expand Down