routines used throughout the ISSM toolkit
More...
Go to the source code of this file.
routines used throughout the ISSM toolkit
Definition in file IssmToolkitUtils.h.
◆ IssmMatTypeFromToolkitOptions()
int IssmMatTypeFromToolkitOptions |
( |
void |
| ) |
|
Definition at line 23 of file IssmToolkitUtils.cpp.
25 char *mat_type = NULL;
28 bool isparallel =
false;
32 if(num_procs>1)isparallel=
true;
38 if (strcmp(mat_type,
"mpidense")==0){
41 else if (strcmp(mat_type,
"mpisparse")==0){
44 else if (strcmp(mat_type,
"dense")==0){
45 if (isparallel)
_error_(
"Dense matrix type not supported for parallel runs with num_procs>1");
48 else _error_(
"matrix type not supported yet!");
51 xDelete<char>(mat_type);
◆ IssmVecTypeFromToolkitOptions()
int IssmVecTypeFromToolkitOptions |
( |
void |
| ) |
|
Definition at line 56 of file IssmToolkitUtils.cpp.
61 bool isparallel=
false;
65 if(num_procs>1)isparallel=
true;
71 if (strcmp(vec_type,
"mpi")==0){
74 else if (strcmp(vec_type,
"seq")==0){
75 if (isparallel)
_error_(
"Dense vector type not supported for parallel runs with num_procs>1");
78 else _error_(
"vector type not supported yet!");
81 xDelete<char>(vec_type);
◆ IssmSolverTypeFromToolkitOptions()
int IssmSolverTypeFromToolkitOptions |
( |
void |
| ) |
|
Definition at line 86 of file IssmToolkitUtils.cpp.
89 bool isparallel=
false;
93 if(num_procs>1)isparallel=
true;
98 if(!solver_type)
_error_(
"Solver not set");
100 if (strcmp(solver_type,
"mumps")==0){
103 else if (strcmp(solver_type,
"gsl")==0){
104 if (isparallel)
_error_(
"Gsl solver type not supported for parallel runs with num_procs>1");
107 else _error_(
"solver type not supported yet!");
110 xDelete<char>(solver_type);
113 return solver_type_enum;