Commit bb56ac5c authored by hrchilds's avatar hrchilds

Update from September 12, 2003

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@76 18c085ea-50e0-402c-830e-de6fd14e8384
parent b6e4c07c
......@@ -255,6 +255,9 @@ $0 = shift @ARGV;
# I corrected a bug in the logic that decided if the vcl should be
# launched in the batch system. The fix was actually made by Jeremy.
#
# Hank Childs, Tue Sep 9 08:35:42 PDT 2003
# Add 'convert' program.
#
###############################################################################
......@@ -290,6 +293,7 @@ USAGE: visit [arguments]
Program arguments:
-gui Run with the Graphical User Interface (default)
-cli Run with the Command Line Interface
-convert Converts files from format A to format B
-makemili Runs the .mili file generator
-surfcomp Runs the surface-compare tool.
-text2polys Runs a utility which generators polygons from text
......@@ -440,6 +444,7 @@ while (scalar(@ARGV) > 0) {
elsif ($arg eq "-xmltest") { $exe_name = "xmltest"; }
elsif ($arg eq "-xmledit") { $exe_name = "xmledit"; }
elsif ($arg eq "-makemili" ) { $exe_name = "makemili"; }
elsif ($arg eq "-convert" ) { $exe_name = "convert"; }
elsif ($arg eq "-silex" ) { $exe_name = "silex"; }
elsif ($arg eq "-surfcomp" ) { $exe_name = "surfcomp"; }
elsif ($arg eq "-text2polys" ) { $exe_name = "text2polys"; }
......@@ -590,11 +595,11 @@ if ((($parallel) or ($launchengine)) and
$nodes_set=0;
#
# The makemili tool needs these parallel arguments, but to not
# The makemili and convert tool needs these parallel arguments, but to not
# confuse the script, we turn off the parallel flag. So we
# translate the executable name here.
#
if ($exe_name eq "makemili")
if (($exe_name eq "makemili") or ($exe_name eq "convert"))
{
$exe_name .= "_par";
}
......@@ -691,8 +696,9 @@ if (!$part_set && (substr($launch,0,4) eq "psub"))
# Determine versions
# -----------------------------------------------------------------------------
# If we still think the exe_name is makemili, we're not running in parallel.
if ($exe_name eq "makemili")
# If we still think the exe_name is makemili or convert, we're not running
# in parallel.
if (($exe_name eq "makemili") or ($exe_name eq "convert"))
{
$exe_name .= "_ser" if (!$parallel);
}
......
......@@ -127,6 +127,9 @@
# Eric Brugger, Tue Aug 26 09:04:30 PDT 2003
# Added surfcomp to the distribution.
#
# Hank Childs, Fri Sep 12 16:35:02 PDT 2003
# Added convert to the distribution.
#
#-----------------------------------------------------------------------
set DataFiles = "TRUE"
......@@ -492,6 +495,9 @@ cp $VisItDir/bin/curv3dprep $bindir
# copy text2polys and time_annotation
cp $VisItDir/bin/text2polys $bindir
cp $VisItDir/bin/time_annotation $bindir
cp $VisItDir/bin/convert_ser $bindir
if(-e $VisItDir/bin/convert_par) then
cp $VisItDir/bin/convert_par $bindir/convert_par
if(-e $VisItDir/bin/makemili_ser) then
cp $VisItDir/bin/makemili_ser $bindir/makemili_ser
endif
......
// ************************************************************************* //
// DatabasePluginInfo.h //
// DatabasePluginInfo.h //
// ************************************************************************* //
#ifndef DATABASE_PLUGIN_INFO_H
......@@ -21,6 +21,7 @@ enum DatabaseType
// Forward declarations.
class avtDatabase;
class avtDatabaseWriter;
// ****************************************************************************
// Class: *DatabasePluginInfo
......@@ -35,6 +36,9 @@ class avtDatabase;
//
// Modifications:
//
// Hank Childs, Wed Sep 10 07:05:54 PDT 2003
// Added DatabaseWriter.
//
// ****************************************************************************
class PLUGIN_API GeneralDatabasePluginInfo
......@@ -52,6 +56,7 @@ class PLUGIN_API CommonDatabasePluginInfo : public virtual GeneralDatabasePlugin
virtual std::vector<std::string> GetDefaultExtensions() = 0;
virtual avtDatabase *SetupDatabase(const char * const *list,
int nList, int nBlock) = 0;
virtual avtDatabaseWriter *GetWriter(void) { return NULL; };
};
class PLUGIN_API MDServerDatabasePluginInfo : public virtual CommonDatabasePluginInfo
......
......@@ -314,15 +314,15 @@ public:
const Expression *GetExpression(int) const;
int GetNumberOfExpressions(void) const;
int GetNDomains(std::string);
avtVarType DetermineVarType(std::string);
avtSubsetType DetermineSubsetType(const std::string &);
std::string MeshForVar(std::string);
std::string MaterialOnMesh(std::string);
std::string SpeciesOnMesh(std::string);
int GetNDomains(std::string) const;
avtVarType DetermineVarType(std::string) const;
avtSubsetType DetermineSubsetType(const std::string &) const;
std::string MeshForVar(std::string) const;
std::string MaterialOnMesh(std::string) const;
std::string SpeciesOnMesh(std::string) const;
const avtMaterialMetaData *GetMaterialOnMesh(std::string);
const avtSpeciesMetaData *GetSpeciesOnMesh(std::string);
const avtMaterialMetaData *GetMaterialOnMesh(std::string) const;
const avtSpeciesMetaData *GetSpeciesOnMesh(std::string) const;
void Print(ostream &, int = 0) const;
......@@ -332,10 +332,13 @@ public:
virtual AttributeGroup *CreateSubAttributeGroup(int);
private:
bool VarIsCompound(const std::string &inVar);
void ParseCompoundForVar(const std::string &inVar, std::string &outVar);
void ParseCompoundForMesh(const std::string &inVar, std::string &meshName);
void ParseCompoundForCategory(const std::string &inVar, std::string &meshName);
bool VarIsCompound(const std::string &inVar) const;
void ParseCompoundForVar(const std::string &inVar, std::string &outVar)
const;
void ParseCompoundForMesh(const std::string &inVar, std::string &meshName)
const;
void ParseCompoundForCategory(const std::string &inVar,
std::string &meshName) const;
};
......
......@@ -1684,6 +1684,9 @@ avtGenericDatabase::AddOriginalNodesArray(vtkDataSet *ds, const int domain)
// Hank Childs, Tue Jul 22 21:48:09 PDT 2003
// Added a flag for whether or not we communicated ghosts.
//
// Hank Childs, Fri Sep 12 16:27:38 PDT 2003
// Added a flag for whether or not reconstruction was forced.
//
// ****************************************************************************
avtDataTree_p
......@@ -1694,9 +1697,9 @@ avtGenericDatabase::MaterialSelect(vtkDataSet *ds, avtMaterial *mat,
bool needBoundarySurfaces,
bool needValidConnectivity,
bool needSmoothMaterialInterfaces,
bool needCleanZonesOnly, bool didGhosts,
bool &subdivisionOccurred, bool &notAllCellsSubdivided,
bool reUseMIR)
bool needCleanZonesOnly, bool reconstructionForced,
bool didGhosts, bool &subdivisionOccurred,
bool &notAllCellsSubdivided, bool reUseMIR)
{
//
// We need to have the material indices as well.
......@@ -1745,7 +1748,7 @@ avtGenericDatabase::MaterialSelect(vtkDataSet *ds, avtMaterial *mat,
}
bool setUpMaterialVariable = false;
if (type == AVT_MATERIAL)
if (type == AVT_MATERIAL || reconstructionForced)
{
setUpMaterialVariable = true;
}
......@@ -3199,6 +3202,9 @@ avtGenericDatabase::CommunicateGhosts(avtDatasetCollection &ds,
// Hank Childs, Tue Jul 22 21:48:09 PDT 2003
// Send down information about whether or not we communicated ghost zones.
//
// Hank Childs, Fri Sep 12 16:27:38 PDT 2003
// Send down info about whether the MIR was forced.
//
// ****************************************************************************
void
......@@ -3262,14 +3268,15 @@ avtGenericDatabase::MaterialSelect(avtDatasetCollection &ds,
bool so;
bool nacs;
ds.avtds[i] = MaterialSelect(ds.GetDataset(i,0), ds.GetMaterial(i),
mvl, domains[i], var, ts,
ds.matnames[i], ds.labels[i],
spec->NeedInternalSurfaces(),
spec->NeedBoundarySurfaces(),
spec->NeedValidFaceConnectivity(),
spec->NeedSmoothMaterialInterfaces(),
spec->NeedCleanZonesOnly(), didGhosts,
so, nacs, reUseMIR);
mvl, domains[i], var, ts,
ds.matnames[i], ds.labels[i],
spec->NeedInternalSurfaces(),
spec->NeedBoundarySurfaces(),
spec->NeedValidFaceConnectivity(),
spec->NeedSmoothMaterialInterfaces(),
spec->NeedCleanZonesOnly(),
spec->MustDoMaterialInterfaceReconstruction(),
didGhosts, so, nacs, reUseMIR);
notAllCellsSubdivided = notAllCellsSubdivided || nacs ||
(subdivisionOccurred && !so) || (!subdivisionOccurred && so);
......
......@@ -213,7 +213,7 @@ class DATABASE_API avtGenericDatabase : public avtDatasetDatabase
std::vector<std::string> &,
std::vector<std::string> &,
bool, bool, bool, bool, bool,
bool, bool&, bool&, bool);
bool, bool, bool&, bool&, bool);
void_ref_ptr GetMIR(int, const char *, int, vtkDataSet*,
avtMaterial *, int, bool, bool, bool,
bool, bool&, bool&, bool);
......
......@@ -1047,6 +1047,9 @@ TetMIR::ReconstructCleanMesh(vtkDataSet *mesh, avtMaterial *mat,
// Jeremy Meredith, Fri Jun 13 16:56:43 PDT 2003
// Added clean-zone-only support.
//
// Hank Childs, Fri Sep 12 17:40:50 PDT 2003
// Formally tell Subset array how many tuples it has.
//
// ****************************************************************************
vtkDataSet *
......@@ -1234,8 +1237,8 @@ TetMIR::GetDataset(vector<int> mats, vtkDataSet *ds,
//
vtkIntArray *outmat = vtkIntArray::New();
outmat->SetName("avtSubsets");
outmat->Allocate(ncells);
int *buff = (int *) outmat->GetVoidPointer(0);
outmat->SetNumberOfTuples(ncells);
int *buff = outmat->GetPointer(0);
for (i=0; i<ncells; i++)
{
buff[i] = mapUsedMatToMat[zonesList[cellList[i]].mat];
......
......@@ -153,6 +153,9 @@
# Hank Childs, Fri Jul 25 21:17:45 PDT 2003
# Renamed avtRelevantPointsFilter to avtCondenseDatasetFilter.
#
# Hank Childs, Wed Sep 10 07:56:10 PDT 2003
# Added avtDatabaseWriter.
#
##############################################################################
@SET_MAKE@
......@@ -274,6 +277,7 @@ PublicFilters_src= \
Sinks_src= \
Sinks/avtDataObjectSink.C \
Sinks/avtDatabaseWriter.C \
Sinks/avtDatasetSink.C \
Sinks/avtDatasetFileWriter.C \
Sinks/avtFileWriter.C \
......
// ************************************************************************* //
// avtDatabaseWriter.C //
// ************************************************************************* //
#include <avtDatabaseWriter.h>
#include <Expression.h>
#include <avtDatabaseMetaData.h>
#include <avtTerminatingSource.h>
#include <NoInputException.h>
// ****************************************************************************
// Method: avtDatabaseWriter constructor
//
// Programmer: Hank Childs
// Creation: September 12, 2003
//
// ****************************************************************************
avtDatabaseWriter::avtDatabaseWriter()
{
shouldAlwaysDoMIR = false;
hasMaterialsInProblem = false;
mustGetMaterialsAdditionally = false;
}
// ****************************************************************************
// Method: avtDatabaseWriter::Write
//
// Purpose:
// Writes out a database making use of virtual function calls.
//
// Programmer: Hank Childs
// Creation: September 10, 2003
//
// ****************************************************************************
void
avtDatabaseWriter::Write(const std::string &filename,
const avtDatabaseMetaData *md)
{
int i;
avtDataObject_p dob = GetInput();
if (*dob == NULL)
EXCEPTION0(NoInputException);
//
// We will need a pipeline specification to force an update. Get that here.
//
avtTerminatingSource *src = dob->GetTerminatingSource();
avtPipelineSpecification_p spec = src->GetGeneralPipelineSpecification();
avtDataSpecification_p ds = spec->GetDataSpecification();
const avtMeshMetaData *mmd = md->GetMesh(0);
//
// We want to process all of the variables in the dataset, so dummy up the
// data specification to include every variable in the dataset that
// pertains to mesh 0.
//
std::vector<std::string> scalarList;
std::vector<std::string> vectorList;
std::vector<std::string> materialList;
for (i = 0 ; i < md->GetNumScalars() ; i++)
{
const avtScalarMetaData *smd = md->GetScalar(i);
if (md->MeshForVar(smd->name) == mmd->name)
{
ds->AddSecondaryVariable(smd->name.c_str());
scalarList.push_back(smd->name);
}
}
for (i = 0 ; i < md->GetNumVectors() ; i++)
{
const avtVectorMetaData *vmd = md->GetVector(i);
if (md->MeshForVar(vmd->name) == mmd->name)
{
ds->AddSecondaryVariable(vmd->name.c_str());
vectorList.push_back(vmd->name);
}
}
for (i = 0 ; i < md->GetNumMaterials() ; i++)
{
const avtMaterialMetaData *mat_md = md->GetMaterial(i);
if (md->MeshForVar(mat_md->name) == mmd->name)
{
hasMaterialsInProblem = true;
mustGetMaterialsAdditionally = true;
if (shouldAlwaysDoMIR || !CanHandleMaterials())
{
ds->ForceMaterialInterfaceReconstructionOn();
mustGetMaterialsAdditionally = false;
}
else
{
mustGetMaterialsAdditionally = true;
}
materialList.push_back(mat_md->name);
}
}
/*
* Expressions currently only work on the engine, so don't add them.
*
// We only want the expressions that correspond to the mesh we are
// operating on. If there is more than one mesh, then we don't
// really know, so don't add expressions.
if (md->GetNumMeshes() == 1)
{
for (i = 0 ; i < md->GetNumberOfExpressions() ; i++)
{
const Expression *expr = md->GetExpression(i);
Expression::ExprType type = expr->GetType();
bool shouldAdd = false;
if (type == Expression::ScalarMeshVar)
{
shouldAdd = true;
scalarList.push_back(expr->GetName());
}
else if (type == Expression::VectorMeshVar)
{
shouldAdd = true;
vectorList.push_back(expr->GetName());
}
if (shouldAdd)
ds->AddSecondaryVariable(expr->GetName().c_str());
}
}
*
*/
//
// Actually force the read of the data.
//
dob->Update(spec);
//
// Call virtual function that the derived type re-defines to do the
// actual writing. All of the remaining code is devoted to writing out
// the file.
//
OpenFile(filename);
WriteHeaders(md, scalarList, vectorList, materialList);
avtDataTree_p rootnode = GetInputDataTree();
std::vector<avtDataTree_p> nodelist;
nodelist.push_back(rootnode);
//
// This 'for' loop is a bit tricky. We are adding to the nodelist as we
// go, so nodelist.size() keeps going. This is in lieu of recursion.
//
cerr << "About to iterate over chunks..." << endl;
for (int cur_index = 0 ; cur_index < nodelist.size() ; cur_index++)
{
avtDataTree_p dt = nodelist[cur_index];
if (*dt == NULL)
continue;
int nc = dt->GetNChildren();
if (nc > 0)
for (int i = 0 ; i < nc ; i++)
nodelist.push_back(dt->GetChild(i));
else
{
vtkDataSet *in_ds = dt->GetDataRepresentation().GetDataVTK();
int chunk = dt->GetDataRepresentation().GetDomain();
cerr << "Working on chunk " << chunk << endl;
WriteChunk(in_ds, chunk);
}
}
CloseFile();
}
// ************************************************************************* //
// avtDatabaseWriter.h //
// ************************************************************************* //
#ifndef AVT_DATABASE_WRITER_H
#define AVT_DATABASE_WRITER_H
#include <avtOriginatingDatasetSink.h>
#include <string>
#include <vector>
#include <pipeline_exports.h>
class avtDatabaseMetaData;
// ****************************************************************************
// Class: avtDatabaseWriter
//
// Purpose:
// This is a general, abstract interface for writing out databases. It is
// designed to be utilized by the plugin writers.
// This differs from avtDatasetFileWriter, in that avtDatasetFileWriter is
// specialized to specific polygonal file formats. That writer should
// probably be renamed.
//
// Programmer: Hank Childs
// Creation: September 10, 2003
//
// ****************************************************************************
class PIPELINE_API avtDatabaseWriter : public avtOriginatingDatasetSink
{
public:
avtDatabaseWriter();
virtual ~avtDatabaseWriter() {;};
void Write(const std::string &, const avtDatabaseMetaData *);
void SetShouldAlwaysDoMIR(bool s)
{ shouldAlwaysDoMIR = s; };
protected:
bool shouldAlwaysDoMIR;
bool mustGetMaterialsAdditionally;
bool hasMaterialsInProblem;
virtual bool CanHandleMaterials(void) { return false; };
virtual void OpenFile(const std::string &) = 0;
virtual void WriteHeaders(const avtDatabaseMetaData *,
std::vector<std::string>&,std::vector<std::string>&,
std::vector<std::string> &) = 0;
virtual void WriteChunk(vtkDataSet *, int) = 0;
virtual void CloseFile(void) = 0;
};
#endif
......@@ -2397,6 +2397,30 @@ fi
#
# Check for the convert directory
#
echo "$as_me:$LINENO: checking for convert" >&5
echo $ECHO_N "checking for convert... $ECHO_C" >&6
if test -d tools/convert; then
echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6
CONVERT_SER="$""(tmpbin)/convert_ser"
if test -n "$PARALLEL"; then
CONVERT_PAR="$""(tmpbin)/convert_par"
else
CONVERT_PAR=""
fi
else
echo "$as_me:$LINENO: result: not found" >&5
echo "${ECHO_T}not found" >&6
CONVERT_SER=""
CONVERT_PAR=""
fi
#
#
# Check for the makemili directory
#
......@@ -15484,6 +15508,7 @@ TOOLS_FILES="tools/Makefile
tools/annotations/Makefile
tools/avtprep/Makefile
tools/clipeditor/Makefile
tools/convert/Makefile
tools/curv3dprep/Makefile
tools/doxygenate/Makefile
tools/escan/Makefile
......@@ -16134,6 +16159,8 @@ s,@VTK_INCLUDES@,$VTK_INCLUDES,;t t
s,@VTK_LIBS@,$VTK_LIBS,;t t
s,@AVTPREP_SER@,$AVTPREP_SER,;t t
s,@AVTPREP_PAR@,$AVTPREP_PAR,;t t
s,@CONVERT_SER@,$CONVERT_SER,;t t
s,@CONVERT_PAR@,$CONVERT_PAR,;t t
s,@MAKEMILI_SER@,$MAKEMILI_SER,;t t
s,@MAKEMILI_PAR@,$MAKEMILI_PAR,;t t
s,@ENGINE_SER@,$ENGINE_SER,;t t
......
......@@ -439,6 +439,9 @@ dnl
dnl Akira Haddox, Wed Aug 20 10:45:41 PDT 2003
dnl Added support for Boxlib3D.
dnl
dnl Hank Childs, Tue Sep 9 07:36:21 PDT 2003
dnl Added tools/convert.
dnl
dnl --------------------------------------------------------------------------
dnl
......@@ -708,6 +711,27 @@ fi
AC_SUBST(AVTPREP_SER)
AC_SUBST(AVTPREP_PAR)
#
# Check for the convert directory
#
AC_MSG_CHECKING(for convert)
if test -d tools/convert; then
AC_MSG_RESULT(found)
CONVERT_SER="$""(tmpbin)/convert_ser"
if test -n "$PARALLEL"; then
CONVERT_PAR="$""(tmpbin)/convert_par"
else
CONVERT_PAR=""
fi
else
AC_MSG_RESULT(not found)
CONVERT_SER=""
CONVERT_PAR=""
fi
AC_SUBST(CONVERT_SER)
AC_SUBST(CONVERT_PAR)
#
#
# Check for the makemili directory
#
......@@ -2463,6 +2487,7 @@ TOOLS_FILES="tools/Makefile
tools/annotations/Makefile
tools/avtprep/Makefile
tools/clipeditor/Makefile
tools/convert/Makefile
tools/curv3dprep/Makefile
tools/doxygenate/Makefile
tools/escan/Makefile
......
<?xml version="1.0"?>
<Plugin name="Silo" label="Silo" type="database" dbtype="STMD" version="1.0">
<Plugin name="Silo" label="Silo" type="database" dbtype="STMD" version="1.0" haswriter="yes">
<Extensions> silo pdb </Extensions>
<CXXFLAGS> $(SILO_INCLUDE) </CXXFLAGS>
<LIBS> $(SILO_LIB) </LIBS>
......
#include <SiloPluginInfo.h>
#include <avtSiloFileFormat.h>
#include <avtSiloWriter.h>
#include <avtSTMDFileFormatInterface.h>
#include <avtGenericDatabase.h>
......@@ -9,8 +10,8 @@
// Purpose:
// Returns the type of a Silo database.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue Aug 27 17:01:53 PST 2002
// Programmer: childs -- generated by xml2info
// Creation: Thu Sep 11 07:12:15 PDT 2003
//
// ****************************************************************************
DatabaseType
......@@ -25,8 +26,8 @@ SiloCommonPluginInfo::GetDatabaseType()
// Purpose:
// Returns the default extensions for a Silo database.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue Aug 27 17:01:53 PST 2002
// Programmer: childs -- generated by xml2info
// Creation: Thu Sep 11 07:12:15 PDT 2003
//
// ****************************************************************************
std::vector<std::string>
......@@ -39,6 +40,24 @@ SiloCommonPluginInfo::GetDefaultExtensions()
return defaultExtensions;
}
// ****************************************************************************
// Method: SiloCommonPluginInfo::GetWriter
//
// Purpose:
// Sets up a Silo writer.
//
// Returns: A Silo writer.
//
// Programmer: childs -- generated by xml2info
// Creation: Thu Sep 11 07:12:15 PDT 2003
//
// ****************************************************************************
avtDatabaseWriter *
SiloCommonPluginInfo::GetWriter(void)
{
return new avtSiloWriter;
}
// ****************************************************************************
// Method: SiloCommonPluginInfo::SetUpSiloDatabase
//
......@@ -52,8 +71,8 @@ SiloCommonPluginInfo::GetDefaultExtensions()
//
// Returns: A Silo database from list.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue Aug 27 17:01:53 PST 2002
// Programmer: childs -- generated by xml2info
// Creation: Thu Sep 11 07:12:15 PDT 2003
//
// ****************************************************************************
avtDatabase *
......
......@@ -8,6 +8,7 @@
#include <database_plugin_exports.h>
class avtDatabase;
class avtDatabaseWriter;
// ****************************************************************************
// Class: SiloDatabasePluginInfo
......@@ -17,8 +18,8 @@ class avtDatabase;
// Portions are separated into pieces relevant to the appropriate
// components of VisIt.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue Aug 27 17:01:53 PST 2002
// Programmer: childs -- generated by xml2info
// Creation: Thu Sep 11 07:12:14 PDT 2003
//
// Modifications:
//
......@@ -39,6 +40,7 @@ class SiloCommonPluginInfo : public virtual CommonDatabasePluginInfo, public vir
virtual std::vector<std::string> GetDefaultExtensions();
virtual avtDatabase *SetupDatabase(const char * const *list,
int nList, int nBlock);
virtual avtDatabaseWriter *GetWriter(void);
};
class SiloMDServerPluginInfo : public virtual MDServerDatabasePluginInfo, public virtual SiloCommonPluginInfo
......
......@@ -627,6 +627,9 @@ avtSiloFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
// Split some of the methods out of ReadDir so it could be
// parallelized. Only allow the first process to read the root file.
//
// Hank Childs, Fri Sep 12 14:48:33 PDT 2003
// Allow for '0' to be a valid material.
//
// ****************************************************************************
void
......@@ -1360,7 +1363,7 @@ avtSiloFileFormat::ReadDir(DBfile *dbfile, const char *dirname,
for (j = 0 ; j < mat->nmat ; j++)
{
char *num = NULL;
int dlen = int(log10(float(mat->matnos[j]))) + 1;
int dlen = int(log10(float(mat->matnos[j]+1))) + 1;
if (mat->matnames == NULL)
{