1.1.0
CCC
 
ascii.cpp File Reference
#include "geoslib_f.h"
#include "geoslib_old_f.h"
#include "geoslib_f_private.h"
#include "geoslib_enum.h"
#include "Variogram/Vario.hpp"
#include "Anamorphosis/AAnam.hpp"
#include "Anamorphosis/AnamDiscreteDD.hpp"
#include "Anamorphosis/AnamDiscreteIR.hpp"
#include "Anamorphosis/AnamEmpirical.hpp"
#include "Anamorphosis/AnamHermite.hpp"
#include "Basic/Utilities.hpp"
#include "Basic/File.hpp"
#include "Basic/String.hpp"
#include "Basic/OptDbg.hpp"
#include "Covariances/CovAniso.hpp"
#include "Db/Db.hpp"
#include "LithoRule/Rule.hpp"
#include "Model/Model.hpp"
#include <string.h>
#include <algorithm>

Functions

void ascii_filename (const char *type, int rank, int mode, char *filename)
 
void ascii_study_define (const char *study)
 
void ascii_environ_read (char *file_name, int verbose)
 
void ascii_simu_read (char *file_name, int verbose, int *nbsimu, int *nbtuba, int *seed)
 
int ascii_option_defined (const char *file_name, int verbose, const char *option_name, int type, void *answer)
 
Dbdb_read_csv (const char *file_name, const CSVformat &csvfmt, int verbose, int ncol_max, int nrow_max, int flag_add_rank)
 

Function Documentation

void ascii_environ_read ( char *  file_name,
int  verbose 
)

Read the Environment definition file

Parameters
[in]file_nameName of the ASCII file
[in]verboseVerbose option if the file cannot be opened
void ascii_filename ( const char *  type,
int  rank,
int  mode,
char *  filename 
)

Returns the name of the file

Parameters
[in]typeType of the file to be named
[in]rankRank of the file (optional)
[in]mode0 for read; 1 for write
[out]filenameOutput filename
int ascii_option_defined ( const char *  file_name,
int  verbose,
const char *  option_name,
int  type,
void *  answer 
)

Check if an option is defined in the Options ASCII file

Returns
1 if the option is defined and 0 otherwise
Parameters
[in]file_nameName of the ASCII file
[in]verboseVerbose option if the file cannot be opened
[in]option_nameKeyword for the requested option
[in]typeAnswer type
  • 0 : Logical (returned as 0 or 1)
  • 1 : integer
  • 2 : real (returned as a double)
[out]answerAnswer
void ascii_simu_read ( char *  file_name,
int  verbose,
int *  nbsimu,
int *  nbtuba,
int *  seed 
)

Read the Simulation Characteristics

Parameters
[in]file_nameName of the ASCII file
[in]verboseVerbose option if the file cannot be opened
[out]nbsimuNumber of simulations
[out]nbtubaNumber of turning bands
[out]seedSeed for the random number generator
void ascii_study_define ( const char *  study)

Set the Study for the test data

Parameters
[in]studyLocal name of the study
Db* db_read_csv ( const char *  file_name,
const CSVformat csvfmt,
int  verbose,
int  ncol_max,
int  nrow_max,
int  flag_add_rank 
)

Read a CSV file and load the results into a Db

Returns
Pointer to the Db descriptor
Parameters
[in]file_nameName of the ASCII file
[in]verboseVerbose option if the file cannot be opened
[in]csvfmtCSVformat structure
[in]ncol_maxMaximum number of columns (or -1)
[in]nrow_maxMaximum number of rows (or -1)
[in]flag_add_rank1 To add the rank number