Updates will be applied April 15th at 12pm EDT (UTC-0400). GitLab could be a little slow between 12 - 12:45pm EDT.

Commit abbe9362 authored by whitlocb's avatar whitlocb

This update changes the avtExecuteThenTimeLoopFilter so it also executes a

named selection filter after its expression filter in its sub-pipeline. This lets
the PersistentParticles operator play better with selections.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@16067 18c085ea-50e0-402c-830e-de6fd14e8384
parent 02ad366c
......@@ -46,6 +46,7 @@
#include <avtDataAttributes.h>
#include <avtExpressionEvaluatorFilter.h>
#include <avtExtents.h>
#include <avtNamedSelectionFilter.h>
#include <avtOriginatingSource.h>
#include <DebugStream.h>
......@@ -186,6 +187,9 @@ avtExecuteThenTimeLoopFilter::FinalizeTimeLoop()
// Hank Childs, Thu Aug 26 13:47:30 PDT 2010
// Change extents names.
//
// Brad Whitlock, Thu Sep 1 10:50:43 PDT 2011
// Add in named selection filter.
//
// ****************************************************************************
void
......@@ -216,11 +220,23 @@ avtExecuteThenTimeLoopFilter::Execute(void)
<< currentTime << endl;
contract->GetDataRequest()->SetTimestep(currentTime);
eef.Update(contract);
avtDataset *ds = NULL;
avtNamedSelectionFilter nsf;
if(contract->GetDataRequest()->GetSelectionName().empty())
{
eef.Update(contract);
ds = *(eef.GetTypedOutput());
}
else
{
nsf.SetInput(eef.GetOutput());
nsf.SetSelectionName(contract->GetDataRequest()->GetSelectionName());
nsf.Update(contract);
ds = *(nsf.GetTypedOutput());
}
// Friend status plus reference points leads to some extra
// contortions here.
avtDataset *ds = *(eef.GetTypedOutput());
avtDataTree_p tree = ds->GetDataTree();
Iterate(currentTime, tree);
......
......@@ -37,7 +37,7 @@
*****************************************************************************/
// ************************************************************************* //
// avtDataRequest.C //
// avtDataRequest.C //
// ************************************************************************* //
#include <avtDataRequest.h>
......@@ -183,6 +183,9 @@ using std::map;
// Hank Childs, Fri Sep 3 12:10:47 PDT 2010
// Added support for "velocityMustBeContinuous".
//
// Brad Whitlock, Thu Sep 1 10:56:43 PDT 2011
// Added selectionName.
//
// ****************************************************************************
avtDataRequest::avtDataRequest(const char *var, int ts,
......@@ -238,6 +241,8 @@ avtDataRequest::avtDataRequest(const char *var, int ts,
variable = new char[strlen(var)+1];
strcpy(variable, var);
selectionName = std::string();
//
// Assume the 'orig' variable is the input variable. If this is not true,
// it will be corrected later.
......@@ -401,6 +406,8 @@ avtDataRequest::avtDataRequest(const char *var, int ts, int ch)
variable = new char[strlen(var)+1];
strcpy(variable, var);
selectionName = std::string();
//
// Assume the 'db' variable is the input variable. If this is not true,
// it will be corrected later.
......@@ -655,6 +662,9 @@ avtDataRequest::avtDataRequest(avtDataRequest_p spec)
// Hank Childs, Fri Sep 3 12:10:47 PDT 2010
// Added support for "velocityMustBeContinuous".
//
// Brad Whitlock, Thu Sep 1 10:58:43 PDT 2011
// Added selectionName.
//
// ****************************************************************************
avtDataRequest &
......@@ -724,6 +734,7 @@ avtDataRequest::operator=(const avtDataRequest &spec)
transformVectorsDuringProject = spec.transformVectorsDuringProject;
needPostGhostMaterialInfo = spec.needPostGhostMaterialInfo;
secondaryVariables = spec.secondaryVariables;
selectionName = spec.selectionName;
selList = spec.selList;
......@@ -1059,6 +1070,9 @@ avtDataRequest::operator==(const avtDataRequest &ds)
if (needPostGhostMaterialInfo != ds.needPostGhostMaterialInfo)
return false;
//if (selectionName != ds.selectionName)
// return false;
return true;
}
......@@ -1823,6 +1837,9 @@ avtSILSpecification::operator==(const avtSILSpecification &s)
// Hank Childs, Fri Sep 3 12:10:47 PDT 2010
// Added support for "velocityMustBeContinuous".
//
// Brad Whitlock, Thu Sep 1 11:01:51 PDT 2011
// Added selectionName.
//
// ****************************************************************************
static const char *
......@@ -1926,6 +1943,7 @@ avtDataRequest::DebugDump(avtWebpage *webpage)
webpage->AddTableEntry2("usesAllDomains", YesOrNo(usesAllDomains));
webpage->AddTableEntry2("transformVectorsDuringProject", YesOrNo(transformVectorsDuringProject));
webpage->AddTableEntry2("needPostGhostMaterialInfo", YesOrNo(needPostGhostMaterialInfo));
webpage->AddTableEntry2("selectionName", selectionName.c_str());
webpage->EndTable();
}
......
......@@ -208,6 +208,9 @@ typedef ref_ptr<avtDataRequest> avtDataRequest_p;
// Hank Childs, Fri Sep 3 12:10:47 PDT 2010
// Added Boolean for whether the velocity field must be continuous.
//
// Brad Whitlock, Thu Sep 1 10:56:29 PDT 2011
// Add selectionName.
//
// ****************************************************************************
class PIPELINE_API avtDataRequest
......@@ -454,6 +457,11 @@ class PIPELINE_API avtDataRequest
void SetNeedPostGhostMaterialInfo(bool b)
{ needPostGhostMaterialInfo = b; }
void SetSelectionName(const std::string &s)
{ selectionName = s; }
const std::string &GetSelectionName() const
{ return selectionName; }
void DebugDump(avtWebpage *);
protected:
......@@ -507,6 +515,7 @@ class PIPELINE_API avtDataRequest
bool passNativeCSG;
bool transformVectorsDuringProject;
bool needPostGhostMaterialInfo;
std::string selectionName;
//
// If we are processing in parallel, this information may have been lost.
......
......@@ -855,6 +855,12 @@ NetworkManager::GetDBFromCache(const std::string &filename, int time,
// Brad Whitlock, Mon Aug 22 13:34:36 PDT 2011
// I added named selection creation here instead of at the end of the pipeline.
//
// Brad Whitlock, Thu Sep 1 11:07:55 PDT 2011
// Stash the selection name into the data request in case we need it
// when creating other pipelines based on this one. For instance, the
// avtExecuteThenTimeLoopFilter creates its own pipeline from the original
// source so we need the selection name there to apply it.
//
// ****************************************************************************
void
......@@ -942,6 +948,7 @@ NetworkManager::StartNetwork(const std::string &format,
dataRequest->SetDiscMode(meshopts.GetDiscretizationMode());
dataRequest->SetDiscBoundaryOnly(meshopts.GetDiscretizeBoundaryOnly());
dataRequest->SetPassNativeCSG(meshopts.GetPassNativeCSG());
dataRequest->SetSelectionName(selName);
workingNet->SetDataSpec(dataRequest);
workingNet->SetTime(dataRequest->GetTimestep());
......
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