Commit ac93a858 authored by hrchilds's avatar hrchilds

Update from October 27, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@349 18c085ea-50e0-402c-830e-de6fd14e8384
parent 96cf3829
......@@ -96,6 +96,15 @@ avtVertexNormalsFilter::~avtVertexNormalsFilter()
// Hank Childs, Thu Feb 26 09:50:37 PST 2004
// Decide what type of normals (point, cell) to do from inside this filter.
//
// Jeremy Meredith, Wed Oct 27 15:22:32 PDT 2004
// Removed check for ensuring that polgons actually existed before doing
// the normals. The vtkVisItPolyDataNormals filter accepts them just fine,
// and we can count on the spatial/topological tests to rule out cases
// where it will be inefficient to compute normals anyway. There were
// cases where some domains had polgons, and others only had lines, but
// the final append filter removed *all* normals because some domains
// did not have any.
//
// ****************************************************************************
vtkDataSet *
......@@ -125,11 +134,6 @@ avtVertexNormalsFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
vtkPolyData *pd = (vtkPolyData *)in_ds;
if (pd->GetNumberOfPolys() <= 0 && pd->GetNumberOfStrips() <= 0)
{
return in_ds;
}
bool pointNormals = true;
if (atts.ValidActiveVariable())
{
......
......@@ -578,10 +578,16 @@ avtPixieFileFormat::GetMesh(int timestate, const char *meshname)
EXCEPTION1(InvalidVariableException, meshNameString);
}
// The dims are being copied to a temporary array before being output
// to get around a compiler (STL) deficiency with g++-3.3.3 on tru64.
int originalDims[3];
originalDims[0] = it->second.dims[0];
originalDims[1] = it->second.dims[1];
originalDims[2] = it->second.dims[2];
debug4 << "avtPixieFileFormat::GetMesh: 0: "
<< "originalDims={" << it->second.dims[0]
<< ", " << it->second.dims[1]
<< ", " << it->second.dims[2] << "}" << endl;
<< "originalDims={" << originalDims[0]
<< ", " << originalDims[1]
<< ", " << originalDims[2] << "}" << endl;
//
// Determine the number of cells in each dimension. Note that
......
......@@ -249,6 +249,26 @@ avtVistaAle3dFileFormat::FreeUpResources(void)
{
}
// ****************************************************************************
// Method: GetFileNameForRead
//
// Purpose: Determines file name for a read based on domain number
// variables
//
// Programmer: Mark C. Miller
// Creation: October 27, 2004
//
// ****************************************************************************
void
avtVistaAle3dFileFormat::GetFileNameForRead(int dom, char *fileName, int size)
{
int filePart = chunkToFileMap[dom];
if (filePart == MASTER_FILE_INDEX)
strncpy(fileName, masterFileName.c_str(), size);
else
SNPRINTF(fileName, size, "%s.%d", masterFileName.c_str(),
filePart);
}
// ****************************************************************************
// Method: avtVistaAle3dFileFormat::PopulateDatabaseMetaData
......
......@@ -45,6 +45,9 @@ using std::vector;
// Mark C. Miller, Wed May 19 10:56:11 PDT 2004
// Added spatialDim data member
//
// Mark C. Miller, Wed Oct 27 16:02:46 PDT 2004
// Added GetFileNameForRead
//
// ****************************************************************************
class avtVistaAle3dFileFormat : public avtVistaFileFormat
......@@ -75,6 +78,9 @@ class avtVistaAle3dFileFormat : public avtVistaFileFormat
vtkFloatArray *ReadVar(int domain, const char *visitName);
void GetFileNameForRead(int dom, char *fileName, int size);
avtMaterial *GetMaterial(int, const char *);
int numPieces;
......
......@@ -218,6 +218,34 @@ avtVistaDiabloFileFormat::FreeUpResources(void)
{
}
// ****************************************************************************
// Method: GetFileNameForRead
//
// Purpose: Determines file name for a read based on domain number
// variables
//
// Programmer: Mark C. Miller
// Creation: October 27, 2004
//
// ****************************************************************************
void
avtVistaDiabloFileFormat::GetFileNameForRead(int dom, char *fileName, int size)
{
int filePart = chunkToFileMap[dom];
if (filePart == MASTER_FILE_INDEX)
strncpy(fileName, masterFileName.c_str(), size);
else
{
const char *tmp1 = masterFileName.c_str();
int i = strlen(tmp1) - 1;
while (i && tmp1[i] != '_')
i--;
string tmp2 = string(masterFileName,0,i);
SNPRINTF(fileName, size, "%s_%05d.SILO", tmp2.c_str(), filePart);
}
}
// ****************************************************************************
// Method: avtVistaDiabloFileFormat::PopulateDatabaseMetaData
//
......
......@@ -28,6 +28,11 @@ using std::vector;
// Programmer: Mark C. Miller
// Creation: July 17, 2004
//
// Modifications:
//
// Mark C. Miller, Wed Oct 27 16:02:46 PDT 2004
// Added GetFileNameForRead
//
// ****************************************************************************
class avtVistaDiabloFileFormat : public avtVistaFileFormat
......@@ -63,6 +68,8 @@ class avtVistaDiabloFileFormat : public avtVistaFileFormat
vtkFloatArray *ReadVar(int domain, const char *visitName);
void GetFileNameForRead(int dom, char *fileName, int size);
int numPieces;
Node **pieceNodes;
vector<vector<FieldInfo_t> > fieldInfos;
......
......@@ -206,27 +206,6 @@ avtVistaFileFormat::CreateFileFormatInterface(const char *const *list, int nList
}
// ****************************************************************************
// Method: GetFileNameForRead
//
// Purpose: Determines file name for a read based on domain number
// variables
//
// Programmer: Mark C. Miller
// Creation: April 28, 2004
//
// ****************************************************************************
void
avtVistaFileFormat::GetFileNameForRead(int dom, char *fileName, int size)
{
int filePart = chunkToFileMap[dom];
if (filePart == MASTER_FILE_INDEX)
strncpy(fileName, masterFileName.c_str(), size);
else
SNPRINTF(fileName, size, "%s.%d", masterFileName.c_str(),
filePart);
}
// ****************************************************************************
// Method: avtVistaFileFormat constructor
//
......
......@@ -114,11 +114,16 @@ class avtVistaFileFormat : public avtSTMDFileFormat
VistaTree *vTree;
VistaFormatType formatType;
static const int MASTER_FILE_INDEX;
string masterFileName;
string masterDirName;
int numChunks;
int *chunkToFileMap;
avtVistaFileFormat(const char *,
avtVistaFileFormat *morphFrom);
void GetFileNameForRead(int domain, char *fileName, int size);
bool ReadDataset(const char *fileName, const char *dsPath,
VistaDataType *type, size_t *size, void **buf);
bool ReadDataset(const char *fileName, const char *dsPath,
......@@ -137,13 +142,6 @@ class avtVistaFileFormat : public avtSTMDFileFormat
char *writerName;
static const int MASTER_FILE_INDEX;
string masterFileName;
string masterDirName;
int numChunks;
int *chunkToFileMap;
// we use void * here so we can use either HDF5 or Silo
void **fileHandles;
......
......@@ -37,6 +37,8 @@ extern ViewerSubject *viewerSubject;
ViewerHostProfileSelectorWithWin::ViewerHostProfileSelectorWithWin(QWidget *parent, const char *name)
: QDialog(parent, name, true)
{
waitingOnUser = false;
QVBoxLayout *topLayout = new QVBoxLayout(this);
QGridLayout *layout = new QGridLayout(topLayout, 4, 4);
......@@ -147,6 +149,9 @@ ViewerHostProfileSelectorWithWin::~ViewerHostProfileSelectorWithWin()
// that they want the same number of processors every time the engine
// launches.
//
// Jeremy Meredith, Wed Oct 27 13:59:14 PDT 2004
// Prevented recursion into QDialog::exec(). See VisIt00005532.
//
// ****************************************************************************
bool
......@@ -170,6 +175,15 @@ ViewerHostProfileSelectorWithWin::SelectProfile(
}
else
{
//
// If someone tries to do something while we already have the
// selector open and waiting on a user, just pretend they didn't
// want to launch one. This will cause the new operations to fail,
// but at least it won't recurse into the exec() call and crash.
//
if (waitingOnUser)
return false;
//
// Check for a host profile for the hostName. If one exists, add
// any arguments to the command line for the engine proxy. If
......@@ -204,7 +218,9 @@ ViewerHostProfileSelectorWithWin::SelectProfile(
}
viewerSubject->BlockSocketSignals(true);
waitingOnUser = true;
bool rejected = (exec() == QDialog::Rejected);
waitingOnUser = false;
viewerSubject->BlockSocketSignals(false);
if (rejected)
......
......@@ -27,6 +27,9 @@ class HostProfileList;
// Creation: February 5, 2003
//
// Modifications:
// Jeremy Meredith, Wed Oct 27 13:56:37 PDT 2004
// Added flag so we know when we are waiting on a user already so that
// we don't try to ask them multiple times about launching the same engine.
//
// ****************************************************************************
class VIEWER_API ViewerHostProfileSelectorWithWin : public QDialog,
......@@ -44,6 +47,8 @@ class VIEWER_API ViewerHostProfileSelectorWithWin : public QDialog,
void newProfileSelected();
private:
bool waitingOnUser;
QListBox *profiles;
QLabel *numProcsLabel;
QSpinBox *numProcs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment