Commit e2d2f7f3 authored by hrchilds's avatar hrchilds

Update from January 20, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@161 18c085ea-50e0-402c-830e-de6fd14e8384
parent 35013a0c
......@@ -10,11 +10,11 @@
<Field name="axisType" type="int">1</Field>
</Object>
<Object name="PluginManagerAttributes" childObjects="0">
<Field name="name" type="stringVector">Streamline </Field>
<Field name="type" type="stringVector">plot </Field>
<Field name="version" type="stringVector">1.0 </Field>
<Field name="id" type="stringVector">Streamline_1.0 </Field>
<Field name="enabled" type="intVector">0 </Field>
<Field name="name" type="stringVector">Streamline InverseGhostZone </Field>
<Field name="type" type="stringVector">plot operator </Field>
<Field name="version" type="stringVector">1.0 1.0 </Field>
<Field name="id" type="stringVector">Streamline_1.0 InverseGhostZone_1.0 </Field>
<Field name="enabled" type="intVector">0 0 </Field>
</Object>
<Object name="HostProfileList" childObjects="31">
<Object name="HostProfile" childObjects="0">
......
......@@ -10,11 +10,11 @@
<Field name="axisType" type="int">1</Field>
</Object>
<Object name="PluginManagerAttributes" childObjects="0">
<Field name="name" type="stringVector">Streamline </Field>
<Field name="type" type="stringVector">plot </Field>
<Field name="version" type="stringVector">1.0 </Field>
<Field name="id" type="stringVector">Streamline_1.0 </Field>
<Field name="enabled" type="intVector">0 </Field>
<Field name="name" type="stringVector">Streamline InverseGhostZone </Field>
<Field name="type" type="stringVector">plot operator </Field>
<Field name="version" type="stringVector">1.0 1.0 </Field>
<Field name="id" type="stringVector">Streamline_1.0 InverseGhostZone_1.0 </Field>
<Field name="enabled" type="intVector">0 0 </Field>
</Object>
<Object name="HostProfileList" childObjects="21">
<Object name="HostProfile" childObjects="0">
......
......@@ -20,6 +20,9 @@
# files. It also puts the core header files into a single include directory
# so you don't have to add tons of include directories in MSVC.
#
# Brad Whitlock, Thu Jan 8 11:15:13 PDT 2004
# I added BUILD_NOTES.txt.
#
#------------------------------------------------------------------------------
if(`pwd` != "/data_vobs/VisIt") then
......@@ -62,6 +65,7 @@ rm -rf $VISITSRC/include/visit
# Copy windowsbuild/VisItBuildInstructionsOnWindows.doc to $VisItDev
cp $TOPDIR/windowsbuild/VisItBuildInstructionsOnWindows.doc .
cp $TOPDIR/windowsbuild/BUILD_NOTES.txt .
# Move windowsbuild/include to $VisItDev/include.
cp -R $TOPDIR/windowsbuild/include .
......
......@@ -33,6 +33,7 @@
#include <avtCallback.h>
#include <avtDatabaseMetaData.h>
#include <avtDatasetCollection.h>
#include <avtDatasetVerifier.h>
#include <avtDomainBoundaries.h>
#include <avtDomainNesting.h>
#include <avtFileFormatInterface.h>
......@@ -230,6 +231,9 @@ avtGenericDatabase::SetDatabaseMetaData(avtDatabaseMetaData *md, int timeState)
// is difficult to do them in the opposite order (nesting must be on orig
// indices), but fairly straight-forward to do them in new order.
//
// Hank Childs, Fri Jan 9 13:46:43 PST 2004
// Use a dataset verifier before passing data into routines like the MIR.
//
// ****************************************************************************
avtDataTree_p
......@@ -262,6 +266,19 @@ avtGenericDatabase::GetOutput(avtDataSpecification_p spec,
//
ReadDataset(datasetCollection, domains, spec, src);
//
// Now that we have read things in from disk, verify that the dataset
// is valid, since routines like the MIR downstream will assume they are.
//
avtDatasetVerifier verifier;
vtkDataSet **ds_list = new vtkDataSet*[nDomains];
for (int i = 0 ; i < nDomains ; i++)
{
ds_list[i] = datasetCollection.GetDataset(i, 0);
}
verifier.VerifyDatasets(nDomains, ds_list, domains);
delete [] ds_list;
//
// Do species selection if appropriate.
//
......
......@@ -2395,17 +2395,15 @@ avtStructuredDomainBoundaries::SetIndicesForRectGrid(int domain, int e[6])
// Added code to disallow operation if shouldComputeNeighborsFromExtents is
// not true.
//
// Kathleen Bonnell, Tue Jan 20 17:26:40 PST 2004
// Reversed order of Exceptions, per Mark Miller's request.
//
// ****************************************************************************
void
avtStructuredDomainBoundaries::SetIndicesForAMRPatch(int domain,
int level, int e[6])
{
if (domain >= levels.size())
EXCEPTION1(VisItException,
"avtStructuredDomainBoundaries: "
"targetted domain more than number of domains");
if (!shouldComputeNeighborsFromExtents)
{
EXCEPTION1(VisItException,
......@@ -2414,6 +2412,12 @@ avtStructuredDomainBoundaries::SetIndicesForAMRPatch(int domain,
"computation of neighbors from index extents");
}
if (domain >= levels.size())
EXCEPTION1(VisItException,
"avtStructuredDomainBoundaries: "
"targetted domain more than number of domains");
levels[domain] = level;
extents[6*domain+0] = e[0];
extents[6*domain+1] = e[1];
......
......@@ -1305,6 +1305,38 @@ avtDataTree::GetAllLabels(vector<string> &labels)
}
}
// ****************************************************************************
// Method: avtDataTree::GetAllDomainIds
//
// Purpose:
// Recursive method to retrieve domain ids.
//
// Arguments:
// doms A place to store the retrieved domains.
//
// Programmer: Hank Childs
// Creation: January 9, 2004
//
// ****************************************************************************
void
avtDataTree::GetAllDomainIds(vector<int> &doms)
{
if (nChildren > 0)
{
for (int i = 0; i < nChildren; i++)
{
if (*children[i] != NULL)
children[i]->GetAllDomainIds(doms);
}
}
else if (dataRep != NULL)
{
doms.push_back(dataRep->GetDomain());
}
}
// ****************************************************************************
// Method: avtDataTree::IsEmpty
//
......
......@@ -4,6 +4,7 @@
#ifndef AVT_DATA_TREE_H
#define AVT_DATA_TREE_H
#include <pipeline_exports.h>
#include <vector>
......@@ -72,6 +73,9 @@ typedef void (*TraverseFunc)(avtDataRepresentation &, void *, bool &);
// Kathleen Bonnell, Mon Apr 29 17:49:25 PDT 2002
// Added GetAllUniqueLabels and GetUniqueLabels.
//
// Hank Childs, Fri Jan 9 10:04:22 PST 2004
// Added GetAllDomainIds.
//
// ****************************************************************************
class PIPELINE_API avtDataTree
......@@ -113,6 +117,7 @@ class PIPELINE_API avtDataTree
void Traverse(TraverseFunc, void *, bool &);
vtkDataSet **GetAllLeaves(int &);
void GetAllDomainIds(vector<int> &);
void GetAllLabels(vector<string> &);
void GetAllUniqueLabels(vector<string> &);
avtDataTree_p PruneTree(const vector<int> &);
......
......@@ -8,9 +8,12 @@
#include <vtkDataSet.h>
#include <vtkFloatArray.h>
#include <vtkPointData.h>
#include <vtkUnsignedCharArray.h>
#include <avtCallback.h>
#include <DebugStream.h>
// ****************************************************************************
// Method: avtDatasetVerifier constructor
......@@ -27,32 +30,39 @@ avtDatasetVerifier::avtDatasetVerifier()
// ****************************************************************************
// Method: avtDatasetVerifier::VerifyDataTree
// Method: avtDatasetVerifier::VerifyDatasets
//
// Purpose:
// Verifies that every VTK dataset in the tree is valid (like the number
// Verifies that every VTK dataset in the list is valid (like the number
// of elements in the variable makes sense for the mesh, etc).
//
// Arguments:
// tree The tree to verify.
// nlist The number of elements in the list.
// list The list of datasets.
// domains The domain number of each dataset.
//
// Programmer: Hank Childs
// Creation: October 18, 2001
//
// Modifications:
//
// Hank Childs, Fri Jan 9 09:40:32 PST 2004
// Renamed function and added arguments; made routine easily usable by
// the database as well the terminating dataset source.
//
// ****************************************************************************
void
avtDatasetVerifier::VerifyDataTree(avtDataTree_p &tree)
avtDatasetVerifier::VerifyDatasets(int nlist, vtkDataSet **list,
std::vector<int> &domains)
{
int nLeaves;
vtkDataSet **ds = tree->GetAllLeaves(nLeaves);
for (int i = 0 ; i < nLeaves ; i++)
for (int i = 0 ; i < nlist ; i++)
{
VerifyDataset(ds[i]);
if (list[i] != NULL)
{
VerifyDataset(list[i], domains[i]);
}
}
delete [] ds;
}
......@@ -64,42 +74,73 @@ avtDatasetVerifier::VerifyDataTree(avtDataTree_p &tree)
//
// Arguments:
// ds A single vtk dataset.
// dom The domain number.
//
// Programmer: Hank Childs
// Creation: October 18, 2001
//
// Modifications:
//
// Kathleen Bonnell, Fri Feb 8 11:03:49 PST 2002
// vtkScalars has been deprecated in VTK 4.0, use vtkDataArray instead.
//
// Hank Childs, Fri Jan 9 09:43:13 PST 2004
// Iterate over all variables. Added an argument for the domain number.
// Also do not issue a warning if the missing values are for ghost zones.
//
// ****************************************************************************
void
avtDatasetVerifier::VerifyDataset(vtkDataSet *ds)
avtDatasetVerifier::VerifyDataset(vtkDataSet *ds, int dom)
{
int i, j;
int nPts = ds->GetNumberOfPoints();
int nCells = ds->GetNumberOfCells();
vtkDataArray *pt_var = ds->GetPointData()->GetScalars();
vtkDataArray *cell_var = ds->GetCellData()->GetScalars();
if (pt_var != NULL)
int nPtVars = ds->GetPointData()->GetNumberOfArrays();
for (i = 0 ; i < nPtVars ; i++)
{
int nScalars = pt_var->GetNumberOfTuples();
if (nScalars != nPts)
vtkDataArray *pt_var = ds->GetPointData()->GetArray(i);
int nscalars = pt_var->GetNumberOfTuples();
if (nscalars != nPts)
{
CorrectVarMismatch(ds, pt_var, true);
IssueVarMismatchWarning(nScalars, nPts, true);
IssueVarMismatchWarning(nscalars, nPts, true, dom);
}
}
if (cell_var != NULL)
int nCellVars = ds->GetCellData()->GetNumberOfArrays();
for (i = 0 ; i < nCellVars ; i++)
{
int nScalars = cell_var->GetNumberOfTuples();
if (nScalars != nCells)
vtkDataArray *cell_var = ds->GetCellData()->GetArray(i);
int nscalars = cell_var->GetNumberOfTuples();
if (nscalars != nCells)
{
CorrectVarMismatch(ds, cell_var, false);
IssueVarMismatchWarning(nScalars, nCells, false);
bool issueWarning = true;
vtkUnsignedCharArray *gz = (vtkUnsignedCharArray *)
ds->GetCellData()->GetArray("vtkGhostLevels");
if (gz != NULL)
{
int ntuples = gz->GetNumberOfTuples();
int num_real = 0;
for (j = 0 ; j < ntuples ; j++)
{
if (gz->GetValue(j) == '\0')
num_real++;
}
if (num_real == nscalars)
{
issueWarning = false;
debug1 << "The input file has an invalid number of "
<< "entries in a zonal variable. Since the number"
<< " of entries corresponds to the number of real "
<< "zones, no warning is being issued." << endl;
}
}
if (issueWarning)
IssueVarMismatchWarning(nscalars, nCells, false, dom);
}
}
}
......@@ -115,6 +156,7 @@ avtDatasetVerifier::VerifyDataset(vtkDataSet *ds)
// nVars The number of values we got.
// nUnits The number we should have gotten.
// isPoint true if it is a ptvar, false otherwise.
// dom The domain number.
//
// Programmer: Hank Childs
// Creation: October 18, 2001
......@@ -124,10 +166,14 @@ avtDatasetVerifier::VerifyDataset(vtkDataSet *ds)
// Hank Childs, Tue Dec 16 10:02:10 PST 2003
// Improve clarity of warning.
//
// Hank Childs, Fri Jan 9 09:43:13 PST 2004
// Added argument dom.
//
// ****************************************************************************
void
avtDatasetVerifier::IssueVarMismatchWarning(int nVars, int nUnits,bool isPoint)
avtDatasetVerifier::IssueVarMismatchWarning(int nVars, int nUnits,
bool isPoint, int dom)
{
if (issuedWarningForVarMismatch)
{
......@@ -140,9 +186,9 @@ avtDatasetVerifier::IssueVarMismatchWarning(int nVars, int nUnits,bool isPoint)
: "Some values were removed");
char msg[1024];
sprintf(msg, "Your %s variable has %d values, but it should have %d."
"%s to ensure VisIt runs smoothly.",
unit_string, nVars, nUnits, action);
sprintf(msg, "In domain %d, your %s variable has %d values, but it should "
"have %d. %s to ensure VisIt runs smoothly.",
dom, unit_string, nVars, nUnits, action);
avtCallback::IssueWarning(msg);
issuedWarningForVarMismatch = true;
......
......@@ -4,8 +4,8 @@
#ifndef AVT_DATASET_VERIFIER_H
#define AVT_DATASET_VERIFIER_H
#include <pipeline_exports.h>
#include <pipeline_exports.h>
#include <avtDataTree.h>
......@@ -24,9 +24,13 @@ class vtkDataArray;
// Creation: October 18, 2001
//
// Modifications:
//
// Kathleen Bonnell, Fri Feb 8 11:03:49 PST 2002
// vtkScalars has been deprecated in VTK 4.0, use vtkDataArray instead.
//
// Hank Childs, Fri Jan 9 09:36:01 PST 2004
// Add a routine that is accessible for the generic database.
//
// ****************************************************************************
class PIPELINE_API avtDatasetVerifier
......@@ -35,15 +39,15 @@ class PIPELINE_API avtDatasetVerifier
avtDatasetVerifier();
virtual ~avtDatasetVerifier() {;};
void VerifyDataTree(avtDataTree_p &);
void VerifyDatasets(int, vtkDataSet **, std::vector<int> &domains);
protected:
bool issuedWarningForVarMismatch;
void VerifyDataset(vtkDataSet *);
void VerifyDataset(vtkDataSet *, int);
void CorrectVarMismatch(vtkDataSet *, vtkDataArray *, bool);
void IssueVarMismatchWarning(int, int, bool);
void IssueVarMismatchWarning(int, int, bool, int);
};
......
......@@ -754,14 +754,24 @@ avtContourFilter::CreatePercentValues(double mn, double mx)
// Hank Childs, Sun Jun 17 18:42:00 PDT 2001
// Moved function from avtContourPlot.
//
// Kathleen Bonnell, Tue Jan 20 17:38:37 PST 2004
// Fix problem with delta when lo > hi.
//
// ****************************************************************************
void
avtContourFilter::CreateNIsoValues(double min, double max)
{
double lo, hi, delta, extremaOffset;
lo = min;
hi = max;
if (atts.GetMinFlag())
lo = atts.GetMin();
else
lo = min;
if (atts.GetMaxFlag())
hi = atts.GetMax();
else
hi = max;
if (logFlag)
{
if (min <= 0.)
......@@ -781,7 +791,6 @@ avtContourFilter::CreateNIsoValues(double min, double max)
}
lo = log10(lo);
hi = log10(hi);
}
//
......@@ -790,26 +799,12 @@ avtContourFilter::CreateNIsoValues(double min, double max)
//
extremaOffset = (hi - lo) / (nLevels + 1.);
if (atts.GetMinFlag())
{
// use the artificial min as first isoValue
lo = atts.GetMin();
if (logFlag)
lo = log10(lo);
}
else
if (!atts.GetMinFlag())
{
lo += extremaOffset;
}
if (atts.GetMaxFlag())
{
// use the artificial max as last isoValue
hi = atts.GetMax();
if (logFlag)
hi = log10(hi);
}
else
if (!atts.GetMaxFlag())
{
hi -= extremaOffset;
}
......@@ -820,7 +815,10 @@ avtContourFilter::CreateNIsoValues(double min, double max)
}
else
{
delta = (hi - lo) / (nLevels - 1.);
if (lo < hi)
delta = (hi - lo) / (nLevels - 1.);
else
delta = (lo - hi) / (nLevels - 1.);
}
if (logFlag)
......
......@@ -52,6 +52,9 @@
// Still execute even if we have an empty SIL. This will allow databases
// to do collective communication routines.
//
// Hank Childs, Fri Jan 9 10:10:05 PST 2004
// Change the arugments to the dataset verifier.
//
// ****************************************************************************
bool
......@@ -97,7 +100,12 @@ avtTerminatingDatasetSource::FetchData(avtDataSpecification_p spec)
atts.GetCumulativeTrueDataExtents()->Merge(de);
}
verifier.VerifyDataTree(tree);
int nleaves = 0;
vtkDataSet **ds = tree->GetAllLeaves(nleaves);
vector<int> domains;
tree->GetAllDomainIds(domains);
verifier.VerifyDatasets(nleaves, ds, domains);
delete [] ds;
}
return rv;
......
......@@ -1027,6 +1027,11 @@ avtBoxlib2DFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
// Programmer: Hank Childs
// Creation: December 10, 2003
//
// Modifications:
// Kathleen Bonnell, Tue Jan 20 17:07:28 PST 2004
// Added flag to constructor call of avtRectilinearDomainBoundaries to
// indicate that neighbors can be computed from extents.
//
// ****************************************************************************
void
......@@ -1095,7 +1100,7 @@ avtBoxlib2DFileFormat::CalculateDomainNesting(void)
vector<int> logJMin(totalPatches);
vector<int> logJMax(totalPatches);
level = 0;
avtRectilinearDomainBoundaries *rdb = new avtRectilinearDomainBoundaries;
avtRectilinearDomainBoundaries *rdb = new avtRectilinearDomainBoundaries(true);
rdb->SetNumDomains(totalPatches);
for (int patch = 0 ; patch < totalPatches ; patch++)
{
......
......@@ -1165,6 +1165,10 @@ avtBoxlib3DFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
// Hank Childs, Wed Dec 10 18:41:45 PST 2003
// Fix cut-and-paste bug.
//
// Kathleen Bonnell, Tue Jan 20 17:07:28 PST 2004
// Added flag to constructor call of avtRectilinearDomainBoundaries to
// indicate that neighbors can be computed from extents.
//
// ****************************************************************************
void
......@@ -1237,7 +1241,7 @@ avtBoxlib3DFileFormat::CalculateDomainNesting(void)
vector<int> logKMin(totalPatches);
vector<int> logKMax(totalPatches);
level = 0;
avtRectilinearDomainBoundaries *rdb = new avtRectilinearDomainBoundaries;
avtRectilinearDomainBoundaries *rdb = new avtRectilinearDomainBoundaries(true);
rdb->SetNumDomains(totalPatches);
for (int patch = 0 ; patch < totalPatches ; patch++)
{
......
<HTML>
<BODY BGCOLOR=#ffffff>
<B><H2>
<CENTER>Copyright 2000 - 2003.</CENTER>
<CENTER>Copyright 2000 - 2004.</CENTER>
<CENTER>The Regents of the University of California.</CENTER>
<CENTER>All rights reserved.</CENTER>
</B></H2>
......
......@@ -96,6 +96,9 @@ import java.util.Vector;
// Kathleen Bonnell, Wed Dec 17 15:19:46 PST 2003
// Added SetDefaultPickAttributes, ResetPickLetter.
//
// Brad Whitlock, Thu Jan 8 14:19:43 PST 2004
// I fixed a typo that prevented it from building.
//
// ****************************************************************************
public class ViewerProxy implements SimpleObserver
......@@ -1093,7 +1096,7 @@ public class ViewerProxy implements SimpleObserver
return synchronous ? Synchronize() : true;
}
public boolean SetAnnotationObjectOptions();
public boolean SetAnnotationObjectOptions()
{
rpc.SetRPCType(ViewerRPC.VIEWERRPCTYPE_SETANNOTATIONOBJECTOPTIONSRPC);
rpc.Notify();
......@@ -1102,14 +1105,14 @@ public class ViewerProxy implements SimpleObserver
public boolean SetDefaultAnnotationObjectList()
{
rpc.SetRPCType(ViewerRPC.VIEWERRPCTYPE_SETDEFAULTANNOTATIONOBJECTLIST);
rpc.SetRPCType(ViewerRPC.VIEWERRPCTYPE_SETDEFAULTANNOTATIONOBJECTLISTRPC);
rpc.Notify();
return synchronous ? Synchronize() : true;
}
public boolean ResetAnnotationObjectList()
{
rpc.SetRPCType(ViewerRPC.VIEWERRPCTYPE_RESTEANNOTATIONOBJECTLISTRPC);
rpc.SetRPCType(ViewerRPC.VIEWERRPCTYPE_RESETANNOTATIONOBJECTLISTRPC);
rpc.Notify();
return synchronous ? Synchronize() : true;
}
......
<?xml version="1.0"?>
<Plugin name="InverseGhostZone" label="Inverse Ghost Zone" type="operator" version="1.0">
<Attribute name="InverseGhostZoneAttributes" purpose="This class contains attributes for the inverse ghost zone operator.">
<Field name="constantData" type="bool">false</Field>
<Plugin name="InverseGhostZone" type="operator" label="Inverse Ghost Zone" version="1.0" enabled="true" iconFile="InverseGhostZone.xpm">
<Attribute name="InverseGhostZoneAttributes" purpose="This class contains attributes for the inverse ghost zone operator." persistent="true">
<Enum name="ShowType">
GhostZonesOnly
GhostZonesAndRealZones
</Enum>
<Field name="showType" label="Zones to Display:" type="enum" subtype="ShowType">
GhostZonesOnly
</Field>
</Attribute>
</Plugin>
/* XPM */
static const char *InverseGhostZone_xpm[] = {
/* width height ncolors chars_per_pixel */
"32 32 198 2",
/* colors */
" c #FF3700",
" . c #D28A89",
" X c #CFAB93",
" o c #51E480",
" O c #D5FE00",
" + c #62DF73",
" @ c #B6B6C3",
" # c #D48181",
" $ c #45FF00",
" % c #9393CF",
" & c #C4B3B3",
" * c #D77A7A",
" = c #CF9393",
" - c #E6FA00",
" ; c #DCFD00",
" : c #9898CD",
" > c #3190EF",
" , c #D67C7C",
" < c #CE9595",
" 1 c #082EFC",
" 2 c #B9B9C2",
" 3 c #EF7E31",
" 4 c #D09090",
" 5 c #C8A9A9",
" 6 c #5465E3",
" 7 c #0FFF0C",
" 8 c #7F7FD5",
" 9 c #C0C3B8",
" 0 c #B7B7C3",
" q c #33EF4A",
" w c #FED500",
" e c #CF9292",
" r c #97F61B",
" t c #C7ABAB",
" y c #E7594A",
" u c #BCBCC1",
" i c #9999CD",
" p c #C9C0A6",
" a c #CE9494",
" s c #C6ADAD",
" d c #00FF81",
" f c #D97474",
" g c #8282D4",
" h c #D18D8D",
" j c #00FCE1",
" k c #EEF400",
" l c #BABAC2",
" z c #D87A76",
" x c #6FFF00",
" c c #D08F8F",
" v c #C8A8A8",
" b c #BFBFC0",
" n c #CDFF00",
" m c #0095FF",
" M c #6969DC",
" N c #03FF20",
" B c #FFCA00",
" V c #FFC800",
" C c #8585D3",
" Z c #DA7571",
" A c #FFC200",
" S c #09FF12",
" D c #D28A8A",
" F c #FFBA00",
" G c #CAA3A3",
" H c #DF6962",
" J c #D77E7B",
" K c #1C8DF6",
" L c #7DFF00",
" P c #00FF8A",
" I c #31DFE9",
" U c #D97373",
" Y c #00F8EA",
" T c #D18C8C",
" R c #B2C4C3",
" E c #DC6C6C",
" W c #C1BEBE",
" Q c #55FF00",
" ! c #C7FF00",
" ~ c #D6807D",
" ^ c #D08E8E",
" / c #C8A7A7",
" ( c #FF6200",
" ) c None",
" _ c #01ACFF",