8.3
general documentation
Loading...
Searching...
No Matches
cs_param_sles_setup.cpp File Reference
#include "cs_defs.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <bft_error.h>
#include <bft_mem.h>
#include "cs_fp_exception.h"
#include "cs_log.h"
#include "cs_math.h"
#include "cs_multigrid.h"
#include "cs_sles.h"
#include "cs_sles_petsc.h"
#include "cs_sles_hypre.h"
#include "cs_param_sles_setup.h"
Include dependency graph for cs_param_sles_setup.cpp:

Functions

int cs_param_sles_setup (bool use_field_id, cs_param_sles_t *slesp)
 Define a cs_sles_t structure in accordance with the settings in a cs_param_sles_t structure (SLES = Sparse Linear Equation Solver)
void cs_param_sles_setup_cvg_param (bool use_field_id, const cs_param_sles_t *slesp)
 Update the settings associated to a cs_sles_t structure and apply those defined in the given cs_param_sles_t structure. This function is used only when a first setup has been performed.
void cs_param_sles_setup_petsc_cmd (bool use_prefix, const char *prefix, const char *keyword, const char *keyval)
 Set the command line option for PETSc.
void cs_param_sles_setup_petsc_ksp (const char *label, cs_param_sles_t *slesp, void *p_ksp)
 Set a KSP structure in PETSc. This is equivalent to set a solver and its related preconditioner.
void cs_param_sles_setup_petsc_pc_amg (const char *prefix, cs_param_sles_t *slesp, void *p_pc)
 Set an AMG preconditioner in PETSc.

Function Documentation

◆ cs_param_sles_setup()

int cs_param_sles_setup ( bool use_field_id,
cs_param_sles_t * slesp )

Define a cs_sles_t structure in accordance with the settings in a cs_param_sles_t structure (SLES = Sparse Linear Equation Solver)

Define cs_sles_t structure in accordance with the settings of a cs_param_sles_t structure (SLES = Sparse Linear Equation Solver)

Parameters
[in]use_field_idif false use system name to define a SLES
[in,out]slesppointer to a cs_param_sles_t structure
Returns
an error code (-1 if a problem is encountered, 0 otherwise)

◆ cs_param_sles_setup_cvg_param()

void cs_param_sles_setup_cvg_param ( bool use_field_id,
const cs_param_sles_t * slesp )

Update the settings associated to a cs_sles_t structure and apply those defined in the given cs_param_sles_t structure. This function is used only when a first setup has been performed.

One modifies only some specific options like the max. number of iterations or the relative tolerance

Parameters
[in]use_field_idif false use a name to retrieve the cs_sles_t struc.
[in]slesppointer to a cs_param_sles_t structure

◆ cs_param_sles_setup_petsc_cmd()

void cs_param_sles_setup_petsc_cmd ( bool use_prefix,
const char * prefix,
const char * keyword,
const char * keyval )

Set the command line option for PETSc.

Parameters
[in]use_prefixneed a prefix
[in]prefixoptional prefix
[in]keywordcommand keyword
[in]keyvalcommand value

◆ cs_param_sles_setup_petsc_ksp()

void cs_param_sles_setup_petsc_ksp ( const char * label,
cs_param_sles_t * slesp,
void * p_ksp )

Set a KSP structure in PETSc. This is equivalent to set a solver and its related preconditioner.

Parameters
[in]labellabel to identify this (part of) system
[in,out]slesppointer to a set of SLES parameters
[in,out]p_kspsolver structure for PETSc

◆ cs_param_sles_setup_petsc_pc_amg()

void cs_param_sles_setup_petsc_pc_amg ( const char * prefix,
cs_param_sles_t * slesp,
void * p_pc )

Set an AMG preconditioner in PETSc.

Parameters
[in]prefixlabel to identify this (part of) system
[in]slesppointer to a set of SLES parameters
[in,out]p_pcpreconditioner structure for PETsc