Commit 01b11474 authored by Aron Helser's avatar Aron Helser

Fixes and session files for libsim ucdmesh and particles.

All changes from Brad Whitlock <bjw@ilight.com>
parent eb15abc1
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,20 +3,21 @@
<sensei>
<!-- Custom Analyses-->
<analysis type="PosthocIO"
output_dir="./" file_name="output" mode="visit" enabled="1">
<mesh name="mesh">
<cell_arrays> data </cell_arrays>
output_dir="./" file_name="output" mode="visit"
enabled="0">
<mesh name="mesh" structure_only="0" ghost_cells="1" ghost_nodes="0">
<cell_arrays>data</cell_arrays>
</mesh>
</analysis>
<analysis type="histogram" mesh="mesh" array="data" association="cell"
bins="10" enabled="1" />
bins="10" enabled="0" />
<analysis type="autocorrelation" mesh="mesh" array="data" association="cell" window="10"
k-max="3" enabled="1" />
k-max="3" enabled="0" />
<!-- VTK-m Analyses -->
<analysis type="vtkmcontour" array="data" value="0.3" enabled="0" write_output="0"/>
<analysis type="vtkmcontour" mesh="mesh" array="data" association="cell" value="0.3" enabled="0" write_output="0"/>
<!-- Catalyst Analyses -->
<analysis type="catalyst"
......@@ -26,14 +27,59 @@
color-range="0.0001,1.5" color-log="1"
enabled="0" />
<!-- Libsim Batch Analysis using session file -->
<analysis type="libsim" visitdir="/Users/bjw/Development/MAIN/trunk/install"
mode="batch"
frequency="10"
<!-- Libsim Analysis Notes
Locating VisIt:
* The "visitdir" attribute tells SENSEI where to find the VisIt
installation, which is required to pick up the Libsim runtime
libraries (when VisIt is not built statically)
The "mode" attribute can be "batch", "interactive", or "interactive,paused."
* batch - Executes the analysis prescribed be the slice or session file.
* interactive - Lets VisIt connect interactively.
* interactive,paused - Lets VisIt connect interactively. Blocks until
VisIt connects. From there, the "run" button
in VisIt's Simulations window can let it proceed.
It is possible to have multiple Libsim analyses but for timings, it is best
to have them enabled one by one.
For debugging, additional attributes can be added to the analysis block:
options="-debug 5 -clobber_vlogs -timings" trace="trace"
-->
<!-- Libsim Slice, render -->
<analysis type="libsim"
frequency="1"
visitdir="/Users/bjw/Development/MAIN/trunk/release" mode="batch"
plots="Pseudocolor,Mesh" plotvars="ucdmesh/data,ucdmesh" slice-origin="0,0,0" slice-normal="0,0,1"
image-filename="slice%ts" image-width="800" image-height="800" image-format="png"
slice-origin="0,0,0" slice-normal="0,0,1" slice-project="1"
enabled="0"/>
<!-- Libsim Iso mesh, render -->
<analysis type="libsim"
frequency="1"
visitdir="/Users/bjw/Development/MAIN/trunk/release" mode="batch"
session="oscillator.session"
image-filename="a%ts.png" image-width="800" image-height="800" image-format="png"
image-filename="iso%ts" image-width="800" image-height="800" image-format="png"
enabled="0"/>
<!-- Libsim Iso ucdmesh, render -->
<analysis type="libsim"
frequency="1"
visitdir="/Users/bjw/Development/MAIN/trunk/release" mode="batch"
session="oscillator-ucdmesh.session"
image-filename="iso-ucdmesh%ts" image-width="800" image-height="800" image-format="png"
enabled="0"/>
<!-- Libsim particles, render -->
<analysis type="libsim"
frequency="1"
visitdir="/Users/bjw/Development/MAIN/trunk/release" mode="batch"
session="oscillator-particles.session"
image-filename="particles%ts" image-width="800" image-height="800" image-format="png"
enabled="1"/>
<!-- ADIOS Analyses -->
<analysis type="adios" filename="oscillators.bp" method="MPI" enabled="0" />
</sensei>
......@@ -546,9 +546,9 @@ DataAdaptor::CreateGhostCellsArray(int cc) const
//----------------------------------------------------------------------------
int DataAdaptor::AddGhostCellsArray(vtkDataObject *mesh, const std::string &meshName)
{
if (meshName != "mesh" && meshName != "ucdmesh")
if (meshName != "mesh" && meshName != "ucdmesh" && meshName != "particles")
{
SENSEI_ERROR("the miniapp provides meshes \"mesh\" and \"ucdmesh\".")
SENSEI_ERROR("the miniapp provides meshes \"mesh\", \"ucdmesh\", and \"particles\".")
return -1;
}
......
......@@ -1176,7 +1176,7 @@ LibsimAnalysisAdaptor::PrivateData::GetArrayInfoFromVariableName(
std::string tmpVar = varName.substr(pos+1, varName.size()-1-pos);
if(tmpVar.substr(0, 5) == "cell_")
{
var = tmpVar.substr(5, tmpVar.size()-5);
var = tmpVar.substr(5, tmpVar.size()-1-5);
association = vtkDataObject::FIELD_ASSOCIATION_CELLS;
}
else
......@@ -1191,7 +1191,7 @@ LibsimAnalysisAdaptor::PrivateData::GetArrayInfoFromVariableName(
meshName = meshNames[0];
if(varName.substr(0, 5) == "cell_")
{
var = varName.substr(5, varName.size()-5);
var = varName.substr(5, varName.size()-1-5);
association = vtkDataObject::FIELD_ASSOCIATION_CELLS;
}
else
......@@ -1519,11 +1519,21 @@ cout << "dx=" << dx[0] << ", " << dx[1] << ", " << dx[2] << endl;
{
if(VisIt_PointMesh_alloc(&mesh) != VISIT_ERROR)
{
visit_handle pts = vtkDataArray_To_VisIt_VariableData(pgrid->GetPoints()->GetData());
if(pts != VISIT_INVALID_HANDLE)
VisIt_PointMesh_setCoords(mesh, pts);
else
bool perr = true;
vtkPoints *p = pgrid->GetPoints();
if(p != nullptr)
{
visit_handle pts = vtkDataArray_To_VisIt_VariableData(p->GetData());
if(pts != VISIT_INVALID_HANDLE)
{
VisIt_PointMesh_setCoords(mesh, pts);
perr = false;
}
}
if(perr)
{
SENSEI_ERROR("The vtkPolyData's coordinates are not set.")
VisIt_PointMesh_free(mesh);
mesh = VISIT_INVALID_HANDLE;
}
......@@ -1725,7 +1735,14 @@ LibsimAnalysisAdaptor::PrivateData::GetMetaData(void *cbdata)
// Get the mesh, structure only.
vtkDataObject *obj = nullptr;
#if 0
bool structureOnly = true;
#else
// Do not bother with structure-only. Most data adaptors are stupid and
// it causes problems if we later call GetMesh with different values
// of structureOnly.
bool structureOnly = false;
#endif
if (da->GetMesh(meshName, structureOnly, obj))
{
SENSEI_ERROR("GetMesh request failed. Skipping that mesh.")
......
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