Commit 4466e61c authored by mdurant's avatar mdurant
Browse files

Adding an instance counter to the avtVsFileFormat object, and adding it to all...

Adding an instance counter to the avtVsFileFormat object, and adding it to all debugging messages at that level, to facilitate debugging when there are multiple copies of the database reader active.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@16210 18c085ea-50e0-402c-830e-de6fd14e8384
parent e09cc800
......@@ -82,6 +82,9 @@
#define __CLASS__ "avtVsFileFormat::"
int avtVsFileFormat::instanceCounter = 0;
// *****************************************************************************
// Method: avtVsFileFormat::avtVsFileFormat
//
......@@ -98,11 +101,13 @@ avtVsFileFormat::avtVsFileFormat(const char* filename,
avtSTMDFileFormat(&filename, 1), dataFileName(filename),
processDataSelections(false), haveReadWholeData(true)
{
instanceCounter++;
VsLog::initialize(DebugStream::Stream3(),
DebugStream::Stream4(),
DebugStream::Stream5());
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "entering" << std::endl;
......@@ -114,7 +119,7 @@ avtVsFileFormat::avtVsFileFormat(const char* filename,
}
}
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "VizSchema reader will "
<< (processDataSelections? "" : "not ")
<< "process data selections" << std::endl;
......@@ -130,11 +135,11 @@ avtVsFileFormat::avtVsFileFormat(const char* filename,
//check types
if (isFloatType(H5T_NATIVE_FLOAT)) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "float type checks out ok." << std::endl;
} else {
std::ostringstream msg;
msg << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
msg << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "ERROR - H5T_NATIVE_FLOAT not recognized as a float.";
VsLog::debugLog() << msg.str() << std::endl;
EXCEPTION1(InvalidDBTypeException, msg.str().c_str());
......@@ -142,11 +147,11 @@ avtVsFileFormat::avtVsFileFormat(const char* filename,
//check types
if (isDoubleType(H5T_NATIVE_DOUBLE)) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "double type checks out ok." << std::endl;
} else {
std::ostringstream msg;
msg << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
msg << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "ERROR - H5T_NATIVE_DOUBLE not recognized as a double.";
VsLog::debugLog() << msg.str() << std::endl;
EXCEPTION1(InvalidDBTypeException, msg.str().c_str());
......@@ -156,7 +161,7 @@ avtVsFileFormat::avtVsFileFormat(const char* filename,
if (err < 0) {
std::ostringstream msg;
msg << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
msg << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "HDF5 version mismatch. Vs reader built with "
<< H5_VERS_INFO << ".";
VsLog::debugLog() << msg.str() << std::endl;
......@@ -168,7 +173,7 @@ avtVsFileFormat::avtVsFileFormat(const char* filename,
//But now do it on demand in 'populateDatabaseMetaData'
//To minimize I/O
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "exiting" << std::endl;
}
......@@ -187,7 +192,7 @@ avtVsFileFormat::avtVsFileFormat(const char* filename,
avtVsFileFormat::~avtVsFileFormat()
{
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "entering" << std::endl;
if (reader != NULL) {
......@@ -200,7 +205,7 @@ avtVsFileFormat::~avtVsFileFormat()
registry = NULL;
}
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "exiting" << std::endl;
}
......@@ -368,7 +373,7 @@ avtVsFileFormat::ProcessDataSelections(int *mins, int *maxs, int *strides)
vtkDataSet* avtVsFileFormat::GetMesh(int domain, const char* name)
{
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Entering function." << std::endl;
LoadData();
......@@ -383,7 +388,7 @@ vtkDataSet* avtVsFileFormat::GetMesh(int domain, const char* name)
if( haveDataSelections = ProcessDataSelections(mins, maxs, strides) )
{
VsLog::debugLog()
<< __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
<< __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Have a logical nodal selection for mesh "
<< "(" << mins[0] << "," << maxs[0] << " stride " << strides[0] << ") "
<< "(" << mins[1] << "," << maxs[1] << " stride " << strides[1] << ") "
......@@ -403,7 +408,7 @@ vtkDataSet* avtVsFileFormat::GetMesh(int domain, const char* name)
// coreMesh and proceed normally
// Check for MD mesh
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Looking for MD mesh with name "
<< meshName << std::endl;
......@@ -412,36 +417,36 @@ vtkDataSet* avtVsFileFormat::GetMesh(int domain, const char* name)
// Found an MD mesh with this name, try to load the mesh data from it
if (mdMeshMeta != NULL) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Found MD mesh with that name."
<< std::endl;
meshName = mdMeshMeta->getNameForBlock(domain);
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Request for md mesh was filtered to regular mesh: "
<< meshName << std::endl;
meta = mdMeshMeta->getBlock(domain);
} else {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "No MD mesh with that name."
<< std::endl;
}
// Did we succeed in loading mesh data from MD mesh?
if (meta == NULL) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Trying to find regular mesh named: "
<< meshName << std::endl;
meta = registry->getMesh(meshName);
}
if (meta != NULL) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Found mesh named: " << meshName << std::endl;
// Uniform Mesh
if (meta->isUniformMesh()) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Trying to load & return uniform mesh" << std::endl;
return getUniformMesh(static_cast<VsUniformMesh*>(meta),
......@@ -450,7 +455,7 @@ vtkDataSet* avtVsFileFormat::GetMesh(int domain, const char* name)
// Rectilinear Mesh
if (meta->isRectilinearMesh()) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Trying to load & return rectilinear mesh."
<< std::endl;
return getRectilinearMesh(static_cast<VsRectilinearMesh*>(meta),
......@@ -459,7 +464,7 @@ vtkDataSet* avtVsFileFormat::GetMesh(int domain, const char* name)
// Structured Mesh
if (meta->isStructuredMesh()) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Trying to load & return structured mesh" << std::endl;
return getStructuredMesh(static_cast<VsStructuredMesh*>(meta),
haveDataSelections, mins, maxs, strides);
......@@ -469,7 +474,7 @@ vtkDataSet* avtVsFileFormat::GetMesh(int domain, const char* name)
// Don't know how to decompose any other type of mesh -> load it
// on proc 0 only
if (PAR_Rank() > 0) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "In parallel mode on processor " << PAR_Rank
<< " and mesh is not uniform. "
<< "Returning NULL, mesh will be loaded on processor 0 only."
......@@ -480,7 +485,7 @@ vtkDataSet* avtVsFileFormat::GetMesh(int domain, const char* name)
// Unstructured Mesh
if (meta->isUnstructuredMesh()) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Trying to load & return unstructured mesh" << std::endl;
return getUnstructuredMesh(static_cast<VsUnstructuredMesh*>(meta),
......@@ -488,21 +493,21 @@ vtkDataSet* avtVsFileFormat::GetMesh(int domain, const char* name)
}
// At this point we don't know what kind of mesh it is.
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Mesh has unknown type: " << meta->getKind()
<< ". Returning NULL." << std::endl;
return NULL;
}
// Variable with mesh
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Looking for Variable With Mesh with this name." << std::endl;
VsVariableWithMesh* vmMeta = registry->getVariableWithMesh(name);
if (vmMeta != NULL)
{
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Found Variable With Mesh. Loading data and returning." << std::endl;
return getPointMesh(vmMeta,
......@@ -510,20 +515,20 @@ vtkDataSet* avtVsFileFormat::GetMesh(int domain, const char* name)
}
// Curve
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Looking for Curve with this name." << std::endl;
vtkDataArray* foundCurve = this->GetVar(domain, name);
if (foundCurve != NULL)
{
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Trying to load & return curve." << std::endl;
return getCurve(domain, name);
}
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Failed to load data for name and domain number. "
<< "Returning NULL." << std::endl;
return NULL;
......@@ -546,7 +551,7 @@ vtkDataSet* avtVsFileFormat::getUniformMesh(VsUniformMesh* uniformMesh,
bool haveDataSelections,
int* mins, int* maxs, int* strides)
{
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Entering function." << std::endl;
LoadData();
......@@ -556,7 +561,7 @@ vtkDataSet* avtVsFileFormat::getUniformMesh(VsUniformMesh* uniformMesh,
if (numCells.size() < 0) {
std::ostringstream msg;
msg << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
msg << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Could not get dimensions of the uniform mesh.";
VsLog::debugLog() << msg.str() << std::endl;
throw std::out_of_range(msg.str().c_str());
......@@ -565,7 +570,7 @@ vtkDataSet* avtVsFileFormat::getUniformMesh(VsUniformMesh* uniformMesh,
size_t numTopologicalDims = uniformMesh->getNumTopologicalDims();
if (numTopologicalDims > 3) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Error: numTopologicalDims of the mesh is larger than 3. "
<< "Returning NULL." << std::endl;
return NULL;
......@@ -574,7 +579,7 @@ vtkDataSet* avtVsFileFormat::getUniformMesh(VsUniformMesh* uniformMesh,
int numSpatialDims = uniformMesh->getNumSpatialDims();
if (numSpatialDims > 3) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Error: numSpatialDims data is larger than 3. "
<< "Returning NULL." << std::endl;
return NULL;
......@@ -585,7 +590,7 @@ vtkDataSet* avtVsFileFormat::getUniformMesh(VsUniformMesh* uniformMesh,
// equal to the numTopologicalDims.
if( numTopologicalDims > numSpatialDims )
{
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Error: The numTopologicalDims ("
<< numTopologicalDims
<< ") is greater than numSpatialDims ("
......@@ -603,30 +608,30 @@ vtkDataSet* avtVsFileFormat::getUniformMesh(VsUniformMesh* uniformMesh,
if (!isDouble && !isFloat)
{
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Error: hdf5 mesh data type not handled: "
<< meshDataType << "Returning NULL." << std::endl;
return NULL;
}
// startCell
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Loading optional startCells attribute." << std::endl;
std::vector<int> startCell;
herr_t err = uniformMesh->getStartCell(&startCell);
if (err < 0) {
VsLog::warningLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::warningLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Uniform mesh does not have starting cell position."
<< std::endl;
} else {
// Adjust the box by startCell
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Adjusting numCells by startCells." << std::endl;
for (size_t i = 0; i < numTopologicalDims; ++i)
numCells[i] -= startCell[i];
}
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Determining size of point arrays." << std::endl;
......@@ -656,7 +661,7 @@ vtkDataSet* avtVsFileFormat::getUniformMesh(VsUniformMesh* uniformMesh,
haveDataSelections = 1;
#endif
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Getting bounds for mesh." << std::endl;
std::vector<float> lowerBounds;
......@@ -667,7 +672,7 @@ vtkDataSet* avtVsFileFormat::getUniformMesh(VsUniformMesh* uniformMesh,
// Storage for mesh points in VisIt are spatially 3D. So create 3
// coordinate arrays and fill in zero for the others.
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Creating coordinate arrays." << std::endl;
std::vector<vtkDataArray*> coords(vsdim);
......@@ -695,7 +700,7 @@ vtkDataSet* avtVsFileFormat::getUniformMesh(VsUniformMesh* uniformMesh,
j += strides[i];
}
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Dumped " << cc << " nodes to the rectilinear grid."
<< std::endl;
}
......@@ -709,7 +714,7 @@ vtkDataSet* avtVsFileFormat::getUniformMesh(VsUniformMesh* uniformMesh,
}
// Create vtkRectilinearGrid
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Creating rectilinear grid." << std::endl;
vtkRectilinearGrid* rgrid = vtkRectilinearGrid::New();
rgrid->SetDimensions(&(gdims[0]));
......@@ -723,7 +728,7 @@ vtkDataSet* avtVsFileFormat::getUniformMesh(VsUniformMesh* uniformMesh,
for (size_t i = 0; i<vsdim; ++i)
coords[i]->Delete();
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Returning data." << std::endl;
return rgrid;
}
......@@ -749,7 +754,7 @@ avtVsFileFormat::getRectilinearMesh(VsRectilinearMesh* rectilinearMesh,
// TODO - make "cleanupAndReturnNull" label, and do a "go to"
// instead of just returning NULL all the time.
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Entering function." << std::endl;
LoadData();
......@@ -759,7 +764,7 @@ avtVsFileFormat::getRectilinearMesh(VsRectilinearMesh* rectilinearMesh,
if (numNodes.size() < 0) {
std::ostringstream msg;
msg << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
msg << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Could not get dimensions of the rectilinear mesh.";
VsLog::debugLog() << msg.str() << std::endl;
throw std::out_of_range(msg.str().c_str());
......@@ -768,7 +773,7 @@ avtVsFileFormat::getRectilinearMesh(VsRectilinearMesh* rectilinearMesh,
size_t numTopologicalDims = rectilinearMesh->getNumTopologicalDims();
if (numTopologicalDims > 3) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Error: numTopologicalDims of data is larger than 3. "
<< "Returning NULL." << std::endl;
return NULL;
......@@ -777,7 +782,7 @@ avtVsFileFormat::getRectilinearMesh(VsRectilinearMesh* rectilinearMesh,
int numSpatialDims = rectilinearMesh->getNumSpatialDims();
if (numSpatialDims > 3) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Error: numSpatialDims data is larger than 3. "
<< "Returning NULL." << std::endl;
return NULL;
......@@ -792,13 +797,13 @@ avtVsFileFormat::getRectilinearMesh(VsRectilinearMesh* rectilinearMesh,
if (!isDouble && !isFloat)
{
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Error: hdf5 mesh data type not handled: "
<< meshDataType << "Returning NULL." << std::endl;
return NULL;
}
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Determining size of point arrays." << std::endl;
// Storage for meshes in VisIt, which is a vtkRectilinearGrid which
......@@ -826,12 +831,12 @@ avtVsFileFormat::getRectilinearMesh(VsRectilinearMesh* rectilinearMesh,
double* dblDataPtr;
float* fltDataPtr;
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Loading data for axis " << i << std::endl;
VsH5Dataset* axisData = rectilinearMesh->getAxisDataset(i);
if (axisData == NULL) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Axis " << i
<< " data not found. Returning NULL." << std::endl;
return NULL;
......@@ -848,14 +853,14 @@ avtVsFileFormat::getRectilinearMesh(VsRectilinearMesh* rectilinearMesh,
fltDataPtr = new float[numNodes[i]];
dataPtr = fltDataPtr;
} else {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Unknown axis data type: "
<< axisDataType << std::endl;
return NULL;
}
if (!dataPtr) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Allocation failed, pointer is NULL."
<< "Returning NULL." << std::endl;
return NULL;
......@@ -868,7 +873,7 @@ avtVsFileFormat::getRectilinearMesh(VsRectilinearMesh* rectilinearMesh,
herr_t err = reader->getDataSet(axisData, dataPtr);
if (err < 0) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "GetDataSet returned error: " << err << " "
<< "Returning NULL." << std::endl;
......@@ -882,7 +887,7 @@ avtVsFileFormat::getRectilinearMesh(VsRectilinearMesh* rectilinearMesh,
// Storage for mesh points in VisIt are spatially 3D. So create 3
// coordinate arrays and fill in zero for the others.
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Creating coordinate arrays." << std::endl;
// The mesh data type will the highest precision of all of the
......@@ -942,7 +947,7 @@ avtVsFileFormat::getRectilinearMesh(VsRectilinearMesh* rectilinearMesh,
delete [] fltDataPtr;
}
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Dumped " << cc << " nodes to the rectilinear grid."
<< std::endl;
}
......@@ -958,7 +963,7 @@ avtVsFileFormat::getRectilinearMesh(VsRectilinearMesh* rectilinearMesh,
}
// Create vtkRectilinearGrid
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Creating rectilinear grid." << std::endl;
vtkRectilinearGrid* rgrid = vtkRectilinearGrid::New();
rgrid->SetDimensions(&(gdims[0]));
......@@ -973,7 +978,7 @@ avtVsFileFormat::getRectilinearMesh(VsRectilinearMesh* rectilinearMesh,
coords[i]->Delete();
}
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Returning data." << std::endl;
return rgrid;
}
......@@ -999,7 +1004,7 @@ vtkDataSet* avtVsFileFormat::getStructuredMesh(VsStructuredMesh* structuredMesh,
// TODO - make "cleanupAndReturnNull" label, and do a "go to"
// instead of just returning NULL all the time.
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Entering function." << std::endl;
LoadData();
......@@ -1011,7 +1016,7 @@ vtkDataSet* avtVsFileFormat::getStructuredMesh(VsStructuredMesh* structuredMesh,
registry->getDataset(structuredMesh->getFullName());
if (pointsDataset == NULL) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Component '"
<< structuredMesh->getFullName()
<< "' not found. Returning NULL." << std::endl;
......@@ -1019,7 +1024,7 @@ vtkDataSet* avtVsFileFormat::getStructuredMesh(VsStructuredMesh* structuredMesh,
}
// Get dims of points array
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Determining dimension of points array." << std::endl;
std::vector<int> numNodes;
......@@ -1027,7 +1032,7 @@ vtkDataSet* avtVsFileFormat::getStructuredMesh(VsStructuredMesh* structuredMesh,
if (numNodes.size() < 0) {
std::ostringstream msg;
msg << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
msg << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Could not get dimensions of the structured mesh.";
VsLog::debugLog() << msg.str() << std::endl;
throw std::out_of_range(msg.str().c_str());
......@@ -1038,7 +1043,7 @@ vtkDataSet* avtVsFileFormat::getStructuredMesh(VsStructuredMesh* structuredMesh,
size_t numTopologicalDims = structuredMesh->getNumTopologicalDims();
if (numTopologicalDims > 3) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Error: numTopologicalDims of data is larger than 3. "
<< "Returning NULL." << std::endl;
return NULL;
......@@ -1047,7 +1052,7 @@ vtkDataSet* avtVsFileFormat::getStructuredMesh(VsStructuredMesh* structuredMesh,
int numSpatialDims = structuredMesh->getNumSpatialDims();
if (numSpatialDims > 3) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Error: numSpatialDims data is larger than 3. "
<< "Returning NULL." << std::endl;
return NULL;
......@@ -1058,7 +1063,7 @@ vtkDataSet* avtVsFileFormat::getStructuredMesh(VsStructuredMesh* structuredMesh,
// equal to the numTopologicalDims.
if( numTopologicalDims > numSpatialDims )
{
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Error: The numTopologicalDims ("
<< numTopologicalDims
<< ") is greater than numSpatialDims ("
......@@ -1075,7 +1080,7 @@ vtkDataSet* avtVsFileFormat::getStructuredMesh(VsStructuredMesh* structuredMesh,
bool isFloat = isFloatType(meshDataType);
if (!isDouble && !isFloat) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Error: hdf5 mesh data type not handled: "
<< meshDataType << "Returning NULL." << std::endl;
return NULL;
......@@ -1103,7 +1108,7 @@ vtkDataSet* avtVsFileFormat::getStructuredMesh(VsStructuredMesh* structuredMesh,
for (size_t i=0; i<numTopologicalDims; ++i)
numPoints *= gdims[i];
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Total number of points is " << numPoints
<< std::endl;
......@@ -1125,7 +1130,7 @@ vtkDataSet* avtVsFileFormat::getStructuredMesh(VsStructuredMesh* structuredMesh,
}
if (!dataPtr) {
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Allocation failed, pointer is NULL. "
<< "Returning NULL." << std::endl;
return NULL;
......@@ -1144,7 +1149,7 @@ vtkDataSet* avtVsFileFormat::getStructuredMesh(VsStructuredMesh* structuredMesh,
if (err < 0)
{
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Error " << err
<< " while reading data. Returning NULL." << std::endl;
......@@ -1160,7 +1165,7 @@ vtkDataSet* avtVsFileFormat::getStructuredMesh(VsStructuredMesh* structuredMesh,
// correct position and set the extra dimensions to zero.
if (numSpatialDims < 3)
{
VsLog::debugLog() << __CLASS__ << __FUNCTION__ << " " << __LINE__ << " "
VsLog::debugLog() << __CLASS__ <<"(" <<instanceCounter <<")" << __FUNCTION__ << " " << __LINE__ << " "
<< "Point spatial dimensionality ("
<< numSpatialDims << " is less than 3. "
<< "Moving data into correct location." << std::endl;
......@@ -1177,16 +1182,16 @@ vtkDataSet* avtVsFileFormat::getStructuredMesh(VsStructuredMesh* structuredMesh,
memset(destPtr, 0, (3-numSpatialDims)*dsize);
}