SENSEI
A frame work for generic in situ analytics
|
A container for capturing metadata describing a mesh. More...
#include <MeshMetadata.h>
Public Member Functions | |
sensei::MeshMetadataPtr | NewCopy () |
copy the meatdata in a new instance More... | |
int | ToStream (sensei::BinaryStream &str) const |
serialize/deserialize for communication and/or I/O More... | |
int | FromStream (sensei::BinaryStream &str) |
serialize/deserialize for communication and/or I/O More... | |
int | ToStream (ostream &str) const |
serialize/deserialize for communication and/or I/O More... | |
int | Validate (MPI_Comm comm, const sensei::MeshMetadataFlags &requiredFlags=0xffffffffffffffff) |
return true if the Flags match the arrays. More... | |
int | GlobalizeView (MPI_Comm) |
construct a global view of the metadata. More... | |
int | ClearBlockInfo () |
removes all block level information from the instance. More... | |
int | CopyBlockInfo (const sensei::MeshMetadataPtr &other, int bid) |
appends block level information of block bid from other. More... | |
int | ClearArrayInfo () |
removes all array metadata from the instance More... | |
int | CopyArrayInfo (const sensei::MeshMetadataPtr &other, const std::string &arrayName) |
appends metadata for the named array to the instance More... | |
Static Public Member Functions | |
static sensei::MeshMetadataPtr | New () |
allocate a new instance More... | |
static sensei::MeshMetadataPtr | New (const MeshMetadataFlags flags) |
allocate a new instance intialize the flags More... | |
Public Attributes | |
bool | GlobalView |
std::string | MeshName |
name of mesh (all) More... | |
int | MeshType |
container mesh type. see svtkType.h (all) More... | |
int | BlockType |
block mesh type. see svtkType.h (all) More... | |
int | NumBlocks |
global number of blocks (all) More... | |
std::vector< int > | NumBlocksLocal |
number of blocks on each rank (all) More... | |
std::array< int, 6 > | Extent |
global cell index space extent (Cartesian, AMR, optional) More... | |
std::array< double, 6 > | Bounds |
global bounding box (all, optional) More... | |
int | CoordinateType |
type enum of point data (unstructured, optional) More... | |
long | NumPoints |
total number of points in all blocks (all, optional) More... | |
long | NumCells |
total number of cells in all blocks (all, optional) More... | |
long | CellArraySize |
total cell array size in all blocks (unstructured, optional) More... | |
int | CellArrayType |
element type of the cell array (unstructured, optional) More... | |
int | NumArrays |
number of arrays (all) More... | |
int | NumGhostCells |
number of ghost cell layers (all) More... | |
int | NumGhostNodes |
number of ghost node layers (all) More... | |
int | NumLevels |
number of AMR levels (AMR) More... | |
int | StaticMesh |
non zero if the mesh does not change in time (all) More... | |
std::vector< std::string > | ArrayName |
name of each data array (all) More... | |
std::vector< int > | ArrayCentering |
centering of each data array (all) More... | |
std::vector< int > | ArrayComponents |
number of components of each array (all) More... | |
std::vector< int > | ArrayType |
type enum of each data array (all) More... | |
std::vector< std::array< double, 2 > > | ArrayRange |
global min,max of each array (all, optional) More... | |
std::vector< int > | BlockOwner |
rank where each block resides (all, optional) More... | |
std::vector< int > | BlockIds |
global id of each block (all, optional) More... | |
std::vector< long > | BlockNumPoints |
number of points for each block (all, optional) More... | |
std::vector< long > | BlockNumCells |
number of cells for each block (all, optional) More... | |
std::vector< long > | BlockCellArraySize |
cell array size for each block (unstructured, optional) More... | |
std::vector< std::array< int, 6 > > | BlockExtents |
std::vector< std::array< double, 6 > > | BlockBounds |
std::vector< std::vector< std::array< double, 2 > > > | BlockArrayRange |
std::vector< std::array< int, 3 > > | RefRatio |
std::vector< int > | BlocksPerLevel |
std::vector< int > | BlockLevel |
std::array< int, 3 > | PeriodicBoundary |
sensei::MeshMetadataFlags | Flags |
A container for capturing metadata describing a mesh.
int sensei::MeshMetadata::ClearArrayInfo | ( | ) |
removes all array metadata from the instance
int sensei::MeshMetadata::ClearBlockInfo | ( | ) |
removes all block level information from the instance.
initialize the related dataset level information.
int sensei::MeshMetadata::CopyArrayInfo | ( | const sensei::MeshMetadataPtr & | other, |
const std::string & | arrayName | ||
) |
appends metadata for the named array to the instance
int sensei::MeshMetadata::CopyBlockInfo | ( | const sensei::MeshMetadataPtr & | other, |
int | bid | ||
) |
appends block level information of block bid from other.
int sensei::MeshMetadata::FromStream | ( | sensei::BinaryStream & | str | ) |
serialize/deserialize for communication and/or I/O
int sensei::MeshMetadata::GlobalizeView | ( | MPI_Comm | ) |
construct a global view of the metadata.
return 0 if successful. this call uses MPI collectives
|
inlinestatic |
allocate a new instance
|
inlinestatic |
allocate a new instance intialize the flags
|
inline |
copy the meatdata in a new instance
int sensei::MeshMetadata::ToStream | ( | sensei::BinaryStream & | str | ) | const |
serialize/deserialize for communication and/or I/O
int sensei::MeshMetadata::ToStream | ( | ostream & | str | ) | const |
serialize/deserialize for communication and/or I/O
int sensei::MeshMetadata::Validate | ( | MPI_Comm | comm, |
const sensei::MeshMetadataFlags & | requiredFlags = 0xffffffffffffffff |
||
) |
return true if the Flags match the arrays.
will return false if the a flag is set and a coresponding array is empty. an error message will be printed naming the missing the array this method tries to be context sensative. for instance if the extents flag was set but the simulation reports unstructured data no error will be issued. Optionally a set of required flags may be specified. Only errors in fields with corresponding bits set are reported. This lets you have optional fields and handle the error on your own. Finally some convenience functionality is packaged here for instance global extents and bounds are automatically generated if requested but not provided.
std::vector<int> sensei::MeshMetadata::ArrayCentering |
centering of each data array (all)
std::vector<int> sensei::MeshMetadata::ArrayComponents |
number of components of each array (all)
std::vector<std::string> sensei::MeshMetadata::ArrayName |
name of each data array (all)
std::vector<std::array<double,2> > sensei::MeshMetadata::ArrayRange |
global min,max of each array (all, optional)
std::vector<int> sensei::MeshMetadata::ArrayType |
type enum of each data array (all)
std::vector<long> sensei::MeshMetadata::BlockCellArraySize |
cell array size for each block (unstructured, optional)
std::vector<int> sensei::MeshMetadata::BlockIds |
global id of each block (all, optional)
note: for AMR BlockNumPoints and BlockNumCells are always global
std::vector<long> sensei::MeshMetadata::BlockNumCells |
number of cells for each block (all, optional)
std::vector<long> sensei::MeshMetadata::BlockNumPoints |
number of points for each block (all, optional)
std::vector<int> sensei::MeshMetadata::BlockOwner |
rank where each block resides (all, optional)
int sensei::MeshMetadata::BlockType |
block mesh type. see svtkType.h (all)
std::array<double,6> sensei::MeshMetadata::Bounds |
global bounding box (all, optional)
long sensei::MeshMetadata::CellArraySize |
total cell array size in all blocks (unstructured, optional)
int sensei::MeshMetadata::CellArrayType |
element type of the cell array (unstructured, optional)
int sensei::MeshMetadata::CoordinateType |
type enum of point data (unstructured, optional)
std::array<int,6> sensei::MeshMetadata::Extent |
global cell index space extent (Cartesian, AMR, optional)
std::string sensei::MeshMetadata::MeshName |
name of mesh (all)
int sensei::MeshMetadata::MeshType |
container mesh type. see svtkType.h (all)
int sensei::MeshMetadata::NumArrays |
number of arrays (all)
int sensei::MeshMetadata::NumBlocks |
global number of blocks (all)
std::vector<int> sensei::MeshMetadata::NumBlocksLocal |
number of blocks on each rank (all)
long sensei::MeshMetadata::NumCells |
total number of cells in all blocks (all, optional)
int sensei::MeshMetadata::NumGhostCells |
number of ghost cell layers (all)
int sensei::MeshMetadata::NumGhostNodes |
number of ghost node layers (all)
int sensei::MeshMetadata::NumLevels |
number of AMR levels (AMR)
long sensei::MeshMetadata::NumPoints |
total number of points in all blocks (all, optional)
int sensei::MeshMetadata::StaticMesh |
non zero if the mesh does not change in time (all)