|
cs_sles_hypre_t * | cs_sles_hypre_define (int f_id, const char *name, cs_sles_hypre_type_t solver_type, cs_sles_hypre_type_t precond_type, cs_sles_hypre_setup_hook_t *setup_hook, void *context) |
| Define and associate a HYPRE linear system solver for a given field or equation name. More...
|
|
cs_sles_hypre_t * | cs_sles_hypre_create (cs_sles_hypre_type_t solver_type, cs_sles_hypre_type_t precond_type, cs_sles_hypre_setup_hook_t *setup_hook, void *context) |
| Create HYPRE linear system solver info and context. More...
|
|
void | cs_sles_hypre_destroy (void **context) |
|
void * | cs_sles_hypre_copy (const void *context) |
|
void | cs_sles_hypre_setup (void *context, const char *name, const cs_matrix_t *a, int verbosity) |
|
cs_sles_convergence_state_t | cs_sles_hypre_solve (void *context, const char *name, const cs_matrix_t *a, int verbosity, double precision, double r_norm, int *n_iter, double *residue, const cs_real_t *rhs, cs_real_t *vx, size_t aux_size, void *aux_vectors) |
|
void | cs_sles_hypre_free (void *context) |
|
bool | cs_sles_hypre_error_post_and_abort (cs_sles_t *sles, cs_sles_convergence_state_t state, const cs_matrix_t *a, const cs_real_t *rhs, cs_real_t *vx) |
| Error handler for HYPRE solver. More...
|
|
void | cs_sles_hypre_log (const void *context, cs_log_t log_type) |
|
void | cs_sles_hypre_set_n_max_iter (cs_sles_hypre_t *context, int n_max_iter) |
| Set the max. number of iterations associated to the given HYPRE contrext. More...
|
|
void | cs_sles_hypre_set_host_device (cs_sles_hypre_t *context, int use_device) |
| Define whether the solver should run on the host or accelerated device. More...
|
|
int | cs_sles_hypre_get_host_device (const cs_sles_hypre_t *context) |
| Query whether the solver should run on the host or accelerated device. More...
|
|
void | cs_sles_hypre_library_info (cs_log_t log_type) |
| Print information on hypre library. More...
|
|
cs_sles_hypre_setup_hook_t |
Function pointer for settings of a HYPRE solver setup.
This function is called during the setup stage for a HYPRE solver.
When first called, the solver argument is NULL, and must be created using HYPRE functions.
Note: if the context pointer is non-NULL, it must point to valid data when the selection function is called so that value or structure should not be temporary (i.e. local);
- Parameters
-
[in] | verbosity | verbosity level |
[in,out] | context | pointer to optional (untyped) value or structure |
[in,out] | solver | handle to HYPRE solver (to be cast as HYPRE_Solver) |
Define and associate a HYPRE linear system solver for a given field or equation name.
If this system did not previously exist, it is added to the list of "known" systems. Otherwise, its definition is replaced by the one defined here.
This is a utility function: if finer control is needed, see cs_sles_define and cs_sles_petsc_create.
The associated solver required that the matrix passed to it is a HYPRE matrix (see cs_matrix_set_type_hypre).
Note that this function returns a pointer directly to the iterative solver management structure. This may be used to set further options. If needed, cs_sles_find may be used to obtain a pointer to the matching cs_sles_t container.
- Parameters
-
[in] | f_id | associated field id, or < 0 |
[in] | name | associated name if f_id < 0, or NULL |
[in] | solver_type | HYPRE solver type |
[in] | precond_type | HYPRE preconditioner type |
[in] | setup_hook | pointer to optional setup epilogue function |
[in,out] | context | pointer to optional (untyped) value or structure for setup_hook, or NULL |
- Returns
- pointer to newly created iterative solver info object.