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

#include <coDoData.h>

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

Public Types

enum  TensorType {
  UNKNOWN = 0 , S2D = 3 , F2D = 4 , S3D = 6 ,
  F3D = 9
}
 

Public Member Functions

TensorType getTensorType () const
 
int dimension () const
 
const char * getTensorCharType () const
 
 coDoTensor (const coObjInfo &info, TensorType ttype)
 
 coDoTensor (const coObjInfo &info, coShmArray *arr)
 
 coDoTensor (const coObjInfo &info, int no, float *r_c, TensorType ttype)
 
 coDoTensor (const coObjInfo &info, int no, TensorType ttype)
 
coDoAbstractDatacloneType (const coObjInfo &info, int no) const
 
void getPointValue (int no, float *m) const
 
void cloneValue (int dstIdx, const coDoAbstractData *src, int srcIdx)
 
void setNullValue (int dstIdx)
 
void getAddress (float **ref) const
 
float * getAddress () const
 
int setSize (int numElem)
 
- Public Member Functions inherited from covise::coDoAbstractData
 coDoAbstractData (const coObjInfo &info, const char *t)
 
virtual void cloneValue (int dstIdx, const coDoAbstractData *src, int srcIdx)=0
 
virtual void setNullValue (int dstIdx)=0
 
virtual coDoAbstractDatacloneType (const coObjInfo &info, int numElements) const =0
 
virtual int getNumPoints () const
 
- 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

int rebuildFromShm ()
 
int getObjInfo (int, coDoInfo **) const
 
coDoTensorcloneObject (const coObjInfo &newinfo) 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)
 

Private Attributes

coIntShm TensorType_
 
coFloatShmArray t_data
 

Static Private Attributes

static const TensorType listOfTypes_ [] = { S2D, F2D, S3D, F3D, UNKNOWN }
 
static const char * strTypes_ [] = { "Sym 2D", "Sym 3D", "Full 2D", "Full 3D", "Unknown" }
 

Friends

class coDoInitializer
 

Additional Inherited Members

- 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 *))
 
- Protected Attributes inherited from covise::coDoAbstractData
coIntShm no_of_points
 
- 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
 

Member Enumeration Documentation

◆ TensorType

Enumerator
UNKNOWN 
S2D 
F2D 
S3D 
F3D 

Constructor & Destructor Documentation

◆ coDoTensor() [1/4]

covise::coDoTensor::coDoTensor ( const coObjInfo info,
TensorType  ttype 
)
inline

◆ coDoTensor() [2/4]

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

◆ coDoTensor() [3/4]

coDoTensor::coDoTensor ( const coObjInfo info,
int  no,
float *  r_c,
TensorType  ttype 
)

◆ coDoTensor() [4/4]

coDoTensor::coDoTensor ( const coObjInfo info,
int  no,
TensorType  ttype 
)

Member Function Documentation

◆ cloneObject()

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

◆ cloneType()

coDoAbstractData * covise::coDoTensor::cloneType ( const coObjInfo info,
int  no 
) const
inlinevirtual

◆ cloneValue()

void covise::coDoTensor::cloneValue ( int  dstIdx,
const coDoAbstractData src,
int  srcIdx 
)
inlinevirtual

◆ dimension()

int covise::coDoTensor::dimension ( ) const
inline

◆ getAddress() [1/2]

float * covise::coDoTensor::getAddress ( ) const
inline

◆ getAddress() [2/2]

void covise::coDoTensor::getAddress ( float **  ref) const
inline

◆ getObjInfo()

int coDoTensor::getObjInfo ( int  no,
coDoInfo **  il 
) const
protectedvirtual

Reimplemented from covise::coDistributedObject.

◆ getPointValue()

void covise::coDoTensor::getPointValue ( int  no,
float *  m 
) const
inline

◆ getTensorCharType()

const char * coDoTensor::getTensorCharType ( ) const

◆ getTensorType()

coDoTensor::TensorType coDoTensor::getTensorType ( ) const

◆ rebuildFromShm()

int coDoTensor::rebuildFromShm ( )
protectedvirtual

◆ setNullValue()

void covise::coDoTensor::setNullValue ( int  dstIdx)
inlinevirtual

◆ setSize()

int coDoTensor::setSize ( int  numElem)

set new values for sizes: only DECREASING is allowed

Returns
0 if ok, -1 on error
Parameters
numElemNew size of element list
numConnNew size of connectivity list
numCoordNew size of coordinale list

◆ virtualCtor()

coDistributedObject * coDoTensor::virtualCtor ( coShmArray arr)
staticprivate

Friends And Related Function Documentation

◆ coDoInitializer

friend class coDoInitializer
friend

Member Data Documentation

◆ listOfTypes_

const coDoTensor::TensorType coDoTensor::listOfTypes_ = { S2D, F2D, S3D, F3D, UNKNOWN }
staticprivate

◆ strTypes_

const char * coDoTensor::strTypes_ = { "Sym 2D", "Sym 3D", "Full 2D", "Full 3D", "Unknown" }
staticprivate

◆ t_data

coFloatShmArray covise::coDoTensor::t_data
private

◆ TensorType_

coIntShm covise::coDoTensor::TensorType_
private

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