Public Member Functions | |
AdditionalData (const bool right_preconditioning=false, const bool Av_is_symmetric=true, const std::vector< std::vector< bool > > &Av_constant_modes=std::vector< std::vector< bool > >(1), const double inner_solve_tolerance=1e-9, const bool use_ssor_on_mass_matrix=false, const bool velocity_uses_higher_order_elements=false, const bool pressure_uses_higher_order_elements=false, const bool Av_do_solve=false, const unsigned int Av_n_iters=1, const double Av_tolerance=1e-3, const bool ouput_details=false) | |
Public Attributes | |
bool | right_preconditioning |
bool | Av_is_symmetric |
std::vector< std::vector< bool > > | Av_constant_modes |
double | inner_solve_tolerance |
bool | use_ssor_on_mass_matrix |
bool | velocity_uses_higher_order_elements |
bool | pressure_uses_higher_order_elements |
unsigned int | Av_do_solve |
unsigned int | Av_n_iters |
double | Av_tolerance |
bool | output_details |
TrilinosWrappers::PreconditionStokes::AdditionalData::AdditionalData | ( | const bool | right_preconditioning = false , |
|
const bool | Av_is_symmetric = true , |
|||
const std::vector< std::vector< bool > > & | Av_constant_modes = std::vector< std::vector< bool > >(1) , |
|||
const double | inner_solve_tolerance = 1e-9 , |
|||
const bool | use_ssor_on_mass_matrix = false , |
|||
const bool | velocity_uses_higher_order_elements = false , |
|||
const bool | pressure_uses_higher_order_elements = false , |
|||
const bool | Av_do_solve = false , |
|||
const unsigned int | Av_n_iters = 1 , |
|||
const double | Av_tolerance = 1e-3 , |
|||
const bool | ouput_details = false | |||
) |
Constructor. This sets the additional data to its default values. For lazy initializations, the user will just set the parameters in here and let the initialize
function set up good preconditioners, where some good values have to be provided here. The default ones mean that we assume the velocity-velocity matrix to be symmetric (only true for Stokes problems!), we use a relative inner tolerance of 1e-9 for the inversion of matrices, and take in IC preconditioner for the inversion of the pressure mass matrix. Moreover, there is no inner CG/GMRES solve performed on the velocity-velocity block by default. Otherwise, we do a solve with the specified solver and the number of iterations and tolerance. Note that too many iterations on Av can slow down the overall procedure considerably.
This flag specifies whether the preconditioner should be build as a left preconditioner or right preconditioner. Note that this setting must be the same as the one used in the solver call.
This flag determines whether the velocity-velocity matrix is symmetric (and positive definite) or not. This choice will influence the AMG preconditioner that is built for that system as well as the inner solve on Av (if that flag is enabled).
std::vector<std::vector<bool> > TrilinosWrappers::PreconditionStokes::AdditionalData::Av_constant_modes |
This determines the near null space for the operator Av, the vector-valued velocity-velocity space. In order to get good performance, this vector has to be specified using the DoFTools::extract_constant_modes() function.
Tolerance level that the inner solvers on the pressure mass matrix (and the pressure Laplace matrix in case of a Navier-Stokes problem) should be solve to. It is essential that this tolerance is in the same order of magnitude than the one chosen for the outer GMRES solver (or little less). Otherwise unexpected variations in the number of iterations can occur from solve to solve.
Default value: 1e-9
residual relative to initial residual.
Determines whether the inner solve for the pressure mass matrix should use an IC preconditioner (incomplete Cholesky factorization) or an SSOR preconditioner. The former tends to be faster in most situations, whereas the latter uses almost no additional memory besides the matrix storage.
Determines whether the underlying velocity discretization uses linear elements or higher order elements, which has consequences for the set up of the internal setup of the ML AMG preconditioner.
Determines whether the underlying pressure discretization uses linear elements or higher order elements, which has consequences for the set up of the internal setup of the ML AMG preconditioner.
Flag to determine whether we should do an inner solve on the velocity-velocity matrix. By default, this option is not on, since it is not necessary for a good performance of the outer solver. However, it can be beneficial to perform some iterations on this block only and not on the whole block, so that the number of outer iterations is reduced. See the discussion in the step-22 tutorial program.
The number of iterations in the inner solve.
The residual tolerance that is going to be used for the inner solve on the velocity-velocity matrix.
This defines whether internal details about the solve process should be written to screen. This can be a lot of information.