gstlearn  1.0.0
CCC
ACalcDbToDb Class Reference

#include <ACalcDbToDb.hpp>

Inheritance diagram for ACalcDbToDb:
ACalculator ACalcInterpolator CalcGridToGrid CalcMigrate CalcSimuPost CalcStatistics ACalcSimulation CalcGlobal CalcImage CalcKriging CalcKrigingFactors CalcSimpleInterpolation CalcSimuPostDemo CalcSimuPostPropByLayer

Public Member Functions

 ACalcDbToDb (bool mustShareSameSpaceDimension=true)
 
 ACalcDbToDb (const ACalcDbToDb &r)=delete
 
ACalcDbToDboperator= (const ACalcDbToDb &r)=delete
 
virtual ~ACalcDbToDb ()
 
void setDbin (Db *dbin)
 
void setDbout (Db *dbout)
 
void setNamingConvention (const NamingConvention &namconv)
 
void setMustShareSpaceDimension (bool mustShareSpaceDimension)
 
DbgetDbin () const
 
DbgetDbout () const
 
DbGridgetGridin () const
 
DbGridgetGridout () const
 
bool hasDbin (bool verbose=true) const
 
bool hasDbout (bool verbose=true) const
 
bool isGridIn (bool verbose=true) const
 
bool isGridOut (bool verbose=true) const
 
- Public Member Functions inherited from ACalculator
 ACalculator ()
 
 ACalculator (const ACalculator &r)=delete
 
ACalculatoroperator= (const ACalculator &r)=delete
 
virtual ~ACalculator ()
 
bool run ()
 

Protected Member Functions

virtual bool _check () override
 
virtual int _getNDim () const
 
virtual int _getNVar () const
 
int _addVariableDb (int whichDb, int status, const ELoc &locatorType, int locatorIndex=0, int number=1, double valinit=0.)
 
void _renameVariable (int whichDb, const VectorString &names, const ELoc &locatorType, int nvar, int iptr, const String &name, int count, bool flagSetLocator=true, int shift=0)
 
void _storeInVariableList (int whichDb, int status, const VectorInt &iuids)
 
int _expandInformation (int mode, const ELoc &locatorType)
 
void _cleanVariableDb (int status)
 
Db_whichDb (int whichDb)
 
String _identifyVariable (int iuid) const
 
- Protected Member Functions inherited from ACalculator
virtual bool _run ()=0
 
virtual bool _preprocess ()
 
virtual bool _postprocess ()
 
virtual void _rollback ()
 

Private Member Functions

bool _checkSpaceDimension ()
 
bool _checkVariableNumber ()
 

Private Attributes

bool _mustShareSpaceDimension
 
Db_dbin
 
Db_dbout
 
NamingConvention _namconv
 
VectorInt _listVariablePermDbIn
 
VectorInt _listVariablePermDbOut
 
VectorInt _listVariableTempDbIn
 
VectorInt _listVariableTempDbOut
 

Constructor & Destructor Documentation

◆ ACalcDbToDb() [1/2]

ACalcDbToDb::ACalcDbToDb ( bool  mustShareSameSpaceDimension = true)

◆ ACalcDbToDb() [2/2]

ACalcDbToDb::ACalcDbToDb ( const ACalcDbToDb r)
delete

◆ ~ACalcDbToDb()

ACalcDbToDb::~ACalcDbToDb ( )
virtual

Member Function Documentation

◆ _addVariableDb()

int ACalcDbToDb::_addVariableDb ( int  whichDb,
int  status,
const ELoc &  locatorType,
int  locatorIndex = 0,
int  number = 1,
double  valinit = 0. 
)
protected

◆ _check()

◆ _checkSpaceDimension()

bool ACalcDbToDb::_checkSpaceDimension ( )
private

◆ _checkVariableNumber()

bool ACalcDbToDb::_checkVariableNumber ( )
private

◆ _cleanVariableDb()

void ACalcDbToDb::_cleanVariableDb ( int  status)
protected

◆ _expandInformation()

int ACalcDbToDb::_expandInformation ( int  mode,
const ELoc &  locatorType 
)
protected

Derive some information from the Output db (if Grid) to the Input Db

Returns
Error return code
Parameters
[in]mode1 for allocation; -1 for deallocation
[in]locatorTypeType of the pointer (ELoc)
Remarks
This function is only valid when the Output Db is a grid
However, in case of a Point output Db, this function should not
be used: the external drift functions should already be present
in the output Db.
If this is not the case, an error is issued.
When called with mode=1, the new variables are added
When called with mode=-1, the variables are deleted (by type)

◆ _getNDim()

int ACalcDbToDb::_getNDim ( ) const
protectedvirtual

Reimplemented in ACalcInterpolator, and SimuRefine.

◆ _getNVar()

int ACalcDbToDb::_getNVar ( ) const
protectedvirtual

◆ _identifyVariable()

String ACalcDbToDb::_identifyVariable ( int  iuid) const
protected

◆ _renameVariable()

void ACalcDbToDb::_renameVariable ( int  whichDb,
const VectorString names,
const ELoc &  locatorType,
int  nvar,
int  iptr,
const String qualifier,
int  count,
bool  flagSetLocator = true,
int  locatorShift = 0 
)
protected

Define the characteristics of the variables created by a Db2Db Calculator

Parameters
whichDb1 if the variable belongs to 'dbin'; 2 if it belongs to 'dbout'
namesNames of the variables in 'dbin' (or empty)
locatorTypeLocator for the names of input variables (or ELoc::UNKNOWN)
nvarNumber of variables (when constructed from locator)
iptrIUID of the (first) variable to be renamed
qualifierName which will serve as 'qualifier' (when provided)
countNumber of variable named from the same basic name (using version number)
flagSetLocatorTrue if the locator must be defined
locatorShiftShift to calculate the rank of the locator currently defined

◆ _storeInVariableList()

void ACalcDbToDb::_storeInVariableList ( int  whichDb,
int  status,
const VectorInt iuids 
)
protected

Store the IUID of the new variable in the relevant internal list

Parameters
whichDb1 for variable in 'dbin'; 2 for variable in 'dbout'
status1 for variables to be stored; 2 for Temporary variable
iuidsVector of UIDs of the new variable

◆ _whichDb()

Db * ACalcDbToDb::_whichDb ( int  whichDb)
protected

Returns a pointer to the relevant Db and issue a message if not defined

Parameters
whichDb1 for 'dbin' and 2 for 'dbout'
Returns
A pointer to the Db or nullptr

◆ getDbin()

Db* ACalcDbToDb::getDbin ( ) const
inline

◆ getDbout()

Db* ACalcDbToDb::getDbout ( ) const
inline

◆ getGridin()

DbGrid * ACalcDbToDb::getGridin ( ) const

◆ getGridout()

DbGrid * ACalcDbToDb::getGridout ( ) const

◆ hasDbin()

bool ACalcDbToDb::hasDbin ( bool  verbose = true) const

◆ hasDbout()

bool ACalcDbToDb::hasDbout ( bool  verbose = true) const

◆ isGridIn()

bool ACalcDbToDb::isGridIn ( bool  verbose = true) const

◆ isGridOut()

bool ACalcDbToDb::isGridOut ( bool  verbose = true) const

◆ operator=()

ACalcDbToDb& ACalcDbToDb::operator= ( const ACalcDbToDb r)
delete

◆ setDbin()

void ACalcDbToDb::setDbin ( Db dbin)
inline

◆ setDbout()

void ACalcDbToDb::setDbout ( Db dbout)
inline

◆ setMustShareSpaceDimension()

void ACalcDbToDb::setMustShareSpaceDimension ( bool  mustShareSpaceDimension)
inline

◆ setNamingConvention()

void ACalcDbToDb::setNamingConvention ( const NamingConvention namconv)
inline

Member Data Documentation

◆ _dbin

Db* ACalcDbToDb::_dbin
private

◆ _dbout

Db* ACalcDbToDb::_dbout
private

◆ _listVariablePermDbIn

VectorInt ACalcDbToDb::_listVariablePermDbIn
private

◆ _listVariablePermDbOut

VectorInt ACalcDbToDb::_listVariablePermDbOut
private

◆ _listVariableTempDbIn

VectorInt ACalcDbToDb::_listVariableTempDbIn
private

◆ _listVariableTempDbOut

VectorInt ACalcDbToDb::_listVariableTempDbOut
private

◆ _mustShareSpaceDimension

bool ACalcDbToDb::_mustShareSpaceDimension
private

◆ _namconv

NamingConvention ACalcDbToDb::_namconv
private

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