![]() |
SENSEI
A frame work for generic in situ analytics
|
A collection of generally useful funcitons implementing common access patterns or operations on SVTK data structures. More...
Classes | |
| class | SVTKObjectFactory |
| Constructs SVTK objects from VTK objects enabling the consumption of the output of VTK filters and ParaView Catalyst. More... | |
| class | VTKObjectFactory |
| Constructs VTK objects from SVTK objects enabling the use of VTK filters and ParaView Catalyst on SVTK data. More... | |
Typedefs | |
| using | BinaryDatasetFunction = std::function< int(svtkDataSet *, svtkDataSet *)> |
| A callback that processes input and output datasets. More... | |
| using | DatasetFunction = std::function< int(svtkDataSet *)> |
| A callback that processes input and output datasets return 0 for success, > zero to stop without error, < zero to stop with error. More... | |
Functions | |
| template<typename SVTK_TT > | |
| SVTK_TT * | GetPointer (svtkDataArray *da) |
| given a svtkDataArray get a pointer to underlying data this handles access from SVTK's AOS and SOA layouts. More... | |
| SENSEI_EXPORT unsigned int | Size (int svtkt) |
| given a SVTK type enum returns the sizeof that type More... | |
| SENSEI_EXPORT int | IsLegacyDataObject (int code) |
| given a SVTK data object enum returns true if it a legacy object More... | |
| SENSEI_EXPORT svtkDataObject * | NewDataObject (int code) |
| givne a SVTK data object enum constructs an instance More... | |
| SENSEI_EXPORT int | GetAssociation (std::string assocStr, int &assoc) |
| returns the enum value given an association name. More... | |
| SENSEI_EXPORT const char * | GetAttributesName (int association) |
| returns the name of the association, point, cell or field More... | |
| SENSEI_EXPORT svtkFieldData * | GetAttributes (svtkDataSet *dobj, int association) |
| returns the container for the associations: svtkPointData, svtkCellData, or svtkFieldData More... | |
| SENSEI_EXPORT int | Apply (svtkDataObject *input, svtkDataObject *output, BinaryDatasetFunction &func) |
| Applies the function to leaves of the structurally equivalent input and output data objects. More... | |
| SENSEI_EXPORT int | Apply (svtkDataObject *dobj, DatasetFunction &func) |
| Applies the function to the data object. More... | |
| SENSEI_EXPORT int | SetGhostLayerMetadata (svtkDataObject *mesh, int nGhostCellLayers, int nGhostNodeLayers) |
| Store ghost layer metadata in the mesh. More... | |
| SENSEI_EXPORT int | GetGhostLayerMetadata (svtkDataObject *mesh, int &nGhostCellLayers, int &nGhostNodeLayers) |
| Retreive ghost layer metadata from the mesh. More... | |
| SENSEI_EXPORT int | GetMetadata (MPI_Comm comm, svtkDataSet *ds, MeshMetadataPtr) |
| SENSEI_EXPORT int | GetMetadata (MPI_Comm comm, svtkCompositeDataSet *cd, MeshMetadataPtr) |
| SENSEI_EXPORT svtkCompositeDataSetPtr | AsCompositeData (MPI_Comm comm, svtkDataObject *dobj, bool take=true) |
| Given a data object ensure that it is a composite data set If it already is, then the call is a no-op, if it is not then it is converted to a multiblock. More... | |
| bool | AMR (const MeshMetadataPtr &md) |
| Return true if the mesh or block type is AMR. More... | |
| bool | Structured (const MeshMetadataPtr &md) |
| Return true if the mesh or block type is logically Cartesian. More... | |
| bool | Polydata (const MeshMetadataPtr &md) |
| Return true if the mesh or block type is polydata. More... | |
| bool | Unstructured (const MeshMetadataPtr &md) |
| Return true if the mesh or block type is unstructured. More... | |
| bool | StretchedCartesian (const MeshMetadataPtr &md) |
| Return true if the mesh or block type is stretched Cartesian. More... | |
| bool | UniformCartesian (const MeshMetadataPtr &md) |
| Return true if the mesh or block type is uniform Cartesian. More... | |
| bool | LogicallyCartesian (const MeshMetadataPtr &md) |
| Return true if the mesh or block type is logically Cartesian. More... | |
| SENSEI_EXPORT int | WriteDomainDecomp (MPI_Comm comm, const sensei::MeshMetadataPtr &md, const std::string fileName) |
| SENSEI_EXPORT int | WriteVTK (const char *fn, long npx, long npy, long npz, double x0, double y0, double z0, double dx, double dy, double dz, const std::vector< svtkDataArray *> &cellData, const std::vector< svtkDataArray *> &pointData) |
| Write an svtkImageData data set to disk in a VTK compatible binary format. More... | |
| template<typename SVTK_TT , typename ARRAY_TT = svtkAOSDataArrayTemplate<SVTK_TT>> | |
| void | PackCells (ARRAY_TT *coIn, ARRAY_TT *ccIn, ARRAY_TT *coOut, ARRAY_TT *ccOut, size_t &coId, size_t &ccId) |
| Packs data from a cell array into another cell array keeping track of where to insert into the output array. More... | |
| template<typename SVTK_TT , typename ARRAY_TT = svtkAOSDataArrayTemplate<SVTK_TT>> | |
| void | UnpackCells (size_t nc, ARRAY_TT *coIn, ARRAY_TT *ccIn, svtkCellArray *caOut, size_t &coId, size_t &ccId) |
| deserializes a buffer made by SVTKUtils::PackCells. More... | |
A collection of generally useful funcitons implementing common access patterns or operations on SVTK data structures.
| using sensei::SVTKUtils::BinaryDatasetFunction = typedef std::function<int(svtkDataSet*, svtkDataSet*)> |
A callback that processes input and output datasets.
return 0 for success, > zero to stop without error, < zero to stop with error
| using sensei::SVTKUtils::DatasetFunction = typedef std::function<int(svtkDataSet*)> |
A callback that processes input and output datasets return 0 for success, > zero to stop without error, < zero to stop with error.
|
inline |
Return true if the mesh or block type is AMR.
| SENSEI_EXPORT int sensei::SVTKUtils::Apply | ( | svtkDataObject * | input, |
| svtkDataObject * | output, | ||
| BinaryDatasetFunction & | func | ||
| ) |
Applies the function to leaves of the structurally equivalent input and output data objects.
| SENSEI_EXPORT int sensei::SVTKUtils::Apply | ( | svtkDataObject * | dobj, |
| DatasetFunction & | func | ||
| ) |
Applies the function to the data object.
The function is called once for each leaf dataset
| SENSEI_EXPORT svtkCompositeDataSetPtr sensei::SVTKUtils::AsCompositeData | ( | MPI_Comm | comm, |
| svtkDataObject * | dobj, | ||
| bool | take = true |
||
| ) |
Given a data object ensure that it is a composite data set If it already is, then the call is a no-op, if it is not then it is converted to a multiblock.
The flag take determines if the smart pointer takes ownership or adds a reference.
| SENSEI_EXPORT int sensei::SVTKUtils::GetAssociation | ( | std::string | assocStr, |
| int & | assoc | ||
| ) |
returns the enum value given an association name.
where name can be one of: point, cell or, field
| SENSEI_EXPORT svtkFieldData* sensei::SVTKUtils::GetAttributes | ( | svtkDataSet * | dobj, |
| int | association | ||
| ) |
returns the container for the associations: svtkPointData, svtkCellData, or svtkFieldData
| SENSEI_EXPORT const char* sensei::SVTKUtils::GetAttributesName | ( | int | association | ) |
returns the name of the association, point, cell or field
| SENSEI_EXPORT int sensei::SVTKUtils::GetGhostLayerMetadata | ( | svtkDataObject * | mesh, |
| int & | nGhostCellLayers, | ||
| int & | nGhostNodeLayers | ||
| ) |
Retreive ghost layer metadata from the mesh.
returns non-zero if no such metadata is found.
| SVTK_TT* sensei::SVTKUtils::GetPointer | ( | svtkDataArray * | da | ) |
given a svtkDataArray get a pointer to underlying data this handles access from SVTK's AOS and SOA layouts.
For SOA layout only single component arrays should be passed.
| SENSEI_EXPORT int sensei::SVTKUtils::IsLegacyDataObject | ( | int | code | ) |
given a SVTK data object enum returns true if it a legacy object
|
inline |
Return true if the mesh or block type is logically Cartesian.
| SENSEI_EXPORT svtkDataObject* sensei::SVTKUtils::NewDataObject | ( | int | code | ) |
givne a SVTK data object enum constructs an instance
| void sensei::SVTKUtils::PackCells | ( | ARRAY_TT * | coIn, |
| ARRAY_TT * | ccIn, | ||
| ARRAY_TT * | coOut, | ||
| ARRAY_TT * | ccOut, | ||
| size_t & | coId, | ||
| size_t & | ccId | ||
| ) |
Packs data from a cell array into another cell array keeping track of where to insert into the output array.
Use it to serialze verys, lines, polys strips form a polytdata into a single cell array for transport
|
inline |
Return true if the mesh or block type is polydata.
| SENSEI_EXPORT int sensei::SVTKUtils::SetGhostLayerMetadata | ( | svtkDataObject * | mesh, |
| int | nGhostCellLayers, | ||
| int | nGhostNodeLayers | ||
| ) |
Store ghost layer metadata in the mesh.
| SENSEI_EXPORT unsigned int sensei::SVTKUtils::Size | ( | int | svtkt | ) |
given a SVTK type enum returns the sizeof that type
|
inline |
Return true if the mesh or block type is stretched Cartesian.
|
inline |
Return true if the mesh or block type is logically Cartesian.
|
inline |
Return true if the mesh or block type is uniform Cartesian.
| void sensei::SVTKUtils::UnpackCells | ( | size_t | nc, |
| ARRAY_TT * | coIn, | ||
| ARRAY_TT * | ccIn, | ||
| svtkCellArray * | caOut, | ||
| size_t & | coId, | ||
| size_t & | ccId | ||
| ) |
deserializes a buffer made by SVTKUtils::PackCells.
|
inline |
Return true if the mesh or block type is unstructured.
| SENSEI_EXPORT int sensei::SVTKUtils::WriteVTK | ( | const char * | fn, |
| long | npx, | ||
| long | npy, | ||
| long | npz, | ||
| double | x0, | ||
| double | y0, | ||
| double | z0, | ||
| double | dx, | ||
| double | dy, | ||
| double | dz, | ||
| const std::vector< svtkDataArray *> & | cellData, | ||
| const std::vector< svtkDataArray *> & | pointData | ||
| ) |
Write an svtkImageData data set to disk in a VTK compatible binary format.
This format can be read by ParaView and VisIt amoung others. This implementation does not depend on VTK iteself and can be used when VTK is not present in the build.
| [in] | fn | the name of the file to write |
| [in] | npx | the number of points in the x-dimension |
| [in] | npy | the number of points in the y-dimension |
| [in] | npz | the number of points in the z-dimension |
| [in] | x0 | the origin in the x-dimension |
| [in] | y0 | the origin in the y-dimension |
| [in] | z0 | the origin in the x-dimension |
| [in] | dx | the grid spacing in the x-dimension |
| [in] | dy | the grid spacing in the y-dimension |
| [in] | dz | the grid spacing in the z-dimension |
| [in] | cellData | a vector of cell centered arrays to write |
| [in] | pointData | a vector of point centered arrays to write |