49 MPI_Comm *comm = (MPI_Comm*) c;
51 else MPI_Comm_rank(*comm,&rank);
65 in = fopen(
"lusolver.inp",
"r");
67 printf(
"tridiagLUInit: File \"lusolver.inp\" not found. Using default values.\n");
70 ierr = fscanf(in,
"%s",word);
if (ierr != 1)
return(1);
71 if (!strcmp(word,
"begin")) {
72 while (strcmp(word,
"end")) {
73 ierr = fscanf(in,
"%s",word);
if (ierr != 1)
return(1);
74 if (!strcmp(word,
"evaluate_norm" )) ierr = fscanf(in,
"%d" ,&t->
evaluate_norm );
75 else if (!strcmp(word,
"maxiter" )) ierr = fscanf(in,
"%d" ,&t->
maxiter );
76 else if (!strcmp(word,
"atol" )) ierr = fscanf(in,
"%lf",&t->
atol );
77 else if (!strcmp(word,
"rtol" )) ierr = fscanf(in,
"%lf",&t->
rtol );
78 else if (!strcmp(word,
"verbose" )) ierr = fscanf(in,
"%d" ,&t->
verbose );
79 else if (!strcmp(word,
"reducedsolvetype")) ierr = fscanf(in,
"%s" ,t->
reducedsolvetype);
80 else if (strcmp(word,
"end")) {
82 ierr = fscanf(in,
"%s",useless);
83 printf(
"Warning: keyword %s in file \"lusolver.inp\" with value %s not recognized or extraneous. Ignoring.\n",word,useless);
85 if (ierr != 1)
return(1);
88 fprintf(stderr,
"Error: Illegal format in file \"solver.inp\".\n");
100 MPI_Bcast(&t->
maxiter,1,MPI_INT,0,*comm);
101 MPI_Bcast(&t->
verbose,1,MPI_INT,0,*comm);
102 MPI_Bcast(&t->
atol,1,MPI_DOUBLE,0,*comm);
103 MPI_Bcast(&t->
rtol,1,MPI_DOUBLE,0,*comm);
char reducedsolvetype[50]
Header file for TridiagLU.
int tridiagLUInit(void *r, void *c)