[vtkusers] Exodus issue
John Vines (CISD/HPCD)
jvines at arl.army.mil
Fri Jan 30 15:03:44 EST 2009
We believe we have found a 32 vs 64 bit bug in the Exodus support We
have made some alterations which seems to have addressed the problem.
Here is the diff information for your review and comment:
Thanks for your time,
John
*vtkExodusModel.h* :
--- Hybrid/vtkExodusModel.h.orig 2006-09-10 00:16:31.000000000 -0400
+++ Hybrid/vtkExodusModel.h 2008-10-31 15:21:59.943483000 -0400
@@ -198,11 +198,13 @@
static void CopyDoubleToFloat(float *f, double *d, int len);
int SetLocalBlockInformation(
- int fid, int use_floats, int *blockIds , int *cellIds, int
ncells);
+ int fid, int use_floats, int *blockIds , vtkIdType *cellIds, int
ncells);
int SetLocalNodeSetInformation(
- int fid, int use_floats, int *pointIds, int
npoints);
+ int fid, int use_floats, vtkIdType *pointIds,
+ int npoints);
int SetLocalSideSetInformation(
- int fid, int use_floats, int *cellIds, int
ncells);
+ int fid, int use_floats, vtkIdType *cellIds,
+ int ncells);
void RemoveBeginningAndTrailingSpaces(char **names, int len);
*vtkExodusModel.cxx* :
--- Hybrid/vtkExodusModel.cxx.orig 2008-04-24 10:29:00.000000000 -0400
+++ Hybrid/vtkExodusModel.cxx 2008-10-31 15:21:52.994057000 -0400
@@ -22,6 +22,7 @@
#include "vtkUnstructuredGrid.h"
#include "vtkObjectFactory.h"
#include "vtkDataArray.h"
+#include "vtkIdTypeArray.h"
#include "vtkIntArray.h"
#include "vtkFloatArray.h"
#include "vtkCellData.h"
@@ -564,8 +565,8 @@
// Check input
int *blockIds = NULL;
- int *cellIds = NULL;
- int *pointIds = NULL;
+ vtkIdType *cellIds = NULL;
+ vtkIdType *pointIds = NULL;
vtkDataArray *da = ugrid->GetCellData()->GetArray("BlockId");
if (da)
@@ -580,7 +581,7 @@
da = ugrid->GetCellData()->GetArray("GlobalElementId");
if (da)
{
- vtkIntArray *ia = vtkIntArray::SafeDownCast(da);
+ vtkIdTypeArray *ia = vtkIdTypeArray::SafeDownCast(da);
if (ia)
{
cellIds = ia->GetPointer(0);
@@ -590,7 +591,7 @@
da = ugrid->GetPointData()->GetArray("GlobalNodeId");
if (da)
{
- vtkIntArray *ia = vtkIntArray::SafeDownCast(da);
+ vtkIdTypeArray *ia = vtkIdTypeArray::SafeDownCast(da);
if (ia)
{
pointIds = ia->GetPointer(0);
@@ -632,7 +633,7 @@
return 0;
}
int vtkExodusModel::SetLocalBlockInformation(
- int fid, int use_floats, int *blockIds , int *cellIds,
int ncells)
+ int fid, int use_floats, int *blockIds , vtkIdType *cellIds, int
ncells)
{
int i;
@@ -762,7 +763,7 @@
return 0;
}
int vtkExodusModel::SetLocalNodeSetInformation(
- int fid, int use_floats, int *pointIds, int npoints)
+ int fid, int use_floats, vtkIdType *pointIds, int npoints)
{
int i, j;
float dummyFloat;
@@ -914,7 +915,7 @@
return 0;
}
int vtkExodusModel::SetLocalSideSetInformation(
- int fid, int use_floats, int *cellIds, int ncells)
+ int fid, int use_floats, vtkIdType *cellIds, int ncells)
{
// TODO - go over this and check it
More information about the vtkusers
mailing list