![]() |
|
#include <hypre_solver.h>
Inheritance diagram for oomph::HyprePreconditioner:Public Member Functions | |
| HyprePreconditioner (const std::string &context_string="") | |
| ~HyprePreconditioner () | |
| Destructor. More... | |
| HyprePreconditioner (const HyprePreconditioner &)=delete | |
| Broken copy constructor. More... | |
| void | operator= (const HyprePreconditioner &)=delete |
| Broken assignment operator. More... | |
| void | enable_report_my_cumulative_preconditioner_solve_time () |
| Enable reporting of cumulative solve time in destructor. More... | |
| void | disable_report_my_cumulative_preconditioner_solve_time () |
| Disable reporting of cumulative solve time in destructor. More... | |
| void | enable_doc_time () |
| Enable documentation of preconditioner timings. More... | |
| void | disable_doc_time () |
| Disable documentation of preconditioner timings. More... | |
| unsigned & | hypre_method () |
| Access function to Hypre_method flag – specified via enumeration. More... | |
| unsigned & | internal_preconditioner () |
| void | use_BoomerAMG () |
| Function to select BoomerAMG as the preconditioner. More... | |
| void | set_amg_iterations (const unsigned &amg_iterations) |
| Function to set the number of times to apply BoomerAMG. More... | |
| unsigned & | amg_iterations () |
| Return function for Max_iter. More... | |
| void | amg_using_simple_smoothing () |
| unsigned & | amg_simple_smoother () |
| Access function to AMG_simple_smoother flag. More... | |
| void | amg_using_complex_smoothing () |
| unsigned & | amg_complex_smoother () |
| Access function to AMG_complex_smoother flag. More... | |
| bool & | amg_using_simple_smoothing_flag () |
| Return function for the AMG_using_simple_smoothing_flag. More... | |
| unsigned & | amg_print_level () |
| Access function to AMG_print_level. More... | |
| unsigned & | amg_smoother_iterations () |
| Access function to AMG_smoother_iterations. More... | |
| unsigned & | amg_coarsening () |
| Access function to AMG_coarsening flag. More... | |
| unsigned & | amg_max_levels () |
| Access function to AMG_max_levels. More... | |
| double & | amg_damping () |
| Access function to AMG_damping parameter. More... | |
| double & | amg_strength () |
| Access function to AMG_strength. More... | |
| double & | amg_max_row_sum () |
| Access function to AMG_max_row_sum. More... | |
| double & | amg_truncation () |
| Access function to AMG_truncation. More... | |
| void | use_ParaSails () |
| Function to select ParaSails as the preconditioner. More... | |
| int & | parasails_symmetry () |
| Access function to ParaSails symmetry flag. More... | |
| int & | parasails_nlevel () |
| Access function to ParaSails nlevel parameter. More... | |
| double & | parasails_thresh () |
| Access function to ParaSails thresh parameter. More... | |
| double & | parasails_filter () |
| Access function to ParaSails filter parameter. More... | |
| void | use_Euclid () |
| Function to select use Euclid as the preconditioner. More... | |
| double & | euclid_droptol () |
| Access function to Euclid drop tolerance parameter. More... | |
| int & | euclid_level () |
| Access function to Euclid level parameter for ILU(k) factorization. More... | |
| void | enable_euclid_rowScale () |
| Enable euclid rowScaling. More... | |
| void | disable_euclid_rowScale () |
| Disable euclid row scaling. More... | |
| void | enable_euclid_using_BJ () |
| void | disable_euclid_using_BJ () |
| void | euclid_using_ILUK () |
| void | euclid_using_ILUT () |
| unsigned & | euclid_print_level () |
| void | enable_delete_matrix () |
| void | disable_delete_matrix () |
| void | setup () |
| void | preconditioner_solve (const DoubleVector &r, DoubleVector &z) |
| Preconditioner_solve uses a hypre solver to precondition vector r. More... | |
| void | clean_up_memory () |
| Function deletes all solver data. More... | |
Public Member Functions inherited from oomph::Preconditioner | |
| Preconditioner () | |
| Constructor. More... | |
| Preconditioner (const Preconditioner &)=delete | |
| Broken copy constructor. More... | |
| void | operator= (const Preconditioner &)=delete |
| Broken assignment operator. More... | |
| virtual | ~Preconditioner () |
| Destructor (empty) More... | |
| virtual void | preconditioner_solve_transpose (const DoubleVector &r, DoubleVector &z) |
| void | setup (DoubleMatrixBase *matrix_pt) |
| void | setup (const Problem *problem_pt, DoubleMatrixBase *matrix_pt) |
| void | enable_silent_preconditioner_setup () |
| Set up the block preconditioner quietly! More... | |
| void | disable_silent_preconditioner_setup () |
| Be verbose in the block preconditioner setup. More... | |
| virtual DoubleMatrixBase * | matrix_pt () const |
| Get function for matrix pointer. More... | |
| virtual void | set_matrix_pt (DoubleMatrixBase *matrix_pt) |
| Set the matrix pointer. More... | |
| virtual const OomphCommunicator * | comm_pt () const |
| Get function for comm pointer. More... | |
| virtual void | set_comm_pt (const OomphCommunicator *const comm_pt) |
| Set the communicator pointer. More... | |
| double | setup_time () const |
| Returns the time to setup the preconditioner. More... | |
| virtual void | turn_into_subsidiary_block_preconditioner (BlockPreconditioner< CRDoubleMatrix > *master_block_prec_pt, const Vector< unsigned > &doftype_in_master_preconditioner_coarse) |
| virtual void | turn_into_subsidiary_block_preconditioner (BlockPreconditioner< CRDoubleMatrix > *master_block_prec_pt, const Vector< unsigned > &doftype_in_master_preconditioner_coarse, const Vector< Vector< unsigned >> &doftype_coarsen_map_coarse) |
Public Member Functions inherited from oomph::DistributableLinearAlgebraObject | |
| DistributableLinearAlgebraObject () | |
| Default constructor - create a distribution. More... | |
| DistributableLinearAlgebraObject (const DistributableLinearAlgebraObject &matrix)=delete | |
| Broken copy constructor. More... | |
| void | operator= (const DistributableLinearAlgebraObject &)=delete |
| Broken assignment operator. More... | |
| virtual | ~DistributableLinearAlgebraObject () |
| Destructor. More... | |
| LinearAlgebraDistribution * | distribution_pt () const |
| access to the LinearAlgebraDistribution More... | |
| unsigned | nrow () const |
| access function to the number of global rows. More... | |
| unsigned | nrow_local () const |
| access function for the num of local rows on this processor. More... | |
| unsigned | nrow_local (const unsigned &p) const |
| access function for the num of local rows on this processor. More... | |
| unsigned | first_row () const |
| access function for the first row on this processor More... | |
| unsigned | first_row (const unsigned &p) const |
| access function for the first row on this processor More... | |
| bool | distributed () const |
| distribution is serial or distributed More... | |
| bool | distribution_built () const |
| void | build_distribution (const LinearAlgebraDistribution *const dist_pt) |
| void | build_distribution (const LinearAlgebraDistribution &dist) |
Public Member Functions inherited from oomph::HypreInterface | |
| HypreInterface () | |
| Constructor. More... | |
| ~HypreInterface () | |
| Destructor. More... | |
| HypreInterface (const HypreInterface &)=delete | |
| Broken copy constructor. More... | |
| void | operator= (const HypreInterface &)=delete |
| Broken assignment operator. More... | |
| void | enable_hypre_error_messages () |
| Turn on the hypre error messages. More... | |
| void | disable_hypre_error_messages () |
| Turn off hypre error messages. More... | |
| unsigned | existing_solver () |
| Function to return value of which solver (if any) is currently stored. More... | |
| unsigned | existing_preconditioner () |
| Function return value of which preconditioner (if any) is stored. More... | |
Static Public Member Functions | |
| static void | report_cumulative_solve_times () |
| static void | reset_cumulative_solve_times () |
| Reset cumulative solve times. More... | |
Static Public Attributes | |
| static double | Cumulative_preconditioner_solve_time = 0.0 |
| static std::map< std::string, double > | Context_based_cumulative_solve_time |
| static unsigned | Cumulative_npreconditioner_solve = 0 |
| static std::map< std::string, unsigned > | Context_based_cumulative_npreconditioner_solve |
| static std::map< std::string, unsigned > | Context_based_nrow |
Private Attributes | |
| bool | Delete_matrix |
| bool | Doc_time |
| double | My_cumulative_preconditioner_solve_time |
| bool | Report_my_cumulative_preconditioner_solve_time |
| std::string | Context_string |
| String can be used to provide context for annotation. More... | |
Additional Inherited Members | |
Public Types inherited from oomph::HypreInterface | |
| enum | Hypre_method_types { CG , GMRES , BiCGStab , BoomerAMG , Euclid , ParaSails , None } |
Public Attributes inherited from oomph::HypreInterface | |
| bool | AMGEuclidSmoother_use_block_jacobi |
| bool | AMGEuclidSmoother_use_row_scaling |
| bool | AMGEuclidSmoother_use_ilut |
| unsigned | AMGEuclidSmoother_level |
| double | AMGEuclidSmoother_drop_tol |
| unsigned | AMGEuclidSmoother_print_level |
Protected Member Functions inherited from oomph::DistributableLinearAlgebraObject | |
| void | clear_distribution () |
Protected Member Functions inherited from oomph::HypreInterface | |
| void | hypre_clean_up_memory () |
| Function deletes all solver data. More... | |
| void | hypre_matrix_setup (CRDoubleMatrix *matrix_pt) |
| void | hypre_solver_setup () |
| void | hypre_solve (const DoubleVector &rhs, DoubleVector &solution) |
Protected Attributes inherited from oomph::Preconditioner | |
| bool | Silent_preconditioner_setup |
| Boolean to indicate whether or not the build should be done silently. More... | |
| std::ostream * | Stream_pt |
| Pointer to the output stream – defaults to std::cout. More... | |
Protected Attributes inherited from oomph::HypreInterface | |
| bool | Output_info |
| Flag is true to output info and results of timings. More... | |
| unsigned | Max_iter |
| Maximum number of iterations used in solver. More... | |
| double | Tolerance |
| Tolerance used to terminate solver. More... | |
| unsigned | Hypre_method |
| Hypre method flag. Valid values are specified in enumeration. More... | |
| unsigned | Internal_preconditioner |
| unsigned | AMG_print_level |
| unsigned | AMG_max_levels |
| Maximum number of levels used in AMG. More... | |
| double | AMG_max_row_sum |
| Parameter to identify diagonally dominant parts of the matrix in AMG. More... | |
| bool | AMG_using_simple_smoothing |
| unsigned | AMG_simple_smoother |
| unsigned | AMG_complex_smoother |
| unsigned | AMG_smoother_iterations |
| The number of smoother iterations to apply. More... | |
| double | AMG_damping |
| Damping factor for BoomerAMG smoothed Jacobi or hybrid SOR. More... | |
| double | AMG_strength |
| Connection strength threshold parameter for BoomerAMG. More... | |
| double | AMG_truncation |
| Interpolation truncation factor for BoomerAMG. More... | |
| unsigned | AMG_coarsening |
| int | ParaSails_symmetry |
| int | ParaSails_nlevel |
| ParaSails nlevel parameter. More... | |
| double | ParaSails_thresh |
| ParaSails thresh parameter. More... | |
| double | ParaSails_filter |
| ParaSails filter parameter. More... | |
| double | Euclid_droptol |
| Euclid drop tolerance for ILU(k) and ILUT factorization. More... | |
| bool | Euclid_rowScale |
| Flag to switch on Euclid row scaling. More... | |
| bool | Euclid_using_ILUT |
| Flag to determine if ILUT (if true) or ILU(k) is used in Euclid. More... | |
| bool | Euclid_using_BJ |
| Flag to determine if Block Jacobi is used instead of PILU. More... | |
| int | Euclid_level |
| Euclid level parameter for ILU(k) factorization. More... | |
| unsigned | Euclid_print_level |
| unsigned | Krylov_print_level |
| bool | Hypre_error_messages |
| bool | Delete_input_data |
///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// An Preconditioner class using the suite of Hypre preconditioners to allow
BoomerAMG (Algebraic Multi Grid), Euclid (ILU) or ParaSails (Approximate inverse)
to be used for Preconditioner::preconditioner_solve(...). By default BoomerAMG is used.
|
inline |
Constructor. Provide optional string that is used in annotation of performance
References oomph::HypreInterface::BoomerAMG, Context_string, Delete_matrix, Doc_time, oomph::HypreInterface::Hypre_method, oomph::HypreInterface::Internal_preconditioner, oomph::HypreInterface::Max_iter, My_cumulative_preconditioner_solve_time, oomph::HypreInterface::None, Report_my_cumulative_preconditioner_solve_time, and oomph::HypreInterface::Tolerance.
|
inline |
Destructor.
References Context_string, My_cumulative_preconditioner_solve_time, oomph::oomph_info, and Report_my_cumulative_preconditioner_solve_time.
|
delete |
Broken copy constructor.
|
inline |
Access function to AMG_coarsening flag.
References oomph::HypreInterface::AMG_coarsening.
Referenced by oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg2v22_for_3D_momentum(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_momentum_simple_visc(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_momentum_stressdiv_visc(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_poisson_problem(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_3D_momentum(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_3D_poisson_problem(), oomph::Hypre_default_settings::set_defaults_for_2D_poisson_problem(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::set_pseudo_elastic_fsi_solver(), and set_pseudo_elastic_fsi_solver().
|
inline |
Access function to AMG_complex_smoother flag.
References oomph::HypreInterface::AMG_complex_smoother.
|
inline |
Access function to AMG_damping parameter.
References oomph::HypreInterface::AMG_damping.
Referenced by oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg2v22_for_3D_momentum(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_momentum_simple_visc(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_momentum_stressdiv_visc(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_poisson_problem(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_3D_momentum(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_3D_poisson_problem(), main(), and oomph::Hypre_default_settings::set_defaults_for_navier_stokes_momentum_block().
|
inline |
Return function for Max_iter.
References oomph::HypreInterface::Max_iter.
Referenced by set_amg_iterations().
|
inline |
Access function to AMG_max_levels.
References oomph::HypreInterface::AMG_max_levels.
|
inline |
Access function to AMG_max_row_sum.
References oomph::HypreInterface::AMG_max_row_sum.
|
inline |
|
inline |
Access function to AMG_simple_smoother flag.
References oomph::HypreInterface::AMG_simple_smoother.
Referenced by oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg2v22_for_3D_momentum(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_momentum_simple_visc(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_momentum_stressdiv_visc(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_poisson_problem(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_3D_momentum(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_3D_poisson_problem(), main(), oomph::Hypre_default_settings::set_defaults_for_2D_poisson_problem(), oomph::Hypre_default_settings::set_defaults_for_navier_stokes_momentum_block(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::set_pseudo_elastic_fsi_solver(), and set_pseudo_elastic_fsi_solver().
|
inline |
Access function to AMG_smoother_iterations.
References oomph::HypreInterface::AMG_smoother_iterations.
Referenced by oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg2v22_for_3D_momentum(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_momentum_simple_visc(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_momentum_stressdiv_visc(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_poisson_problem(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_3D_momentum(), and oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_3D_poisson_problem().
|
inline |
Access function to AMG_strength.
References oomph::HypreInterface::AMG_strength.
Referenced by oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg2v22_for_3D_momentum(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_momentum_simple_visc(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_momentum_stressdiv_visc(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_poisson_problem(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_3D_momentum(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_3D_poisson_problem(), main(), oomph::Hypre_default_settings::set_defaults_for_2D_poisson_problem(), oomph::Hypre_default_settings::set_defaults_for_3D_poisson_problem(), oomph::Hypre_default_settings::set_defaults_for_navier_stokes_momentum_block(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::set_pseudo_elastic_fsi_solver(), and set_pseudo_elastic_fsi_solver().
|
inline |
Access function to AMG_truncation.
References oomph::HypreInterface::AMG_truncation.
|
inline |
Function to select use of 'complex' AMG smoothers as controlled by the flag AMG_complex_smoother
References oomph::HypreInterface::AMG_using_simple_smoothing.
|
inline |
Function to select use of 'simple' AMG smoothers as controlled by the flag AMG_simple_smoother
References oomph::HypreInterface::AMG_using_simple_smoothing.
Referenced by main(), oomph::Hypre_default_settings::set_defaults_for_2D_poisson_problem(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::set_pseudo_elastic_fsi_solver(), and set_pseudo_elastic_fsi_solver().
|
inline |
Return function for the AMG_using_simple_smoothing_flag.
References oomph::HypreInterface::AMG_using_simple_smoothing.
|
virtual |
Function deletes all solver data.
clean_up_memory() deletes any existing Hypre solver and Hypre matrix
Reimplemented from oomph::Preconditioner.
References oomph::HypreInterface::hypre_clean_up_memory().
Referenced by setup().
|
inline |
Hypre copies matrix data from oomph-lib's CRDoubleMatrix or DistributedCRDoubleMatrix into its own data structures, doubling the memory requirements for the matrix. Calling this function ensures that the matrix is not deleted.
References Delete_matrix.
|
inline |
Disable documentation of preconditioner timings.
References Doc_time.
Referenced by FSIChannelWithLeafletProblem< ELEMENT >::FSIChannelWithLeafletProblem(), PreconditionedFSICollapsibleChannelProblem< ELEMENT >::PreconditionedFSICollapsibleChannelProblem(), FSIChannelWithLeafletProblem< ELEMENT >::set_iterative_solver(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::set_pseudo_elastic_fsi_solver(), set_pseudo_elastic_fsi_solver(), and TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem().
|
inline |
Disable euclid row scaling.
References oomph::HypreInterface::Euclid_rowScale.
|
inline |
Disable use of Block Jacobi, so PILU will be used
References oomph::HypreInterface::Euclid_using_BJ.
|
inline |
Disable reporting of cumulative solve time in destructor.
References Report_my_cumulative_preconditioner_solve_time.
|
inline |
Hypre copies matrix data from oomph-lib's CRDoubleMatrix or DistributedCRDoubleMatrix into its own data structures, doubling the memory requirements for the matrix. As far as the Hypre solvers are concerned the oomph-lib matrix is no longer required and could be deleted to save memory. However, this will not be the expected behaviour and therefore needs to be requested explicitly by the user by calling this function which changes the flag from false (its default) to true.
References Delete_matrix.
|
inline |
|
inline |
Enable euclid rowScaling.
References oomph::HypreInterface::Euclid_rowScale.
|
inline |
Enable use of Block Jacobi as opposed to PILU
References oomph::HypreInterface::Euclid_using_BJ.
|
inline |
Enable reporting of cumulative solve time in destructor.
References Report_my_cumulative_preconditioner_solve_time.
|
inline |
Access function to Euclid drop tolerance parameter.
References oomph::HypreInterface::Euclid_droptol.
|
inline |
Access function to Euclid level parameter for ILU(k) factorization.
References oomph::HypreInterface::Euclid_level.
|
inline |
Function to set the level of printing from Euclid when the Euclid destructor is called 0: no printing (default) 1: prints summary of runtime settings and timings 2: as 1 plus prints memory usage
References oomph::HypreInterface::Euclid_print_level.
|
inline |
Function to switch on ILU(k) factorization for Euclid (default is ILU(k) factorization)
References oomph::HypreInterface::Euclid_using_ILUT.
|
inline |
Function to switch on ILUT factorization for Euclid (default is ILU(k) factorization)
References oomph::HypreInterface::Euclid_using_ILUT.
|
inline |
Access function to Hypre_method flag – specified via enumeration.
References oomph::HypreInterface::Hypre_method.
Referenced by main(), oomph::Hypre_default_settings::set_defaults_for_2D_poisson_problem(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::set_pseudo_elastic_fsi_solver(), and set_pseudo_elastic_fsi_solver().
|
inline |
Access function to Internal_preconditioner flag – specified via enumeration.
References oomph::HypreInterface::Internal_preconditioner.
|
delete |
Broken assignment operator.
|
inline |
Access function to ParaSails filter parameter.
References oomph::HypreInterface::ParaSails_filter.
|
inline |
Access function to ParaSails nlevel parameter.
References oomph::HypreInterface::ParaSails_nlevel.
|
inline |
|
inline |
Access function to ParaSails thresh parameter.
References oomph::HypreInterface::ParaSails_thresh.
|
virtual |
Preconditioner_solve uses a hypre solver to precondition vector r.
Function applies solver to vector r for preconditioning. This requires a call to setup(...) first. Note: Hypre copies matrix data from oomph-lib's CRDoubleMatrix or DistributedCRDoubleMatrix into its own data structures, doubling the memory requirements for the matrix. As far as the Hypre solvers are concerned, the oomph-lib matrix is no longer required and could be deleted to save memory. However, this will not be the expected behaviour and therefore needs to be requested explicitly by the user with the delete_matrix() function.
Implements oomph::Preconditioner.
References oomph::DoubleVector::built(), Context_based_cumulative_npreconditioner_solve, Context_based_cumulative_solve_time, Context_string, Cumulative_npreconditioner_solve, Cumulative_preconditioner_solve_time, oomph::DistributableLinearAlgebraObject::distribution_pt(), oomph::HypreInterface::existing_solver(), oomph::HypreInterface::hypre_solve(), My_cumulative_preconditioner_solve_time, oomph::HypreInterface::None, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::HypreInterface::Output_info, UniformPSDSelfTest::r, and oomph::TimingHelpers::timer().
|
static |
Report cumulative solve times of all instantiations of this class
References Context_based_cumulative_npreconditioner_solve, Context_based_cumulative_solve_time, Context_based_nrow, Cumulative_npreconditioner_solve, Cumulative_preconditioner_solve_time, and oomph::oomph_info.
|
static |
Reset cumulative solve times.
References Context_based_cumulative_npreconditioner_solve, Context_based_cumulative_solve_time, Context_based_nrow, Cumulative_npreconditioner_solve, and Cumulative_preconditioner_solve_time.
|
inline |
Function to set the number of times to apply BoomerAMG.
References amg_iterations(), and oomph::HypreInterface::Max_iter.
Referenced by oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg2v22_for_3D_momentum(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_momentum_simple_visc(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_momentum_stressdiv_visc(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_2D_poisson_problem(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_3D_momentum(), oomph::Lagrange_Enforced_Flow_Preconditioner_Subsidiary_Operator_Helper::boomer_amg_for_3D_poisson_problem(), main(), oomph::Hypre_default_settings::set_defaults_for_2D_poisson_problem(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::set_pseudo_elastic_fsi_solver(), and set_pseudo_elastic_fsi_solver().
|
virtual |
Function to set up a preconditioner for the linear system defined by matrix_pt. This function is required when preconditioning and must be called before using the preconditioner_solve(...) function. This interface allows HyprePreconditioner to be used as a Preconditioner object for oomph-lib's own IterativeLinearSolver class. Note: matrix_pt must point to an object of type CRDoubleMatrix or DistributedCRDoubleMatrix. Note: Hypre copies matrix data from oomph-lib's CRDoubleMatrix and DistributedCRDoubleMatrix into its own data structures, doubling the memory requirements for the matrix. As far as the Hypre solvers are concerned, the oomph-lib matrix is no longer required and could be deleted to save memory. However, this will not be the expected behaviour and therefore needs to be requested explicitly by the user by calling the enable_delete_matrix() function.
An interface to allow HypreSolver to be used as a Preconditioner for the oomph-lib IterativeLinearSolver class. Matrix has to be of type CRDoubleMatrix or DistributedCRDoubleMatrix.
Implements oomph::Preconditioner.
References oomph::DistributableLinearAlgebraObject::build_distribution(), clean_up_memory(), Context_based_nrow, Context_string, oomph::HypreInterface::Delete_input_data, Delete_matrix, oomph::DistributableLinearAlgebraObject::distribution_pt(), Doc_time, oomph::HypreInterface::hypre_matrix_setup(), oomph::HypreInterface::hypre_solver_setup(), oomph::Preconditioner::matrix_pt(), oomph::DoubleMatrixBase::ncol(), oomph::CRDoubleMatrix::nnz(), oomph::DistributableLinearAlgebraObject::nrow(), oomph::CRDoubleMatrix::nrow(), oomph::DoubleMatrixBase::nrow(), oomph::DistributableLinearAlgebraObject::nrow_local(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::oomph_info, and oomph::HypreInterface::Output_info.
|
inline |
Function to select BoomerAMG as the preconditioner.
References oomph::HypreInterface::BoomerAMG, and oomph::HypreInterface::Hypre_method.
Referenced by main().
|
inline |
Function to select use Euclid as the preconditioner.
References oomph::HypreInterface::Euclid, and oomph::HypreInterface::Hypre_method.
|
inline |
Function to select ParaSails as the preconditioner.
References oomph::HypreInterface::Hypre_method, and oomph::HypreInterface::ParaSails.
|
static |
Static unsigned that accumulates the number of preconditioner solves of all instantiations of this class, labeled by context string. Reset it manually, e.g. after every Newton solve, using reset_cumulative_solve_times().
Referenced by preconditioner_solve(), report_cumulative_solve_times(), and reset_cumulative_solve_times().
|
static |
Static double that accumulates the preconditioner solve time of all instantiations of this class, labeled by context string. Reset it manually, e.g. after every Newton solve, using reset_cumulative_solve_times().
map of static doubles that accumulates the preconditioner solve time of all instantiations of this class, labeled by context string. Reset it manually, e.g. after every Newton solve, using reset_cumulative_solve_times().
Referenced by preconditioner_solve(), report_cumulative_solve_times(), and reset_cumulative_solve_times().
|
static |
Static unsigned that stores nrow for the most recent instantiations of this class, labeled by context string. Reset it manually, e.g. after every Newton solve, using reset_cumulative_solve_times().
Referenced by report_cumulative_solve_times(), reset_cumulative_solve_times(), and setup().
|
private |
String can be used to provide context for annotation.
Referenced by HyprePreconditioner(), preconditioner_solve(), setup(), and ~HyprePreconditioner().
|
static |
Static unsigned that accumulates the number of preconditioner solves of all instantiations of this class. Reset it manually, e.g. after every Newton solve, using reset_cumulative_solve_times().
Referenced by preconditioner_solve(), report_cumulative_solve_times(), and reset_cumulative_solve_times().
|
static |
Static double that accumulates the preconditioner solve time of all instantiations of this class. Reset it manually, e.g. after every Newton solve, using reset_cumulative_solve_times().
//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// Static double that accumulates the preconditioner solve time of all instantiations of this class. Reset it manually, e.g. after every Newton solve, using reset_cumulative_solve_times().
Referenced by preconditioner_solve(), report_cumulative_solve_times(), and reset_cumulative_solve_times().
|
private |
Hypre copies matrix data from oomph-lib's CRDoubleMatrix or DistributedCRDoubleMatrix into its own data structures, doubling the memory requirements for the matrix. As far as the Hypre solvers are concerned the oomph-lib matrix is no longer required and could be deleted to save memory. However, this will not be the expected behaviour and therefore needs to be requested explicitly by the user by changing this flag from false (its default) to true.
Referenced by disable_delete_matrix(), enable_delete_matrix(), HyprePreconditioner(), and setup().
|
private |
Referenced by disable_doc_time(), enable_doc_time(), HyprePreconditioner(), and setup().
|
private |
Private double that accumulates the preconditioner solve time of thi instantiation of this class. Is reported in destructor if Report_my_cumulative_preconditioner_solve_time is set to true
Referenced by HyprePreconditioner(), preconditioner_solve(), and ~HyprePreconditioner().
|
private |
Bool to request report of My_cumulative_preconditioner_solve_time in destructor
Referenced by disable_report_my_cumulative_preconditioner_solve_time(), enable_report_my_cumulative_preconditioner_solve_time(), HyprePreconditioner(), and ~HyprePreconditioner().