From 0e30348e98c2b0a34675cdbb2d57678d857d91ff Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Tue, 26 Mar 2019 17:04:28 +0100 Subject: [PATCH] Add documentation for initialising Trilinos AMG constant modes --- include/deal.II/lac/trilinos_precondition.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/deal.II/lac/trilinos_precondition.h b/include/deal.II/lac/trilinos_precondition.h index aba329ce8a..3b5ac1984a 100644 --- a/include/deal.II/lac/trilinos_precondition.h +++ b/include/deal.II/lac/trilinos_precondition.h @@ -1369,6 +1369,25 @@ namespace TrilinosWrappers /** * Constructor. By default, we pretend to work on elliptic problems with * linear finite elements on a scalar equation. + * + * Making use of the DoFTools::extract_constant_modes() function, the + * @p constant_modes vector can be initialized for a given field in the + * following manner: + * + * @code + * #include + * ... + * + * DoFHandlerType<...> dof_handler; + * FEValuesExtractors::Type... field_extractor; + * ... + * + * TrilinosWrappers::PreconditionAMG::AdditionalData data; + * DoFTools::extract_constant_modes( + * dof_handler, + * dof_handler.get_fe_collection().component_mask(field_extractor), + * data.constant_modes ); + * @endcode */ AdditionalData(const bool elliptic = true, const bool higher_order_elements = false, -- 2.39.5