Commit af04477b authored by allens's avatar allens
Browse files

for each FileFormat added NonCompliantException to most of the error...

for each FileFormat added NonCompliantException to most of the error messagingto gives users more information, minor clean up of other files.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12839 18c085ea-50e0-402c-830e-de6fd14e8384
parent bac1fbd0
......@@ -49,10 +49,11 @@
#include <vtkFloatArray.h>
#include <vtkUnstructuredGrid.h>
#include <avtDatabaseMetaData.h>
#include <InvalidDBTypeException.h>
#include <InvalidDBTypeException.h>
#include <InvalidVariableException.h>
#include <InvalidFilesException.h>
#include <NonCompliantException.h>
// Define this symbol BEFORE including hdf5.h to indicate the HDF5 code
// in this file uses version 1.6 of the HDF5 API. This is harmless for
......@@ -149,6 +150,9 @@ avtGTCFileFormat::Initialize()
if(initialized)
return true;
if( H5Fis_hdf5( GetFilename() ) < 0 )
EXCEPTION1( InvalidFilesException, GetFilename() );
// Turn off error message printing.
H5Eset_auto(0,0);
debug4 << mName << "Opening " << GetFilename() << endl;
......@@ -157,8 +161,10 @@ avtGTCFileFormat::Initialize()
if (fileHandle < 0)
{
debug4 << mName << "Could not open " << GetFilename() << endl;
EXCEPTION1(InvalidDBTypeException, "Cannot be a GTC file since it is not even an HDF5 file.");
debug4 << mName << "Could not open " << GetFilename() << endl;
EXCEPTION2( NonCompliantException, "GTC File Open",
"File '" + string(GetFilename()) + "' can not be opened" );
}
particleHandle = H5Dopen(fileHandle, "particle_data");
......@@ -166,8 +172,8 @@ avtGTCFileFormat::Initialize()
{
debug4 << mName << "Could not open particle_data" << endl;
H5Fclose(fileHandle);
EXCEPTION1(InvalidDBTypeException, "Cannot be a GTC file, "
"since it is does not contain the dataset \"particle_data\"");
EXCEPTION2( NonCompliantException, "GTC Dataset Open",
"Dataset 'particle_data' can not be opened" );
}
//Check variable's size.
......@@ -181,7 +187,8 @@ avtGTCFileFormat::Initialize()
H5Sclose(sid);
H5Dclose(particleHandle);
H5Fclose(fileHandle);
EXCEPTION1(InvalidDBTypeException, "The GTC file has an invalid number of dimensions");
EXCEPTION2( NonCompliantException, "GTC Dataset Extents",
"Dataset 'particle_data' has an invalid extents");
}
debug4 << mName << "Determining variable size" << endl;
......@@ -193,7 +200,8 @@ avtGTCFileFormat::Initialize()
H5Sclose(sid);
H5Dclose(particleHandle);
H5Fclose(fileHandle);
EXCEPTION1(InvalidDBTypeException, "The GTC file has an insufficient number of variables");
EXCEPTION2( NonCompliantException, "GTC Dataset Extents",
"Dataset 'particle_data' has an insufficient number of variables");
}
H5Sclose(dataspace);
......@@ -902,6 +910,3 @@ parallelBuffer::AddElement( float *data )
}
#endif
......@@ -51,10 +51,8 @@
#include <avtDatabaseMetaData.h>
#include <Expression.h>
#include <BadIndexException.h>
#include <NonCompliantException.h>
#include <InvalidFilesException.h>
#include <InvalidVariableException.h>
#include <UnexpectedValueException.h>
#include <vtkStructuredGrid.h>
#include <vtkPoints.h>
#include <vtkCellType.h>
......@@ -128,22 +126,36 @@ static void dbg_string_attrib(hid_t id, const std::string &str)
avtH5NimrodFileFormat::avtH5NimrodFileFormat (const char *filename):
avtMTSDFileFormat (&filename, 1)
{
if( H5Fis_hdf5( filename ) < 0 )
EXCEPTION1( InvalidFilesException, filename );
// INITIALIZE DATA MEMBERS
fname = filename;
hid_t file;
hid_t root_id, group_id;
char *string_attrib;
float time;
file = H5Fopen (filename, H5F_ACC_RDONLY, H5P_DEFAULT);
if (file < 0)
EXCEPTION1 (InvalidFilesException, filename);
{
EXCEPTION2( NonCompliantException, "H5NIMROD File Open",
"File '" + string(filename) + "' can not be opened" );
}
hsize_t i, npoints;
// Read attributes
root_id = H5Gopen (file, "/");
if ( root_id < 0 )
{
H5Fclose(file);
EXCEPTION2( NonCompliantException, "H5NIMROD Group Open",
"The root group '/' was not found" );
}
dbg_string_attrib(root_id, "Description");
dbg_string_attrib(root_id, "Source");
......@@ -151,7 +163,8 @@ avtH5NimrodFileFormat::avtH5NimrodFileFormat (const char *filename):
{
H5Gclose(root_id);
H5Fclose(file);
EXCEPTION1 (InvalidFilesException, filename);
EXCEPTION2( NonCompliantException, "H5NIMROD Read Attribute",
"Attribute 'time' was not found or was the wrong type." );
}
debug5 << "time: " << time << std::endl;
......@@ -160,7 +173,8 @@ avtH5NimrodFileFormat::avtH5NimrodFileFormat (const char *filename):
{
H5Gclose(root_id);
H5Fclose(file);
EXCEPTION1 (InvalidFilesException, filename);
EXCEPTION2( NonCompliantException, "H5NIMROD Group Open",
"The group '/GRID' was not found" );
}
string_attrib = NULL;
......@@ -174,8 +188,8 @@ avtH5NimrodFileFormat::avtH5NimrodFileFormat (const char *filename):
H5Gclose(root_id);
H5Gclose(grid_id);
H5Fclose(file);
EXCEPTION2(UnexpectedValueException, "Cartesian - XYZ",
string_attrib);
EXCEPTION2( NonCompliantException, "H5NIMROD Read Attribute",
"Attribute 'Cartesian - XYZ' was not found or was the wrong type." );
}
free(string_attrib);
}
......@@ -194,8 +208,8 @@ avtH5NimrodFileFormat::avtH5NimrodFileFormat (const char *filename):
H5Gclose(root_id);
H5Gclose(grid_id);
H5Fclose (file);
EXCEPTION2 (UnexpectedValueException, "Structured",
string_attrib ? string_attrib : "NULL");
EXCEPTION2( NonCompliantException, "H5NIMROD Read Attribute",
"Attribute 'Topology' was not found or not 'Structured'" );
}
if(string_attrib)
{
......@@ -211,7 +225,8 @@ avtH5NimrodFileFormat::avtH5NimrodFileFormat (const char *filename):
H5Gclose(root_id);
H5Gclose(grid_id);
H5Fclose (file);
EXCEPTION2 (UnexpectedValueException, 3, ndims);
EXCEPTION2( NonCompliantException, "H5NIMROD Read Dimensions",
"Grid dataset 'X' does not have three dimensions" );
}
// points
for (i = 0, npoints = 1; i < ndims; i++)
......@@ -253,7 +268,8 @@ avtH5NimrodFileFormat::avtH5NimrodFileFormat (const char *filename):
{
H5Gclose(group_id);
H5Fclose(file);
EXCEPTION1 (InvalidFilesException, filename);
EXCEPTION2( NonCompliantException, "H5NIMROD Read Attribute",
"Attribute 'Step number' was not found or wrong type" );
}
cycles.push_back( atoi(stepnumber) );
......@@ -264,7 +280,8 @@ avtH5NimrodFileFormat::avtH5NimrodFileFormat (const char *filename):
{
H5Gclose(group_id);
H5Fclose(file);
EXCEPTION1 (InvalidFilesException, filename);
EXCEPTION2( NonCompliantException, "H5NIMROD Read Attribute",
"Attribute 'time' was not found or wrong type" );
}
times.push_back( time );
......@@ -448,7 +465,10 @@ avtH5NimrodFileFormat::GetMesh (int timestate, const char *meshname)
hid_t file;
file = H5Fopen (fname.c_str (), H5F_ACC_RDONLY, H5P_DEFAULT);
if (file < 0)
EXCEPTION1 (InvalidFilesException, fname.c_str ());
{
EXCEPTION2( NonCompliantException, "H5NIMROD File Open",
"File '" + fname + "' can not be opened" );
}
hid_t grid_id = H5Gopen (file, "/GRID");
vtkpoints->SetNumberOfPoints (npoints);
......@@ -513,7 +533,10 @@ avtH5NimrodFileFormat::GetVar (int timestate, const char *varname)
file = H5Fopen (fname.c_str (), H5F_ACC_RDONLY, H5P_DEFAULT);
if (file < 0)
EXCEPTION1 (InvalidFilesException, fname.c_str ());
{
EXCEPTION2( NonCompliantException, "H5NIMROD File Open",
"File '" + fname + "' can not be opened" );
}
hid_t root_id, group_id;
root_id = H5Gopen (file, "/");
......@@ -570,7 +593,10 @@ avtH5NimrodFileFormat::GetVectorVar (int timestate, const char *varname)
file = H5Fopen (fname.c_str (), H5F_ACC_RDONLY, H5P_DEFAULT);
if (file < 0)
EXCEPTION1 (InvalidFilesException, fname.c_str ());
{
EXCEPTION2( NonCompliantException, "H5NIMROD File Open",
"File '" + fname + "' can not be opened" );
}
hid_t root_id, group_id;
root_id = H5Gopen (file, "/");
......@@ -652,14 +678,9 @@ avtH5NimrodFileFormat::GetVectorVar (int timestate, const char *varname)
void avtH5NimrodFileFormat::GetCycles(std::vector<int> &c)
{
c = cycles;
metadata->SetCyclesAreAccurate(true);
metadata->SetCycles( cycles );
metadata->SetTimesAreAccurate(true);
metadata->SetTimes( times );
}
// ****************************************************************************
// Method: avtH5NimrodFileFormat::GetTimes
//
......@@ -677,10 +698,4 @@ void avtH5NimrodFileFormat::GetCycles(std::vector<int> &c)
void avtH5NimrodFileFormat::GetTimes(std::vector<double> &t)
{
t = times;
metadata->SetCyclesAreAccurate(true);
metadata->SetCycles( cycles );
metadata->SetTimesAreAccurate(true);
metadata->SetTimes( times );
}
......@@ -1170,6 +1170,7 @@ avtH5PartFileFormat::GetFieldMesh(int timestate, const char *meshname)
coords[2]->Delete();
visitTimer->StopTimer(t1, "H5PartFileFormat::GetFieldMesh()");
return rgrid;
}
......
......@@ -93,7 +93,7 @@ avtM3DC1Field::~avtM3DC1Field()
// ****************************************************************************
// Method: findElementNeighbors
//
// Creationist: Allen Sanderson
// Creationist: Joshua Breslau
// Creation: 20 November 2009
//
// ****************************************************************************
......@@ -192,7 +192,7 @@ void avtM3DC1Field::findElementNeighbors()
// ****************************************************************************
// Method: register_vert
//
// Creationist: Allen Sanderson
// Creationist: Joshua Breslau
// Creation: 20 November 2009
//
// ****************************************************************************
......@@ -221,7 +221,7 @@ void avtM3DC1Field::register_vert(v_entry *vlist, int *len,
// ****************************************************************************
// Method: add_edge
//
// Creationist: Allen Sanderson
// Creationist: Joshua Breslau
// Creation: 20 November 2009
//
// ****************************************************************************
......@@ -254,7 +254,7 @@ void avtM3DC1Field::add_edge(edge *list, int *tri,
// ****************************************************************************
// Method: get_tri_coords2D
//
// Creationist: Allen Sanderson
// Creationist: Joshua Breslau
// Creation: 20 November 2009
//
// ****************************************************************************
......@@ -282,7 +282,7 @@ int avtM3DC1Field::get_tri_coords2D(double *xin, int el, double *xout)
// ****************************************************************************
// Method: get_tri_coords2D
//
// Creationist: Allen Sanderson
// Creationist: Joshua Breslau
// Creation: 20 November 2009
//
// ****************************************************************************
......@@ -367,7 +367,7 @@ int avtM3DC1Field::get_tri_coords2D(double *xin, double *xout)
// ****************************************************************************
// Method: interp basic interpolation
//
// Creationist: Allen Sanderson
// Creationist: Joshua Breslau
// Creation: 20 November 2009
//
// ****************************************************************************
......@@ -386,7 +386,7 @@ float avtM3DC1Field::interp(float *var, int el, double *lcoords)
// ****************************************************************************
// Method: interpdR interpolation in dR
//
// Creationist: Allen Sanderson
// Creationist: Joshua Breslau
// Creation: 20 November 2009
//
// ****************************************************************************
......@@ -411,7 +411,7 @@ float avtM3DC1Field::interpdR(float *var, int el, double *lcoords)
// ****************************************************************************
// Method: interpdz interpolation in dz
//
// Creationist: Allen Sanderson
// Creationist: Joshua Breslau
// Creation: 20 November 2009
//
// ****************************************************************************
......@@ -437,7 +437,7 @@ float avtM3DC1Field::interpdz(float *var, int el, double *lcoords)
// ****************************************************************************
// Method: interpdR2 interpolation in dR2
//
// Creationist: Allen Sanderson
// Creationist: Joshua Breslau
// Creation: 20 November 2009
//
// ****************************************************************************
......@@ -467,7 +467,7 @@ float avtM3DC1Field::interpdR2(float *var, int el, double *lcoords)
// ****************************************************************************
// Method: interpdz2 interpolation in dz2
//
// Creationist: Allen Sanderson
// Creationist: Joshua Breslau
// Creation: 20 November 2009
//
// ****************************************************************************
......@@ -497,7 +497,7 @@ float avtM3DC1Field::interpdz2(float *var, int el, double *lcoords)
// ****************************************************************************
// Method: interpdR interpolation in dR
//
// Creationist: Allen Sanderson
// Creationist: Joshua Breslau
// Creation: 20 November 2009
//
// ****************************************************************************
......@@ -528,9 +528,10 @@ float avtM3DC1Field::interpdRdz(float *var, int el, double *lcoords)
// Method: interpBcomps
//
// Simultaneously interpolate all three cylindrical components of
// magnetic field
// magnetic field - should not be used for calculating integral
// curves.
//
// Creationist: Allen Sanderson
// Creationist: Joshua Breslau
// Creation: 20 November 2009
//
// ****************************************************************************
......
......@@ -56,9 +56,9 @@
#include <DBOptionsAttributes.h>
#include <Expression.h>
#include <InvalidVariableException.h>
#include <avtCallback.h>
#include <NonCompliantException.h>
#include <InvalidFilesException.h>
#include <UnexpectedValueException.h>
#include <DebugStream.h>
......@@ -172,7 +172,7 @@ avtM3DC1FileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md,
{
avtMeshMetaData *mmd;
avtMeshType mt = AVT_UNSTRUCTURED_MESH;
int nblocks = nelms;
int nblocks = 1;
int block_origin = 0;
int cell_origin = 0;
int group_origin = 0;
......@@ -234,7 +234,7 @@ avtM3DC1FileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md,
new avtMeshMetaData(string("equilibrium/mesh") + string(level),
nblocks, block_origin,
cell_origin, group_origin,
topological_dimension, spatial_dimension, mt);
spatial_dimension, topological_dimension, mt);
mmd->hideFromGUI = true;
md->Add(mmd);
......@@ -243,7 +243,7 @@ avtM3DC1FileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md,
new avtMeshMetaData(string("mesh") + string(level),
nblocks, block_origin,
cell_origin, group_origin,
topological_dimension, spatial_dimension, mt);
spatial_dimension, topological_dimension, mt);
mmd->hideFromGUI = true;
md->Add(mmd);
}
......@@ -254,14 +254,14 @@ avtM3DC1FileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md,
mmd =
new avtMeshMetaData("hidden/equilibrium/mesh",
nblocks, block_origin, cell_origin, group_origin,
topological_dimension, spatial_dimension, mt);
spatial_dimension, topological_dimension, mt);
mmd->hideFromGUI = true;
md->Add(mmd);
mmd =
new avtMeshMetaData("hidden/mesh",
nblocks, block_origin, cell_origin, group_origin,
topological_dimension, spatial_dimension, mt);
spatial_dimension, topological_dimension, mt);
mmd->hideFromGUI = true;
md->Add(mmd);
......@@ -347,20 +347,24 @@ avtM3DC1FileFormat::GetElements(int timestate, const char *meshname)
} else if( strncmp(meshname, "mesh", 4 ) == 0 ) {
sprintf( meshStr, "/time_%03d/mesh", timestate );
} else
EXCEPTION2( UnexpectedValueException, meshname, "NOT FOUND" );
EXCEPTION2( NonCompliantException, "M3DC1 Element Name Lookup",
"Element '" + string(meshStr) + "' was not found." );
// Open the group.
hid_t meshId = H5Gopen( m_fileID, meshStr, H5P_DEFAULT);
if ( meshId < 0 )
EXCEPTION2( UnexpectedValueException, meshStr, "NOT FOUND" );
EXCEPTION2( NonCompliantException, "M3DC1 Group Open",
"Group '" + string(meshStr) + "' was not found." );
// Read in the mesh information.
int nElements;
if ( ! ReadAttribute( meshId, "nelms", &nElements ) )
EXCEPTION2( UnexpectedValueException, "nelms", "Not found or wrong type" );
EXCEPTION2( NonCompliantException, "M3DC1 Attribute Reader",
"Attribute 'nelms' was not found or was the wrong type." );
if( nElements != nelms )
EXCEPTION2( UnexpectedValueException, "nelms", "Time step nelms does not match equilibrium nelms" );
EXCEPTION2( NonCompliantException, "M3DC1 Element Check",
"Time step 'nelms' does not match equilibrium 'nelms'" );
// Open the dataset and space info for the elements.
hid_t datasetId = H5Dopen(meshId, "elements", H5P_DEFAULT);
......@@ -372,13 +376,15 @@ avtM3DC1FileFormat::GetElements(int timestate, const char *meshname)
// Sanity check.
if( rank != 2 || sdim[0] != nelms || sdim[1] != ELEMENT_SIZE )
{
EXCEPTION2( UnexpectedValueException, "elements", "The number of elements or the element size does not match" );
EXCEPTION2( NonCompliantException, "M3DC1 Element Check",
"The number of elements or the element size does not match" );
}
// Memory for the elements.
float *elements = new float[sdim[0]*sdim[1]];
if( elements == 0 )
EXCEPTION2( UnexpectedValueException, "Elements", "CAN NOT ALLOCATE MEMORY" );
EXCEPTION2( NonCompliantException, "M3DC1 Memory Allocation",
"CAN NOT ALLOCATE MEMORY" );
// Read in the elements.
H5Dread( datasetId,
......@@ -596,8 +602,8 @@ avtM3DC1FileFormat::GetMesh(int timestate, const char *meshname)
sprintf( meshStr, "mesh" );
}
else
EXCEPTION2( UnexpectedValueException, meshname, "NOT FOUND" );
EXCEPTION2( NonCompliantException, "M3DC1 Mesh Name",
"Can not find '" + string(meshnamePtr) );
// Parse the mesh variable name to get the refinement level.
int refinement;
......@@ -610,7 +616,7 @@ avtM3DC1FileFormat::GetMesh(int timestate, const char *meshname)
// Get the C1 elements.
float* elements = GetElements(timestate, meshStr);
// Create a VTk grid for the mesh.
// Create a VTK grid for the mesh.
vtkUnstructuredGrid *grid = vtkUnstructuredGrid::New();
// Now get the points on the mesh based on the number of planes and
......@@ -627,6 +633,8 @@ avtM3DC1FileFormat::GetMesh(int timestate, const char *meshname)
// Add in the VTK cells. The connectivity is the same for all
// triangles because each triangle is defined by three points that
// are not unique.
grid->Allocate(npts/3);
vtkTriangle *tri = vtkTriangle::New();
for( int i=0; i<npts; i+=3 )
{
......@@ -669,32 +677,36 @@ avtM3DC1FileFormat::GetHeaderVar(int timestate, const char *varname)
// Header variables are at the top level group.
hid_t rootID = H5Gopen( m_fileID, "/", H5P_DEFAULT);
if ( rootID < 0 )
EXCEPTION2( UnexpectedValueException, "Root Group", "NOT FOUND" );
EXCEPTION2( NonCompliantException, "M3DC1 Group Open",
"The root group '/' was not found" );
// Everything is converted to floats by visit so might as well do it
// here and save the copying time and memory.
string variable(&(varname[7]));
float value;
// Read in linear flag and ntor an an int
if( strcmp(&(varname[7]), "linear") == 0 ||
strcmp(&(varname[7]), "ntor" ) == 0 )
if( variable == "linear" || variable == "ntor" )
{
int intVal;
if ( ! ReadAttribute( rootID, &(varname[7]), &intVal ) )
EXCEPTION2( UnexpectedValueException, &(varname[7]),
"Not found or wrong type" )
if ( ! ReadAttribute( rootID, variable.c_str(), &intVal ) )
{
EXCEPTION2( NonCompliantException, "M3DC1 Attribute Reader",
"Attribute '" + variable + "' was not found or was the wrong type." );
}
else
value = intVal;
}
// Read in bzero and rzero as a double
else if( strcmp(&(varname[7]), "bzero") == 0 ||
strcmp(&(varname[7]), "rzero" ) == 0 )
else if( variable == "bzero" || variable == "rzero" )
{
double dblVal;
if ( ! ReadAttribute( rootID, &(varname[7]), &dblVal ) )
EXCEPTION2( UnexpectedValueException, &(varname[7]),
"Not found or wrong type" )
if ( ! ReadAttribute( rootID, variable.c_str(), &dblVal ) )
{
EXCEPTION2( NonCompliantException, "M3DC1 Attribute Reader",
"Attribute '" + variable + "' was not found or was the wrong type." );
}
else
value = dblVal;
}
......@@ -772,13 +784,14 @@ avtM3DC1FileFormat::GetFieldVar(int timestate, const char *varname)
// Open the group.
hid_t groupID = H5Gopen( m_fileID, groupStr, H5P_DEFAULT);
if ( groupID < 0 )
EXCEPTION2( UnexpectedValueException, groupStr, "NOT FOUND" );
EXCEPTION2( NonCompliantException, "M3DC1 Group Open",
"Group '" + string(groupStr) + "' was not found" );
// Open the field dataset
hid_t datasetId = H5Dopen(groupID, varStr, H5P_DEFAULT);
if ( datasetId < 0 )
EXCEPTION2( UnexpectedValueException, groupStr + string("/") + varStr,
"NOT FOUND" );
EXCEPTION2( NonCompliantException, "M3DC1 Dataset Open",
"Dataset '" + string(varStr) + "' was not found" );
// Read in the dataset information.
hid_t spaceId = H5Dget_space(datasetId);
......@@ -787,11 +800,12 @@ avtM3DC1FileFormat::GetFieldVar(int timestate, const char *varname)
H5Sget_simple_extent_dims(spaceId, &sdim[0], NULL);
if( rank != 2 || sdim[0] != nelms || sdim[1] != nComponents )
EXCEPTION2( UnexpectedValueException,
groupStr + string("/") + varStr,
"The number of elements or the component size does not match" );
EXCEPTION2( NonCompliantException, "M3DC1 Element Check",
"Dataset '" +
string(groupStr) + string("/") + string(varStr) +
"' the number of elements or the component size does not match" );
// Normally an array ould be created but instead use the VTK memory
// Normally an array would be created but instead use the VTK memory
// directly - this usage works because the vtk and hdf5 memory
// layout are the same.
......@@ -816,8 +830,9 @@ avtM3DC1FileFormat::GetFieldVar(int timestate, const char *varname)
// that the hdfd5 and vtk memory layout are the same.
if( H5Dread( datasetId,
H5T_NATIVE_FLOAT, H5S_ALL, spaceId, H5P_DEFAULT, values ) < 0 )
EXCEPTION2( UnexpectedValueException,
groupStr + string("/") + varStr, "Can not read the data" );
EXCEPTION2( NonCompliantException, "M3DC1 Dataset Read",
"Dataset '" + string(groupStr) + string("/") + string(varStr) +
"' can not be read" );
H5Dclose(spaceId);
H5Dclose(datasetId);
......@@ -930,9 +945,12 @@ avtM3DC1FileFormat::GetVar(int timestate, const char *varname)
if( (element = m3dField.get_tri_coords2D(centroid, xieta)) < 0 )
{
debug1 << "avtM3DC1FileFormat::GetVar - Can not find element for "
<< centroid[0] << " "<< centroid[1] << " "<< centroid[2]
<< endl;
char buf[1024];
sprintf( buf, "avtM3DC1FileFormat::GetVar - Get Triangle Coords 2d can not find element for point %10.6f %10.6f %10.6f",
centroid[0], centroid[1], centroid[2] );
avtCallback::IssueWarning( buf );
}
}
......@@ -943,10 +961,13 @@ avtM3DC1FileFormat::GetVar(int timestate, const char *varname)
*varPtr++ = m3dField.interp(values, element, xieta);
else
{
debug1 << "avtM3DC1FileFormat::GetVar - Can not find element for "
<< pt[0] << " "<< pt[1] << " "<< pt[2]
<< endl;
char buf[1024];
sprintf( buf, "avtM3DC1FileFormat::GetVar - Get Triangle Coords 2d can not find element for point %10.6f %10.6f %10.6f",
pt[0], pt[1], pt[2] );
avtCallback::IssueWarning( buf );
*varPtr++ = 0;
}
......@@ -967,9 +988,12 @@ avtM3DC1FileFormat::GetVar(int timestate, const char *varname)
*varPtr++ = m3dField.interp(values, element, xieta);
else
{
debug1 << "avtM3DC1FileFormat::GetVar - Can not find element for "