gstlearn  1.0.0
CCC
BooleanObject Class Reference

#include <BooleanObject.hpp>

Inheritance diagram for BooleanObject:
AStringable

Public Member Functions

 BooleanObject (const AShape *shape)
 
 BooleanObject (const BooleanObject &r)
 
BooleanObjectoperator= (const BooleanObject &r)
 
virtual ~BooleanObject ()
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 Interface to AStringable. More...
 
void setMode (int mode)
 
void setOrientation (double orientation)
 
void setCenter (int idim, double value)
 
void setCenter (const VectorDouble &center)
 
void setExtension (int idim, double value)
 
void setValue (int rank, double value)
 
int getMode () const
 
double getCenter (int idim) const
 
double getExtension (int idim) const
 
double getOrientation () const
 
double getValue (int rank) const
 
const AShapegetToken () const
 
bool isCompatiblePore (const Db *db)
 
bool isCompatibleGrainAdd (const Db *db)
 
bool isCompatibleGrainDelete (const Db *db, int iptr_cover)
 
void projectToGrid (DbGrid *dbout, int iptr_simu, int iptr_rank, int facies, int rank)
 
int coverageUpdate (Db *db, int iptr_cover, int val)
 
VectorDouble getValues () 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
 

Static Public Member Functions

static BooleanObjectgenerate (const DbGrid *dbout, const VectorDouble &cdgrain, const ModelBoolean *tokens, const SimuBooleanParam &boolparam, double eps=EPSILON3)
 

Private Member Functions

bool _isPore (const Db *db, int iech)
 
bool _isGrain (const Db *db, int iech)
 
void _defineBoundingBox (double eps=EPSILON3)
 
void _extensionLinkage ()
 
bool _isInObject (const VectorDouble &coor, int ndim)
 
bool _isInBoundingBox (const VectorDouble &coor, int ndim)
 
int _getCoverageAtSample (const Db *db, int iptr_cover, int iech)
 
void _updateCoverageAtSample (Db *db, int iptr_cover, int iech, int ival)
 

Static Private Member Functions

static bool _checkIntensity (const DbGrid *dbout, const ModelBoolean *tokens, const VectorDouble &coor, double eps=EPSILON3)
 
static void _drawCoordinate (const DbGrid *dbout, const SimuBooleanParam &boolparam, VectorDouble &coor)
 

Private Attributes

int _mode
 
const AShape_token
 
VectorDouble _center
 
VectorDouble _extension
 
double _orientation
 
VectorDouble _values
 
VectorVectorDouble _box
 

Constructor & Destructor Documentation

◆ BooleanObject() [1/2]

BooleanObject::BooleanObject ( const AShape shape)

◆ BooleanObject() [2/2]

BooleanObject::BooleanObject ( const BooleanObject r)

◆ ~BooleanObject()

BooleanObject::~BooleanObject ( )
virtual

Member Function Documentation

◆ _checkIntensity()

bool BooleanObject::_checkIntensity ( const DbGrid dbout,
const ModelBoolean tokens,
const VectorDouble coor,
double  eps = EPSILON3 
)
staticprivate

Check if an object may be generated according to the value of the Intensity This Intensity can be local or not (if Flag_stat)

Returns
Error return code:
0 the token is created
1 the token may not be created

◆ _defineBoundingBox()

void BooleanObject::_defineBoundingBox ( double  eps = EPSILON3)
private

◆ _drawCoordinate()

void BooleanObject::_drawCoordinate ( const DbGrid dbout,
const SimuBooleanParam boolparam,
VectorDouble coor 
)
staticprivate

◆ _extensionLinkage()

void BooleanObject::_extensionLinkage ( )
private

Function to link the geometries of an object

◆ _getCoverageAtSample()

int BooleanObject::_getCoverageAtSample ( const Db db,
int  iptr_cover,
int  iech 
)
private

◆ _isGrain()

bool BooleanObject::_isGrain ( const Db db,
int  iech 
)
private

◆ _isInBoundingBox()

bool BooleanObject::_isInBoundingBox ( const VectorDouble coor,
int  ndim 
)
private

Check if the pixel (coor) belongs to the object bounding box

Returns
True if the pixel is in the box and False otherwise
Parameters
[in]coorlocation of the pixel
[in]ndimSpace dimension

◆ _isInObject()

bool BooleanObject::_isInObject ( const VectorDouble coor,
int  ndim 
)
private

Check if the pixel (coor) belongs to the grain.

Returns
True if the pixel is in the object, False otherwise
Parameters
[in]coorlocation of the pixel
[in]ndimSpace dimension

◆ _isPore()

bool BooleanObject::_isPore ( const Db db,
int  iech 
)
private

◆ _updateCoverageAtSample()

void BooleanObject::_updateCoverageAtSample ( Db db,
int  iptr_cover,
int  iech,
int  ival 
)
private

◆ coverageUpdate()

int BooleanObject::coverageUpdate ( Db db,
int  iptr_cover,
int  val 
)

Update the covering value of each constraining grain after a deletion or an addition operation

Returns
Count of grains not covered after the operation
Parameters
[in]dbDb structure
[in]iptr_coverUID for the covering variable
[in]valtype of the operation to be tested 1 for addition; -1 for deletion

◆ generate()

BooleanObject * BooleanObject::generate ( const DbGrid dbout,
const VectorDouble cdgrain,
const ModelBoolean tokens,
const SimuBooleanParam boolparam,
double  eps = EPSILON3 
)
static

Function used to generate the geometry of an object

◆ getCenter()

double BooleanObject::getCenter ( int  idim) const
inline

◆ getExtension()

double BooleanObject::getExtension ( int  idim) const
inline

◆ getMode()

int BooleanObject::getMode ( ) const
inline

◆ getOrientation()

double BooleanObject::getOrientation ( ) const
inline

◆ getToken()

const AShape* BooleanObject::getToken ( ) const
inline

◆ getValue()

double BooleanObject::getValue ( int  rank) const
inline

◆ getValues()

VectorDouble BooleanObject::getValues ( ) const

◆ isCompatibleGrainAdd()

bool BooleanObject::isCompatibleGrainAdd ( const Db db)

Check if an object can be added with regards to the constraining grains

Parameters
[in]dbConstraining data set

◆ isCompatibleGrainDelete()

bool BooleanObject::isCompatibleGrainDelete ( const Db db,
int  iptr_cover 
)

Check if an object can be deleted with regards to the constraining grains

Parameters
[in]dbConstraining data set
[in]iptr_coverUIUD for coverage variable

◆ isCompatiblePore()

bool BooleanObject::isCompatiblePore ( const Db db)

Check if the current object is compatible with the constraining pores

Returns
True if it is compatible; False otherwise
Parameters
[in]dbConstraining data set

◆ operator=()

BooleanObject & BooleanObject::operator= ( const BooleanObject r)

◆ projectToGrid()

void BooleanObject::projectToGrid ( DbGrid dbout,
int  iptr_simu,
int  iptr_rank,
int  facies,
int  rank 
)

◆ setCenter() [1/2]

void BooleanObject::setCenter ( const VectorDouble center)

◆ setCenter() [2/2]

void BooleanObject::setCenter ( int  idim,
double  value 
)
inline

◆ setExtension()

void BooleanObject::setExtension ( int  idim,
double  value 
)
inline

◆ setMode()

void BooleanObject::setMode ( int  mode)
inline

◆ setOrientation()

void BooleanObject::setOrientation ( double  orientation)
inline

◆ setValue()

void BooleanObject::setValue ( int  rank,
double  value 
)
inline

◆ toString()

String BooleanObject::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

Interface to AStringable.

Reimplemented from AStringable.

Member Data Documentation

◆ _box

VectorVectorDouble BooleanObject::_box
private

◆ _center

VectorDouble BooleanObject::_center
private

◆ _extension

VectorDouble BooleanObject::_extension
private

◆ _mode

int BooleanObject::_mode
private

◆ _orientation

double BooleanObject::_orientation
private

◆ _token

const AShape* BooleanObject::_token
private

◆ _values

VectorDouble BooleanObject::_values
private

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