gstlearn
1.0.0
CCC
|
#include <SPDE.hpp>
Public Member Functions | |
SPDE (Model *model, const Db *domain, const Db *data=nullptr, const ESPDECalcMode &calcul=ESPDECalcMode::fromKey("SIMUCOND"), const AMesh *mesh=nullptr, int useCholesky=-1, SPDEParam params=SPDEParam(), bool verbose=false, bool showStats=false) | |
SPDE (const SPDE &r)=delete | |
SPDE & | operator= (const SPDE &r)=delete |
virtual | ~SPDE () |
int | compute (Db *dbout, int nbsimu=1, int seed=131351, const NamingConvention &namconv=NamingConvention("spde")) |
double | computeLogDet (int nbsimu=1, int seed=1234) const |
double | computeQuad () const |
double | computeLogLike (int nbsimu=1, int seed=131323) const |
double | computeProfiledLogLike (int nbsimu=1, int seed=131323) const |
VectorDouble | getCoeffs () |
void | setDriftCoeffs (VectorDouble coeffs) |
const PrecisionOpCs * | getPrecisionOpCs (int i=0) const |
const ProjMatrix * | getProjMatrix (int i=0) const |
const PrecisionOpMultiConditional * | getPrecisionKrig () const |
const AMesh * | getMeshingKrig (int i=0) const |
const AMesh * | getMeshingSimu (int i=0) const |
const Db * | getData () const |
Static Public Member Functions | |
static SPDE * | create (Model *model, const Db *domain, const Db *data=nullptr, const ESPDECalcMode &calcul=ESPDECalcMode::fromKey("SIMUCOND"), const AMesh *mesh=nullptr, int useCholesky=-1, SPDEParam params=SPDEParam(), bool verbose=false, bool showStats=false) |
Private Member Functions | |
int | _init (const Db *domain, const AMesh *mesh=nullptr, bool verbose=false, bool showStats=false) |
void | _centerByDrift (const VectorDouble &dataVect, int ivar=0, bool useSel=true) const |
void | _computeDriftCoeffs () const |
void | _purge () |
bool | _isSimulationRequested () const |
bool | _isKrigingRequested () const |
void | _computeLk () const |
void | _computeKriging () const |
void | _computeSimuNonCond () const |
void | _computeSimuCond () const |
void | _addNuggetOnResult (VectorDouble &result) |
void | _addDrift (Db *db, VectorDouble &result, int ivar=0, bool useSel=true) |
void | _setUseCholesky (int useCholesky=-1, bool verbose=false) |
Private Attributes | |
const Db * | _data |
ESPDECalcMode | _calcul |
PrecisionOpMultiConditional * | _precisionsKrig |
PrecisionOpMultiConditional * | _precisionsSimu |
std::vector< PrecisionOp * > | _pilePrecisions |
std::vector< ProjMatrix * > | _pileProjMatrix |
std::vector< const AMesh * > | _meshingSimu |
std::vector< const AMesh * > | _meshingKrig |
VectorDouble | _driftCoeffs |
Model * | _model |
VectorVectorDouble | _workingKrig |
VectorVectorDouble | _workingSimu |
VectorDouble | _workingData |
VectorDouble | _workingDataInit |
std::vector< ProjMatrix * > | _projOnDbOut |
VectorInt | _adressesICov |
double | _nugget |
VectorVectorDouble | _driftTab |
bool | _requireCoeffs |
bool | _isCoeffsComputed |
bool | _deleteMesh |
bool | _useCholesky |
SPDEParam | _params |
The SPDE class provides the SPDE implementation of a univariate model defined by the sum of a nugget effect and Matern's models. Its main objectives are:
SPDE::SPDE | ( | Model * | model, |
const Db * | domain, | ||
const Db * | data = nullptr , |
||
const ESPDECalcMode & | calcul = ESPDECalcMode::fromKey("SIMUCOND") , |
||
const AMesh * | meshUser = nullptr , |
||
int | useCholesky = -1 , |
||
SPDEParam | params = SPDEParam() , |
||
bool | verbose = false , |
||
bool | showStats = false |
||
) |
The class constructor with the following arguments:
model | This compulsory argument is a LMC of Matern's (or Markov?) basic structures with possibly a nugget effect |
domain | The Db defining the space dimension and spatial limits where the SPDE model is defined |
data | The Db containing the data for conditioning (optional) |
calcul | Option from ESPDECalcMode |
meshUser | The mesh for the discretization of the domain |
useCholesky | Define the choice regarding Cholesky |
params | Set of SPDE parameters |
verbose | Verbose flag |
showStats | Display statistics for Linear Operations (when deleting the class) |
Either Domain or a Mesh can be provided:
The domain or the mesh should have the same spatial reference (ndim, manifold) than the model.
|
delete |
|
virtual |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Perform one conditional simulation on internal meshing The results (for each covariance item) are stored in _workingSimu'
|
private |
Perform one non-conditional simulation on internal meshing The results (for each covariance item) are stored in _workingSimu
|
private |
|
private |
|
private |
|
private |
|
private |
Define if Cholesky must be used or not
useCholesky | 1 for YES; 0 for No; -1: set optimal default |
verbose | Verbose flag |
int SPDE::compute | ( | Db * | dbout, |
int | nbsimu = 1 , |
||
int | seed = 131351 , |
||
const NamingConvention & | namconv = NamingConvention("spde") |
||
) |
double SPDE::computeLogDet | ( | int | nbsimu = 1 , |
int | seed = 1234 |
||
) | const |
double SPDE::computeLogLike | ( | int | nbsimu = 1 , |
int | seed = 131323 |
||
) | const |
double SPDE::computeProfiledLogLike | ( | int | nbsimu = 1 , |
int | seed = 131323 |
||
) | const |
double SPDE::computeQuad | ( | ) | const |
|
static |
VectorDouble SPDE::getCoeffs | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void SPDE::setDriftCoeffs | ( | VectorDouble | coeffs | ) |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |