![]() |
|
Helper functions for use with the Hypre library. More...
Functions | |
int | check_HYPRE_error_flag (std::ostringstream &message) |
void | create_HYPRE_Vector (const DoubleVector &oomph_vec, const LinearAlgebraDistribution *dist_pt, HYPRE_IJVector &hypre_ij_vector, HYPRE_ParVector &hypre_par_vector) |
void | create_HYPRE_Vector (const LinearAlgebraDistribution *dist_pt, HYPRE_IJVector &hypre_ij_vector, HYPRE_ParVector &hypre_par_vector) |
void | create_HYPRE_Matrix (CRDoubleMatrix *oomph_matrix, HYPRE_IJMatrix &hypre_ij_matrix, HYPRE_ParCSRMatrix &hypre_par_matrix, LinearAlgebraDistribution *dist_pt) |
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) |
Variables | |
double | AMG_strength = 0.25 |
unsigned | AMG_coarsening = 6 |
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.
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
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, int(), j, helpers::lower(), oomph::MPI_Helpers::mpi_has_been_initialised(), oomph::CRDoubleMatrix::ncol(), oomph::OomphCommunicator::nproc(), oomph::CRDoubleMatrix::nrow(), oomph::LinearAlgebraDistribution::nrow_local(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, 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.
References oomph::LinearAlgebraDistribution::communicator_pt(), oomph::LinearAlgebraDistribution::distributed(), oomph::DistributableLinearAlgebraObject::distributed(), oomph::DistributableLinearAlgebraObject::distribution_pt(), oomph::LinearAlgebraDistribution::first_row(), i, j, helpers::lower(), 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.
References oomph::LinearAlgebraDistribution::communicator_pt(), oomph::LinearAlgebraDistribution::first_row(), helpers::lower(), 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.
References compute_granudrum_aor::args.
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)
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
Referenced by oomph::HypreInterface::HypreInterface().
double oomph::HypreHelpers::AMG_truncation = 0.0 |
AMG interpolation truncation factor.
Referenced by oomph::HypreInterface::HypreInterface().