1.3.1
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

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
    

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
 

Constructor & Destructor Documentation

◆ ANoStat() [1/3]

ANoStat::ANoStat ( )

◆ ANoStat() [2/3]

ANoStat::ANoStat ( const VectorString codes)

◆ ANoStat() [3/3]

ANoStat::ANoStat ( const ANoStat m)

◆ ~ANoStat()

ANoStat::~ANoStat ( )
virtual

Member Function Documentation

◆ addNoStatElem()

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

◆ addNoStatElemByItem()

int ANoStat::addNoStatElemByItem ( const CovParamId item)

◆ addNoStatElems()

int ANoStat::addNoStatElems ( const VectorString codes)

◆ attachModel()

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

◆ attachToDb()

int ANoStat::attachToDb ( Db db,
int  icas,
bool  verbose = false 
) const
virtual

Reimplemented in NoStatFunctional, and NoStatArray.

◆ attachToMesh()

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

Reimplemented in NoStatFunctional, and NoStatArray.

◆ deleteAllNoStatElem()

void ANoStat::deleteAllNoStatElem ( )

◆ deleteNoStatElem()

void ANoStat::deleteNoStatElem ( int  ipar)

◆ detachFromDb()

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

Reimplemented in NoStatArray.

◆ detachFromMesh()

void ANoStat::detachFromMesh ( ) const
virtual

Reimplemented in NoStatArray.

◆ getAllItems()

const std::vector<CovParamId>& ANoStat::getAllItems ( ) const
inline

◆ getICov()

int ANoStat::getICov ( int  ipar) const
inline

◆ getIGrf()

int ANoStat::getIGrf ( int  ipar) const
inline

◆ getInfoFromDb()

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

◆ getItems()

const CovParamId ANoStat::getItems ( int  ipar) const
inline

◆ getIV1()

int ANoStat::getIV1 ( int  ipar) const
inline

◆ getIV2()

int ANoStat::getIV2 ( int  ipar) const
inline

◆ getNoStat()

const CovParamId ANoStat::getNoStat ( int  ipar) const
inline

◆ getNoStatElemNumber()

int ANoStat::getNoStatElemNumber ( ) const
inline

◆ getNoStats()

const std::vector<CovParamId>& ANoStat::getNoStats ( ) const
inline

◆ getRank()

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

◆ getType()

const EConsElem& ANoStat::getType ( int  ipar) const
inline

◆ getValue()

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.

◆ getValueByParam()

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

Implemented in NoStatFunctional, and NoStatArray.

◆ isDefined()

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

◆ isDefinedByCov()

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

◆ isDefinedByCovType()

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

◆ isDefinedByType()

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

◆ isDefinedforAnisotropy()

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

◆ isDefinedforRotation()

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

◆ isNotEmpty()

bool ANoStat::isNotEmpty ( ) const
inline

◆ manageInfo()

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

◆ matchICov()

bool ANoStat::matchICov ( int  ipar,
int  icov0 
) const
inline

◆ matchIGrf()

bool ANoStat::matchIGrf ( int  ipar,
int  igrf0 
) const
inline

◆ matchIV1()

bool ANoStat::matchIV1 ( int  ipar,
int  iv10 
) const
inline

◆ matchIV2()

bool ANoStat::matchIV2 ( int  ipar,
int  iv20 
) const
inline

◆ matchType()

bool ANoStat::matchType ( int  ipar,
const EConsElem &  type0 
) const
inline

◆ operator=()

ANoStat & ANoStat::operator= ( const ANoStat m)

◆ toString()

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: