Commit 2aee3c7e authored by whitlocb's avatar whitlocb

I merged the RC to the trunk.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@6921 18c085ea-50e0-402c-830e-de6fd14e8384
parent 5259b387
......@@ -117,6 +117,14 @@ avtNamedSelectionManager::GetInstance(void)
// Programmer: Hank Childs
// Creation: January 30, 2009
//
// Modifications:
//
// Hank Childs, Sun Apr 19 18:40:32 PDT 2009
// Fix problem with named selections on non-FastBit files.
//
// Hank Childs, Sun Apr 19 22:42:09 PDT 2009
// Fix problem with named selections not being overwritten.
//
// ****************************************************************************
void
......@@ -158,7 +166,7 @@ avtNamedSelectionManager::CreateNamedSelection(avtDataObject_p dob,
return;
}
if (contract->GetDataRequest()->NeedZoneNumbers() == false)
if (c1->GetDataRequest()->NeedZoneNumbers() == false)
{
debug1 << "Must re-execute pipeline to create named selection" << endl;
dob->Update(contract);
......@@ -174,6 +182,9 @@ avtNamedSelectionManager::CreateNamedSelection(avtDataObject_p dob,
vtkDataSet **leaves = tree->GetAllLeaves(nleaves);
for (i = 0 ; i < nleaves ; i++)
{
if (leaves[i]->GetNumberOfCells() == 0)
continue;
vtkDataArray *ocn = leaves[i]->GetCellData()->
GetArray("avtOriginalCellNumbers");
if (ocn == NULL)
......@@ -234,6 +245,7 @@ avtNamedSelectionManager::CreateNamedSelection(avtDataObject_p dob,
// data structure for tracking named selections.
//
ns = new avtZoneIdNamedSelection(selName,numTotal,selForDoms,selForZones);
DeleteNamedSelection(selName, false); // Remove sel if it already exists.
int curSize = selList.size();
selList.resize(curSize+1);
selList[curSize] = ns;
......@@ -256,10 +268,17 @@ avtNamedSelectionManager::CreateNamedSelection(avtDataObject_p dob,
// Programmer: Hank Childs
// Creation: January 30, 2009
//
// Modifications:
//
// Hank Childs, Sun Apr 19 22:42:09 PDT 2009
// Add a default argument for whether or not the named selection should
// be in the list.
//
// ****************************************************************************
void
avtNamedSelectionManager::DeleteNamedSelection(const std::string &name)
avtNamedSelectionManager::DeleteNamedSelection(const std::string &name,
bool shouldExpectSel)
{
int i;
......@@ -275,6 +294,9 @@ avtNamedSelectionManager::DeleteNamedSelection(const std::string &name)
if (numToRemove == -1)
{
if (! shouldExpectSel)
return;
EXCEPTION1(VisItException, "Cannot delete selection; does not exist");
}
......
......@@ -59,6 +59,11 @@ class avtNamedSelection;
// Programmer: Hank Childs
// Creation: January 30, 2009
//
// Modifications:
//
// Hank Childs, Sun Apr 19 22:42:09 PDT 2009
// Add argument to DeleteNamedSelection.
//
// ****************************************************************************
class PIPELINE_API avtNamedSelectionManager
......@@ -75,7 +80,8 @@ class PIPELINE_API avtNamedSelectionManager
void CreateNamedSelection(avtDataObject_p, const std::string &);
void DeleteNamedSelection(const std::string &);
void DeleteNamedSelection(const std::string &,
bool expectThisSelToBeThere = true);
void LoadNamedSelection(const std::string &);
void SaveNamedSelection(const std::string &);
......
......@@ -487,6 +487,31 @@ avtHohlraumFluxQuery::IntegrateLine(int oneSide, int otherSide,
}
}
// ****************************************************************************
// Method: avtHohlraumFluxQuery::PreExecute
//
// Purpose:
// This method is called before we start executing on the data.
//
// Programmer: Brad Whitlock
// Creation: Fri Apr 17 09:41:11 PDT 2009
//
// Modifications:
//
// ****************************************************************************
void
avtHohlraumFluxQuery::PreExecute()
{
avtLineScanQuery::PreExecute();
// Override the default value of numBins from the base class since it will
// be set during query execution. We have to do it here to avoid an exception
// that would be thrown from the avtLineScanQuery::PreExecute method. We
// need to set the number of bins to zero here so we can safely take the
// maximum value of numBins in the PostExecute method.
numBins = 0;
}
// ****************************************************************************
// Method: avtHohlraumFluxQuery::PostExecute
......@@ -516,15 +541,33 @@ avtHohlraumFluxQuery::IntegrateLine(int oneSide, int otherSide,
// Hank Childs, Thu Jul 24 13:00:40 PDT 2008
// Add to the output resolution.
//
// Brad Whitlock, Fri Apr 17 09:41:37 PDT 2009
// I removed the code to bail out early if radBins == NULL. This was fatal
// in parallel with processors that did not have data because it caused the
// communication for summing the double array across processors with a
// later MPI communication to unify the maximum value. Both types of
// communications were MPI_Allreduce so MPI tried to make them succeed even
// though they were incompatible.
//
// ****************************************************************************
void
avtHohlraumFluxQuery::PostExecute(void)
{
// Make sure that we have the same number of bins across all processors. We
// will unless we're on a processor that had no data to execute. IF that's
// the case then we construct radBins here with all zeroes unless no
// processors had data.
numBins = UnifyMaximumValue(numBins);
if(numBins == 0)
return;
if (radBins == NULL)
{
return;
radBins = new double[numBins];
for(int i = 0; i < numBins; ++i)
radBins[i] = 0.;
}
double *accumBins = new double[numBins];
SumDoubleArrayAcrossAllProcessors(radBins, accumBins, numBins);
......
......@@ -58,6 +58,10 @@
// Programmer: David Bremer
// Creation: November 17, 2006
//
// Modifications:
// Brad Whitlock, Fri Apr 17 09:38:35 PDT 2009
// I added a PreExecute method.
//
// ****************************************************************************
class QUERY_API avtHohlraumFluxQuery : public avtLineScanQuery
......@@ -106,6 +110,7 @@ class QUERY_API avtHohlraumFluxQuery : public avtLineScanQuery
private:
virtual void ExecuteLineScan(vtkPolyData *pd);
virtual void PreExecute(void);
virtual void PostExecute(void);
};
......
......@@ -42,6 +42,8 @@
#include <avtLineScanQuery.h>
#include <set>
#include <stdio.h>
#include <math.h>
......@@ -150,6 +152,14 @@ avtLineScanQuery::PreExecute(void)
// Programmer: Hank Childs
// Creation: July 20, 2006
//
// Modifications:
// Brad Whitlock, Mon Apr 20 09:39:46 PDT 2009
// I added code that makes duplicate line segments only be counted once.
// These line segments seem to occur at domain boundaries -- maybe a copy
// from each processor? When these line segments are counted multiply, it
// prevents the whole line scan from building up into a longer line. This
// was causing results of zero in the Hohlraum Flux query.
//
// ****************************************************************************
int
......@@ -158,6 +168,11 @@ avtLineScanQuery::GetCellsForPoint(int ptId, vtkPolyData *pd,
int &seg1, int &seg2)
{
static vtkIdList *list = vtkIdList::New();
// Follow the same pattern as for "list". These get leaked but at least
// we don't have to allocate them very often.
static vtkIdList *this_cell_pts = vtkIdList::New();
static vtkIdList *cell_pts = vtkIdList::New();
pd->GetPointCells(ptId, list);
int numMatches = 0;
int workingLineid = lineid;
......@@ -182,12 +197,44 @@ avtLineScanQuery::GetCellsForPoint(int ptId, vtkPolyData *pd,
}
else
{
// This is an error condition. It is believed to occur when
// a line coincides with an edge. Empirically, it is believed
// to happen about one time when you cast 100K lines over 90M
// zones. So: it doesn't happen often, but it happens enough.
// In this case, just ignoring the line won't affect statistics.
return 3;
// Compare the other cells against this cell. If this cell matches
// any other cell then don't count it. To get here, we have already
// had 2 good cells (we assume) so we basically want to make sure
// any matches don't count. We check here in a somewhat already
// error condition to avoid the cost of doing it every time. Of course,
// it might be more appropriate to just clean the data beforehand.
bool match = false;
pd->GetCellPoints(curId, this_cell_pts);
for(int j = 0; j < list->GetNumberOfIds(); ++j)
{
if(i == j)
continue;
pd->GetCellPoints(list->GetId(j), cell_pts);
if(cell_pts->GetNumberOfIds() == this_cell_pts->GetNumberOfIds())
{
// Store the node numbers in a set so we can easily compare
// the sorted sets' of node numbers.
std::set<vtkIdType> ids1, ids2;
for(int q = 0; q < cell_pts->GetNumberOfIds(); ++q)
{
ids1.insert(cell_pts->GetId(q));
ids2.insert(this_cell_pts->GetId(q));
}
match = (ids1 == ids2);
}
}
if(!match)
{
// This is an error condition. It is believed to occur when
// a line coincides with an edge. Empirically, it is believed
// to happen about one time when you cast 100K lines over 90M
// zones. So: it doesn't happen often, but it happens enough.
// In this case, just ignoring the line won't affect statistics.
return 3;
}
}
}
......
......@@ -149,7 +149,16 @@ enhancements and bug-fixes that were added to this release.</p>
made active.</li>
<li>The Fortran libsim interface could crash the simulation in the event that
VisIt was unable to connect to the simulation.</li>
<li></li>
<li>VisIt was not sending expression definitions to the compute engine
prior to executing a database query. This could cause database queries
to fail if the expressions had not already been sent to the compute
engine for another reason such as for creating a plot.</li>
<li>VisIt's <i>Hohlraum Flux</i> query could crash the parallel compute engine if
a processor did not have data.</li>
<li>VisIt's <i>Hohlraum Flux</i> query could return all zeroes in the event that
many of the line segments produced by its line scan were duplicates. This prevented
the query from linking the line scans into larger connected lines along which
the <i>Hohlraum Flux</i> query integrates its results.</li>
</ul>
<a name="Config_changes"></a>
......
......@@ -1057,6 +1057,11 @@ ViewerQueryManager::GetQueryClientAtts()
// Brad Whitlock, Tue Apr 29 16:31:58 PDT 2008
// Support for internationalization.
//
// Brad Whitlock, Fri Apr 17 09:58:52 PDT 2009
// Send updated expressions to the engine before we execute the query in
// case the query involves expressions that have not been sent to the engine
// yet.
//
// ****************************************************************************
void
......@@ -1248,12 +1253,19 @@ ViewerQueryManager::DatabaseQuery(ViewerWindow *oWin, const string &qName,
}
TRY
{
{
if(plotIds.size() > 0)
{
ViewerPlot *p = plist->GetPlot(plotIds[0]);
ViewerEngineManager::Instance()->UpdateExpressionsFromPlot(p);
}
if (doTimeQuery)
{
DoTimeQuery(oWin, &qa);
CATCH_RETURN(1);
}
if (ViewerEngineManager::Instance()->Query(engineKey, networkIds,
&qa, qa))
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment