deal.II version GIT relicensing-6842-g793a97d2aa 2026-10-02 14:00:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu< Number, MemorySpace >::AdditionalData Struct Reference

The set of additional parameters to tune the preconditioner. More...

#include <deal.II/lac/trilinos_tpetra_precondition.h>

Detailed Description

template<typename Number, typename MemorySpace = ::MemorySpace::Host>
struct LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu< Number, MemorySpace >::AdditionalData

The set of additional parameters to tune the preconditioner.

Definition at line 1345 of file trilinos_tpetra_precondition.h.

Public Member Functions

 AdditionalData (const bool elliptic=true, const bool symmetric=true, const bool w_cycle=false, const double aggregation_threshold=1e-4, const std::vector< std::vector< bool > > &constant_modes=std::vector< std::vector< bool > >(0), const int smoother_sweeps=2, const int smoother_overlap=0, const bool output_details=false, const std::string &smoother_type="Chebyshev", const std::string &coarse_type="KLU2")
 Constructor.
 

Public Attributes

bool elliptic
 Optimize for elliptic problems.
 
bool symmetric
 Assume A is symmetric.
 
bool w_cycle
 Use W cycle instead of V cycle.
 
double aggregation_threshold
 Threshold for coarsening.
 
std::vector< std::vector< bool > > constant_modes
 
int smoother_sweeps
 Number of times pre- and post-smoothing are applied.
 
int smoother_overlap
 Determine the overlap in the smoother when run in parallel.
 
bool output_details
 Print internal information details of MueLu to screen.
 
std::string smoother_type
 Determines which smoother to use for the AMG cycle The following possibilities are implemented in this interface. From Ifpack2:
 
std::string coarse_type
 Type of smoother to use on the finer levels.
 

Constructor & Destructor Documentation

◆ AdditionalData()

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu< Number, MemorySpace >::AdditionalData::AdditionalData ( const bool  elliptic = true,
const bool  symmetric = true,
const bool  w_cycle = false,
const double  aggregation_threshold = 1e-4,
const std::vector< std::vector< bool > > &  constant_modes = std::vector< std::vector< bool > >(0),
const int  smoother_sweeps = 2,
const int  smoother_overlap = 0,
const bool  output_details = false,
const std::string &  smoother_type = "Chebyshev",
const std::string &  coarse_type = "KLU2" 
)

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 constant_modes vector can be initialized for a given field in the following manner:

...
DoFHandler<...> dof_handler;
FEValuesExtractors::Type... field_extractor;
...
LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu::AdditionalData
dof_handler,
dof_handler.get_fe_collection().component_mask(field_extractor),
data.constant_modes);
std::vector< index_type > data
Definition mpi.cc:734
std::vector< std::vector< bool > > extract_constant_modes(const DoFHandler< dim, spacedim > &dof_handler, const ComponentMask &component_mask={})
Parameters
ellipticOptimize MueLu for elliptic problems.
symmetricAssume for A to be symmetric.
w_cycleUse W-cycle instead of V-cycle.
aggregation_thresholdThreshold for coarsening.
constant_modesDetermine the nullspace of the equation.
smoother_sweepsNumber of times to apply the smoother.
smoother_overlapOverlap of smoother if run in parallel.
output_detailsPrint additional info to screen.
smoother_typeDetermine the smoother to use.
coarse_typeDetermine the coarse solver.

Member Data Documentation

◆ elliptic

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
bool LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu< Number, MemorySpace >::AdditionalData::elliptic

Optimize for elliptic problems.

Determines what underlying multigrid algorithm should be used. For elliptic problems this would be smoothed aggregation and unsmoothed for non-elliptic problems.

Definition at line 1403 of file trilinos_tpetra_precondition.h.

◆ symmetric

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
bool LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu< Number, MemorySpace >::AdditionalData::symmetric

Assume A is symmetric.

If A is symmetric the prolongation and restriction operators are transposes of each other.

Definition at line 1411 of file trilinos_tpetra_precondition.h.

◆ w_cycle

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
bool LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu< Number, MemorySpace >::AdditionalData::w_cycle

Use W cycle instead of V cycle.

Use W-cycle instead of the default V-cycle.

Definition at line 1418 of file trilinos_tpetra_precondition.h.

◆ aggregation_threshold

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
double LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu< Number, MemorySpace >::AdditionalData::aggregation_threshold

Threshold for coarsening.

This threshold tells the AMG setup how the coarsening should be performed. In MueLu all points that strongly couple with the tentative coarse-level point form one aggregate. The strong coupling is controlled by aggregation_threshold, meaning that all elements that are larger than aggregation_threshold times the diagonal element couple strongly.

Definition at line 1430 of file trilinos_tpetra_precondition.h.

◆ constant_modes

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
std::vector<std::vector<bool> > LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu< Number, MemorySpace >::AdditionalData::constant_modes

Specifies the constant modes (forming the near null space) of the matrix. This parameter helps MueLu consider that null space when building the preconditioner. Additionally, it also tells MueLu whether we work on a scalar equation (with a single constant mode) or on a vector-valued equation (with as many constant modes as solution components). Providing the correct constant modes, provided by DoFTools::extract_constant_modes() can significantly increase the performance of the preconditioner.

Definition at line 1443 of file trilinos_tpetra_precondition.h.

◆ smoother_sweeps

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
int LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu< Number, MemorySpace >::AdditionalData::smoother_sweeps

Number of times pre- and post-smoothing are applied.

For a Chebyshev smoother this determines the polynomial degree. Otherwise it determines how often the matrix-vector product of the smoother is applied.

Definition at line 1452 of file trilinos_tpetra_precondition.h.

◆ smoother_overlap

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
int LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu< Number, MemorySpace >::AdditionalData::smoother_overlap

Determine the overlap in the smoother when run in parallel.

Definition at line 1457 of file trilinos_tpetra_precondition.h.

◆ output_details

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
bool LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu< Number, MemorySpace >::AdditionalData::output_details

Print internal information details of MueLu to screen.

Definition at line 1462 of file trilinos_tpetra_precondition.h.

◆ smoother_type

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
std::string LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu< Number, MemorySpace >::AdditionalData::smoother_type

Determines which smoother to use for the AMG cycle The following possibilities are implemented in this interface. From Ifpack2:

  • "Jacobi"
  • "l1 Jacobi"
  • "Gauss Seidel"
  • "l1 Gauss Seidel"
  • "Symmetric Gauss Seidel"
  • "Chebyshev"
  • "ILU"
  • "ILUT"

Definition at line 1479 of file trilinos_tpetra_precondition.h.

◆ coarse_type

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
std::string LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu< Number, MemorySpace >::AdditionalData::coarse_type

Type of smoother to use on the finer levels.

The same settings as for the smoother type are possible with the addition of "KLU2" from Amesos2.

Definition at line 1487 of file trilinos_tpetra_precondition.h.


The documentation for this struct was generated from the following file: