Commit a20a9062 authored by hrchilds's avatar hrchilds

Update from February 22, 2005

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@417 18c085ea-50e0-402c-830e-de6fd14e8384
parent 40df1c52
......@@ -54,6 +54,9 @@ $0 = shift @ARGV;
# Jeremy Meredith, Thu Feb 17 15:29:20 PST 2005
# Added support for valgrind.
#
# Jeremy Meredith, Tue Feb 22 18:57:58 PST 2005
# Renamed convert to visitconvert because it is more unique.
#
###############################################################################
......@@ -506,7 +509,7 @@ if ((($parallel) or ($launchengine)) and
# confuse the script, we turn off the parallel flag. So we
# translate the executable name here.
#
if (($exe_name eq "makemili") or ($exe_name eq "convert"))
if (($exe_name eq "makemili") or ($exe_name eq "visitconvert"))
{
$exe_name .= "_par";
}
......@@ -630,7 +633,7 @@ if (!$part_set && (substr($launch,0,4) eq "psub"))
# 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"))
if (($exe_name eq "makemili") or ($exe_name eq "visitconvert"))
{
$exe_name .= "_ser" if (!$parallel);
}
......
......@@ -191,6 +191,9 @@
# Added support for version-specific visit scripts and the ability to
# launch tools without passing them as an argument to the visit script.
#
# Jeremy Meredith, Tue Feb 22 18:55:53 PST 2005
# Renamed convert to the more unique visitconver.
#
#------------------------------------------------------------------------------
set DataFiles = "TRUE"
......@@ -610,9 +613,9 @@ cp $VisItDir/exe/curv3dprep $bindir
# copy text2polys and time_annotation
cp $VisItDir/exe/text2polys $bindir
cp $VisItDir/exe/time_annotation $bindir
cp $VisItDir/exe/convert_ser $bindir
if(-e $VisItDir/exe/convert_par) then
cp $VisItDir/exe/convert_par $bindir/convert_par
cp $VisItDir/exe/visitconvert_ser $bindir
if(-e $VisItDir/exe/visitconvert_par) then
cp $VisItDir/exe/visitconvert_par $bindir/visitconvert_par
endif
if(-e $VisItDir/exe/makemili_ser) then
cp $VisItDir/exe/makemili_ser $bindir/makemili_ser
......@@ -627,7 +630,7 @@ cp $VisItDir/exe/surfcomp $bindir
#
# Make symlinks for the programs
#
ln -s frontendlauncher distribution/visit/bin/convert
ln -s frontendlauncher distribution/visit/bin/visitconvert
ln -s frontendlauncher distribution/visit/bin/curv3dprep
ln -s frontendlauncher distribution/visit/bin/makemili
ln -s frontendlauncher distribution/visit/bin/mpeg_encode
......
......@@ -45,6 +45,11 @@ class avtDatabaseWriter;
// Hank Childs, Thu Feb 19 10:01:47 PST 2004
// Added GetFilenames. Made GetDefaultExtensions not be pure virtual.
//
// Jeremy Meredith, Tue Feb 22 18:36:54 PST 2005
// Moved GetWriter to the engine so the mdserver doesn't need it.
// Added the general plugin info method HasWriter so the mdserver
// can still check if it is supported by the given plugin.
//
// ****************************************************************************
class PLUGIN_API GeneralDatabasePluginInfo
......@@ -54,6 +59,7 @@ class PLUGIN_API GeneralDatabasePluginInfo
virtual char *GetVersion() const = 0;
virtual char *GetID() const = 0;
virtual bool EnabledByDefault() const { return true; }
virtual bool HasWriter() const { return false; }
};
class PLUGIN_API CommonDatabasePluginInfo : public virtual GeneralDatabasePluginInfo
......@@ -66,7 +72,6 @@ class PLUGIN_API CommonDatabasePluginInfo : public virtual GeneralDatabasePlugin
{ std::vector<std::string> rv; return rv; };
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
......@@ -79,8 +84,7 @@ class PLUGIN_API MDServerDatabasePluginInfo : public virtual CommonDatabasePlugi
class PLUGIN_API EngineDatabasePluginInfo : public virtual CommonDatabasePluginInfo
{
public:
// this makes compilers happy... remove if we ever have functions here
virtual void dummy() = 0;
virtual avtDatabaseWriter *GetWriter(void) { return NULL; };
};
#endif
......@@ -102,6 +102,31 @@ DatabasePluginManager::Instance()
return instance;
}
// ****************************************************************************
// Method: DatabasePluginManager::GetEnginePluginInfo
//
// Purpose:
// Return a pointer to the engine database plugin information for the
// specified database type.
//
// Arguments:
// id The id of the database type.
//
// Returns: The engine database plugin information for the database type.
//
// Programmer: Jeremy Meredith
// Creation: February 22, 2005
//
// Modifications:
//
// ****************************************************************************
EngineDatabasePluginInfo *
DatabasePluginManager::GetEnginePluginInfo(const string &id)
{
return enginePluginInfo[loadedindexmap[id]];
}
// ****************************************************************************
// Method: DatabasePluginManager::GetCommonPluginInfo
//
......@@ -140,6 +165,9 @@ DatabasePluginManager::GetCommonPluginInfo(const string &id)
// Jeremy Meredith, Wed Nov 5 13:28:03 PST 2003
// Use the default value for enabled status instead of always true.
//
// Jeremy Meredith, Tue Feb 22 15:22:29 PST 2005
// Added a way to determine directly if a plugin has a writer.
//
// ****************************************************************************
bool
......@@ -168,10 +196,11 @@ DatabasePluginManager::LoadGeneralPluginInfo()
// Success! Add it to the list.
allindexmap[info->GetID()] = ids.size();
ids .push_back(info->GetID());
names .push_back(info->GetName());
versions.push_back(info->GetVersion());
enabled .push_back(info->EnabledByDefault());
ids .push_back(info->GetID());
names .push_back(info->GetName());
versions .push_back(info->GetVersion());
enabled .push_back(info->EnabledByDefault());
haswriter.push_back(info->HasWriter());
return true;
}
......@@ -304,3 +333,29 @@ DatabasePluginManager::ReloadPlugins()
LoadPluginsNow();
}
// ****************************************************************************
// Method: DatabasePluginManager::PluginHasWriter
//
// Purpose:
// Returns true if a database plugin has a writer method.
//
// Arguments:
// id the plugin id
//
// Programmer: Jeremy Meredith
// Creation: February 22, 2005
//
// ****************************************************************************
bool
DatabasePluginManager::PluginHasWriter(const string &id)
{
bool retval = false;
if(allindexmap.find(id) != allindexmap.end())
{
int index = allindexmap[id];
if(index < names.size())
retval = haswriter[index];
}
return retval;
}
......@@ -25,12 +25,14 @@ class EngineDatabasePluginInfo;
// Creation: August 21, 2002
//
// Modifications:
//
// Jeremy Meredith, Fri Feb 28 12:26:45 PST 2003
// Renamed LoadCommonPluginInfo to LoadGeneralPluginInfo to clarify its
// purpose (which really is unrelated to FreeCommonPluginInfo and
// GetCommonPluginInfo).
//
// Jeremy Meredith, Tue Feb 22 15:20:03 PST 2005
// Added way to determine directly if a plugin has a writer.
//
// ****************************************************************************
class PLUGIN_API DatabasePluginManager : public PluginManager
......@@ -44,6 +46,8 @@ class PLUGIN_API DatabasePluginManager : public PluginManager
virtual void ReloadPlugins();
CommonDatabasePluginInfo *GetCommonPluginInfo(const std::string&);
EngineDatabasePluginInfo *GetEnginePluginInfo(const std::string&);
bool PluginHasWriter(const std::string&);
private:
DatabasePluginManager();
......@@ -57,6 +61,9 @@ class PLUGIN_API DatabasePluginManager : public PluginManager
// the plugin manager instance
static DatabasePluginManager *instance;
// arrays containing all plugins (appends the ones in PluginManager.C)
std::vector<bool> haswriter;
// arrays containing enabled plugins
std::vector<CommonDatabasePluginInfo*> commonPluginInfo;
std::vector<MDServerDatabasePluginInfo*> mdserverPluginInfo;
......
......@@ -518,18 +518,18 @@ ColorAttribute::ColorAttribute(int red, int green, int blue, int alpha) :
void
ColorAttribute::SetRgb(int red, int green, int blue)
{
color[0] = (int)red;
color[1] = (int)green;
color[2] = (int)blue;
color[0] = (unsigned char)red;
color[1] = (unsigned char)green;
color[2] = (unsigned char)blue;
}
void
ColorAttribute::SetRgba(int red, int green, int blue, int alpha)
{
color[0] = (int)red;
color[1] = (int)green;
color[2] = (int)blue;
color[3] = (int)alpha;
color[0] = (unsigned char)red;
color[1] = (unsigned char)green;
color[2] = (unsigned char)blue;
color[3] = (unsigned char)alpha;
}
void
......@@ -544,25 +544,25 @@ ColorAttribute::GetRgba(double c[4]) const
void
ColorAttribute::SetRed(int red)
{
color[0] = (char)(red & 255);
color[0] = (unsigned char)(red & 255);
}
void
ColorAttribute::SetGreen(int green)
{
color[1] = (char)(green & 255);
color[1] = (unsigned char)(green & 255);
}
void
ColorAttribute::SetBlue(int blue)
{
color[2] = (char)(blue & 255);
color[2] = (unsigned char)(blue & 255);
}
void
ColorAttribute::SetAlpha(int alpha)
{
color[3] = (char)(alpha & 255);
color[3] = (unsigned char)(alpha & 255);
}
int
......@@ -591,9 +591,9 @@ ColorAttribute::Alpha() const
void ColorAttribute::SetRgba2(double c[4])
{
color[0] = (unsigned) (c[0] * 255.);
color[1] = (unsigned) (c[1] * 255.);
color[2] = (unsigned) (c[2] * 255.);
color[3] = (unsigned) (c[3] * 255.);
color[0] = (unsigned char) (c[0] * 255.);
color[1] = (unsigned char) (c[1] * 255.);
color[2] = (unsigned char) (c[2] * 255.);
color[3] = (unsigned char) (c[3] * 255.);
}
......@@ -31,9 +31,9 @@ Definition:
void
ColorAttribute::SetRgb(int red, int green, int blue)
{
color[0] = (int)red;
color[1] = (int)green;
color[2] = (int)blue;
color[0] = (unsigned char)red;
color[1] = (unsigned char)green;
color[2] = (unsigned char)blue;
}
Function: SetRgba
......@@ -42,10 +42,10 @@ Definition:
void
ColorAttribute::SetRgba(int red, int green, int blue, int alpha)
{
color[0] = (int)red;
color[1] = (int)green;
color[2] = (int)blue;
color[3] = (int)alpha;
color[0] = (unsigned char)red;
color[1] = (unsigned char)green;
color[2] = (unsigned char)blue;
color[3] = (unsigned char)alpha;
}
Function: GetRgba
......@@ -66,7 +66,7 @@ Definition:
void
ColorAttribute::SetRed(int red)
{
color[0] = (char)(red & 255);
color[0] = (unsigned char)(red & 255);
}
Function: SetGreen
......@@ -75,7 +75,7 @@ Definition:
void
ColorAttribute::SetGreen(int green)
{
color[1] = (char)(green & 255);
color[1] = (unsigned char)(green & 255);
}
......@@ -85,7 +85,7 @@ Definition:
void
ColorAttribute::SetBlue(int blue)
{
color[2] = (char)(blue & 255);
color[2] = (unsigned char)(blue & 255);
}
Function: SetAlpha
......@@ -94,7 +94,7 @@ Definition:
void
ColorAttribute::SetAlpha(int alpha)
{
color[3] = (char)(alpha & 255);
color[3] = (unsigned char)(alpha & 255);
}
Function: Red
......@@ -175,9 +175,9 @@ Declaration: void SetRgba2(double c[4]);
Definition:
void ColorAttribute::SetRgba2(double c[4])
{
color[0] = (unsigned) (c[0] * 255.);
color[1] = (unsigned) (c[1] * 255.);
color[2] = (unsigned) (c[2] * 255.);
color[3] = (unsigned) (c[3] * 255.);
color[0] = (unsigned char)(c[0] * 255.);
color[1] = (unsigned char)(c[1] * 255.);
color[2] = (unsigned char)(c[2] * 255.);
color[3] = (unsigned char)(c[3] * 255.);
}
......@@ -12,6 +12,7 @@
#include <ExprPipelineState.h>
class avtSourceFromAVTDataset;
// ****************************************************************************
// Class: avtExpressionEvaluatorFilter
......
......@@ -23,11 +23,16 @@
// Hank Childs, Sat Sep 11 12:14:31 PDT 2004
// Initialized new data members for target chunks, total zones.
//
// Jeremy Meredith, Wed Feb 16 15:01:40 PST 2005
// Initialized members to disable MIR and Expressions.
//
// ****************************************************************************
avtDatabaseWriter::avtDatabaseWriter()
{
shouldAlwaysDoMIR = false;
shouldNeverDoMIR = false;
shouldNeverDoExpressions = false;
hasMaterialsInProblem = false;
mustGetMaterialsAdditionally = false;
......@@ -133,6 +138,9 @@ avtDatabaseWriter::Write(const std::string &filename,
// Hank Childs, Wed Dec 22 11:25:07 PST 2004
// Enable expressions, since they now work inside of convert.
//
// Jeremy Meredith, Wed Feb 16 15:01:40 PST 2005
// Added ability to disable MIR and Expressions.
//
// ****************************************************************************
void
......@@ -206,7 +214,7 @@ avtDatabaseWriter::Write(const std::string &filename,
// operating on. If there is more than one mesh, then we don't
// really know, so don't add expressions.
//
if (md->GetNumMeshes() == 1)
if (md->GetNumMeshes() == 1 && !shouldNeverDoExpressions)
{
for (i = 0 ; i < md->GetNumberOfExpressions() ; i++)
{
......@@ -237,7 +245,8 @@ avtDatabaseWriter::Write(const std::string &filename,
{
hasMaterialsInProblem = true;
mustGetMaterialsAdditionally = true;
if (shouldAlwaysDoMIR || !CanHandleMaterials())
if (!shouldNeverDoMIR &&
(shouldAlwaysDoMIR || !CanHandleMaterials()))
{
ds->ForceMaterialInterfaceReconstructionOn();
mustGetMaterialsAdditionally = false;
......
......@@ -43,6 +43,9 @@ class avtDatabaseMetaData;
// I replaced long long with VISIT_LONG_LONG so the code can build
// on Windows using the MSVC 6.0 compiler.
//
// Jeremy Meredith, Wed Feb 16 15:01:40 PST 2005
// Added ability to disable MIR and Expressions.
//
// ****************************************************************************
class PIPELINE_API avtDatabaseWriter : public avtOriginatingDatasetSink
......@@ -58,12 +61,20 @@ class PIPELINE_API avtDatabaseWriter : public avtOriginatingDatasetSink
void SetShouldAlwaysDoMIR(bool s)
{ shouldAlwaysDoMIR = s; };
void SetShouldNeverDoMIR(bool s)
{ shouldNeverDoMIR = s; };
void SetShouldNeverDoExpressions(bool s)
{ shouldNeverDoExpressions = s; };
bool SetTargetChunks(int nChunks);
bool SetTargetZones(VISIT_LONG_LONG nTotalZones);
void SetVariableList(std::vector<std::string> &);
protected:
bool shouldAlwaysDoMIR;
bool shouldNeverDoMIR;
bool shouldNeverDoExpressions;
bool mustGetMaterialsAdditionally;
bool hasMaterialsInProblem;
......
......@@ -59,9 +59,10 @@ CFLAGS="-pthread"
PTHREAD_CXXFLAGS="-pthread"
##
## We only get 256MB of memory by default.
## We only get 256MB of memory by default, thus the maxdata flag
## We can only use 2GB/node without large pages (-blpdata)
##
LDFLAGS="-Wl,-bmaxdata:0x70000000 $LDFLAGS"
LDFLAGS="-Wl,-blpdata -Wl,-bmaxdata:0x70000000 $LDFLAGS"
##
## Make sure we use the right MPI library (05/04/01 JSM)
......
......@@ -59,9 +59,10 @@ CFLAGS="-pthread"
PTHREAD_CXXFLAGS="-pthread"
##
## We only get 256MB of memory by default.
## We only get 256MB of memory by default, thus the maxdata flag
## We can only use 2GB/node without large pages (-blpdata)
##
LDFLAGS="-Wl,-bmaxdata:0x70000000 $LDFLAGS"
LDFLAGS="-Wl,-blpdata -Wl,-bmaxdata:0x70000000 $LDFLAGS"
##
## Make sure we use the right MPI library (05/04/01 JSM)
......
......@@ -59,9 +59,10 @@ CFLAGS="-pthread"
PTHREAD_CXXFLAGS="-pthread"
##
## We only get 256MB of memory by default.
## We only get 256MB of memory by default, thus the maxdata flag
## We can only use 2GB/node without large pages (-blpdata)
##
LDFLAGS="-Wl,-bmaxdata:0x70000000 $LDFLAGS"
LDFLAGS="-Wl,-blpdata -Wl,-bmaxdata:0x70000000 $LDFLAGS"
##
## Make sure we use the right MPI library (05/04/01 JSM)
......
......@@ -45,7 +45,11 @@ PYVERSION=python2.1
##
## Turn off warnings for deprecated features.
##
##CXXFLAGS="-Wno-deprecated $CXXFLAGS"
##
## Turn on dynamic cast code.
##
CXXFLAGS="-qrtti=dynamiccast $CXXFLAGS"
##
## Turn on fake exceptions.
......@@ -53,9 +57,10 @@ PYVERSION=python2.1
##FAKE_EXCEPTIONS_BY_DEFAULT="yes"
##
## We only get 256MB of memory by default.
## We only get 256MB of memory by default, thus the maxdata flag
## We can only use 2GB/node without large pages (-blpdata)
##
## LDFLAGS="-Wl,-bmaxdata:0x70000000 $LDFLAGS"
LDFLAGS="-Wl,-blpdata -Wl,-bmaxdata:0x70000000 $LDFLAGS"
##
## Make sure we use the right MPI library (05/04/01 JSM)
......
......@@ -59,9 +59,10 @@ CFLAGS="-pthread"
PTHREAD_CXXFLAGS="-pthread"
##
## We only get 256MB of memory by default.
## We only get 256MB of memory by default, thus the maxdata flag
## We can only use 2GB/node without large pages (-blpdata)
##
LDFLAGS="-Wl,-bmaxdata:0x70000000 $LDFLAGS"
LDFLAGS="-Wl,-blpdata -Wl,-bmaxdata:0x70000000 $LDFLAGS"
##
## Make sure we use the right MPI library (05/04/01 JSM)
......
......@@ -59,9 +59,10 @@ CFLAGS="-pthread"
PTHREAD_CXXFLAGS="-pthread"
##
## We only get 256MB of memory by default.
## We only get 256MB of memory by default, thus the maxdata flag
## We can only use 2GB/node without large pages (-blpdata)
##
LDFLAGS="-Wl,-bmaxdata:0x70000000 $LDFLAGS"
LDFLAGS="-Wl,-blpdata -Wl,-bmaxdata:0x70000000 $LDFLAGS"
##
## Make sure we use the right MPI library (05/04/01 JSM)
......
......@@ -59,9 +59,10 @@ CFLAGS="-pthread"
PTHREAD_CXXFLAGS="-pthread"
##
## We only get 256MB of memory by default.
## We only get 256MB of memory by default, thus the maxdata flag
## We can only use 2GB/node without large pages (-blpdata)
##
LDFLAGS="-Wl,-bmaxdata:0x70000000 $LDFLAGS"
LDFLAGS="-Wl,-blpdata -Wl,-bmaxdata:0x70000000 $LDFLAGS"
##
## Make sure we use the right MPI library (05/04/01 JSM)
......
......@@ -59,9 +59,10 @@ CFLAGS="-pthread"
PTHREAD_CXXFLAGS="-pthread"
##
## We only get 256MB of memory by default.
## We only get 256MB of memory by default, thus the maxdata flag
## We can only use 2GB/node without large pages (-blpdata)
##
LDFLAGS="-Wl,-bmaxdata:0x70000000 $LDFLAGS"
LDFLAGS="-Wl,-blpdata -Wl,-bmaxdata:0x70000000 $LDFLAGS"
##
## Make sure we use the right MPI library (05/04/01 JSM)
......
......@@ -2494,9 +2494,9 @@ 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"
CONVERT_SER="$""(tmpbin)/visitconvert_ser"
if test -n "$PARALLEL"; then
CONVERT_PAR="$""(tmpbin)/convert_par"
CONVERT_PAR="$""(tmpbin)/visitconvert_par"
else
CONVERT_PAR=""
fi
......
......@@ -537,6 +537,9 @@ dnl
dnl Brad Whitlock, Thu Jan 6 13:01:21 PST 2005
dnl Added support for creating a link to the HDF4 libraries on MacOS X.
dnl
dnl Jeremy Meredith, Tue Feb 22 18:48:19 PST 2005
dnl Renamed "convert" to "visitconvert".
dnl
dnl --------------------------------------------------------------------------
dnl
......@@ -864,9 +867,9 @@ AC_SUBST(AVTPREP_PAR)
AC_MSG_CHECKING(for convert)
if test -d tools/convert; then
AC_MSG_RESULT(found)
CONVERT_SER="$""(tmpbin)/convert_ser"
CONVERT_SER="$""(tmpbin)/visitconvert_ser"
if test -n "$PARALLEL"; then
CONVERT_PAR="$""(tmpbin)/convert_par"
CONVERT_PAR="$""(tmpbin)/visitconvert_par"
else
CONVERT_PAR=""
fi
......
......@@ -9,8 +9,8 @@
// Purpose:
// Returns the type of a ANALYZE database.
//
// Programmer: whitlocb -- generated by xml2info
// Creation: Mon Nov 24 16:51:12 PST 2003
// Programmer: meredith -- generated by xml2info
// Creation: Tue Feb 22 14:33:46 PST 2005
//
// ****************************************************************************
DatabaseType
......@@ -25,8 +25,8 @@ ANALYZECommonPluginInfo::GetDatabaseType()
// Purpose:
// Returns the default extensions for a ANALYZE database.
//
// Programmer: whitlocb -- generated by xml2info
// Creation: Mon Nov 24 16:51:12 PST 2003
// Programmer: meredith -- generated by xml2info
// Creation: Tue Feb 22 14:33:46 PST 2005
//
// ****************************************************************************
std::vector<std::string>
......@@ -39,24 +39,6 @@ ANALYZECommonPluginInfo::GetDefaultExtensions()
return defaultExtensions;
}
// ****************************************************************************
// Method: ANALYZECommonPluginInfo::GetWriter
//
// Purpose:
// Sets up a ANALYZE writer.
//
// Returns: A ANALYZE writer.
//
// Programmer: whitlocb -- generated by xml2info
// Creation: Mon Nov 24 16:51:12 PST 2003
//
// ****************************************************************************
avtDatabaseWriter *
ANALYZECommonPluginInfo::GetWriter(void)
{
return NULL;
}
// ****************************************************************************
// Method: ANALYZECommonPluginInfo::SetUpANALYZEDatabase
//
......@@ -70,8 +52,8 @@ ANALYZECommonPluginInfo::GetWriter(void)