41 fprintf(stderr,
"Error in SparseGridsSimulation::define() -\n");
42 fprintf(stderr,
" m_sim_fg not NULL!\n");
59 fprintf(stderr,
"Error in SparseGridsSimulation::Define() -\n");
67 ferr = fscanf(in,
"%s", word);
if (ferr != 1)
return(1);
69 if (std::string(word) ==
"begin") {
71 while (std::string(word) !=
"end") {
73 ferr = fscanf(in,
"%s",word);
if (ferr != 1)
return(1);
75 if (std::string(word) ==
"log2_imin") {
77 ferr = fscanf(in,
"%d",&
m_imin);
if (ferr != 1)
return(1);
79 }
else if (std::string(word) ==
"interp_order") {
83 }
else if (std::string(word) ==
"write_sg_solutions") {
86 ferr = fscanf(in,
"%s",answer);
if (ferr != 1)
return(1);
89 }
else if (std::string(word) ==
"write_sg_errors") {
92 ferr = fscanf(in,
"%s",answer);
if (ferr != 1)
return(1);
95 }
else if (std::string(word) !=
"end") {
98 ferr = fscanf(in,
"%s",useless);
99 printf(
"Warning: keyword %s in file \"%s\" with value %s not recognized or extraneous. Ignoring.\n",
104 if (ferr != 1)
return(1);
108 fprintf( stderr,
"Error: Illegal format in file \"%s\". Word read is: %s\n",
118 printf(
"Sparse grids inputs:\n");
119 printf(
" log2 of minimum grid size: %d\n",
m_imin);
121 printf(
" write sparse grids solutions? %s\n",
126 MPI_Bcast(&
m_imin,1,MPI_INT,0,MPI_COMM_WORLD);
142 printf(
"Allocated full grid simulation object(s).\n");
Structure defining a simulation.
#define _MAX_STRING_SIZE_
#define _SPARSEGRIDS_SIM_INP_FNAME_
SimulationObject * m_sim_fg