#include "petscmat.h"
#include "petscvec.h"
#include "petscksp.h"
#include "./petscpatches.h"
#include "../../../shared/shared.h"
Go to the source code of this file.
: from the petsc options, determine what kind of solver we are using.
Definition in file PetscOptionsDetermineSolverType.cpp.
◆ PetscOptionsDetermineSolverType()
void PetscOptionsDetermineSolverType |
( |
int * |
psolver_type | ) |
|
Definition at line 20 of file PetscOptionsDetermineSolverType.cpp.
23 #if _PETSC_MAJOR_ < 3 || (_PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 2)
33 #if (_PETSC_MAJOR_==3) && (_PETSC_MINOR_>=7)
34 PetscOptionsGetString(NULL,PETSC_NULL,
"-mat_type",&option[0],100,&flag);
36 PetscOptionsGetString(PETSC_NULL,
"-mat_type",&option[0],100,&flag);
39 if (strcmp(option,
"aijmumps")==0){
42 if (strcmp(option,
"sbaijmumps")==0){
45 if (strcmp(option,
"aijspooles")==0){
48 if (strcmp(option,
"sbaijspooles")==0){
51 if (strcmp(option,
"superlu_dist")==0){
54 if (strcmp(option,
"")==0){
58 #if _PETSC_MAJOR_ >= 3
59 #if (_PETSC_MINOR_>=7)
60 PetscOptionsGetString(NULL,PETSC_NULL,
"-pc_factor_mat_solver_package",&option[0],100,&flag);
62 PetscOptionsGetString(PETSC_NULL,
"-pc_factor_mat_solver_package",&option[0],100,&flag);
64 if (strcmp(option,
"mumps")==0){
69 #if (_PETSC_MAJOR_==3) && (_PETSC_MINOR_>=7)
70 PetscOptionsGetString(NULL,PETSC_NULL,
"-issm_option_solver",&option[0],100,&flag);
72 PetscOptionsGetString(PETSC_NULL,
"-issm_option_solver",&option[0],100,&flag);
74 if(strcmp(option,
"FS")==0 || strcmp(option,
"stokes")==0){
78 *psolver_type=solver_type;