1.1.0
CCC
 
ANoStat Class Referenceabstract

NoStat is defined as a series of codes. Each code follows the following syntax with three parts: More...

#include <ANoStat.hpp>

Inheritance diagram for ANoStat:
AStringable ICloneable NoStatArray NoStatFunctional

Public Member Functions

 ANoStat ()
 
 ANoStat (const VectorString &codes)
 
 ANoStat (const ANoStat &m)
 
ANoStatoperator= (const ANoStat &m)
 
virtual ~ANoStat ()
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 
bool isNotEmpty () const
 
bool isDefinedByCov (int icov=-1, int igrf=-1) const
 
bool isDefinedByType (const EConsElem &type, int igrf=-1) const
 
bool isDefinedByCovType (const EConsElem &type, int icov=-1, int igrf=-1) const
 
bool isDefined (const EConsElem &type, int icov=0, int iv1=-1, int iv2=-1, int igrf=-1) const
 
bool isDefinedforAnisotropy (int icov=-1, int igrf=-1) const
 
bool isDefinedforRotation (int icov=-1, int igrf=-1) const
 
virtual double getValue (const EConsElem &type, int icas, int rank, int icov=0, int iv1=-1, int iv2=-1, int igrf=-1) const =0
 
virtual double getValueByParam (int ipar, int icas, int rank) const =0
 
virtual int attachToMesh (const AMesh *mesh, bool verbose=false) const
 
virtual void detachFromMesh () const
 
virtual int attachToDb (Db *db, int icas, bool verbose=false) const
 
virtual void detachFromDb (Db *db, int icas) const
 
int manageInfo (int mode, Db *dbin, Db *dbout)
 
int addNoStatElem (int igrf, int icov, const EConsElem &type, int iv1, int iv2)
 
int addNoStatElemByItem (const CovParamId &item)
 
int addNoStatElems (const VectorString &codes)
 
void deleteNoStatElem (int ipar)
 
void deleteAllNoStatElem ()
 
int getRank (const EConsElem &type, int icov, int iv1=-1, int iv2=-1, int igrf=-1) const
 
int getIGrf (int ipar) const
 
int getICov (int ipar) const
 
const EConsElem & getType (int ipar) const
 
int getIV1 (int ipar) const
 
int getIV2 (int ipar) const
 
int getNoStatElemNumber () const
 
const std::vector< CovParamId > & getNoStats () const
 
const CovParamId getNoStat (int ipar) const
 
int attachModel (const Model *model)
 
bool matchIGrf (int ipar, int igrf0) const
 
bool matchICov (int ipar, int icov0) const
 
bool matchType (int ipar, const EConsElem &type0) const
 
bool matchIV1 (int ipar, int iv10) const
 
bool matchIV2 (int ipar, int iv20) const
 
const std::vector< CovParamId > & getAllItems () const
 
const CovParamId getItems (int ipar) const
 
bool getInfoFromDb (int ipar, int icas1, int iech1, int icas2, int iech2, double *val1, double *val2) const
 
- Public Member Functions inherited from AStringable
 AStringable ()
 
 AStringable (const AStringable &r)
 
AStringableoperator= (const AStringable &r)
 
virtual ~AStringable ()
 
virtual void display (const AStringFormat *strfmt=nullptr) const final
 
virtual void display (int level) const final
 
- Public Member Functions inherited from ICloneable
 ICloneable ()
 
virtual ~ICloneable ()
 
virtual ICloneableclone () const =0
 

Detailed Description

NoStat is defined as a series of codes. Each code follows the following syntax with three parts:

G<igrf>M<icov>R<idir>

Example:

G1M0R2: Range in the third direction, for the first covariance of the second GRF
M1A: First anisotropy direction angle, for the second covariance of the first GRF

Notes:

  • All numbering is 0-based
  • First two parts can be omitted: we consider G0 and M0
  • The keyword for the last part is chosen among:
          R : Range
          A : Angle
          P : Third parameter
          V : Sill
          S : Scale
          T : Tapering range
          C : Velocity (advection)
          I : Rotation angle for Sphere
          H : Anisotropy matrix terms

Constructor & Destructor Documentation

ANoStat::ANoStat ( )
ANoStat::ANoStat ( const VectorString codes)
ANoStat::ANoStat ( const ANoStat m)
ANoStat::~ANoStat ( )
virtual

Member Function Documentation

int ANoStat::addNoStatElem ( int  igrf,
int  icov,
const EConsElem &  type,
int  iv1,
int  iv2 
)

Add an element to the pile of Non-stationary parameters

Parameters
igrfRank of the Target GRF
icovRank of the target covariance
typeType of the non-stationary parameter
iv1Rank of the first designation
iv2Rank of the second designation
int ANoStat::addNoStatElemByItem ( const CovParamId item)
int ANoStat::addNoStatElems ( const VectorString codes)
int ANoStat::attachModel ( const Model model)

This function tries to attach the current Non-Stationary environment to the model, checking that references to Covariance ranks are valid

Parameters
modelModel structure
Returns
Error return code
int ANoStat::attachToDb ( Db db,
int  icas,
bool  verbose = false 
) const
virtual

Reimplemented in NoStatArray, and NoStatFunctional.

int ANoStat::attachToMesh ( const AMesh mesh,
bool  verbose = false 
) const
virtual

Reimplemented in NoStatArray, and NoStatFunctional.

void ANoStat::deleteAllNoStatElem ( )
void ANoStat::deleteNoStatElem ( int  ipar)
void ANoStat::detachFromDb ( Db db,
int  icas 
) const
virtual

Reimplemented in NoStatArray.

void ANoStat::detachFromMesh ( ) const
virtual

Reimplemented in NoStatArray.

const std::vector<CovParamId>& ANoStat::getAllItems ( ) const
inline
int ANoStat::getICov ( int  ipar) const
inline
int ANoStat::getIGrf ( int  ipar) const
inline
bool ANoStat::getInfoFromDb ( int  ipar,
int  icas1,
int  iech1,
int  icas2,
int  iech2,
double *  val1,
double *  val2 
) const

Get the information from the storage in Dbin and/or Dbout

Parameters
iparRank of the non-stationary parameter
icas1Type of first Db: 1 for Input; 2 for Output
iech1Rank of the first sample (in Dbin)
icas2Type of first Db: 1 for Input; 2 for Output
iech2Rank of the second sample (in Dbout)
val1Returned value at first sample
val2Returned value at the second sample
Returns
true if the two values are different
const CovParamId ANoStat::getItems ( int  ipar) const
inline
int ANoStat::getIV1 ( int  ipar) const
inline
int ANoStat::getIV2 ( int  ipar) const
inline
const CovParamId ANoStat::getNoStat ( int  ipar) const
inline
int ANoStat::getNoStatElemNumber ( ) const
inline
const std::vector<CovParamId>& ANoStat::getNoStats ( ) const
inline
int ANoStat::getRank ( const EConsElem &  type,
int  icov,
int  iv1 = -1,
int  iv2 = -1,
int  igrf = -1 
) const

Return the rank for a Non-stationary parameter

Parameters
typeRank of Target Type (or EConsElem::UNKNOWN for any)
icovRank of the Target Covariance (or -1 for any)
iv1Rank of the first additional element designation (or -1 for any)
iv2Rank of the second additional element designation (or -1 for any)
igrfRank of Target GRF (or -1 for any)
Returns
-1 if no match is found
const EConsElem& ANoStat::getType ( int  ipar) const
inline
virtual double ANoStat::getValue ( const EConsElem &  type,
int  icas,
int  rank,
int  icov = 0,
int  iv1 = -1,
int  iv2 = -1,
int  igrf = -1 
) const
pure virtual

Implemented in NoStatFunctional, and NoStatArray.

virtual double ANoStat::getValueByParam ( int  ipar,
int  icas,
int  rank 
) const
pure virtual

Implemented in NoStatFunctional, and NoStatArray.

bool ANoStat::isDefined ( const EConsElem &  type,
int  icov = 0,
int  iv1 = -1,
int  iv2 = -1,
int  igrf = -1 
) const
bool ANoStat::isDefinedByCov ( int  icov = -1,
int  igrf = -1 
) const

Look if a Non-stationary parameter is defined

Parameters
icovRank of Target Covariance (or -1 for any)
igrfRank of Target GRF (or -1 for any)
Returns
bool ANoStat::isDefinedByCovType ( const EConsElem &  type,
int  icov = -1,
int  igrf = -1 
) const

Look if a Non-stationary parameter is defined

Parameters
typeRank of Target Type (or EConsElem::UNKNOWN for any)
icovRank of the Target Covariance (or -1 for any)
igrfRank of Target GRF (or -1 for any)
Returns
bool ANoStat::isDefinedByType ( const EConsElem &  type,
int  igrf = -1 
) const

Look if a Non-stationary parameter is defined

Parameters
typeRank of Target Type (or EConsElem::UNKNOWN for any)
igrfRank of Target GRF (or -1 for any)
Returns
bool ANoStat::isDefinedforAnisotropy ( int  icov = -1,
int  igrf = -1 
) const

Look if a Non-stationary parameter for Anisotropy is defined either by Tensor or by (angle/range/scale)

Parameters
icovRank of the Target Covariance (or -1 for any)
igrfRank of Target GRF (or -1 for any)
Returns
bool ANoStat::isDefinedforRotation ( int  icov = -1,
int  igrf = -1 
) const

Look if a Non-stationary parameter for Anisotropy is defined only by angle / range / scale

Parameters
icovRank of the Target Covariance (or -1 for any)
igrfRank of Target GRF (or -1 for any)
Returns
bool ANoStat::isNotEmpty ( ) const
inline
int ANoStat::manageInfo ( int  mode,
Db dbin,
Db dbout 
)

Derive the non-stationary information(s) from the Output db (if Grid) to the Input Db

Returns
Error return code
Parameters
[in]mode1 for allocation; -1 for deallocation
[in]dbinDescriptor of the input Db
[in]dboutDescriptor of the output Db
bool ANoStat::matchICov ( int  ipar,
int  icov0 
) const
inline
bool ANoStat::matchIGrf ( int  ipar,
int  igrf0 
) const
inline
bool ANoStat::matchIV1 ( int  ipar,
int  iv10 
) const
inline
bool ANoStat::matchIV2 ( int  ipar,
int  iv20 
) const
inline
bool ANoStat::matchType ( int  ipar,
const EConsElem &  type0 
) const
inline
ANoStat & ANoStat::operator= ( const ANoStat m)
String ANoStat::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

Reimplemented from AStringable.

Reimplemented in NoStatFunctional, and NoStatArray.


The documentation for this class was generated from the following files: