Commit fd72b39d authored by hrchilds's avatar hrchilds

Update from June 12, 2003

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@11 18c085ea-50e0-402c-830e-de6fd14e8384
parent cb52c9ff
......@@ -214,11 +214,16 @@ avtDatabase::GetOutput(const char *var, int ts)
// Kathleen Bonnell, Wed Mar 26 13:03:54 PST 2003
// Pass on containsOriginalCells.
//
// Jeremy Meredith, Thu Jun 12 08:48:20 PDT 2003
// Added logic to decrement the topo. dimension if we have requested
// material boundaries.
//
// ****************************************************************************
void
avtDatabase::PopulateDataObjectInformation(avtDataObject_p &dob,
const char *var)
const char *var,
avtDataSpecification *spec)
{
int timerHandle = visitTimer->StartTimer();
......@@ -324,6 +329,16 @@ avtDatabase::PopulateDataObjectInformation(avtDataObject_p &dob,
validity.InvalidateZones();
}
//
// SPECIAL CASE:
//
// We need to decrement the topological dimension if we asked for
// an unfilled boundary. The way this is handles (by directly
// checking a data specification) needs to change.
//
if (spec && spec->NeedBoundarySurfaces())
atts.SetTopologicalDimension(atts.GetTopologicalDimension() - 1);
char str[1024];
sprintf(str, "Populating Information for %s", var);
visitTimer->StopTimer(timerHandle, str);
......
......@@ -86,6 +86,9 @@ class PickVarInfo;
// Brad Whitlock, Wed May 14 09:08:32 PDT 2003
// I added an optional timeState argument to GetMetaData and GetSIL.
//
// Jeremy Meredith, Wed Jun 11 16:39:27 PDT 2003
// Added an option argument to PopulateDataObjectInformation.
//
// ****************************************************************************
class DATABASE_API avtDatabase
......@@ -134,7 +137,8 @@ class DATABASE_API avtDatabase
virtual void PopulateIOInformation(avtIOInformation &);
void PopulateDataObjectInformation(avtDataObject_p&,
const char *);
const char *,
avtDataSpecification* =NULL);
virtual bool QueryScalars(const std::string &, const int,
const int, const int,
const std::vector<int> &,
......
......@@ -20,6 +20,7 @@
#include <vtkStructuredGrid.h>
#include <vtkUnsignedIntArray.h>
#include <vtkUnstructuredGrid.h>
#include <vtkUnstructuredGridBoundaryFilter.h>
#include <vtkVisItUtility.h>
#include <avtDatabaseMetaData.h>
......@@ -207,6 +208,9 @@ avtGenericDatabase::SetDatabaseMetaData(avtDatabaseMetaData *md, int timeState)
// Kathleen Bonnell, Wed Mar 26 13:03:54 PST 2003
// Tell the MetaData when the originalCells array has been added.
//
// Jeremy Meredith, Thu Jun 12 09:06:49 PDT 2003
// Added the data spec to the input of PopulateDataObjectInformation.
//
// ****************************************************************************
avtDataTree_p
......@@ -320,7 +324,7 @@ avtGenericDatabase::GetOutput(avtDataSpecification_p spec,
// for example), so call this again.
//
avtDataObject_p dob = src->GetOutput();
PopulateDataObjectInformation(dob, spec->GetVariable());
PopulateDataObjectInformation(dob, spec->GetVariable(), *spec);
return rv;
}
......@@ -1578,13 +1582,18 @@ avtGenericDatabase::AddOriginalCellsArray(vtkDataSet *ds, const int domain)
// Jeremy Meredith, Thu Oct 24 15:37:05 PDT 2002
// Added smoothing option and clean zones only option.
//
// Jeremy Meredith, Thu Jun 12 09:07:28 PDT 2003
// Added needBoundarySurfaces option.
//
// ****************************************************************************
avtDataTree_p
avtGenericDatabase::MaterialSelect(vtkDataSet *ds, avtMaterial *mat,
vector<avtMixedVariable *> mvl,int dom,const char *var,
int ts, vector<string> &mnames, vector<string> &labels,
bool needInternalSurfaces, bool needValidConnectivity,
bool needInternalSurfaces,
bool needBoundarySurfaces,
bool needValidConnectivity,
bool needSmoothMaterialInterfaces,
bool needCleanZonesOnly,
bool &subdivisionOccurred, bool &notAllCellsSubdivided,
......@@ -1649,6 +1658,38 @@ avtGenericDatabase::MaterialSelect(vtkDataSet *ds, avtMaterial *mat,
out_ds[d]->Delete();
out_ds[d] = NULL;
}
if (out_ds[d] && needBoundarySurfaces)
{
//
// We need to extract the internal boundaries
//
if (out_ds[d]->GetDataObjectType() != VTK_UNSTRUCTURED_GRID)
{
EXCEPTION1(ImproperUseException, "MaterialSelect did not "
"get a VTK_UNSTRUCTURED_GRID\n")
}
vtkUnstructuredGridBoundaryFilter *bf =
vtkUnstructuredGridBoundaryFilter::New();
vtkDataSet *in_ds = out_ds[d];
bf->SetInput((vtkUnstructuredGrid*)in_ds);
out_ds[d] = bf->GetOutput();
bf->Update();
out_ds[d]->Register(NULL);
out_ds[d]->SetSource(NULL);
bf->Delete();
if (out_ds != NULL && out_ds[d]->GetNumberOfCells() == 0)
{
out_ds[d]->Delete();
out_ds[d] = NULL;
}
}
}
//
......@@ -3011,6 +3052,9 @@ avtGenericDatabase::CommunicateGhosts(avtDatasetCollection &ds,
// Jeremy Meredith, Wed Mar 19 16:50:58 PST 2003
// Added support for variables defined on only a subset of the domains.
//
// Jeremy Meredith, Thu Jun 12 09:09:30 PDT 2003
// Added a flag for internal boundary surfaces.
//
// ****************************************************************************
void
......@@ -3077,6 +3121,7 @@ avtGenericDatabase::MaterialSelect(avtDatasetCollection &ds,
mvl, domains[i], var, ts,
ds.matnames[i], ds.labels[i],
spec->NeedInternalSurfaces(),
spec->NeedBoundarySurfaces(),
spec->NeedValidFaceConnectivity(),
spec->NeedSmoothMaterialInterfaces(),
spec->NeedCleanZonesOnly(),
......
......@@ -132,6 +132,9 @@ class PickVarInfo;
// Brad Whitlock, Wed May 14 09:16:44 PDT 2003
// I added an optional int argument to SetDatabaseMetaData.
//
// Jeremy Meredith, Thu Jun 12 09:05:38 PDT 2003
// Added another flag to MaterialSelect.
//
// ****************************************************************************
class DATABASE_API avtGenericDatabase : public avtDatasetDatabase
......@@ -196,7 +199,7 @@ class DATABASE_API avtGenericDatabase : public avtDatasetDatabase
int, const char *, int,
std::vector<std::string> &,
std::vector<std::string> &,
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,
......
......@@ -53,6 +53,9 @@ using std::vector;
// Jeremy Meredith, Thu Oct 24 16:15:11 PDT 2002
// Added material options.
//
// Jeremy Meredith, Tue Jun 10 13:21:15 PDT 2003
// Added needBoundarySurfaces.
//
// ****************************************************************************
avtDataSpecification::avtDataSpecification(const char *var, int ts,
......@@ -62,6 +65,7 @@ avtDataSpecification::avtDataSpecification(const char *var, int ts,
needZones = false;
useGhostZones = true;
needInternalSurfaces = false;
needBoundarySurfaces = false;
needValidFaceConnectivity = false;
needStructuredIndices = false;
usesAllDomains = true;
......@@ -115,6 +119,9 @@ avtDataSpecification::avtDataSpecification(const char *var, int ts,
// Jeremy Meredith, Thu Oct 24 16:15:11 PDT 2002
// Added material options.
//
// Jeremy Meredith, Tue Jun 10 13:21:24 PDT 2003
// Added needBoundarySurfaces.
//
// ****************************************************************************
avtDataSpecification::avtDataSpecification(const char *var, int ts, int ch)
......@@ -123,6 +130,7 @@ avtDataSpecification::avtDataSpecification(const char *var, int ts, int ch)
needZones = false;
useGhostZones = true;
needInternalSurfaces = false;
needBoundarySurfaces = false;
needValidFaceConnectivity = false;
needStructuredIndices = false;
usesAllDomains = true;
......@@ -279,6 +287,9 @@ avtDataSpecification::avtDataSpecification(avtDataSpecification_p spec)
// Jeremy Meredith, Thu Oct 24 16:15:11 PDT 2002
// Added material options.
//
// Jeremy Meredith, Tue Jun 10 13:21:32 PDT 2003
// Added needBoundarySurfaces.
//
// ****************************************************************************
avtDataSpecification &
......@@ -307,6 +318,7 @@ avtDataSpecification::operator=(const avtDataSpecification &spec)
useGhostZones = spec.useGhostZones;
needZones = spec.needZones;
needInternalSurfaces = spec.needInternalSurfaces;
needBoundarySurfaces = spec.needBoundarySurfaces;
needValidFaceConnectivity = spec.needValidFaceConnectivity;
needStructuredIndices = spec.needStructuredIndices;
usesAllDomains = spec.usesAllDomains;
......@@ -364,6 +376,9 @@ avtDataSpecification::operator=(const avtDataSpecification &spec)
// Jeremy Meredith, Thu Oct 24 16:15:11 PDT 2002
// Compare material options.
//
// Jeremy Meredith, Tue Jun 10 13:21:40 PDT 2003
// Compare needBoundarySurfaces.
//
// ****************************************************************************
bool
......@@ -402,6 +417,11 @@ avtDataSpecification::operator==(const avtDataSpecification &ds)
return false;
}
if (needBoundarySurfaces != ds.needBoundarySurfaces)
{
return false;
}
if (useGhostZones != ds.useGhostZones)
{
return false;
......
......@@ -77,6 +77,9 @@ typedef ref_ptr<avtDataSpecification> avtDataSpecification_p;
// Added options for forced material interface reconstruction for mixed
// variables, for material interface smoothing, and for clean zones only.
//
// Jeremy Meredith, Thu Jun 12 08:47:03 PDT 2003
// Added option for boundary surfaces.
//
// ****************************************************************************
class PIPELINE_API avtDataSpecification
......@@ -116,6 +119,13 @@ class PIPELINE_API avtDataSpecification
void TurnInternalSurfacesOff(void)
{ needInternalSurfaces = false; };
bool NeedBoundarySurfaces(void)
{ return needBoundarySurfaces; };
void TurnBoundarySurfacesOn(void)
{ needBoundarySurfaces = true; };
void TurnBoundarySurfacesOff(void)
{ needBoundarySurfaces = false; };
bool NeedStructuredIndices(void)
{ return needStructuredIndices; };
void SetNeedStructuredIndices(bool v)
......@@ -172,6 +182,7 @@ class PIPELINE_API avtDataSpecification
bool mayRequireZones;
bool useGhostZones;
bool needInternalSurfaces;
bool needBoundarySurfaces;
bool needValidFaceConnectivity;
bool needStructuredIndices;
bool needMixedVariableReconstruction;
......
......@@ -42,6 +42,12 @@ fi
PYDIR=$VISITHOME/python/redhat_6
PYVERSION=python2.1
##
## HDF4
##
DEFAULT_HDF4_FLAGS=/usr/gapps/visit/hdf4/1.5/redhat_7/include
DEFAULT_HDF4_LIBS=/usr/gapps/visit/hdf4/1.5/redhat_7/lib
##
## HDF5
##
......
......@@ -42,6 +42,12 @@ fi
PYDIR=$VISITHOME/python/redhat_6
PYVERSION=python2.1
##
## HDF4
##
DEFAULT_HDF4_FLAGS=/usr/gapps/visit/hdf4/1.5/redhat_7/include
DEFAULT_HDF4_LIBS=/usr/gapps/visit/hdf4/1.5/redhat_7/lib
##
## HDF5
##
......
......@@ -42,6 +42,12 @@ fi
PYDIR=$VISITHOME/python/redhat_6
PYVERSION=python2.1
##
## HDF4
##
DEFAULT_HDF4_FLAGS=/usr/gapps/visit/hdf4/1.5/redhat_7/include
DEFAULT_HDF4_LIBS=/usr/gapps/visit/hdf4/1.5/redhat_7/lib
##
## HDF5
##
......
......@@ -69,6 +69,12 @@ fi
PYDIR=$VISITHOME/python/irix64
PYVERSION=python2.1
##
## HDF4
##
DEFAULT_HDF4_FLAGS=/usr/gapps/hdf4/1.4.0/IRIX64/serial/n32/debug/include
DEFAULT_HDF4_LIBS=/usr/gapps/hdf4/1.4.0/IRIX64/serial/n32/debug/lib
##
## HDF5
##
......
......@@ -42,6 +42,12 @@ fi
PYDIR=$VISITHOME/python/redhat_6
PYVERSION=python2.1
##
## HDF4
##
DEFAULT_HDF4_FLAGS=/usr/gapps/visit/hdf4/1.5/redhat_7/include
DEFAULT_HDF4_LIBS=/usr/gapps/visit/hdf4/1.5/redhat_7/lib
##
## HDF5
##
......
......@@ -42,6 +42,12 @@ fi
PYDIR=$VISITHOME/python/redhat_6
PYVERSION=python2.1
##
## HDF4
##
DEFAULT_HDF4_FLAGS=/usr/gapps/visit/hdf4/1.5/redhat_7/include
DEFAULT_HDF4_LIBS=/usr/gapps/visit/hdf4/1.5/redhat_7/lib
##
## HDF5
##
......
......@@ -56,6 +56,12 @@ fi
PYDIR=$VISITHOME/python/sunos_57
PYVERSION=python2.1
##
## HDF4
##
DEFAULT_HDF4_FLAGS=/usr/gapps/hdf4/1.4.0/SunOS/gcc/static/debug/include
DEFAULT_HDF4_LIBS=/usr/gapps/hdf4/1.4.0/SunOS/gcc/static/debug/lib
#
# HDF5
#
......
......@@ -56,6 +56,12 @@ fi
PYDIR=$VISITHOME/python/sunos_57
PYVERSION=python2.1
##
## HDF4
##
DEFAULT_HDF4_FLAGS=/usr/gapps/hdf4/1.4.0/SunOS/gcc/static/debug/include
DEFAULT_HDF4_LIBS=/usr/gapps/hdf4/1.4.0/SunOS/gcc/static/debug/lib
#
# HDF5
#
......
......@@ -42,6 +42,12 @@ fi
PYDIR=$VISITHOME/python/redhat_6
PYVERSION=python2.1
##
## HDF4
##
DEFAULT_HDF4_FLAGS=/usr/gapps/visit/hdf4/1.5/redhat_7/include
DEFAULT_HDF4_LIBS=/usr/gapps/visit/hdf4/1.5/redhat_7/lib
##
## HDF5
##
......
......@@ -69,6 +69,12 @@ fi
PYDIR=$VISITHOME/python/irix64
PYVERSION=python2.1
##
## HDF4
##
DEFAULT_HDF4_FLAGS=/usr/gapps/hdf4/1.4.0/IRIX64/serial/n32/debug/include
DEFAULT_HDF4_LIBS=/usr/gapps/hdf4/1.4.0/IRIX64/serial/n32/debug/lib
##
## HDF5
##
......
This diff is collapsed.
......@@ -412,6 +412,9 @@ dnl
dnl Sean Ahern, Wed Jun 11 16:36:52 PDT 2003
dnl Fixed pthreads test.
dnl
dnl Akira Haddox, Thu Jun 12 08:56:16 PDT 2003
dnl Added support for HDF4.
dnl
dnl --------------------------------------------------------------------------
dnl
......@@ -1719,6 +1722,46 @@ AC_SUBST(MILI)
AC_SUBST(MILI_FLAGS)
AC_SUBST(MILI_LIBS)
#
# Look for HDF4.
#
AC_MSG_CHECKING(for HDF4)
HDF4=""
HDF4_FLAGS=""
HDF4_LIBS=""
AC_ARG_WITH(hdf4,
[ --with-hdf4=FLAGS,LIBS Location of HDF4 header and library],
hdf4_specified="yes",
hdf4_specified="no"
)
if test "$hdf4_specified" = "yes"; then
if test "$withval" != "no"; then
HDF4_FLAGS="`echo $withval |cut -f1 -d,`"
HDF4_LIBS="`echo $withval |cut -f2 -d, -s`"
fi
else
if test "$DEFAULT_HDF4_FLAGS" != "" ; then
HDF4_FLAGS="-I$DEFAULT_HDF4_FLAGS $HDF4_FLAGS"
fi
if test "$DEFAULT_HDF4_LIBS" != "" ; then
HDF4_LIBS="-L$DEFAULT_HDF4_LIBS -lmfhdf -ldf $HDF4_LIBS"
fi
fi
if test "$HDF4_LIBS" != "" ; then
if test "$HDF4_FLAGS" != "" ; then
HDF4="$""(HDF4)"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
else
AC_MSG_RESULT(no)
fi
AC_SUBST(HDF4)
AC_SUBST(HDF4_FLAGS)
AC_SUBST(HDF4_LIBS)
#
# Add Some include paths to the engine's CPPFLAGS.
#
......
<?xml version="1.0"?>
<Plugin name="Cosmos" label="Cosmos" type="database" dbtype="MTMD" version="1.0">
<Extensions> cosmos </Extensions>
<CXXFLAGS> $(HDF4_FLAGS) </CXXFLAGS>
<LIBS> $(HDF4_LIBS) </LIBS>
</Plugin>
#include <CosmosPluginInfo.h>
#include <avtCosmosFileFormat.h>
#include <avtMTMDFileFormatInterface.h>
#include <avtGenericDatabase.h>
// ****************************************************************************
// Method: CosmosCommonPluginInfo::GetDatabaseType
//
// Purpose:
// Returns the type of a Cosmos database.
//
// Programmer: haddox1 -- generated by xml2info
// Creation: Wed Jun 4 08:27:32 PDT 2003
//
// ****************************************************************************
DatabaseType
CosmosCommonPluginInfo::GetDatabaseType()
{
return DB_TYPE_MTMD;
}
// ****************************************************************************
// Method: CosmosCommonPluginInfo::GetDefaultExtensions
//
// Purpose:
// Returns the default extensions for a Cosmos database.
//
// Programmer: haddox1 -- generated by xml2info
// Creation: Wed Jun 4 08:27:32 PDT 2003
//
// ****************************************************************************
std::vector<std::string>
CosmosCommonPluginInfo::GetDefaultExtensions()
{
std::vector<std::string> defaultExtensions;
defaultExtensions.push_back("cosmos");
return defaultExtensions;
}
// ****************************************************************************
// Method: CosmosCommonPluginInfo::SetUpCosmosDatabase
//
// Purpose:
// Sets up a Cosmos database.
//
// Arguments:
// list A list of file names.
// nList The number of timesteps in list.
// nBlocks The number of blocks in the list.
//
// Returns: A Cosmos database from list.
//
// Programmer: haddox1 -- generated by xml2info
// Creation: Wed Jun 4 08:27:32 PDT 2003
//
// ****************************************************************************
avtDatabase *
CosmosCommonPluginInfo::SetupDatabase(const char *const *list,
int nList, int nBlock)
{
return new avtGenericDatabase(
new avtMTMDFileFormatInterface(
new avtCosmosFileFormat(list[0])));
}
#include <CosmosPluginInfo.h>
// ****************************************************************************
// Function: GetEngineInfo
//
// Purpose:
// Return a new EnginePluginInfo for the Cosmos database.
//
// Programmer: haddox1 -- generated by xml2info
// Creation: Wed Jun 4 08:27:32 PDT 2003
//
// ****************************************************************************
extern "C" EngineDatabasePluginInfo* GetEngineInfo()
{
return new CosmosEnginePluginInfo;
}
// this makes compilers happy... remove if we ever have functions here
void CosmosEnginePluginInfo::dummy()
{
}
#include <CosmosPluginInfo.h>
// ****************************************************************************
// Function: GetMDServerInfo
//
// Purpose:
// Return a new MDServerPluginInfo for the Cosmos database.
//
// Programmer: haddox1 -- generated by xml2info
// Creation: Wed Jun 4 08:27:32 PDT 2003
//
// ****************************************************************************
extern "C" MDServerDatabasePluginInfo* GetMDServerInfo()
{
return new CosmosMDServerPluginInfo;
}
// this makes compilers happy... remove if we ever have functions here
void CosmosMDServerPluginInfo::dummy()
{
}
// ************************************************************************* //
// File: CosmosPluginInfo.C
// ************************************************************************* //
#include <CosmosPluginInfo.h>
// ****************************************************************************
// Function: GetGeneralInfo
//
// Purpose:
// Return a new GeneralPluginInfo for the Cosmos database.
//
// Programmer: haddox1 -- generated by xml2info
// Creation: Wed Jun 4 08:27:32 PDT 2003
//
// ****************************************************************************
extern "C" GeneralDatabasePluginInfo* GetGeneralInfo()
{
return new CosmosGeneralPluginInfo;
}
// ****************************************************************************
// Method: CosmosGeneralPluginInfo::GetName
//
// Purpose:
// Return the name of the database plugin.
//
// Returns: A pointer to the name of the database plugin.
//
// Programmer: haddox1 -- generated by xml2info
// Creation: Wed Jun 4 08:27:32 PDT 2003
//
// ****************************************************************************
char *
CosmosGeneralPluginInfo::GetName() const
{
return "Cosmos";
}
// ****************************************************************************
// Method: CosmosGeneralPluginInfo::GetVersion
//
// Purpose:
// Return the version of the database plugin.
//
// Returns: A pointer to the version of the database plugin.
//
// Programmer: haddox1 -- generated by xml2info
// Creation: Wed Jun 4 08:27:32 PDT 2003
//
// ****************************************************************************
char *
CosmosGeneralPluginInfo::GetVersion() const
{
return "1.0";
}
// ****************************************************************************
// Method: CosmosGeneralPluginInfo::GetID
//
// Purpose:
// Return the id of the database plugin.
//
// Returns: A pointer to the id of the database plugin.
//
// Programmer: haddox1 -- generated by xml2info
// Creation: Wed Jun 4 08:27:32 PDT 2003
//
// ****************************************************************************
char *
CosmosGeneralPluginInfo::GetID() const
{
return "Cosmos_1.0";
}
// ****************************************************************************
// CosmosPluginInfo.h
// ****************************************************************************
#ifndef COSMOS_PLUGIN_INFO_H
#define COSMOS_PLUGIN_INFO_H
#include <DatabasePluginInfo.h>
#include <database_plugin_exports.h>
class avtDatabase;
// ****************************************************************************
// Class: CosmosDatabasePluginInfo
//
// Purpose:
// Classes that provide all the information about the Cosmos plugin.
// Portions are separated into pieces relevant to the appropriate
// components of VisIt.
//
// Programmer: haddox1 -- generated by xml2info
// Creation: Wed Jun 4 08:27:32 PDT 2003
//
// Modifications:
//
// ****************************************************************************
class CosmosGeneralPluginInfo : public virtual GeneralDatabasePluginInfo
{
public:
virtual char *GetName() const;
virtual char *GetVersion() const;
virtual char *GetID() const;
};
class CosmosCommonPluginInfo : public virtual CommonDatabasePluginInfo, public virtual CosmosGeneralPluginInfo
{
public:
virtual DatabaseType GetDatabaseType();
virtual std::vector<std::string> GetDefaultExtensions();
virtual avtDatabase *SetupDatabase(const char * const *list,
int nList, int nBlock);
};
class CosmosMDServerPluginInfo : public virtual MDServerDatabasePluginInfo, public virtual CosmosCommonPluginInfo
{
public:
// this makes compilers happy... remove if we ever have functions here
virtual void dummy();
};