TTK
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ttk::CellArray Class Reference

CellArray generic array of cells More...

#include <CellArray_legacy.h>

Public Member Functions

 CellArray (const LongSimplexId *cellArray, const LongSimplexId nbCells, const unsigned char dimension)
 
virtual ~CellArray ()
 
void setOwnership (const bool o)
 Deal with data ownership.
 
unsigned char getDimension () const
 Retrieve the dimension.
 
LongSimplexId getNbCells () const
 Get the number of cells in the array.
 
SimplexId getCellVertexNumber (const LongSimplexId cellId) const
 
LongSimplexId getCellVertex (const LongSimplexId cellId, const SimplexId localVertId) const
 
 CellArray (const LongSimplexId *connectivity, const LongSimplexId *offset, const LongSimplexId nbCells)
 
virtual ~CellArray ()
 
void setOwnership (const bool o)
 Deal with data ownership.
 
LongSimplexId getNbCells () const
 Get the number of cells in the array.
 
SimplexId getCellVertexNumber (const LongSimplexId cellId) const
 
LongSimplexId getCellVertex (const LongSimplexId cellId, const SimplexId localVertId) const
 

Static Public Member Functions

static void TranslateToFlatLayout (std::vector< LongSimplexId > &connectivity, std::vector< LongSimplexId > &offset, LongSimplexId *&singleArray)
 

Protected Attributes

const LongSimplexIdcellArray_
 
const LongSimplexId nbCells_
 
const unsigned char dimension_
 
bool ownerShip_ = false
 
const LongSimplexIdconnectivity_
 
const LongSimplexIdoffset_
 

Detailed Description

CellArray generic array of cells

Author
Charles Gueunet charl.nosp@m.es.g.nosp@m.ueune.nosp@m.t@ki.nosp@m.tware.nosp@m..com
Date
March 2020.

CellArray is a generic container that allows to deal with various cell layouts in memory

See also
Triangulation
ttkTriangulation This version assumes the cell data to be given as a unique array. This array contains for each cell the number of points in the cell then the point ids of the cell. See VTK 8.2 vtkCellArray documentation for more details about this layout. This file will be installed by CMake as CellArray.h if the TTK_CELL_ARRAY_LAYOUT is set to SingleArray
Author
Charles Gueunet charl.nosp@m.es.g.nosp@m.ueune.nosp@m.t@ki.nosp@m.tware.nosp@m..com
Date
March 2020.

CellArray is a generic container that allows to deal with various cell layouts in memory

See also
Triangulation
ttkTriangulation This version assumes the cell data to be given by two arrays:
  • Connectivity, containing the list of point ids of each cells
  • Offsets, containing the beginning and end position of each cell in the Connectivity array See VTK 9 vtkCellArray documentation for more details about this layout. This class is more a view on data than a complete container. It does not support memory modification operations. This file will be installed by CMake as CellArray.h if the TTK_CELL_ARRAY_LAYOUT is set to OffsetAndConnectivity

Definition at line 31 of file CellArray_legacy.h.

Constructor & Destructor Documentation

◆ CellArray() [1/2]

ttk::CellArray::CellArray ( const LongSimplexId cellArray,
const LongSimplexId  nbCells,
const unsigned char  dimension 
)
inline

Definition at line 33 of file CellArray_legacy.h.

◆ ~CellArray() [1/2]

virtual ttk::CellArray::~CellArray ( )
inlinevirtual

Definition at line 39 of file CellArray_legacy.h.

◆ CellArray() [2/2]

ttk::CellArray::CellArray ( const LongSimplexId connectivity,
const LongSimplexId offset,
const LongSimplexId  nbCells 
)
inline

Definition at line 36 of file CellArray_new.h.

◆ ~CellArray() [2/2]

virtual ttk::CellArray::~CellArray ( )
inlinevirtual

Definition at line 42 of file CellArray_new.h.

Member Function Documentation

◆ getCellVertex() [1/2]

LongSimplexId ttk::CellArray::getCellVertex ( const LongSimplexId  cellId,
const SimplexId  localVertId 
) const
inline

Get the vertex id of the "localVertId"'nt vertex of the cell.

Parameters
cellIdglobal id of the cell
localVertIdid of the vertex local to the cell, usually lower than 4 in 3D and lower than 3 in 2D.
Returns
the global id of the vertex

Definition at line 78 of file CellArray_legacy.h.

◆ getCellVertex() [2/2]

LongSimplexId ttk::CellArray::getCellVertex ( const LongSimplexId  cellId,
const SimplexId  localVertId 
) const
inline

Get the vertex id of the "localVertId"'nt vertex of the cell. Can deal with heterogeneous meshes

Parameters
cellIdglobal id of the cell
localVertIdid of the vertex local to the cell
Returns
the global id of the vertex

Definition at line 78 of file CellArray_new.h.

◆ getCellVertexNumber() [1/2]

SimplexId ttk::CellArray::getCellVertexNumber ( const LongSimplexId  cellId) const
inline

Get the number of vertices in the cell with the id: cellid

Parameters
cellIdglobal id of the cell
Returns
dimension + 1 for now as we only accept regular meshes

Definition at line 63 of file CellArray_legacy.h.

◆ getCellVertexNumber() [2/2]

SimplexId ttk::CellArray::getCellVertexNumber ( const LongSimplexId  cellId) const
inline

Get the number of vertices in the cell with the id: cellid Can deal with heterogeneous meshes

Parameters
cellIdglobal id of the cell
Returns
the offset difference between this cell and next.

Definition at line 63 of file CellArray_new.h.

◆ getDimension()

unsigned char ttk::CellArray::getDimension ( ) const
inline

Retrieve the dimension.

Definition at line 51 of file CellArray_legacy.h.

◆ getNbCells() [1/2]

LongSimplexId ttk::CellArray::getNbCells ( ) const
inline

Get the number of cells in the array.

Definition at line 56 of file CellArray_legacy.h.

◆ getNbCells() [2/2]

LongSimplexId ttk::CellArray::getNbCells ( ) const
inline

Get the number of cells in the array.

Definition at line 55 of file CellArray_new.h.

◆ setOwnership() [1/2]

void ttk::CellArray::setOwnership ( const bool  o)
inline

Deal with data ownership.

Definition at line 46 of file CellArray_legacy.h.

◆ setOwnership() [2/2]

void ttk::CellArray::setOwnership ( const bool  o)
inline

Deal with data ownership.

Definition at line 50 of file CellArray_new.h.

◆ TranslateToFlatLayout()

static void ttk::CellArray::TranslateToFlatLayout ( std::vector< LongSimplexId > &  connectivity,
std::vector< LongSimplexId > &  offset,
LongSimplexId *&  singleArray 
)
static

Member Data Documentation

◆ cellArray_

const LongSimplexId* ttk::CellArray::cellArray_
protected

Definition at line 96 of file CellArray_legacy.h.

◆ connectivity_

const LongSimplexId* ttk::CellArray::connectivity_
protected

Definition at line 91 of file CellArray_new.h.

◆ dimension_

const unsigned char ttk::CellArray::dimension_
protected

Definition at line 98 of file CellArray_legacy.h.

◆ nbCells_

const LongSimplexId ttk::CellArray::nbCells_
protected

Definition at line 97 of file CellArray_legacy.h.

◆ offset_

const LongSimplexId* ttk::CellArray::offset_
protected

Definition at line 92 of file CellArray_new.h.

◆ ownerShip_

bool ttk::CellArray::ownerShip_ = false
protected

Definition at line 99 of file CellArray_legacy.h.


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