COVISE Core
Public Member Functions | Protected Member Functions | Static Private Member Functions | Friends | List of all members
covise::coDoOctTree Class Reference

#include <coDoOctTree.h>

Inheritance diagram for covise::coDoOctTree:
Inheritance graph
[legend]
Collaboration diagram for covise::coDoOctTree:
Collaboration graph
[legend]

Public Member Functions

 coDoOctTree (const coObjInfo &info)
 
 coDoOctTree (const coObjInfo &info, coShmArray *arr)
 
 coDoOctTree (const coObjInfo &info, int cellListSize, int macroCellListSize, int cellBBoxesSize, int gridBBoxSize)
 
 coDoOctTree (const coObjInfo &info, int nelem, int nconn, int ncoord, int *el, int *conn, float *x_c, float *y_c, float *z_c, int normal_size=NORMAL_SIZE, int max_no_levels=MAX_NO_LEVELS, int min_small_enough=MIN_SMALL_ENOUGH, int crit_level=CRIT_LEVEL, int limit_fX=INT_MAX, int limit_fY=INT_MAX, int limit_fZ=INT_MAX)
 
int IsInBBox (int cell, int no_e, const float *point) const
 
virtual ~coDoOctTree ()
 Destructor. More...
 
- Public Member Functions inherited from covise::coDoBasisTree
 coDoBasisTree (const coObjInfo &info, const char *label1, const char *label2, int nelem_l, int nconn_l, int ncoord_l, int *el, int *conn, float *x_c, float *y_c, float *z_c, int normal_size, int max_no_levels, int min_small_enough, int crit_level, int limit_fX, int limit_fY, int limit_fZ)
 
 coDoBasisTree (const coObjInfo &info)
 Another constructor. More...
 
 coDoBasisTree (const coObjInfo &info, const char *label)
 Still another constructor. More...
 
 coDoBasisTree (const coObjInfo &info, const char *label1, const char *label2, int cellListSize, int macroCellListSize, int cellBBoxesSize, int gridBBoxSize)
 
virtual ~coDoBasisTree ()
 Destructor. More...
 
void Visualise (std::vector< int > &ll, std::vector< int > &cl, std::vector< float > &xi, std::vector< float > &yi, std::vector< float > &zi)
 
const int * search (const float *point) const
 
const int * extended_search (const coVector &point1, const coVector &point2, std::vector< int > &OctreePolygonList) const
 Dump of information of the macrocells and cells defining the octtree. More...
 
bool cutLineCuboid (const coVector &point1, const coVector &point2, const float *cuboidBbox, std::vector< coVector > &CutVec) const
 extends normal search function, by searching for all cells between two points More...
 
bool cutThroughOct (int baum, const float bbox[6], std::vector< int > &ll, std::vector< int > &cl, std::vector< float > &xi, std::vector< float > &yi, std::vector< float > &zi, const coVector &point1, const coVector &point2, std::vector< int > &OctreePolygonList) const
 cuts a line with a cuboid and gives back a vector with the coordinates More...
 
const int * getBbox (std::vector< float > &boundingBox) const
 recursive cut through a octree macro cell More...
 
const int * area_search (std::vector< float > &Bbox, std::vector< int > &GridElemList) const
 get the BBox of a given Octtree More...
 
void getMacroCellElements (int baum, float bbox[6], std::vector< int > &ElementList, const float *reference_Bbox) const
 search for all cells within a 3D area More...
 
bool lineInBbox (const coVector &point1, const coVector &point2, const float bbox[6]) const
 get all Elements which are in a specific macro cell More...
 
void getChunks (vector< const int * > &chunks, const functionObject *test)
 /////////////////////////////////////////////// More...
 
int getNumCellLists ()
 
int getNumMacroCellLists ()
 
int getNumCellBBoxes ()
 
int getNumGridBBoxes ()
 
void getAddresses (int **cellList, int **macroCellList, float **cellBBox, float **gridBBox, int **fX, int **fY, int **fZ, int **max_no_levels)
 
- Public Member Functions inherited from covise::coDistributedObject
void getShmLocation (int &shmSegNo, shmSizeType &offset) const
 Get my location in shared memory. More...
 
void addAttribute (const char *, const char *)
 Attach an attribute to an object. More...
 
void addAttributes (int, const char *const *, const char *const *)
 Attach multiple attributes to an object. More...
 
const char * getAttribute (const char *) const
 get one attribute More...
 
int getNumAttributes () const
 get number of attributes More...
 
int getAllAttributes (const char ***name, const char ***content) const
 get all attributes More...
 
void copyAllAttributes (const coDistributedObject *src)
 copy all attributes from src to this object More...
 
char * getName () const
 get the object's name More...
 
const char * getType () const
 get the object's type More...
 
int isType (const char *reqType) const
 check whether this is a certain type More...
 
bool objectOk () const
 check whether object was created or received ok More...
 
 coDistributedObject ()
 
 coDistributedObject (const coObjInfo &info)
 
 coDistributedObject (const coObjInfo &info, const char *t)
 
 coDistributedObject (const coObjInfo &info, int shmSeg, shmSizeType offs, char *t)
 
virtual ~coDistributedObject ()
 
coDistributedObjectclone (const coObjInfo &newinfo) const
 
void copyObjInfo (coObjInfo *info) const
 
const coDistributedObjectcreateUnknown () const
 
int * store_header (int, int, int, int *, data_type *, long *, covise::DataHandle &idata)
 
int restore_header (int **, int, int *, int *, shmSizeType *)
 
void init_header (int *, int *, int, data_type **, long **)
 
int update_shared_dl (int count, covise_data_list *dl)
 
int store_shared_dl (int count, covise_data_list *dl)
 
int restore_shared_dl (int count, covise_data_list *dl)
 
void setType (const char *, const char *)
 
int getObjectInfo (coDoInfo **) const
 
int get_type_no () const
 
int access (access_type)
 
int destroy ()
 
char * object_on_hosts () const
 
int incRefCount () const
 
int decRefCount () const
 
int getRefCount () const
 
void print () const
 
void getObjectFromShm ()
 Common function for all read-Constructors: More...
 
bool checkObject () const
 Check object: return true if valid, false if not. More...
 

Protected Member Functions

coDoOctTreecloneObject (const coObjInfo &newinfo) const
 
- Protected Member Functions inherited from covise::coDoBasisTree
int getObjInfo (int, coDoInfo **) const
 
int rebuildFromShm ()
 
void BBoxForElement (int i)
 
void ShareCellsBetweenLeaves ()
 
void IniBBox (float *, const int *) const
 
void fillBBoxSon (float *bbox_son, const float *bbox, int son) const
 
void SplitOctTree (const float *bbox, std::vector< int > &population_, int level, int offset)
 
int CellsAreTooBig (const float *bbox, std::vector< int > &population)
 
void RecreateShm (const char *label1, const char *label2)
 
void DivideUpToLevel ()
 
const int * lookUp (int position, int *okey, int mask) const
 
void MakeOctTree (int *el, int *conn, float *x_c, float *y_c, float *z_c)
 
int Position (int *key) const
 
- Protected Member Functions inherited from covise::coDistributedObject
int getShmArray () const
 
int createFromShm (coShmArray *arr)
 
virtual int rebuildFromShm ()=0
 
virtual int getObjInfo (int, coDoInfo **) const
 
bool checkObj (int shmSegNo, shmSizeType shmOffs, bool &printed) const
 Check object in shared memory. More...
 
virtual coDistributedObjectcloneObject (const coObjInfo &newinfo) const =0
 

Static Private Member Functions

static coDistributedObjectvirtualCtor (coShmArray *arr)
 

Friends

class coDoInitializer
 

Additional Inherited Members

- Public Types inherited from covise::coDoBasisTree
enum  {
  SHM_OBJ = 8 , MAX_NO_LEVELS = 10 , MIN_SMALL_ENOUGH = 32 , CRIT_LEVEL = 3 ,
  NORMAL_SIZE = 800
}
 
- Static Public Member Functions inherited from covise::coDistributedObject
static const coDistributedObjectcreateFromShm (const coObjInfo &newinfo)
 
static const coDistributedObjectcreateUnknown (coShmArray *)
 
static const coDistributedObjectcreateUnknown (int seg, shmSizeType offs)
 
static int calcType (const char *)
 
static char * calcTypeString (int)
 
static int set_vconstr (const char *, coDistributedObject *(*)(coShmArray *))
 
- Static Protected Member Functions inherited from covise::coDoBasisTree
static int IsInMacroCell (const int *okey, const int *macro_keys)
 
- Protected Attributes inherited from covise::coDoBasisTree
coIntShmArray cellList
 
coIntShmArray macroCellList
 
coFloatShmArray cellBBoxes
 
coFloatShmArray gridBBox
 
coIntShm fXShm
 
coIntShm fYShm
 
coIntShm fZShm
 
coIntShm max_no_levels_Shm
 
std::vector< int > macCellList_
 
std::vector< int > cellList_
 
std::vector< int > * populations_
 
std::vector< float > cellBBoxes_
 
int nelem
 
int nconn
 
int ncoord
 
int * el_
 
int * conn_
 
float * x_c_
 
float * y_c_
 
float * z_c_
 
float * cell_bbox_
 
float grid_bbox_ [6]
 
int fX_
 
int fY_
 
int fZ_
 
const int normal_size_
 
int max_no_levels_
 
const int min_small_enough_
 
const int crit_level_
 
const int limit_fX_
 
const int limit_fY_
 
const int limit_fZ_
 
- Protected Attributes inherited from covise::coDistributedObject
coIntShm version
 
coIntShm refcount
 
coShmArrayshmarr
 
coStringShmArrayattributes = nullptr
 
coDoHeaderheader = nullptr
 
char type_name [7]
 
int type_no = 0
 
char * name = nullptr
 
int loc_version = -1
 
bool new_ok
 
int size = 0
 
char * attribs = nullptr
 

Detailed Description

Derived class from coDoBasisTree, used for cell location in unstructured grids.

Constructor & Destructor Documentation

◆ coDoOctTree() [1/4]

coDoOctTree::coDoOctTree ( const coObjInfo info)

Constructor

Parameters
nobject name

◆ coDoOctTree() [2/4]

coDoOctTree::coDoOctTree ( const coObjInfo info,
coShmArray arr 
)

Constructor

Parameters
nobject name
arrpointer to coShmArray

◆ coDoOctTree() [3/4]

covise::coDoOctTree::coDoOctTree ( const coObjInfo info,
int  cellListSize,
int  macroCellListSize,
int  cellBBoxesSize,
int  gridBBoxSize 
)
inline

Constructor for deserialization

Parameters
infoobject name
cellListSizenumber of cellList items
macroCellListSizenumber of macroCellList items
cellBBoxesSizenumber of cellBBoxes items
gridBBoxSizenumber of gridBBox items

◆ coDoOctTree() [4/4]

coDoOctTree::coDoOctTree ( const coObjInfo info,
int  nelem,
int  nconn,
int  ncoord,
int *  el,
int *  conn,
float *  x_c,
float *  y_c,
float *  z_c,
int  normal_size = NORMAL_SIZE,
int  max_no_levels = MAX_NO_LEVELS,
int  min_small_enough = MIN_SMALL_ENOUGH,
int  crit_level = CRIT_LEVEL,
int  limit_fX = INT_MAX,
int  limit_fY = INT_MAX,
int  limit_fZ = INT_MAX 
)

Constructor

Parameters
nobject name
nelemnumber of elements in the grid
nconnlength of the grid connectivity list
ncoordnumber of points in the grid
elarray with "pointers" to the connectivity list for each element
connconnectivity list
x_cX coordinates of the grid points
y_cY coordinates of the grid points
z_cZ coordinates of the grid points

◆ ~coDoOctTree()

coDoOctTree::~coDoOctTree ( )
virtual

Destructor.

Member Function Documentation

◆ cloneObject()

coDoOctTree * coDoOctTree::cloneObject ( const coObjInfo newinfo) const
protectedvirtual

◆ IsInBBox()

int coDoOctTree::IsInBBox ( int  cell,
int  no_e,
const float *  point 
) const

IsInBBox: returns 1 if a point is in the bounding box of a cell

Parameters
cellinteger cell identifier
no_enumber of cells
pointarray to 3 point coordinates
Returns
1 if the point is in the bounding box of the cell, 0 otherwise

◆ virtualCtor()

coDistributedObject * coDoOctTree::virtualCtor ( coShmArray arr)
staticprivate

Friends And Related Function Documentation

◆ coDoInitializer

friend class coDoInitializer
friend

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