#include "Covariances/CovAniso.hpp"
#include "gstlearn_export.hpp"
#include "geoslib_d.h"
#include "Basic/NamingConvention.hpp"
#include "Db/DbGrid.hpp"
#include "Matrix/MatrixRectangular.hpp"
#include "Model/Model.hpp"
#include "Model/Constraints.hpp"
#include "Model/Option_AutoFit.hpp"
#include "Model/Option_VarioFit.hpp"
#include "Stats/Selectivity.hpp"
#include "Variogram/DirParam.hpp"
Functions | |
GSTLEARN_EXPORT Vario * | variogram_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 *dbmap, 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 void | set_test_discrete (bool flag_discret) |
GSTLEARN_EXPORT Vario * | model_pgs (Db *db, const VarioParam *varioparam, const RuleProp *ruleprop, const Model *model1, const Model *model2=nullptr) |
GSTLEARN_EXPORT Cheb_Elem * | spde_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 gibbs_nburn=10, int gibbs_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 gibbs_nburn=10, int gibbs_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 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_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) |
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 db_proportion_estimate | ( | Db * | dbin, |
DbGrid * | dbout, | ||
Model * | model, | ||
int | niter, | ||
bool | verbose, | ||
const NamingConvention & | namconv | ||
) |
Standard Kriging
[in] | dbin | Input Db structure |
[in] | dbout | Output Db structure |
[in] | model | Model structure |
[in] | niter | Number of iterations |
[in] | verbose | Verbose flag |
[in] | namconv | Naming convention |
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
[in] | dbin | input Db structure |
[in] | model | Model structure |
[in] | method | Method for declustering |
[in] | neigh | ANeigh structure |
[in] | dbgrid | Grid auxiliary Db structure |
[in] | radius | Array of neighborhood radius |
[in] | ndiscs | Array of discretization |
[in] | flag_sel | 1 to mask off samples with zero weight |
[in] | verbose | Verbose 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
[in] | dbgrid | Db grid structure |
[in] | name_facies | Name of variable containing Facies |
[in] | name_fluid | Name of variable containing Fluid |
[in] | name_poro | Name of variable containing Porosity (optional) |
[in] | name_date | Name of variable containing Date |
[in] | nfacies | number of facies (facies 0 excluded) |
[in] | nfluids | number of fluids |
[in] | facies0 | Value of the target facies |
[in] | fluid0 | Value of the target fluid |
[in] | ntime | Number of Time intervals |
[in] | time0 | Starting time |
[in] | dtime | Time interval |
[in] | verbose | 1 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
[in] | dbin | Db structure |
[in] | model | Model structure |
[in] | nbsimu | Number of simulations |
[in] | seed | Seed for random number generator |
[in] | gibbs_nburn | Initial number of iterations for bootstrapping |
[in] | gibbs_niter | Maximum number of iterations |
[in] | flag_moving | 1 for Moving |
[in] | flag_norm | 1 if the Model must be normalized |
[in] | flag_multi_mono | 1 for the Multi_mono algorithm |
[in] | flag_propagation | 1 for the propagation algorithm |
[in] | flag_sym_neigh | Deprecated argument |
[in] | gibbs_optstats | 0: No stats - 1: Print - 2: Save Neutral file |
[in] | percent | Amount of nugget effect added to too continuous model (expressed in percentage of total variance) |
[in] | flag_ce | 1 if the conditional expectation should be returned instead of simulations |
[in] | flag_cstd | 1 if the conditional standard deviation should be returned instead of simulations |
[in] | verbose | Verbose flag |
[in] | namconv | Naming 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
[in] | dbin | input Db structure |
[in] | dbout | output Db structure |
[in] | model | Model structure (univariate) |
[in] | neigh | ANeigh structure |
[in] | flag_positive | 1 for a positive constraints |
[in] | namconv | Naming convention |
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
[in] | vario | Vario structure containing the exp. variogram |
[in] | model | Model structure containing the basic structures |
[in] | verbose | Verbose flag |
[in] | mauto_arg | Option_AutoFit structure |
[in] | cons_arg | Constraints structure |
[in] | optvar_arg | Opt_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
[in] | db | Db descriptor |
[in] | varioparam | VarioParam structure |
[in] | ruleprop | RuleProp structure |
[in] | model1 | First Model structure |
[in] | model2 | Second Model structure (optional) |
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
[in] | dbin | Input Db structure (optional) |
[in] | dbout | Output Db structure |
[in] | ruleprop | Ruleprop definition |
[in] | model11 | First Model structure for First Lithotype Rule |
[in] | model12 | Second Model structure for First Lithotype Rule |
[in] | model21 | First Model structure for Second Lithotype Rule |
[in] | model22 | Second Model structure for Second Lithotype Rule |
[in] | neigh | ANeigh structure |
[in] | nbsimu | Number of simulations |
[in] | seed | Seed for random number generator |
[in] | flag_gaus | 1 gaussian results; otherwise facies |
[in] | flag_prop | 1 for facies proportion |
[in] | flag_check | 1 if the facies at data must be checked against the closest simulated grid node |
[in] | flag_show | 1 if the grid node which coincides with the data should be represented with the data facies (only if flag_cond && !flag_gaus) |
[in] | nbtuba | Number of turning bands |
[in] | gibbs_nburn | Number of bootstrap iterations |
[in] | gibbs_niter | Maximum number of iterations |
[in] | percent | Amount of nugget effect added to too continuous model (expressed in percentage of the total variance) |
[in] | namconv | Naming convention |
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
[in] | dbin | Input Db structure (optional) |
[in] | dbout | Output Db structure |
[in] | ruleprop | RuleProp structure |
[in] | model1 | First Model structure |
[in] | model2 | Second Model structure (optional) |
[in] | neigh | ANeigh structure |
[in] | nbsimu | Number of simulations |
[in] | seed | Seed for random number generator |
[in] | flag_gaus | 1 if results must be gaussian; otherwise facies |
[in] | flag_prop | 1 for facies proportion |
[in] | flag_check | 1 if the facies at data must be checked against the closest simulated grid node |
[in] | flag_show | 1 if the grid node which coincides with the data should be represented with the data facies (only if flag_cond && !flag_gaus) |
[in] | nbtuba | Number of turning bands |
[in] | gibbs_nburn | Number of bootstrap iterations |
[in] | gibbs_niter | Maximum number of iterations |
[in] | percent | Amount of nugget effect added to too much continous model (expressed in percentage of the total variance) |
[in] | namconv | Naming convention |
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
[in] | dbin | Input Db structure (optional) |
[in] | dbout | Output Db structure |
[in] | ruleprop | RuleProp definition |
[in] | model1 | First Model structure |
[in] | model2 | Second Model structure (optional) |
[in] | triswitch | Meshing option |
[in] | gext | Array of domain dilation |
[in] | flag_gaus | 1 if results must be gaussian; otherwise facies |
[in] | flag_prop | 1 for facies proportion |
[in] | flag_check | 1 if the facies at data must be checked against the closest simulated grid node |
[in] | flag_show | 1 if the grid node which coincides with the data should be represented with the data facies |
[in] | nfacies | Number of facies |
[in] | seed | Seed for random number generator |
[in] | nbsimu | Number of simulations |
[in] | gibbs_nburn | Number of iterations (Burning step) |
[in] | gibbs_niter | Maximum number of iterations |
[in] | ngibbs_int | Number of iterations internal to Gibbs (SPDE) |
[in] | verbose | Verbose flag |
[in] | percent | Amount of nugget effect added to too continous model (expressed in percentage of the total variance) |
GSTLEARN_EXPORT VectorDouble simsph_mesh | ( | MeshSpherical * | mesh, |
Model * | model, | ||
const SimuSphericalParam & | sphepar, | ||
int | seed, | ||
int | verbose | ||
) |
Simulates the random function on the sphere
[in] | mesh | MeshSpherical object |
[in] | model | Model (defined in Euclidean space) to be used |
[in] | sphepar | SimuSphericalParam structure |
[in] | seed | Seed for random number generation |
[in] | verbose | Verbose 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
[in] | mode | 1 for allocation; -1 for deallocation |
[in] | verbose | Verbose flag |
[in] | power | Parameter passed to Chebychev function |
[in] | blin | Array of coefficients for Linear combinaison |
[in] | S | Shift operator |
[in] | cheb_old | Cheb_Elem to be freed (only for mode=-1) |
GSTLEARN_EXPORT int spde_chebychev_operate | ( | MatrixSparse * | S, |
Cheb_Elem * | cheb_elem, | ||
const VectorDouble & | lambda, | ||
const VectorDouble & | x, | ||
VectorDouble & | y | ||
) |
GSTLEARN_EXPORT Vario* variogram_pgs | ( | Db * | db, |
const VarioParam * | varioparam, | ||
const RuleProp * | ruleprop, | ||
int | flag_rho, | ||
int | opt_correl | ||
) |
Calculate the Gaussian variograms
[in] | db | Db structure |
[in] | varioparam | VarioParam structure for the GRFs |
[in] | ruleprop | RuleProp structure |
[in] | flag_rho | 1 if the correlation coefficient must be regressed |
[in] | opt_correl | 0 full model; 1 symmetrical; 2 residuals |
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
[in] | dbmap | Db Grid structure containing the Vmap |
[in] | model | Model structure containing the basic structures |
[in] | verbose | Verbose flag |
[in] | mauto_arg | Option_AutoFit structure |
[in] | cons_arg | Constraints structure |
[in] | optvar_arg | Opt_Vario structure |