API
Initialization and configuration
HYPRE.Init — Function
Init(; finalize_atexit=true, nthreads = 1)Wrapper around HYPRE_Initialize. Will also call MPI.Init unless MPI is already initialized. HYPRE.Init must be called before using any other HYPRE functions. Calling this function more than once has no effect.
Keyword arguments:
finalize_atexit::Bool: whentrue(default) a Julia exit hook is added that release allocated resources (i.e. matrices, vectors, solvers) and callsHYPRE_Finalize.nthreads::Integer: configure the number of internal OpenMP threads the HYPRE library should use. By default (nthreads = 1) no multithreading is used. Setnthreads = 0if you want HYPRE to control the number of threads, or if you want to configure it at a later point withHYPRE.SetNumThreads. See documentation forHYPRE.SetNumThreadsfor more details.
HYPRE.SetNumThreads — Function
HYPRE.SetNumThreads(nt::Integer)Configure the number of internal OpenMP threads the HYPRE library should use for the current process. The value is clamped between 1 and Sys.CPU_THREADS before passing it on to HYPRE. Return the result of HYPRE.NumThreads()`.
If the number of threads is not configured (by setting nthreads = 0 in HYPRE.Init and not calling this function explicitly) HYPRE will control the number of threads internally (e.g. by using all available CPU cores, or the OMP_NUM_THREADS environment variable).
Note: The number of threads can improve execution speed, but a large number of threads can be detrimental to actual solver performance for some solvers (e.g. parallel Gauss-Seidel smoothers).
HYPRE.NumThreads — Function
HYPRE.NumThreads()Query the number of OpenMP threads the HYPRE library is configured to use.
Matrix/vector creation
HYPRE.start_assemble! — Function
HYPRE.start_assemble!(A::HYPREMatrix) -> HYPREMatrixAssembler
HYPRE.start_assemble!(b::HYPREVector) -> HYPREVectorAssembler
HYPRE.start_assemble!(A::HYPREMatrix, b::HYPREVector) -> HYPREAssemblerInitialize a new assembly for matrix A, vector b, or for both. This zeroes out any previous data in the arrays. Return a HYPREAssembler with allocated data buffers needed to perform the assembly efficiently.
See also: HYPRE.assemble!, HYPRE.finish_assemble!.
HYPRE.assemble! — Function
HYPRE.assemble!(A::HYPREMatrixAssembler, i, j, a::Matrix)
HYPRE.assemble!(A::HYPREVectorAssembler, i, b::Vector)
HYPRE.assemble!(A::HYPREAssembler, ij, a::Matrix, b::Vector)Assemble (by adding) matrix contribution a, vector contribution b, into the underlying array(s) of the assembler at global row indices i and column indices j.
This is roughly equivalent to:
# A.A::HYPREMatrix
A.A[i, j] += a
# A.b::HYPREVector
A.b[i] += bSee also: HYPRE.start_assemble!, HYPRE.finish_assemble!.
HYPRE.finish_assemble! — Function
HYPRE.finish_assemble!(A::HYPREMatrixAssembler)
HYPRE.finish_assemble!(A::HYPREVectorAssembler)
HYPRE.finish_assemble!(A::HYPREAssembler)Finish the assembly. This synchronizes the data between processors.
Solvers and preconditioners
HYPRE.solve! — Function
solve!(solver::HYPRESolver, x::HYPREVector, A::HYPREMatrix, b::HYPREVector)Solve the linear system A x = b using solver with x as the initial guess. The approximate solution is stored in x.
See also solve.
HYPRE.solve — Function
solve(solver::HYPRESolver, A::HYPREMatrix, b::HYPREVector) -> HYPREVectorSolve the linear system A x = b using solver and return the approximate solution.
This method allocates an initial guess/output vector x, initialized to 0.
See also solve!.
HYPRE.HYPRESolver — Type
HYPRESolverAbstract super type of all the wrapped HYPRE solvers.
HYPRE.BiCGSTAB — Type
BiCGSTAB(; settings...)Create a BiCGSTAB solver. See HYPRE API reference for details and supported settings.
External links
HYPRE.BoomerAMG — Type
BoomerAMG(; settings...)Create a BoomerAMG solver/preconditioner. See HYPRE API reference for details and supported settings.
External links
HYPRE.FlexGMRES — Type
FlexGMRES(; settings...)Create a FlexGMRES solver. See HYPRE API reference for details and supported settings.
External links
HYPRE.GMRES — Type
GMRES(; settings...)Create a GMRES solver. See HYPRE API reference for details and supported settings.
External links
HYPRE.Hybrid — Type
Hybrid(; settings...)Create a Hybrid solver. See HYPRE API reference for details and supported settings.
External links
HYPRE.ParaSails — Type
ParaSails(comm=MPI.COMM_WORLD; settings...)Create a ParaSails preconditioner. See HYPRE API reference for details and supported settings.
External links
HYPRE.GetNumIterations — Function
HYPRE.GetNumIterations(s::HYPRESolver)Return number of iterations during the last solve with solver s.
This function dispatches on the solver to the corresponding C API wrapper LibHYPRE.HYPRE_$(Solver)GetNumIterations.
HYPRE.GetFinalRelativeResidualNorm — Function
HYPRE.GetFinalRelativeResidualNorm(s::HYPRESolver)Return the final relative residual norm from the last solve with solver s.
This function dispatches on the solver to the corresponding C API wrapper LibHYPRE.HYPRE_$(Solver)GetFinalRelativeResidualNorm.