1.2.3
CCC
 
geoslib_f.h File Reference

Functions

GSTLEARN_EXPORT void acknowledge_gstlearn (void)
 
GSTLEARN_EXPORT VectorDouble util_set_array_double (int ntab, const double *rtab)
 
GSTLEARN_EXPORT VectorInt util_set_array_integer (int ntab, const int *itab)
 
GSTLEARN_EXPORT VectorString util_set_array_char (int ntab, char **names)
 
GSTLEARN_EXPORT std::vector< char * > util_vs_to_vs (VectorString vs)
 
GSTLEARN_EXPORT int csv_manage (const char *filename, const CSVformat &csv, int mode, int nitem, bool flag_integer=0, bool verbose=false)
 
GSTLEARN_EXPORT void csv_print_double (double value)
 
GSTLEARN_EXPORT VectorDouble db_get_grid_axis (DbGrid *dbgrid, int idim)
 
GSTLEARN_EXPORT VectorDouble db_get_attribute (Db *db, int iatt, bool verbose=false)
 
GSTLEARN_EXPORT VectorInt db_identify_variables_by_name (Db *db, const String &pattern)
 
GSTLEARN_EXPORT Variovariogram_pgs (Db *db, const VarioParam *varioparam, const RuleProp *ruleprop, int flag_rho=false, int opt_correl=2)
 
GSTLEARN_EXPORT int model_auto_fit (Vario *vario, Model *model, bool verbose=false, const Option_AutoFit &mauto_arg=Option_AutoFit(), const Constraints &cons_arg=Constraints(), const Option_VarioFit &optvar_arg=Option_VarioFit())
 
GSTLEARN_EXPORT int vmap_auto_fit (const DbGrid *dbvmap, Model *model, bool verbose=false, const Option_AutoFit &mauto_arg=Option_AutoFit(), const Constraints &cons_arg=Constraints(), const Option_VarioFit &optvar_arg=Option_VarioFit())
 
GSTLEARN_EXPORT int db_model_nostat (Db *db, Model *model, int icov=0, const NamingConvention &namconv=NamingConvention("Nostat"))
 
GSTLEARN_EXPORT void set_test_discrete (bool flag_discret)
 
GSTLEARN_EXPORT Variomodel_pgs (Db *db, const VarioParam *varioparam, const RuleProp *ruleprop, const Model *model1, const Model *model2=nullptr)
 
GSTLEARN_EXPORT Cheb_Elemspde_cheb_manage (int mode, int verbose, double power, const VectorDouble &blin, MatrixSparse *S, Cheb_Elem *cheb_old)
 
GSTLEARN_EXPORT int spde_chebychev_operate (MatrixSparse *S, Cheb_Elem *cheb_elem, const VectorDouble &lambda, const VectorDouble &x, VectorDouble &y)
 
GSTLEARN_EXPORT int krigsum (Db *dbin, Db *dbout, Model *model, ANeigh *neigh, bool flag_positive=false, const NamingConvention &namconv=NamingConvention("KrigSum"))
 
GSTLEARN_EXPORT int declustering (Db *db, Model *model, int method, ANeigh *neigh=nullptr, DbGrid *dbgrid=nullptr, const VectorDouble &radius=VectorDouble(), const VectorInt &ndisc=VectorInt(), int flag_sel=false, bool verbose=false)
 
GSTLEARN_EXPORT int simpgs (Db *dbin, Db *dbout, RuleProp *ruleprop, Model *model1, Model *model2=nullptr, ANeigh *neigh=nullptr, int nbsimu=1, int seed=1321421, int flag_gaus=false, int flag_prop=false, int flag_check=false, int flag_show=false, int nbtuba=100, int nboot=10, int niter=100, double percent=5., const NamingConvention &namconv=NamingConvention("Facies", true, true, true, ELoc::fromKey("FACIES")))
 
GSTLEARN_EXPORT int simbipgs (Db *dbin, Db *dbout, RuleProp *ruleprop, Model *model11, Model *model12=nullptr, Model *model21=nullptr, Model *model22=nullptr, ANeigh *neigh=nullptr, int nbsimu=1, int seed=43243, int flag_gaus=false, int flag_prop=false, int flag_check=false, int flag_show=false, int nbtuba=100, int nboot=10, int niter=100, double percent=5., const NamingConvention &namconv=NamingConvention("Facies", true, true, true, ELoc::fromKey("FACIES")))
 
GSTLEARN_EXPORT VectorDouble simsph_mesh (MeshSpherical *mesh, Model *model, const SimuSphericalParam &sphepar, int seed=54523, int verbose=false)
 
GSTLEARN_EXPORT DbGridsimfine (DbGrid *dbin, Model *model, const SimuRefineParam &param, int seed)
 
GSTLEARN_EXPORT MatrixRectangular fluid_extract (DbGrid *dbgrid, const String &name_facies, const String &name_fluid, const String &name_poro, const String &name_date, int nfacies, int nfluids, int facies0, int fluid0, int ntime, double time0, double dtime, bool verbose=false)
 
GSTLEARN_EXPORT int simpgs_spde (Db *dbin, Db *dbout, RuleProp *ruleprop, Model *model1, Model *model2, const String &triswitch, const VectorDouble &gext, int flag_gaus, int flag_modif, int flag_check, int flag_show, int nfacies, int seed, int nbsimu, int gibbs_nburn, int gibbs_niter, int ngibbs_int, int verbose, double percent)
 
GSTLEARN_EXPORT Dbdb_read_csv (const char *filename, const CSVformat &csvfmt, int verbose=0, int ncol_max=-1, int nrow_max=-1, int flag_add_rank=0)
 
GSTLEARN_EXPORT int db_write_csv (Db *db, const char *filename, const CSVformat &csv, int flag_allcol=1, int flag_coor=1, bool flag_integer=false)
 
GSTLEARN_EXPORT int db_proportion_estimate (Db *dbin, DbGrid *dbout, Model *model, int niter=100, bool verbose=false, const NamingConvention &namconv=NamingConvention("Prop", true, true, true, ELoc::fromKey("P")))
 
GSTLEARN_EXPORT int gibbs_sampler (Db *dbin, Model *model, int nbsimu, int seed, int gibbs_nburn, int gibbs_niter, bool flag_moving, bool flag_norm, bool flag_multi_mono, bool flag_propagation, bool flag_sym_neigh, int gibbs_optstats, double percent, bool flag_ce, bool flag_cstd, bool verbose=false, const NamingConvention &namconv=NamingConvention("Gibbs"))
 
GSTLEARN_EXPORT int potential_kriging (Db *db, Db *dbgrd, Db *dbtgt, DbGrid *dbout, Model *model, ANeigh *neigh, double nugget_grd=0., double nugget_tgt=0., bool flag_pot=true, bool flag_grad=false, bool flag_trans=false, bool flag_save_data=false, int opt_part=0, bool verbose=false)
 
GSTLEARN_EXPORT int potential_cov (Model *model, bool verbose, int type1, const VectorDouble &x10, const VectorDouble &x1p, const VectorDouble &tx1, int type2, const VectorDouble &x20, const VectorDouble &x2p, const VectorDouble &tx2, VectorDouble &covtab)
 
GSTLEARN_EXPORT int potential_simulate (Db *dbiso, Db *dbgrd, Db *dbtgt, DbGrid *dbout, Model *model, ANeigh *neigh, double nugget_grd=0., double nugget_tgt=0., double dist_tempere=TEST, bool flag_trans=false, int seed=135674, int nbsimu=1, int nbtuba=100, bool verbose=false)
 
GSTLEARN_EXPORT int potential_xvalid (Db *dbiso, Db *dbgrd, Db *dbtgt, Model *model, ANeigh *neigh, double nugget_grd=0., double nugget_tgt=0., bool flag_dist_conv=false, bool verbose=false)
 

Function Documentation

GSTLEARN_EXPORT void acknowledge_gstlearn ( void  )

Acknowledgment of the authors for gstlearn Library

GSTLEARN_EXPORT int csv_manage ( const char *  filename,
const CSVformat csv,
int  mode,
int  nitem,
bool  flag_integer,
bool  verbose 
)

Manage the Utility to write into a CSV file

Returns
Error return code
Parameters
[in]filenameName of the CSV file
[in]csvCSVFormat description
[in]mode1 for opening File; -1 for closing File
[in]nitemNumber of items per line
[in]flag_integertrue if the numerical values must be printed as integer
[in]verboseVerbose flag
Remarks
: This procedure manages an internal structure (declared as static)
: When opened, you can use csv_print_string() or csv_print_double()
: in order to store items in the file
: Do not forget to use csv_manage(-1,...) to close the file
GSTLEARN_EXPORT void csv_print_double ( double  value)

Write a DOUBLE element into the (opened) CSV file

Parameters
[in]valueReal value to be written
Remarks
: This function uses CSV_ENCODING static structure
: which must have been initiated beforehand
GSTLEARN_EXPORT VectorDouble db_get_attribute ( Db db,
int  iatt,
bool  verbose 
)

Returns a vector containing an attribute from the Db

Parameters
[in]dbDb structure
[in]iattAttribute rank
[in]verboseVerbose flag
GSTLEARN_EXPORT VectorDouble db_get_grid_axis ( DbGrid dbgrid,
int  idim 
)

Returns a vector containing the coordinates of a Grid along one space dimension

Parameters
[in]dbgridDb structure
[in]idimRank of the space dimension
GSTLEARN_EXPORT VectorInt db_identify_variables_by_name ( Db db,
const String pattern 
)

Identify the variables of a Db where names match a criterion

Parameters
[in]dbDb structure
[in]patternMatching pattern
GSTLEARN_EXPORT int db_model_nostat ( Db db,
Model model,
int  icov,
const NamingConvention namconv 
)

Calculate and store new variables in the Db which contain the non-stationary Model component

Returns
Distance value
Parameters
[in]dbDb structure
[in]modelModel structure
[in]icovRank of the Basic structure
[in]namconvNaming convention
Remarks
This procedure automatically creates several fields:
ndim fields for storing the ranges
ndim fields for storing the angles
1 field for storing the sill
GSTLEARN_EXPORT int db_proportion_estimate ( Db dbin,
DbGrid dbout,
Model model,
int  niter,
bool  verbose,
const NamingConvention namconv 
)

Standard Kriging

Returns
Error return code
Parameters
[in]dbinInput Db structure
[in]dboutOutput Db structure
[in]modelModel structure
[in]niterNumber of iterations
[in]verboseVerbose flag
[in]namconvNaming convention
Remarks
The procedure uses the FIRST covariance of the Model
to describe the spatial structure
GSTLEARN_EXPORT 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
GSTLEARN_EXPORT int db_write_csv ( Db db,
const char *  filename,
const CSVformat csvfmt,
int  flag_allcol,
int  flag_coor,
bool  flag_integer 
)

Write the Data frame into a CSV file. Reserved for numerical data frame.

Returns
Error return code
Parameters
[in]dbName of the Db
[in]filenameName of the CSV file
[in]csvfmtCSVformat structure
[in]flag_allcol1 if all the columns available must be dumped out
[in]flag_coor1 if the coordinates must be dumped out
[in]flag_integertrue if the numerical values must be printed as integer
Remarks
: This procedure dumps the Z-variables and optionally the X-variables
GSTLEARN_EXPORT int declustering ( Db dbin,
Model model,
int  method,
ANeigh neigh,
DbGrid dbgrid,
const VectorDouble radius,
const VectorInt ndiscs,
int  flag_sel,
bool  verbose 
)

Perform the Declustering task

Returns
Error return code
Parameters
[in]dbininput Db structure
[in]modelModel structure
[in]methodMethod for declustering
[in]neighANeigh structure
[in]dbgridGrid auxiliary Db structure
[in]radiusArray of neighborhood radius
[in]ndiscsArray of discretization
[in]flag_sel1 to mask off samples with zero weight
[in]verboseVerbose option
GSTLEARN_EXPORT MatrixRectangular fluid_extract ( DbGrid dbgrid,
const String name_facies,
const String name_fluid,
const String name_poro,
const String name_date,
int  nfacies,
int  nfluids,
int  facies0,
int  fluid0,
int  ntime,
double  time0,
double  dtime,
bool  verbose 
)

Extract time charts from the fluid propagation block

Returns
The returned matrix
Parameters
[in]dbgridDb grid structure
[in]name_faciesName of variable containing Facies
[in]name_fluidName of variable containing Fluid
[in]name_poroName of variable containing Porosity (optional)
[in]name_dateName of variable containing Date
[in]nfaciesnumber of facies (facies 0 excluded)
[in]nfluidsnumber of fluids
[in]facies0Value of the target facies
[in]fluid0Value of the target fluid
[in]ntimeNumber of Time intervals
[in]time0Starting time
[in]dtimeTime interval
[in]verbose1 for a verbose option
GSTLEARN_EXPORT int gibbs_sampler ( Db dbin,
Model model,
int  nbsimu,
int  seed,
int  gibbs_nburn,
int  gibbs_niter,
bool  flag_moving,
bool  flag_norm,
bool  flag_multi_mono,
bool  flag_propagation,
bool  flag_sym_neigh,
int  gibbs_optstats,
double  percent,
bool  flag_ce,
bool  flag_cstd,
bool  verbose,
const NamingConvention namconv 
)

Perform the Gibbs sampler

Returns
Error return code
Parameters
[in]dbinDb structure
[in]modelModel structure
[in]nbsimuNumber of simulations
[in]seedSeed for random number generator
[in]gibbs_nburnInitial number of iterations for bootstrapping
[in]gibbs_niterMaximum number of iterations
[in]flag_moving1 for Moving
[in]flag_norm1 if the Model must be normalized
[in]flag_multi_mono1 for the Multi_mono algorithm
[in]flag_propagation1 for the propagation algorithm
[in]flag_sym_neighDeprecated argument
[in]gibbs_optstats0: No stats - 1: Print - 2: Save Neutral file
[in]percentAmount of nugget effect added to too continuous model (expressed in percentage of total variance)
[in]flag_ce1 if the conditional expectation should be returned instead of simulations
[in]flag_cstd1 if the conditional standard deviation should be returned instead of simulations
[in]verboseVerbose flag
[in]namconvNaming convention
GSTLEARN_EXPORT int krigsum ( Db dbin,
Db dbout,
Model model,
ANeigh neigh,
bool  flag_positive,
const NamingConvention namconv 
)

Punctual Multivariate Kriging under a constraint

Returns
Error return code
Parameters
[in]dbininput Db structure
[in]dboutoutput Db structure
[in]modelModel structure (univariate)
[in]neighANeigh structure
[in]flag_positive1 for a positive constraints
[in]namconvNaming convention
Remarks
All the variables are estimated using the same model
In this procedure, we assume that:
- the problem is multivariate ("z" variables)
- the constraints is stored in "sum" (only used in dbout)
GSTLEARN_EXPORT int model_auto_fit ( Vario vario,
Model model,
bool  verbose,
const Option_AutoFit mauto_arg,
const Constraints cons_arg,
const Option_VarioFit optvar_arg 
)

Automatic model fitting

Returns
Error returned code
Parameters
[in]varioVario structure containing the exp. variogram
[in]modelModel structure containing the basic structures
[in]verboseVerbose flag
[in]mauto_argOption_AutoFit structure
[in]cons_argConstraints structure
[in]optvar_argOpt_Vario structure
GSTLEARN_EXPORT Vario* model_pgs ( Db db,
const VarioParam varioparam,
const RuleProp ruleprop,
const Model model1,
const Model model2 
)

Evaluate the experimental variogram of indicators in PluriGaussian case

Returns
Error return code
Parameters
[in]dbDb descriptor
[in]varioparamVarioParam structure
[in]rulepropRuleProp structure
[in]model1First Model structure
[in]model2Second Model structure (optional)
GSTLEARN_EXPORT int potential_cov ( Model model,
bool  verbose,
int  type1,
const VectorDouble x10,
const VectorDouble x1p,
const VectorDouble tx1,
int  type2,
const VectorDouble x20,
const VectorDouble x2p,
const VectorDouble tx2,
VectorDouble covtab 
)

Potential covariance

Returns
Error return code
Parameters
[in]modelModel structure
[in]verboseVerbose flag
[in]type1Type of the first point 1 for gradient; 2 for tangent; 3 for isopotential
[in]x10Coordinates of the centering for first point
[in]x1pCoordinates of the first point
[in]tx1Tangent values at the first point
[in]type2Type of the second point 1 for gradient; 2 for tangent; 3 for isopotential (Sign is negative for target point)
[in]x20Coordinates of the centering for second point
[in]x2pCoordinates of the second point
[in]tx2Tangent values at the second point
[out]covtabArray of returned values (dimensionned to ndim*ndim)
GSTLEARN_EXPORT int potential_kriging ( Db dbiso,
Db dbgrd,
Db dbtgt,
DbGrid dbout,
Model model,
ANeigh neigh,
double  nugget_grd,
double  nugget_tgt,
bool  flag_pot,
bool  flag_grad,
bool  flag_trans,
bool  flag_save_data,
int  opt_part,
bool  verbose 
)

Potential estimation

Returns
Error return code
Parameters
[in]dbisoIso-potential Db structure
[in]dbgrdGradient Db structure
[in]dbtgtTangent Db structure (optional)
[in]dboutOutput Db structure
[in]modelModel structure
[in]neighANeigh structure
[in]nugget_grdNugget effect for Gradients
[in]nugget_tgtNugget effect for Tangents
[in]flag_potTrue if the Potential must be estimated
[in]flag_gradTrue if the gradient must also be estimated
[in]flag_transTrue if the estimation result must be translated into layer number
[in]flag_save_dataTrue if the Potential / Gradient must be saved on any Information file
[in]opt_partOption to exhibit only a part of estimation:
  • 0 : the whole estimation
  • 1 : the gradient contribution only
  • 2 : the tangent contribution only
  • 3 : the isovalues contribution only
  • 4 : the drift contribution only
  • 5 : the external drift contribution only
[in]verboseVerbose option
Remarks
The results will be stored in the dbout file
- the estimation in the variable ELoc::Z
- the gradient components in the variables ELoc::GRD
GSTLEARN_EXPORT int potential_simulate ( Db dbiso,
Db dbgrd,
Db dbtgt,
DbGrid dbout,
Model model,
ANeigh neigh,
double  nugget_grd,
double  nugget_tgt,
double  dist_tempere,
bool  flag_trans,
int  seed,
int  nbsimu,
int  nbtuba,
bool  verbose 
)

Potential simulations

Returns
Error return code
Parameters
[in]dbisoIso-potential Db structure
[in]dbgrdGradient Db structure
[in]dbtgtTangent Db structure (optional)
[in]dboutOutput Db structure
[in]modelModel structure
[in]neighANeigh structure
[in]nugget_grdNugget effect for Gradients
[in]nugget_tgtNugget effect for Tangents
[in]dist_tempereDistance for tempering simulations (or TEST)
[in]flag_transTrue if the estimation result must be translated into layer number
[in]seedSeed for the random number generator
[in]nbsimuNumber of simulations
[in]nbtubaNumber of turning bands
[in]verboseVerbose option
Remarks
The simulations will be stored in the dbout file (ELoc::SIMU)
GSTLEARN_EXPORT int potential_xvalid ( Db dbiso,
Db dbgrd,
Db dbtgt,
Model model,
ANeigh neigh,
double  nugget_grd,
double  nugget_tgt,
bool  flag_dist_conv,
bool  verbose 
)

Potential cross-validation

Returns
Error return code
Parameters
[in]dbisoIso-potential Db structure
[in]dbgrdGradient Db structure
[in]dbtgtTangent Db structure (optional)
[in]modelModel structure
[in]neighANeigh structure
[in]nugget_grdNugget effect for Gradients
[in]nugget_tgtNugget effect for Tangents
[in]flag_dist_convFlag for converting into distance
[in]verboseVerbose option
GSTLEARN_EXPORT void set_test_discrete ( bool  flag_discret)
GSTLEARN_EXPORT int simbipgs ( Db dbin,
Db dbout,
RuleProp ruleprop,
Model model11,
Model model12,
Model model21,
Model model22,
ANeigh neigh,
int  nbsimu,
int  seed,
int  flag_gaus,
int  flag_prop,
int  flag_check,
int  flag_show,
int  nbtuba,
int  gibbs_nburn,
int  gibbs_niter,
double  percent,
const NamingConvention namconv 
)

Perform the conditional or non-conditional Bi Pluri-gaussian simulations

Returns
Error return code
Parameters
[in]dbinInput Db structure (optional)
[in]dboutOutput Db structure
[in]rulepropRuleprop definition
[in]model11First Model structure for First Lithotype Rule
[in]model12Second Model structure for First Lithotype Rule
[in]model21First Model structure for Second Lithotype Rule
[in]model22Second Model structure for Second Lithotype Rule
[in]neighANeigh structure
[in]nbsimuNumber of simulations
[in]seedSeed for random number generator
[in]flag_gaus1 gaussian results; otherwise facies
[in]flag_prop1 for facies proportion
[in]flag_check1 if the facies at data must be checked against the closest simulated grid node
[in]flag_show1 if the grid node which coincides with the data should be represented with the data facies (only if flag_cond && !flag_gaus)
[in]nbtubaNumber of turning bands
[in]gibbs_nburnNumber of bootstrap iterations
[in]gibbs_niterMaximum number of iterations
[in]percentAmount of nugget effect added to too continuous model (expressed in percentage of the total variance)
[in]namconvNaming convention
Remarks
When conditional, the two first variables in the input Db
should correspond to the two facies indices (starting from 1)
The argument 'dbin' is optional: it must be defined only for
conditional simulations
The proportions (nfac1 * nfac2) must be ordered as follows:
f1af2a, f1bf2a, f1cf2a, ..., f1bf2a, f1bf2b, ..., f1nf2m
GSTLEARN_EXPORT DbGrid* simfine ( DbGrid dbin,
Model model,
const SimuRefineParam param,
int  seed 
)

Refine the simulation

Returns
Newly refined Grid.
Parameters
[in]dbinInput grid Db structure
[in]modelModel structure
[in]paramSimuRefineParam structure
[in]seedSeed for the random number generator
Remarks
For each dimension of the space, if N stands for the number of
nodes in the input grid, the number of nodes of the output grid
will be (N-1) * 2^p + 1 where p is the param.getNmult()
GSTLEARN_EXPORT int simpgs ( Db dbin,
Db dbout,
RuleProp ruleprop,
Model model1,
Model model2,
ANeigh neigh,
int  nbsimu,
int  seed,
int  flag_gaus,
int  flag_prop,
int  flag_check,
int  flag_show,
int  nbtuba,
int  gibbs_nburn,
int  gibbs_niter,
double  percent,
const NamingConvention namconv 
)

Perform the conditional or non-conditional Pluri-gaussian simulations

Returns
Error return code
Parameters
[in]dbinInput Db structure (optional)
[in]dboutOutput Db structure
[in]rulepropRuleProp structure
[in]model1First Model structure
[in]model2Second Model structure (optional)
[in]neighANeigh structure
[in]nbsimuNumber of simulations
[in]seedSeed for random number generator
[in]flag_gaus1 if results must be gaussian; otherwise facies
[in]flag_prop1 for facies proportion
[in]flag_check1 if the facies at data must be checked against the closest simulated grid node
[in]flag_show1 if the grid node which coincides with the data should be represented with the data facies (only if flag_cond && !flag_gaus)
[in]nbtubaNumber of turning bands
[in]gibbs_nburnNumber of bootstrap iterations
[in]gibbs_niterMaximum number of iterations
[in]percentAmount of nugget effect added to too much continous model (expressed in percentage of the total variance)
[in]namconvNaming convention
Remarks
When conditional, the unique variable in the input Db structure
should correspond to the facies index (starting from 1)
The argument 'dbin' is optional: it must be defined only for
conditional simulations
GSTLEARN_EXPORT int simpgs_spde ( Db dbin,
Db dbout,
RuleProp ruleprop,
Model model1,
Model model2,
const String triswitch,
const VectorDouble gext,
int  flag_gaus,
int  flag_prop,
int  flag_check,
int  flag_show,
int  nfacies,
int  seed,
int  nbsimu,
int  gibbs_nburn,
int  gibbs_niter,
int  ngibbs_int,
int  verbose,
double  percent 
)

Perform the conditional Pluri-gaussian simulations using spde

Returns
Error return code
Parameters
[in]dbinInput Db structure (optional)
[in]dboutOutput Db structure
[in]rulepropRuleProp definition
[in]model1First Model structure
[in]model2Second Model structure (optional)
[in]triswitchMeshing option
[in]gextArray of domain dilation
[in]flag_gaus1 if results must be gaussian; otherwise facies
[in]flag_prop1 for facies proportion
[in]flag_check1 if the facies at data must be checked against the closest simulated grid node
[in]flag_show1 if the grid node which coincides with the data should be represented with the data facies
[in]nfaciesNumber of facies
[in]seedSeed for random number generator
[in]nbsimuNumber of simulations
[in]gibbs_nburnNumber of iterations (Burning step)
[in]gibbs_niterMaximum number of iterations
[in]ngibbs_intNumber of iterations internal to Gibbs (SPDE)
[in]verboseVerbose flag
[in]percentAmount of nugget effect added to too continous model (expressed in percentage of the total variance)
Remarks
When conditional, the unique variable in the input Db structure
should correspond to the facies index (starting from 1)
GSTLEARN_EXPORT VectorDouble simsph_mesh ( MeshSpherical mesh,
Model model,
const SimuSphericalParam sphepar,
int  seed,
int  verbose 
)

Simulates the random function on the sphere

Returns
The Vector simulated values
Parameters
[in]meshMeshSpherical object
[in]modelModel (defined in Euclidean space) to be used
[in]spheparSimuSphericalParam structure
[in]seedSeed for random number generation
[in]verboseVerbose flag
GSTLEARN_EXPORT Cheb_Elem* spde_cheb_manage ( int  mode,
int  verbose,
double  power,
const VectorDouble blin,
MatrixSparse S,
Cheb_Elem cheb_old 
)

Manage Cheb_Elem structure

Returns
Error return code
Parameters
[in]mode1 for allocation; -1 for deallocation
[in]verboseVerbose flag
[in]powerParameter passed to Chebychev function
[in]blinArray of coefficients for Linear combinaison
[in]SShift operator
[in]cheb_oldCheb_Elem to be freed (only for mode=-1)
Remarks
Arguments 'power', 'nblin', 'blin' and 'B' are used if mode=1
Argument 'cheb_old' is used if mode=-1
GSTLEARN_EXPORT int spde_chebychev_operate ( MatrixSparse S,
Cheb_Elem cheb_elem,
const VectorDouble lambda,
const VectorDouble x,
VectorDouble y 
)

Perform the Chebychev polynomial procedure on an input vector

Returns
Error return code
Parameters
[in]SShift operator
[in]cheb_elemCheb_Elem structure
[in]lambdaScaling vector
[in]xInput array (Dimension: nvertex)
[out]yOutput array (Dimension: nvertex)
GSTLEARN_EXPORT VectorString util_set_array_char ( int  ntab,
char **  names 
)

Create a VectorString for storing an array of chars

Returns
The VectorString
Parameters
[in]ntabNumber of samples
[in]namesArray of character values to be loaded
GSTLEARN_EXPORT VectorDouble util_set_array_double ( int  ntab,
const double *  rtab 
)

Create a VectorDouble for storing an array of double

Returns
The VectorDouble
Parameters
[in]ntabNumber of samples
[in]rtabArray of double values to be loaded
GSTLEARN_EXPORT VectorInt util_set_array_integer ( int  ntab,
const int *  itab 
)

Create a VectorInt for storing an array of integer

Returns
The VectorInt
Parameters
[in]ntabNumber of samples
[in]itabArray of integer values to be loaded
GSTLEARN_EXPORT std::vector<char*> util_vs_to_vs ( VectorString  vs)

Convert VectorString into a std::vector<char *> structure

Returns
Pointer to the returned array of characters
Parameters
[in]vsInput VectorString
GSTLEARN_EXPORT Vario* variogram_pgs ( Db db,
const VarioParam varioparam,
const RuleProp ruleprop,
int  flag_rho,
int  opt_correl 
)

Calculate the Gaussian variograms

Returns
Error return code
Parameters
[in]dbDb structure
[in]varioparamVarioParam structure for the GRFs
[in]rulepropRuleProp structure
[in]flag_rho1 if the correlation coefficient must be regressed
[in]opt_correl0 full model; 1 symmetrical; 2 residuals
Remarks
This is simply a routine dispatching between the stationary function
and the non-stationary one
GSTLEARN_EXPORT int vmap_auto_fit ( const DbGrid dbmap,
Model model,
bool  verbose,
const Option_AutoFit mauto_arg,
const Constraints cons_arg,
const Option_VarioFit optvar_arg 
)

Automatic model fitting

Returns
Error returned code
Parameters
[in]dbmapDb Grid structure containing the Vmap
[in]modelModel structure containing the basic structures
[in]verboseVerbose flag
[in]mauto_argOption_AutoFit structure
[in]cons_argConstraints structure
[in]optvar_argOpt_Vario structure