1.4.0
CCC
 
SPDE.cpp File Reference

Functions

int krigingSPDE (Db *dbin, Db *dbout, Model *model, bool flag_est, bool flag_std, const AMesh *mesh, int useCholesky, const SPDEParam &params, int nbMC, bool verbose, bool showStats, const NamingConvention &namconv)
 
int simulateSPDE (Db *dbin, Db *dbout, Model *model, int nbsimu, const AMesh *mesh, int useCholesky, const SPDEParam &params, bool verbose, bool showStats, const NamingConvention &namconv)
 
double logLikelihoodSPDE (Db *dbin, Db *dbout, Model *model, const AMesh *mesh, int useCholesky, int nbsimu, const SPDEParam &params, bool verbose)
 
static int _loadPositions (int iech, const VectorVectorInt &index1, const VectorInt &cumul, VectorInt &positions, VectorInt &identity, int *rank_arg)
 
static void _addVerrConstant (MatrixSquareSymmetric &sills, const VectorDouble &verrDef)
 
static void _checkMinNugget (MatrixSquareSymmetric &sills, const VectorDouble &minNug)
 
static MatrixSquareSymmetric _buildSillPartialMatrix (const MatrixSquareSymmetric &sillsRef, int nvar, int ndef, const VectorInt &identity)
 
MatrixSparsebuildInvNugget (Db *db, Model *model, const SPDEParam &params)
 
VectorDouble krigingSPDENew (Db *dbin, Db *dbout, Model *model, const VectorMeshes &meshes, int useCholesky, bool verbose, const NamingConvention &namconv)
 

Function Documentation

◆ _addVerrConstant()

static void _addVerrConstant ( MatrixSquareSymmetric sills,
const VectorDouble verrDef 
)
static

◆ _buildSillPartialMatrix()

static MatrixSquareSymmetric _buildSillPartialMatrix ( const MatrixSquareSymmetric sillsRef,
int  nvar,
int  ndef,
const VectorInt identity 
)
static

◆ _checkMinNugget()

static void _checkMinNugget ( MatrixSquareSymmetric sills,
const VectorDouble minNug 
)
static

◆ _loadPositions()

static int _loadPositions ( int  iech,
const VectorVectorInt index1,
const VectorInt cumul,
VectorInt positions,
VectorInt identity,
int *  rank_arg 
)
static

◆ buildInvNugget()

MatrixSparse* buildInvNugget ( Db db,
Model model,
const SPDEParam params 
)

Build the inverse of the Nugget Effect matrix It is established for:

  • the number of variables defined in 'dbin' (and in 'Model')
  • the active samples of 'dbin'
  • the samples where Z-variable (and possibly V-variable) is defined
Parameters
dbInput Db structure
modelInput Model structure
paramsA structure for ruling the parameters of SPDE

◆ krigingSPDE()

int krigingSPDE ( Db dbin,
Db dbout,
Model model,
bool  flag_est,
bool  flag_std,
const AMesh mesh,
int  useCholesky,
const SPDEParam params,
int  nbMC,
bool  verbose,
bool  showStats,
const NamingConvention namconv 
)

Perform the estimation by KRIGING under the SPDE framework

Parameters
dbinInput Db (must contain the variable to be estimated)
dboutOutput Db where the estimation must be performed
modelModel definition
flag_estTrue for the estimation
flag_stdTrue for the standard deviation of estimation error
meshMesh description (optional)
useCholeskyDefine the choice regarding Cholesky
paramsSet of parameters
nbMCNumber of Monte-Carlo simulations used for variance calculation
verboseVerbose flag
showStatsShow statistics for Linear Operations
namconvNaming convention
Returns
Error return code
Remarks
You can provide an already existing mesh. Otherwise an optimal mesh will be created
internally: one per structure constituting the Model for Kriging.
Each mesh is created using the Turbo Meshing facility... based on an internal grid.
This internal grid is rotated according to the rotation of the structure. Its mesh size
is derived from the range (per direction) by dividing it by the refinement factor.
Note that switching 'flag_std' to ON implies that 'flag_est' is ON.

◆ krigingSPDENew()

VectorDouble krigingSPDENew ( Db dbin,
Db dbout,
Model model,
const VectorMeshes meshes,
int  useCholesky,
bool  verbose,
const NamingConvention namconv 
)

Perform the estimation by KRIGING under the SPDE framework

Parameters
dbinInput Db (must contain the variable to be estimated)
dboutOutput Db where the estimation must be performed
modelModel definition
meshesMeshes description (optional)
useCholeskyDefine the choice regarding Cholesky
verboseVerbose flag
namconvNaming convention
Returns
Error return code
Remarks
You can provide an already existing mesh. Otherwise an optimal mesh will be created
internally: one per structure constituting the Model for Kriging.
Each mesh is created using the Turbo Meshing facility... based on an internal grid.
This internal grid is rotated according to the rotation of the structure. Its mesh size
is derived from the range (per direction) by dividing it by the refinement factor.

◆ logLikelihoodSPDE()

double logLikelihoodSPDE ( Db dbin,
Db dbout,
Model model,
const AMesh mesh,
int  useCholesky,
int  nbsimu,
const SPDEParam params,
bool  verbose 
)

◆ simulateSPDE()

int simulateSPDE ( Db dbin,
Db dbout,
Model model,
int  nbsimu,
const AMesh mesh,
int  useCholesky,
const SPDEParam params,
bool  verbose,
bool  showStats,
const NamingConvention namconv 
)

Perform simulations under the SPDE framework

Parameters
dbinInput Db. If defined, the simulations are conditional; non conditional otherwise
dboutOutput Db where the simulations must be performed
modelModel definition
nbsimuNumber of simulations
meshMesh description (optional)
useCholeskyDefine the choice regarding Cholesky
paramsSet of parametes
verboseVerbose flag
showStatsShow statistics for Linear Operations
namconvNaming convention
Returns
Error return code
Remarks
You can provide an already existing mesh. Otherwise an optimal mesh will be created
internally: one per structure constituting the Model for Kriging and one for Simulating
Each mesh is created using the Turbo Meshing facility... based on an internal grid.
This internal grid is rotated according to the rotation of the structure. Its mesh size
is derived from the range (per direction) by dividing it by the refinement factor.