///////////////////////////////////////////////////////////////////// More...
Functions | |
int | check_HYPRE_error_flag (std::ostringstream &message) |
Helper function to check the Hypre error flag, return the message associated with any error, and reset the global error flag to zero. This function also returns the error value. More... | |
void | create_HYPRE_Vector (const DoubleVector &oomph_vec, const LinearAlgebraDistribution *dist_pt, HYPRE_IJVector &hypre_ij_vector, HYPRE_ParVector &hypre_par_vector) |
Helper function to create a HYPRE_IJVector and HYPRE_ParVector. More... | |
void | create_HYPRE_Vector (const LinearAlgebraDistribution *dist_pt, HYPRE_IJVector &hypre_ij_vector, HYPRE_ParVector &hypre_par_vector) |
Helper function to create a HYPRE_IJVector and HYPRE_ParVector. More... | |
void | create_HYPRE_Matrix (CRDoubleMatrix *oomph_matrix, HYPRE_IJMatrix &hypre_ij_matrix, HYPRE_ParCSRMatrix &hypre_par_matrix, LinearAlgebraDistribution *dist_pt) |
Helper function to create a serial HYPRE_IJMatrix and HYPRE_ParCSRMatrix from a CRDoubleMatrix NOTE: dist_pt is rebuilt to match the distribution of the hypre solver which is not necassarily the same as the oomph lib matrix. More... | |
void | euclid_settings_helper (const bool &use_block_jacobi, const bool &use_row_scaling, const bool &use_ilut, const int &level, const double &drop_tol, const int &print_level, HYPRE_Solver &euclid_object) |
Helper function to set Euclid options using a command line like array. More... | |
Variables | |
double | AMG_strength = 0.25 |
Default for AMG strength (0.25 recommended for 2D problems; larger (0.5-0.75, say) for 3D. More... | |
unsigned | AMG_coarsening = 6 |
Default AMG coarsening strategy. Coarsening types include: 0 = CLJP (parallel coarsening using independent sets) 1 = classical RS with no boundary treatment (not recommended in parallel) 3 = modified RS with 3rd pass to add C points on the boundaries 6 = Falgout (uses 1 then CLJP using interior coarse points as first independent set) 8 = PMIS (parallel coarsening using independent sets - lower complexities than 0, maybe also slower convergence) 10= HMIS (one pass RS on each processor then PMIS on interior coarse points as first independent set) 11= One pass RS on each processor (not recommended) More... | |
double | AMG_truncation = 0.0 |
AMG interpolation truncation factor. More... | |
/////////////////////////////////////////////////////////////////////
Helper functions for use with the Hypre library.
/////////////////////////////////////////////////////////////////////
int oomph::HypreHelpers::check_HYPRE_error_flag | ( | std::ostringstream & | message | ) |
Helper function to check the Hypre error flag, return the message associated with any error, and reset the global error flag to zero. This function also returns the error value.
Helper function to check the Hypre error flag, return the message associated with any error, and reset the error flag to zero.
Definition at line 147 of file hypre_solver.cc.
References hypre__global_error, and oomph::oomph_info.
Referenced by oomph::HypreInterface::hypre_clean_up_memory(), oomph::HypreInterface::hypre_matrix_setup(), oomph::HypreInterface::hypre_solve(), and oomph::HypreInterface::hypre_solver_setup().
void oomph::HypreHelpers::create_HYPRE_Matrix | ( | CRDoubleMatrix * | oomph_matrix, |
HYPRE_IJMatrix & | hypre_ij_matrix, | ||
HYPRE_ParCSRMatrix & | hypre_par_matrix, | ||
LinearAlgebraDistribution * | dist_pt | ||
) |
Helper function to create a serial HYPRE_IJMatrix and HYPRE_ParCSRMatrix from a CRDoubleMatrix NOTE: dist_pt is rebuilt to match the distribution of the hypre solver which is not necassarily the same as the oomph lib matrix.
Helper function to create a serial HYPRE_IJMatrix and HYPRE_ParCSRMatrix from a CRDoubleMatrix.
Definition at line 270 of file hypre_solver.cc.
References oomph::LinearAlgebraDistribution::build(), oomph::CRDoubleMatrix::built(), oomph::CRDoubleMatrix::column_index(), oomph::LinearAlgebraDistribution::communicator_pt(), oomph::LinearAlgebraDistribution::distributed(), oomph::DistributableLinearAlgebraObject::distributed(), oomph::DistributableLinearAlgebraObject::distribution_pt(), oomph::LinearAlgebraDistribution::first_row(), i, oomph::MPI_Helpers::mpi_has_been_initialised(), oomph::CRDoubleMatrix::ncol(), oomph::CRDoubleMatrix::nrow(), oomph::LinearAlgebraDistribution::nrow_local(), oomph::CRDoubleMatrix::row_start(), and oomph::CRDoubleMatrix::value().
Referenced by oomph::HypreInterface::hypre_matrix_setup().
void oomph::HypreHelpers::create_HYPRE_Vector | ( | const DoubleVector & | oomph_vec, |
const LinearAlgebraDistribution * | dist_pt, | ||
HYPRE_IJVector & | hypre_ij_vector, | ||
HYPRE_ParVector & | hypre_par_vector | ||
) |
Helper function to create a HYPRE_IJVector and HYPRE_ParVector.
Definition at line 178 of file hypre_solver.cc.
References oomph::LinearAlgebraDistribution::communicator_pt(), oomph::LinearAlgebraDistribution::distributed(), oomph::DistributableLinearAlgebraObject::distributed(), oomph::DistributableLinearAlgebraObject::distribution_pt(), oomph::LinearAlgebraDistribution::first_row(), i, oomph::LinearAlgebraDistribution::nrow_local(), and oomph::DoubleVector::values_pt().
Referenced by oomph::HypreInterface::hypre_solve(), and oomph::HypreInterface::hypre_solver_setup().
void oomph::HypreHelpers::create_HYPRE_Vector | ( | const LinearAlgebraDistribution * | dist_pt, |
HYPRE_IJVector & | hypre_ij_vector, | ||
HYPRE_ParVector & | hypre_par_vector | ||
) |
Helper function to create a HYPRE_IJVector and HYPRE_ParVector.
Helper function to create an empty HYPRE_IJVector and HYPRE_ParVector.
Definition at line 240 of file hypre_solver.cc.
References oomph::LinearAlgebraDistribution::communicator_pt(), oomph::LinearAlgebraDistribution::first_row(), and oomph::LinearAlgebraDistribution::nrow_local().
void oomph::HypreHelpers::euclid_settings_helper | ( | const bool & | use_block_jacobi, |
const bool & | use_row_scaling, | ||
const bool & | use_ilut, | ||
const int & | level, | ||
const double & | drop_tol, | ||
const int & | print_level, | ||
HYPRE_Solver & | euclid_object | ||
) |
Helper function to set Euclid options using a command line like array.
Definition at line 409 of file hypre_solver.cc.
Referenced by oomph::HypreInterface::hypre_solver_setup().
unsigned oomph::HypreHelpers::AMG_coarsening = 6 |
Default AMG coarsening strategy. Coarsening types include: 0 = CLJP (parallel coarsening using independent sets) 1 = classical RS with no boundary treatment (not recommended in parallel) 3 = modified RS with 3rd pass to add C points on the boundaries 6 = Falgout (uses 1 then CLJP using interior coarse points as first independent set) 8 = PMIS (parallel coarsening using independent sets - lower complexities than 0, maybe also slower convergence) 10= HMIS (one pass RS on each processor then PMIS on interior coarse points as first independent set) 11= One pass RS on each processor (not recommended)
Definition at line 134 of file hypre_solver.cc.
Referenced by oomph::HypreInterface::HypreInterface().
double oomph::HypreHelpers::AMG_strength = 0.25 |
Default for AMG strength (0.25 recommended for 2D problems; larger (0.5-0.75, say) for 3D.
Definition at line 118 of file hypre_solver.cc.
Referenced by oomph::HypreInterface::HypreInterface().
double oomph::HypreHelpers::AMG_truncation = 0.0 |
AMG interpolation truncation factor.
Definition at line 140 of file hypre_solver.cc.
Referenced by oomph::HypreInterface::HypreInterface().