View on GitHub

Vistle

Distributed Data-parallel Scientific Visualization in VR

Public Types | Public Member Functions | Static Public Attributes | List of all members
vistle::UnstructuredGrid Class Reference

#include <core/unstr.h>

Inheritance diagram for vistle::UnstructuredGrid:
Inheritance graph
[legend]
Collaboration diagram for vistle::UnstructuredGrid:
Collaboration graph
[legend]

Public Types

enum  Type {
  GHOST_BIT = cell::GHOST_BIT , CONVEX_BIT = cell::CONVEX_BIT , TYPE_MASK = cell::TYPE_MASK , POLYHEDRON = cell::POLYHEDRON ,
  NONE = cell::NONE , BAR = cell::BAR , TRIANGLE = cell::TRIANGLE , QUAD = cell::QUAD ,
  TETRAHEDRON = cell::TETRAHEDRON , PYRAMID = cell::PYRAMID , PRISM = cell::PRISM , HEXAHEDRON = cell::HEXAHEDRON ,
  VPOLYHEDRON = cell::VPOLYHEDRON , POLYGON = cell::POLYGON , POINT = cell::POINT , CPOLYHEDRON = cell::CPOLYHEDRON ,
  NUM_TYPES = cell::NUM_TYPES
}
 
typedef Indexed Base
 
- Public Types inherited from vistle::Indexed
typedef Coords Base
 
typedef vistle::VertexOwnerList VertexOwnerList
 
typedef vistle::CelltreeInterface< 3 >::Celltree Celltree
 
- Public Types inherited from vistle::Coords
typedef Vec< Scalar, 3 > Base
 
- Public Types inherited from vistle::Vec< Scalar, 3 >
typedef DataBase Base
 
typedef shm< Scalar >::array array
 
typedef Scalar Scalar
 
typedef VistleVector< Scalar, Dim > Vector
 
- Public Types inherited from vistle::DataBase
typedef Object Base
 
- Public Types inherited from vistle::Object
enum  InitializedFlags { Initialized }
 
enum  Type {
  COORD = -9 , COORDWRADIUS = -8 , DATABASE = -7 , UNKNOWN = -1 ,
  EMPTY = 1 , PLACEHOLDER = 11 , TEXTURE1D = 16 , POINTS = 18 ,
  SPHERES = 19 , LINES = 20 , TUBES = 21 , TRIANGLES = 22 ,
  POLYGONS = 23 , UNSTRUCTUREDGRID = 24 , UNIFORMGRID = 25 , RECTILINEARGRID = 26 ,
  STRUCTUREDGRID = 27 , QUADS = 28 , VERTEXOWNERLIST = 95 , CELLTREE1 = 96 ,
  CELLTREE2 = 97 , CELLTREE3 = 98 , NORMALS = 99 , VEC = 100
}
 
typedef std::shared_ptr< Objectptr
 
typedef std::shared_ptr< const Objectconst_ptr
 
typedef ObjectData Data
 
- Public Types inherited from vistle::CelltreeInterface< 3 >
typedef vistle::Celltree< Scalar, Index, Dim > Celltree
 
- Public Types inherited from vistle::GridInterface
enum  FindCellFlags { NoFlags = 0 , AcceptGhost = 1 , ForceCelltree = 2 , NoCelltree = 4 }
 

Public Member Functions

 UnstructuredGrid (const Index numElements, const Index numCorners, const Index numVertices, const Meta &meta=Meta())
 
void resetElements () override
 
shm< Byte >::arraytl ()
 
const Bytetl () const
 
bool isConvex (Index elem) const
 
bool isGhostCell (Index elem) const override
 
std::pair< Vector, VectorcellBounds (Index elem) const override
 
Index findCell (const Vector &point, Index hint=InvalidIndex, int flags=NoFlags) const override
 
bool insideConvex (Index elem, const Vector &point) const
 
bool inside (Index elem, const Vector &point) const override
 
Index checkConvexity ()
 
Scalar exitDistance (Index elem, const Vector &point, const Vector &dir) const override
 
Interpolator getInterpolator (Index elem, const Vector &point, Mapping mapping=Vertex, InterpolationMode mode=Linear) const override
 
std::pair< Vector, VectorelementBounds (Index elem) const override
 
std::vector< IndexcellVertices (Index elem) const override
 
Scalar cellDiameter (Index elem) const override
 
Vector cellCenter (Index elem) const override
 
std::vector< IndexgetNeighborElements (Index elem) const override
 
Index cellNumFaces (Index elem) const override
 
- Public Member Functions inherited from vistle::Indexed
 Indexed (const Index numElements, const Index numCorners, const Index numVertices, const Meta &meta=Meta())
 
Index getNumElements () override
 
Index getNumElements () const override
 
Index getNumCorners ()
 
Index getNumCorners () const
 
void resetCorners ()
 
shm< Index >::arrayel ()
 
shm< Index >::arraycl ()
 
const Indexel () const
 
const Indexcl () const
 
std::pair< Vector, VectorgetBounds () const override
 
bool hasCelltree () const override
 
Celltree::const_ptr getCelltree () const override
 
bool validateCelltree () const override
 
bool hasVertexOwnerList () const
 
VertexOwnerList::const_ptr getVertexOwnerList () const
 
void removeVertexOwnerList () const
 
const NeighborFindergetNeighborFinder () const
 
- Public Member Functions inherited from vistle::Coords
 Coords (const Index numVertices, const Meta &meta=Meta())
 
void resetCoords ()
 
std::set< Object::const_ptrreferencedObjects () const override
 check whether all references have been resolved More...
 
Index getNumCoords ()
 
Index getNumCoords () const
 
Index getNumVertices () override
 
Index getNumVertices () const override
 
Normals::const_ptr normals () const override
 
void setNormals (Normals::const_ptr normals)
 
Vector3 getVertex (Index v) const override
 
 V_DATA_BEGIN (Coords)
 
 Data (const Index numVertices=0, Type id=UNKNOWN, const std::string &name="", const Meta &meta=Meta())
 
 Data (const Vec< Scalar, 3 >::Data &o, const std::string &n, Type id)
 
 ~Data ()
 
 V_DATA_END (Coords)
 
- Public Member Functions inherited from vistle::Vec< Scalar, 3 >
 Vec (const Index size, const Meta &meta=Meta())
 
Index getSize () override
 
Index getSize () const override
 
int dimension () const override
 
bool copyEntry (Index to, DataBase::const_ptr src, Index from) override
 
void setValue (Index idx, int component, const double &value) override
 
double value (Index idx, int c=0) const override
 
void resetArrays () override
 
void setSize (const Index size) override
 
void applyDimensionHint (Object::const_ptr grid) override
 
void setExact (bool exact) override
 
arrayx (int c=0)
 
const Scalarx (int c=0) const
 
arrayy ()
 
const Scalary () const
 
arrayz ()
 
const Scalarz () const
 
arrayw ()
 
const Scalarw () const
 
void updateInternals () override
 
std::pair< Vector, VectorgetMinMax () const
 
- Public Member Functions inherited from vistle::DataBase
 DEFINE_ENUM_WITH_STRING_CONVERSIONS (Mapping,(Unspecified)(Vertex)(Element))
 
std::set< Object::const_ptrreferencedObjects () const override
 check whether all references have been resolved More...
 
Object::const_ptr grid () const
 
void setGrid (Object::const_ptr grid)
 
Mapping guessMapping (Object::const_ptr grid=Object::const_ptr()) const
 
Mapping mapping () const
 
void setMapping (Mapping m)
 
void copyAttributes (Object::const_ptr src, bool replace=true) override
 
- Public Member Functions inherited from vistle::Object
template<class Interface >
const Interface * getInterface () const
 
std::shared_ptr< const Objectobject () const override
 
virtual ~Object ()
 
bool operator== (const Object &other) const
 
bool operator!= (const Object &other) const
 
bool isComplete () const
 
Object::ptr clone () const
 
virtual Object::ptr cloneInternal () const =0
 
Object::ptr cloneType () const
 
virtual Object::ptr cloneTypeInternal () const =0
 
virtual void refresh () const
 refresh cached pointers from shm More...
 
virtual bool check () const
 
virtual bool isEmpty () const
 
virtual bool isEmpty ()
 
shm_handle_t getHandle () const
 
Type getType () const
 
std::string getName () const
 
int getBlock () const
 
int getNumBlocks () const
 
double getRealTime () const
 
int getTimestep () const
 
int getNumTimesteps () const
 
int getIteration () const
 
int getExecutionCounter () const
 
int getCreator () const
 
Matrix4 getTransform () const
 
void setBlock (const int block)
 
void setNumBlocks (const int num)
 
void setRealTime (double time)
 
void setTimestep (const int timestep)
 
void setNumTimesteps (const int num)
 
void setIteration (const int num)
 
void setExecutionCounter (const int count)
 
void setCreator (const int id)
 
void setTransform (const Matrix4 &transform)
 
const Metameta () const
 
void setMeta (const Meta &meta)
 
void addAttribute (const std::string &key, const std::string &value="")
 
void setAttributeList (const std::string &key, const std::vector< std::string > &values)
 
bool hasAttribute (const std::string &key) const
 
std::string getAttribute (const std::string &key) const
 
std::vector< std::string > getAttributes (const std::string &key) const
 
std::vector< std::string > getAttributeList () const
 
bool addAttachment (const std::string &key, Object::const_ptr att) const
 
bool hasAttachment (const std::string &key) const
 
void copyAttachments (Object::const_ptr src, bool replace=true)
 
Object::const_ptr getAttachment (const std::string &key) const
 
bool removeAttachment (const std::string &key) const
 
int ref () const
 
int unref () const
 
int refcount () const
 
template<class Archive >
void saveObject (Archive &ar) const
 
Datad () const
 
- Public Member Functions inherited from vistle::GridInterface
 DEFINE_ENUM_WITH_STRING_CONVERSIONS (InterpolationMode,(First)(Mean)(Nearest)(Linear))
 
virtual Interpolator getInterpolator (Index elem, const Vector &point, DataBase::Mapping mapping=DataBase::Vertex, InterpolationMode mode=Linear) const =0
 
Interpolator getInterpolator (const Vector &point, DataBase::Mapping mapping=DataBase::Vertex, InterpolationMode mode=Linear) const
 

Static Public Attributes

static const Index MaxNumVertices = 4
 
static const Index MaxNumFaces = 6
 
static const int Dimensionality [NUM_TYPES] = {-1, 1, 2, 2, 3, 3, 3, 3, -1, -1, 0, 3}
 
static const int NumVertices [NUM_TYPES] = {0, 2, 3, 4, 4, 5, 6, 8, -1, -1, 1, -1}
 
static const int NumFaces [NUM_TYPES] = {0, 0, 1, 1, 4, 5, 5, 6, -1, -1, 0, -1}
 
static const unsigned FaceSizes [NUM_TYPES][MaxNumFaces]
 
static const unsigned FaceVertices [NUM_TYPES][MaxNumFaces][MaxNumVertices]
 

Additional Inherited Members

- Static Public Member Functions inherited from vistle::Coords
static Datacreate (const std::string &name="", Type id=UNKNOWN, const Index numVertices=0, const Meta &meta=Meta())
 
- Static Public Member Functions inherited from vistle::Object
static const char * toString (Type v)
 
static const char * typeName ()
 
static ObjectcreateEmpty (const std::string &name=std::string())
 
static std::shared_ptr< Objectas (std::shared_ptr< Object > ptr)
 
static std::shared_ptr< const Objectas (std::shared_ptr< const Object > ptr)
 
template<class Archive >
static ObjectloadObject (Archive &ar)
 
- Public Attributes inherited from vistle::Coords
shm_obj_ref< Normalsnormals
 
- Protected Member Functions inherited from vistle::Object
 Object (Data *data)
 
 Object ()
 
- Protected Member Functions inherited from vistle::ObjectInterfaceBase
virtual ~ObjectInterfaceBase ()
 
- Static Protected Member Functions inherited from vistle::Object
static void publish (const Data *d)
 
static Objectcreate (Data *)
 
- Protected Attributes inherited from vistle::Object
Datam_data
 

Member Typedef Documentation

◆ Base

Member Enumeration Documentation

◆ Type

Enumerator
GHOST_BIT 
CONVEX_BIT 
TYPE_MASK 
POLYHEDRON 
NONE 
BAR 
TRIANGLE 
QUAD 
TETRAHEDRON 
PYRAMID 
PRISM 
HEXAHEDRON 
VPOLYHEDRON 
POLYGON 
POINT 
CPOLYHEDRON 
NUM_TYPES 

Constructor & Destructor Documentation

◆ UnstructuredGrid()

vistle::UnstructuredGrid::UnstructuredGrid ( const Index  numElements,
const Index  numCorners,
const Index  numVertices,
const Meta meta = Meta() 
)

Member Function Documentation

◆ cellBounds()

std::pair< Vector, Vector > vistle::UnstructuredGrid::cellBounds ( Index  elem) const
overridevirtual

Implements vistle::GridInterface.

◆ cellCenter()

Vector vistle::UnstructuredGrid::cellCenter ( Index  elem) const
overridevirtual

Implements vistle::GridInterface.

◆ cellDiameter()

Scalar vistle::UnstructuredGrid::cellDiameter ( Index  elem) const
overridevirtual

Implements vistle::GridInterface.

◆ cellNumFaces()

Index vistle::UnstructuredGrid::cellNumFaces ( Index  elem) const
overridevirtual

Reimplemented from vistle::Indexed.

◆ cellVertices()

std::vector< Index > vistle::UnstructuredGrid::cellVertices ( Index  elem) const
overridevirtual

Reimplemented from vistle::Indexed.

◆ checkConvexity()

Index vistle::UnstructuredGrid::checkConvexity ( )

◆ elementBounds()

std::pair< Vector, Vector > vistle::UnstructuredGrid::elementBounds ( Index  elem) const
overridevirtual

Reimplemented from vistle::Indexed.

◆ exitDistance()

Scalar vistle::UnstructuredGrid::exitDistance ( Index  elem,
const Vector point,
const Vector dir 
) const
overridevirtual

Implements vistle::GridInterface.

◆ findCell()

Index vistle::UnstructuredGrid::findCell ( const Vector point,
Index  hint = InvalidIndex,
int  flags = NoFlags 
) const
overridevirtual

Implements vistle::GridInterface.

◆ getInterpolator()

GridInterface::Interpolator vistle::UnstructuredGrid::getInterpolator ( Index  elem,
const Vector point,
Mapping  mapping = Vertex,
InterpolationMode  mode = Linear 
) const
override

◆ getNeighborElements()

std::vector< Index > vistle::UnstructuredGrid::getNeighborElements ( Index  elem) const
overridevirtual

Implements vistle::GridInterface.

◆ inside()

bool vistle::UnstructuredGrid::inside ( Index  elem,
const Vector point 
) const
overridevirtual

Implements vistle::GridInterface.

◆ insideConvex()

bool vistle::UnstructuredGrid::insideConvex ( Index  elem,
const Vector point 
) const

◆ isConvex()

bool vistle::UnstructuredGrid::isConvex ( Index  elem) const

◆ isGhostCell()

bool vistle::UnstructuredGrid::isGhostCell ( Index  elem) const
overridevirtual

Implements vistle::GridInterface.

◆ resetElements()

void vistle::UnstructuredGrid::resetElements ( )
overridevirtual

Reimplemented from vistle::Indexed.

◆ tl() [1/2]

shm< Byte >::array & vistle::UnstructuredGrid::tl ( )
inline

◆ tl() [2/2]

const Byte * vistle::UnstructuredGrid::tl ( ) const
inline

Member Data Documentation

◆ Dimensionality

const int vistle::UnstructuredGrid::Dimensionality = {-1, 1, 2, 2, 3, 3, 3, 3, -1, -1, 0, 3}
static

◆ FaceSizes

const unsigned vistle::UnstructuredGrid::FaceSizes
static
Initial value:
= {
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{3, 0, 0, 0, 0, 0},
{4, 0, 0, 0, 0, 0},
{3, 3, 3, 3, 0, 0},
{4, 3, 3, 3, 0, 0},
{3, 4, 4, 4, 3, 0},
{4, 4, 4, 4, 4, 4},
}

◆ FaceVertices

const unsigned vistle::UnstructuredGrid::FaceVertices
static

◆ MaxNumFaces

const Index vistle::UnstructuredGrid::MaxNumFaces = 6
static

◆ MaxNumVertices

const Index vistle::UnstructuredGrid::MaxNumVertices = 4
static

◆ NumFaces

const int vistle::UnstructuredGrid::NumFaces = {0, 0, 1, 1, 4, 5, 5, 6, -1, -1, 0, -1}
static

◆ NumVertices

const int vistle::UnstructuredGrid::NumVertices = {0, 2, 3, 4, 4, 5, 6, 8, -1, -1, 1, -1}
static

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