158                                                                             {
  160 
  161  char time_file_name[255];
  162  PetscBool flg = PETSC_FALSE;
  165                                 time_file_name, 255, &flg);
  166 
  167  if (!flg) {
  170               "*** ERROR %s (time_data FILE NEEDED)", 
nAme.c_str());
 
  172  }
  173 
  174  FILE *time_data = fopen(time_file_name, "r");
  175  if (time_data == NULL) {
  177             "*** ERROR data file < %s > open unsuccessful", time_file_name);
  178  }
  179  double no1 = 0.0;
  182  while (!feof(time_data)) {
  185        fscanf(time_data, "%lf %lf %lf %lf", &no1, &no2(0), &no2(1), &no2(2));
  187      fgetc(time_data);
  188      continue;
  189    }
  192               "*** ERROR read data file error (check input time data file) "
  193               "{ n = %d }",
  195    }
  197  }
  198  int r = fclose(time_data);
 
  199 
  201  for (
auto &[ts, vec] : 
tSeries) {
 
  203                        "** read vector %3.2e time %3.2e %3.2e %3.2e", ts,
  204                        vec(0), vec(1), vec(2));
  205  }
  207 
  208  if (r != 0) {
  210            "*** ERROR file close unsuccessful");
  211  }
  213 
  217    };
  218 
  220}
#define MOFEM_TAG_AND_LOG_C(channel, severity, tag, format,...)
Tag and log in channel.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
const double n
refractive index of diffusive medium
PetscErrorCode PetscOptionsGetString(PetscOptions *, const char pre[], const char name[], char str[], size_t size, PetscBool *set)
virtual FTensor::Tensor1< double, SPACE_DIM > getVectorFromData(const double time)