1.3.2
CCC
 
potential.cpp File Reference
#include "geoslib_f.h"
#include "geoslib_old_f.h"
#include "Basic/Utilities.hpp"
#include "Basic/Law.hpp"
#include "Basic/File.hpp"
#include "Basic/String.hpp"
#include "Basic/OptDbg.hpp"
#include "Covariances/CovAniso.hpp"
#include "Covariances/CovLMGradient.hpp"
#include "Drifts/DriftList.hpp"
#include "Db/Db.hpp"
#include "Db/DbGrid.hpp"
#include "Db/DbHelper.hpp"
#include "Model/Model.hpp"
#include "Neigh/ANeigh.hpp"
#include "Matrix/MatrixFactory.hpp"
#include "Simulation/CalcSimuTurningBands.hpp"
#include <math.h>
#include <string.h>

Functions

bool st_potenv_valid (Pot_Env *pot_env, Pot_Ext *pot_ext, Db *dbiso, Db *dbgrd, Db *dbtgt, DbGrid *dbout, Model *model, ANeigh *neigh)
 
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)
 
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)
 
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)
 
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)
 

Function Documentation

◆ potential_cov()

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)

◆ potential_kriging()

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

◆ potential_simulate()

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)

◆ potential_xvalid()

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

◆ st_potenv_valid()

bool st_potenv_valid ( Pot_Env *  pot_env,
Pot_Ext *  pot_ext,
Db dbiso,
Db dbgrd,
Db dbtgt,
DbGrid dbout,
Model model,
ANeigh neigh 
)