Commit a6448c45 authored by hrchilds's avatar hrchilds

Update from March 7, 2006

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@631 18c085ea-50e0-402c-830e-de6fd14e8384
parent e41f36f6
......@@ -373,6 +373,10 @@ class EngineAttributesParser(XMLParser):
# Date: Fri Jun 24 10:03:23 PDT 2005
#
# Modifications:
# Brad Whitlock, Tue Mar 7 15:55:40 PST 2006
# I made it use a new windowImageSize field that contains the size of the
# OpenGL part of the window instead of the windowSize, which is the size of
# the whole window including the decorations and toolbar.
#
###############################################################################
......@@ -426,7 +430,7 @@ class WindowSizeParser(XMLParser):
self.activeWindow = 0
except ValueError:
return
elif name == "windowSize" and type == "intArray":
elif name == "windowImageSize" and type == "intArray":
length = self.dataAtts["length"]
if length == "2":
fragments = string.split(data, " ")
......
......@@ -97,6 +97,9 @@
# Jeremy Meredith, Wed Aug 31 16:48:05 PDT 2005
# I added xml2plugin.
#
# Brad Whitlock, Tue Mar 7 13:47:00 PST 2006
# I added the ability to choose a bank other than bdivp.
#
#-----------------------------------------------------------------------
set Compress = COMPRESS
......@@ -105,6 +108,7 @@ set append = true
set beta = false
set private = false
set config = prompt
set bank = prompt
set logging = false
set group_ownership = none
set dir_permission = 755
......@@ -145,6 +149,11 @@ while ($option_found == true)
shift
shift
breaksw
case -b:
set bank = $2
shift
shift
breaksw
case -l:
set logging = true
shift
......@@ -156,8 +165,8 @@ while ($option_found == true)
end
if ($#argv != 3) then
echo "Usage: visit-install [-c open | closed] [-g group] [-gw] [-l] [-r]"
echo " [-beta | -private] version platform directory"
echo "Usage: visit-install [-c open | closed] [-g group] [-b bank] [-gw] [-l]"
echo " [-r] [-beta | -private] version platform directory"
exit (1)
endif
......@@ -199,6 +208,39 @@ if ($config != none && $config != open && $config != closed) then
exit (1)
endif
if ($bank == prompt) then
# Determine whether the user needs a bank in order to install.
set yn = ""
while ("$yn" == "")
echo "Do you need to use a bank when submitting parallel jobs to a"
echo "batch system? (y/n):"
set yn = `echo $< | tr "[A-Z]" "[a-z]"`
if ("$yn" != "y" && "$yn" != "n") then
set yn = ""
endif
end
# If a bank is required then prompt for it.
if ("$yn" == "y") then
while ($bank == prompt)
echo ""
echo "Type the name of a bank for VisIt to use when launching its"
echo "parallel compute engine in a batch system:"
set bank = $<
if ("$bank" == "") then
echo "YOU MUST ENTER A BANK NAME!"
set bank = prompt
else
echo "You chose bank: $bank"
endif
end
else
# No bank was required. Use the default of bdivp.
set bank = "bdivp"
endif
endif
set version = $1;
set base = `echo visit$version | tr "." "_"`
set platform = $2
......@@ -289,14 +331,17 @@ cd ../../..
cp distribution/visit/data/* $dir/data
#
# Set the link for the configuration file.
# Use the appropriate configuration file, setting the bank to the right value.
#
rm -f $dir/$version+/.visit/config
if ($config == open) then
ln -s visit-config-open $dir/$version+/.visit/config
ln -s visit-config-open $dir/$version+/.visit/config_template
else if ($config == closed) then
ln -s visit-config-closed $dir/$version+/.visit/config
ln -s visit-config-closed $dir/$version+/.visit/config_template
endif
sed -e "s/bdivp/$bank/" $dir/$version+/.visit/config_template > $dir/$version+/.visit/config
chgrp $group_ownership $dir/$version+/.visit/config
chmod 664 $dir/$version+/.visit/config
#
# If we're on MacOS X, then we want to create some small scripts that
......
......@@ -10,6 +10,10 @@
# Usage:
# visit-install-closed [-beta | -private | -public] -v <version>
#
# Modifications:
# Brad Whitlock, Tue Mar 7 14:10:26 PST 2006
# I added -b bdivp to the visit-install invokations.
#
#-----------------------------------------------------------------------
test=no
......@@ -174,7 +178,7 @@ EOF
rm -f hitit
cat <<EOF > hitit
./visit-install -r -private -c closed -g visit -gw -l $ver linux /usr/gapps/visit > installlog 2>&1
./visit-install -r -private -c closed -g visit -b bdivp -gw -l $ver linux /usr/gapps/visit > installlog 2>&1
echo "" >> resultlog 2>&1
echo " install of visit on hitit" >> resultlog 2>&1
echo " ---------------------------" >> resultlog 2>&1
......@@ -208,7 +212,7 @@ fi
rm -f sunset
cat <<EOF > sunset
./visit-install -private -c closed -g visit -gw -l $ver sunos5 /usr/gapps/visit > installlog 2>&1
./visit-install -private -c closed -g visit -b bdivp -gw -l $ver sunos5 /usr/gapps/visit > installlog 2>&1
echo "" >> resultlog 2>&1
echo " install of visit on sunset" >> resultlog 2>&1
echo " ----------------------------" >> resultlog 2>&1
......@@ -263,7 +267,7 @@ EOF
rm -f sc
cat <<EOF > sc
./visit-install -r -private -c closed -g visit -gw -l $ver osf1 /usr/gapps/visit > installlog 2>&1
./visit-install -r -private -c closed -g visit -b bdivp -gw -l $ver osf1 /usr/gapps/visit > installlog 2>&1
echo "" >> resultlog 2>&1
echo " install of visit on sc" >> resultlog 2>&1
echo " ------------------------" >> resultlog 2>&1
......@@ -297,7 +301,7 @@ fi
rm -f tidalwave
cat <<EOF > tidalwave
./visit-install -private -c closed -g visit -gw -l $ver irix6 /usr/gapps/visit > installlog 2>&1
./visit-install -private -c closed -g visit -b bdivp -gw -l $ver irix6 /usr/gapps/visit > installlog 2>&1
echo "" >> resultlog 2>&1
echo " install of visit on tidalwave" >> resultlog 2>&1
echo " -------------------------------" >> resultlog 2>&1
......@@ -331,7 +335,7 @@ fi
rm -f white
cat <<EOF > white
./visit-install -private -c closed -g visit -gw -l $ver aix /usr/gapps/visit > installlog 2>&1
./visit-install -private -c closed -g visit -b bdivp -gw -l $ver aix /usr/gapps/visit > installlog 2>&1
echo "" >> resultlog 2>&1
echo " install of visit on white" >> resultlog 2>&1
echo " ---------------------------" >> resultlog 2>&1
......@@ -365,7 +369,7 @@ fi
rm -f pu
cat <<EOF > pu
./visit-install -private -c closed -g visit -gw -l $ver aix64-xlc /usr/gapps/visit > installlog 2>&1
./visit-install -private -c closed -g visit -b bdivp -gw -l $ver aix64-xlc /usr/gapps/visit > installlog 2>&1
echo "" >> resultlog 2>&1
echo " install of visit on pu" >> resultlog 2>&1
echo " ------------------------" >> resultlog 2>&1
......@@ -399,7 +403,7 @@ fi
rm -f lilac
cat <<EOF > lilac
./visit-install $verflag -c closed -g visit -gw -l $ver linux /usr/gapps/visit > installlog 2>&1
./visit-install $verflag -c closed -g visit -b bdivp -gw -l $ver linux /usr/gapps/visit > installlog 2>&1
echo "" >> resultlog 2>&1
echo " install of visit on lilac" >> resultlog 2>&1
echo " ---------------------------" >> resultlog 2>&1
......
......@@ -15,6 +15,9 @@
# I fixed some errors that prevented other users from installing on
# mcr and thunder.
#
# Brad Whitlock, Tue Mar 7 14:08:59 PST 2006
# Added -b bank to the visit-install invokations.
#
#-----------------------------------------------------------------------
test=no
......@@ -211,7 +214,7 @@ scp kickit:/var/tmp/$user/kickit/visitbuild/visit$ver2.linux.tar.gz visit$ver2.l
rm -f hoth
cat <<EOF > hoth
#!/bin/sh
./visit-install -r -private -c open -g visit -gw -l $ver linux_rhel3 /usr/gapps/visit > installlog 2>&1
./visit-install -r -private -c open -g visit -b bdivp -gw -l $ver linux_rhel3 /usr/gapps/visit > installlog 2>&1
rm -f resultlog
echo " install of visit on hoth" > resultlog 2>&1
echo " --------------------------" >> resultlog 2>&1
......@@ -247,7 +250,7 @@ fi
rm -f sunspot
cat <<EOF > sunspot
#!/bin/sh
./visit-install $verflag -c open -g visit -gw -l $ver sunos5 /usr/gapps/visit > installlog 2>&1
./visit-install $verflag -c open -g visit -b bdivp -gw -l $ver sunos5 /usr/gapps/visit > installlog 2>&1
rm -f resultlog
echo " install of visit on sunspot" > resultlog 2>&1
echo " -----------------------------" >> resultlog 2>&1
......@@ -283,7 +286,7 @@ fi
rm -f quad
cat <<EOF > quad
#!/bin/sh
./visit-install -r -private -c open -g visit -gw -l $ver irix6 /usr/gapps/visit > installlog 2>&1
./visit-install -r -private -c open -g visit -b bdivp -gw -l $ver irix6 /usr/gapps/visit > installlog 2>&1
rm -f resultlog
echo " install of visit on quad" > resultlog 2>&1
echo " --------------------------" >> resultlog 2>&1
......@@ -319,7 +322,7 @@ fi
rm -f gps
cat <<EOF > gps
#!/bin/sh
./visit-install -private -c open -g visit -gw -l $ver osf1 /usr/gapps/visit > installlog 2>&1
./visit-install -private -c open -g visit -b bdivp -gw -l $ver osf1 /usr/gapps/visit > installlog 2>&1
rm -f resultlog
echo " install of visit on gps" > resultlog 2>&1
echo " -------------------------" >> resultlog 2>&1
......@@ -355,7 +358,7 @@ fi
rm -f berg
cat <<EOF > berg
#!/bin/sh
./visit-install -private -c open -g visit -gw -l $ver aix /usr/gapps/visit > installlog 2>&1
./visit-install -private -c open -g visit -b bdivp -gw -l $ver aix /usr/gapps/visit > installlog 2>&1
rm -f resultlog
echo " install of visit on berg" > resultlog 2>&1
echo " --------------------------" >> resultlog 2>&1
......@@ -391,7 +394,7 @@ fi
rm -f up
cat <<EOF > up
#!/bin/sh
./visit-install -private -c open -g visit -gw -l $ver aix64-xlc /usr/gapps/visit > installlog 2>&1
./visit-install -private -c open -g visit -b bdivp -gw -l $ver aix64-xlc /usr/gapps/visit > installlog 2>&1
rm -f resultlog
echo "" > resultlog 2>&1
echo " install of visit on up" >> resultlog 2>&1
......@@ -428,7 +431,7 @@ fi
rm -f pengra
cat <<EOF > pengra
#!/bin/sh
./visit-install -private -c open -g visit -gw -l $ver linux_chaos /usr/gapps/visit > installlog 2>&1
./visit-install -private -c open -g visit -b bdivp -gw -l $ver linux_chaos /usr/gapps/visit > installlog 2>&1
rm -f resultlog
echo " install of visit on pengra" > resultlog 2>&1
echo " ----------------------------" >> resultlog 2>&1
......@@ -464,7 +467,7 @@ fi
rm -f thunder
cat <<EOF > thunder
#!/bin/sh
./visit-install -private -c open -g visit -gw -l $ver linux-ia64 /usr/gapps/visit > installlog 2>&1
./visit-install -private -c open -g visit -b bdivp -gw -l $ver linux-ia64 /usr/gapps/visit > installlog 2>&1
rm -f resultlog
echo " install of visit on thunder" > resultlog 2>&1
echo " -----------------------------" >> resultlog 2>&1
......@@ -500,7 +503,7 @@ fi
rm -f gauss
cat <<EOF > gauss
#!/bin/sh
./visit-install $verflag -c open -g visit -gw -l $ver linux-x86_64 /usr/gapps/visit > installlog 2>&1
./visit-install $verflag -c open -g visit -b bdivp -gw -l $ver linux-x86_64 /usr/gapps/visit > installlog 2>&1
rm -f resultlog
echo " install of visit on gauss" > resultlog 2>&1
echo " ---------------------------" >> resultlog 2>&1
......
......@@ -50,7 +50,7 @@ View2DAttributes::TriStateMode_FromString(const std::string &s, View2DAttributes
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -66,7 +66,7 @@ View2DAttributes::View2DAttributes() : AttributeSubject("DDid")
viewportCoords[1] = 0.1;
viewportCoords[2] = 0.9;
viewportCoords[3] = 0.9;
fullFrameActivationMode = Off;
fullFrameActivationMode = Auto;
fullFrameAutoThreshold = 100;
}
......@@ -79,7 +79,7 @@ View2DAttributes::View2DAttributes() : AttributeSubject("DDid")
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -110,7 +110,7 @@ View2DAttributes::View2DAttributes(const View2DAttributes &obj) : AttributeSubje
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -130,7 +130,7 @@ View2DAttributes::~View2DAttributes()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -164,7 +164,7 @@ View2DAttributes::operator = (const View2DAttributes &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -201,7 +201,7 @@ View2DAttributes::operator == (const View2DAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -222,7 +222,7 @@ View2DAttributes::operator != (const View2DAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -243,7 +243,7 @@ View2DAttributes::TypeName() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -271,7 +271,7 @@ View2DAttributes::CopyAttributes(const AttributeGroup *atts)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -297,7 +297,7 @@ View2DAttributes::CreateCompatible(const std::string &tname) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -324,7 +324,7 @@ View2DAttributes::NewInstance(bool copy) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -352,7 +352,7 @@ View2DAttributes::SelectAll()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -412,7 +412,7 @@ View2DAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool force
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -561,7 +561,7 @@ View2DAttributes::SelectViewportCoords()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -589,7 +589,7 @@ View2DAttributes::GetFieldName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -617,7 +617,7 @@ View2DAttributes::GetFieldType(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......@@ -645,7 +645,7 @@ View2DAttributes::GetFieldTypeName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......
......@@ -2,6 +2,7 @@ Constant: DEFAULT_FULL_FRAME_AUTO_THRESHOLD
Declaration: static const double DEFAULT_FULL_FRAME_AUTO_THRESHOLD;
Definition: const double View2DAttributes::DEFAULT_FULL_FRAME_AUTO_THRESHOLD = 100.0;
Function: GetUseFullFrame
Declaration: bool GetUseFullFrame(const double *limits=0) const;
Definition:
......@@ -78,3 +79,4 @@ View2DAttributes::SetUseFullFrame(bool ff)
else
fullFrameActivationMode = Off;
}
......@@ -13,7 +13,7 @@
// Notes: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Mon Jul 25 16:10:32 PST 2005
// Creation: Tue Mar 7 11:30:08 PDT 2006
//
// Modifications:
//
......
......@@ -18,7 +18,7 @@
0.900000
</Field>
<Field name="fullFrameActivationMode" label="fullFrameActivationMode" type="enum" subtype="TriStateMode">
Off
Auto
</Field>
<Field name="fullFrameAutoThreshold" label="fullFrameAutoThreshold" type="double">
100.000000
......
......@@ -132,6 +132,9 @@
# Hank Childs, Sat Feb 18 10:25:59 PST 2006
# Added ApplyDDF.
#
# Hank Childs, Sun Mar 5 16:00:07 PST 2006
# Added avtTimeExpression.
#
##############################################################################
@SET_MAKE@
......@@ -224,7 +227,8 @@ Management_src= \
Management/avtConstantCreatorFilter.C \
Management/avtExprNode.C \
Management/avtExprNodeFactory.C \
Management/ExprPipelineState.C
Management/ExprPipelineState.C \
Management/avtTimeExpression.C
Math_src= \
Math/avtAbsValFilter.C \
......
......@@ -93,6 +93,7 @@
#include <avtSymmTransformExpression.h>
#include <avtEvalPlaneExpression.h>
#include <avtSymmPlaneExpression.h>
#include <avtTimeExpression.h>
#include <stdio.h>
#include <ExpressionException.h>
......@@ -438,6 +439,9 @@ avtVectorExpr::CreateFilters(ExprPipelineState *state)
// Hank Childs, Sat Feb 18 10:24:30 PST 2006
// Added apply_ddf.
//
// Hank Childs, Sun Mar 5 16:01:34 PST 2006
// Added time.
//
// ****************************************************************************
void
avtFunctionExpr::CreateFilters(ExprPipelineState *state)
......@@ -669,6 +673,8 @@ avtFunctionExpr::CreateFilters(ExprPipelineState *state)
f = new avtEvalPlaneExpression;
else if (functionName == "symm_plane")
f = new avtSymmPlaneExpression;
else if (functionName == "time")
f = new avtTimeExpression;
else if (functionName == "surface_normal" ||
functionName == "point_surface_normal")
{
......
// ************************************************************************* //
// avtTimeExpression.C //
// ************************************************************************* //
#include <avtTimeExpression.h>
#include <vtkDataArray.h>
#include <vtkDataSet.h>
#include <vtkFloatArray.h>
#include <vtkUnsignedCharArray.h>
// ****************************************************************************
// Method: avtTimeExpression constructor
//
// Purpose:
// Defines the constructor. Note: this should not be inlined in the
// header because it causes problems for certain compilers.
//
// Programmer: Hank Childs
// Creation: March 5, 2006
//
// ****************************************************************************
avtTimeExpression::avtTimeExpression()
{
}
// ****************************************************************************
// Method: avtTimeExpression destructor
//
// Purpose:
// Defines the destructor. Note: this should not be inlined in the header
// because it causes problems for certain compilers.
//
// Programmer: Hank Childs
// Creation: March 5, 2006
//
// ****************************************************************************
avtTimeExpression::~avtTimeExpression()
{
;
}
// ****************************************************************************
// Method: avtTimeExpression::DoOperation
//
// Purpose:
// Generates new constants (the time).
//
// Arguments:
// in The input data array (ignored).
// out The output data array.
// ncomponents The number of components ('1' for scalar, '2' or '3' for
// vectors, etc.)
// ntuples The number of tuples (ie 'npoints' or 'ncells')
//
// Programmer: Hank Childs
// Creation: March 5, 2006
//
// ****************************************************************************
void
avtTimeExpression::DoOperation(vtkDataArray *, vtkDataArray *out,
int ncomponents, int ntuples)
{
float ftime = (float) GetInput()->GetInfo().GetAttributes().GetTime();
for (int i = 0 ; i < ntuples ; i++)
out->SetTuple1(i, ftime);
}
// ****************************************************************************
// Method: avtTimeExpression::CreateArray
//
// Purpose:
// Creates an array of constant value. Note that this routine will not
// return uchar arrays. The motivation for this is that most uchar arrays
// come from the conditional expression (if), which uses a uchar as the
// conditional, but really wants floats as the then- and else- variables.
// (ie if(gt(X, 2.), 1., 0.) -- the constant 1. should be a float
// (or whatever X is, not a uchar).
//
// Programmer: Hank Childs
// Creation: March 5, 2006
//
// ****************************************************************************
vtkDataArray *
avtTimeExpression::CreateArray(vtkDataArray *in)
{
if (in->GetDataType() == VTK_UNSIGNED_CHAR)
{
return vtkFloatArray::New();
}
return in->NewInstance();
}
// ************************************************************************* //
// avtTimeExpression.h //
// ************************************************************************* //
#ifndef AVT_TIME_EXPRESSION_H
#define AVT_TIME_EXPRESSION_H
#include <avtUnaryMathFilter.h>
// ****************************************************************************
// Class: avtTimeExpression
//
// Purpose:
// Creates a constant, where the constant is the time.
//
// Programmer: Hank Childs
// Creation: March 5, 2006
//
// ****************************************************************************
class EXPRESSION_API avtTimeExpression : public avtUnaryMathFilter
{
public:
avtTimeExpression();
virtual ~avtTimeExpression();
virtual const char * GetType(void)
{ return "avtTimeExpression"; };
virtual const char * GetDescription(void)
{ return "Generating constant (time)"; };
protected:
virtual void DoOperation(vtkDataArray *in, vtkDataArray *out,
int ncomponents, int ntuples);
virtual int GetNumberOfComponentsInOutput(int) { return 1; };
virtual int GetVariableDimension(void) { return 1; };
virtual vtkDataArray *CreateArray(vtkDataArray *);
};
#endif
......@@ -47,11 +47,16 @@ using std::vector;
// Programmer: Hank Childs
// Creation: May 24, 2002
//
// Modifications:
// Brad Whitlock, Mon Mar 6 17:36:50 PST 2006
// Added oldFileBase.
//
// ****************************************************************************
avtDatasetFileWriter::avtDatasetFileWriter()
{
nFilesWritten = 0;
oldFileBase = 0;
}
......@@ -65,11 +70,16 @@ avtDatasetFileWriter::avtDatasetFileWriter()
// Programmer: Hank Childs
// Creation: February 5, 2004
//
// Modifications:
// Brad Whitlock, Mon Mar 6 17:37:26 PST 2006
// Added oldFileBase.
//
// ****************************************************************************
avtDatasetFileWriter::~avtDatasetFileWriter()
{
;
if(oldFileBase != 0)
delete [] oldFileBase;
}
......@@ -633,9 +643,11 @@ avtDatasetFileWriter::WriteCurveFile(const char *filename)
// Creation: May 24, 2002
//
// Modifications:
// Hank Childs, Mon Feb 24 18:22:04 PST 2003
// Allow for non-familied filenames.
//
// Hank Childs, Mon Feb 24 18:22:04 PST 2003
// Allow for non-familied filenames.
// Brad Whitlock, Mon Mar 6 17:39:39 PST 2006
// Added code to reset nFilesWritten if the file base changes.
//
// ****************************************************************************
......@@ -646,6 +658,24 @@ avtDatasetFileWriter::CreateFilename(const char *base, bool family,
char *str = NULL;
int len = strlen(base);
// Reset the nFilesWritten count if the file base changes.
if(family)
{
if(oldFileBase == NULL)
{
oldFileBase = new char[len+1];
strcpy(oldFileBase, base);
}
else if(strcmp(oldFileBase, base) != 0)
{
delete [] oldFileBase;
oldFileBase = new char[len+1];
strcpy(oldFileBase, base);
nFilesWritten = 0;
}
}
//
// Get memory for the filename.
//
......
......@@ -45,6 +45,9 @@ typedef enum
// Moved inlined destructor definition to .C file because certain compilers
// have problems with them.
//
// Brad Whitlock, Mon Mar 6 17:35:28 PST 2006
// I made it reset nFilesWritten if the nase changes.
//
// ****************************************************************************
class AVTFILEWRITER_API avtDatasetFileWriter : public avtOriginatingDatasetSink
......@@ -61,6 +64,7 @@ class AVTFILEWRITER_API avtDatasetFileWriter : public avtOriginatingDatasetSink
protected:
static const char *extensions[];
int nFilesWritten;
char *oldFileBase;
void