Commit 67cd6aab authored by whitlocb's avatar whitlocb

Enhancements to SimV2:

1. Domain nesting and domain boundary objects are now supported. SimV2 wraps
   the real avt C++ objects using a C API that hides all direct access to the
   objects. The static C lib dynamically gets the real implementations of the
   functions from the SimV2 runtime. This pattern will be implemented for the rest
   of the libsim structures to prevent errors in user initialization of simulation data
   structures.
2. I created an AMR simulation of the Mandelbrot set to test the domain
   nesting features. See http://www.visitusers.org/index.php?title=Movies
3. VisItDebug functions were added that enable the simulation to write
   printf-style output to VisIt's debug logs. I stole the pattern from Tom. Thanks Tom!
4. The VisItUpdatePlots and VisItExecuteCommand functions were changed to be
   blocking using a new synchronization mechanism in SimV2. The functions
   block but still allow the simulation to process VisIt commands until the
   synchronization is complete. This gets the 2 functions working as one would
   expect and makes it much more feasible to write code where the sim saves
   images of its data as it progresses. The amr and updateplots simulation examples
   can actually do this now.
5. The synchronization mechanism is exposed via the new VisItSynchronize function
    which blocks the sim until VisIt is ready to continue (if VisIt is connected).
6. The command callback infrastructure was reworked to be a little simpler and
   allow for user-provided callback data. The gui was also fixed so it 
   sends the right commands in addition to the "enhanced" command names. A few
   issues were also fixed to make sure that the command callback infrastructure is
   compatible with the new synchronization mechanism.
7. Block names were added to mesh metadata. The amr and csg example simulations use this.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@6731 18c085ea-50e0-402c-830e-de6fd14e8384
parent 4602f085
This diff is collapsed.
......@@ -1817,7 +1817,10 @@ dnl Determine the installation path to VisIt's lib directory. We take --prefix
dnl into account if it has been specified.
dnl
VISITWRAPPER_RPATH=
VISIT_LIB_DIR="$""(libdir)"
COMPATIBILITY_VERSION=`sed -e "s/b//" VERSION`
if test "x$prefix" != xNONE; then
COMPATIBILITY_VERSION=`sed -e "s/b//" VERSION`
PLATFORM=
case "$UNAME" in
Linux)
......@@ -1852,23 +1855,21 @@ if test "x$prefix" != xNONE; then
esac
;;
esac
COMPATIBILITY_VERSION=`sed -e "s/b//" VERSION`
VISIT_LIB_DIR="$prefix/$COMPATIBILITY_VERSION/$PLATFORM/lib"
dnl
dnl Set up "rpath" flags that let the visit wrapper library know where it will be
dnl installed so we don't have to specify a LD_LIBRARY_PATH or rpath to the
dnl client simulation.
dnl
case $UNAME in
Linux)
VISITWRAPPER_RPATH="-Wl,-rpath,$VISIT_LIB_DIR"
;;
Darwin)
VISITWRAPPER_RPATH="-Wl,-install_name,$VISIT_LIB_DIR/\$@,-compatibility_version,$COMPATIBILITY_VERSION,-current_version,$COMPATIBILITY_VERSION"
;;
esac
fi
dnl
dnl Set up "rpath" flags that let the visit wrapper library know where it will be
dnl installed so we don't have to specify a LD_LIBRARY_PATH or rpath to the
dnl client simulation.
dnl
case $UNAME in
Linux)
VISITWRAPPER_RPATH="-Wl,-rpath,$VISIT_LIB_DIR"
;;
Darwin)
VISITWRAPPER_RPATH="-Wl,-install_name,$VISIT_LIB_DIR/\$@,-compatibility_version,$COMPATIBILITY_VERSION,-current_version,$COMPATIBILITY_VERSION"
;;
esac
AC_SUBST(VISITWRAPPER_RPATH)
dnl
......@@ -3717,13 +3718,13 @@ AC_DEFINE_UNQUOTED(PLUGIN_EXTENSION, ".${SHLIB_SOEXT}", [Shared library extensio
# This is versioned to ensure compatibility with future changes.
#
if test -d engine; then
ENGINEWRAPSER="libvisitenginev1_ser.${SHLIB_SOEXT}"
LIBSIM_RUNTIME_SER="$""{LIBSIM_RUNTIME_SER}"
if test -n "$PARALLEL"; then
ENGINEWRAPPAR="libvisitenginev1_par.${SHLIB_SOEXT}"
LIBSIM_RUNTIME_PAR="$""{LIBSIM_RUNTIME_PAR}"
fi
fi
AC_SUBST(ENGINEWRAPSER)
AC_SUBST(ENGINEWRAPPAR)
AC_SUBST(LIBSIM_RUNTIME_SER)
AC_SUBST(LIBSIM_RUNTIME_PAR)
#
# This helps the Makefile in the lib directory make the right links
......
......@@ -52,6 +52,8 @@
#include <avtMixedVariable.h>
#include <avtSimulationInformation.h>
#include <avtSimulationCommandSpecification.h>
#include <avtStructuredDomainBoundaries.h>
#include <avtStructuredDomainNesting.h>
#include <avtSpecies.h>
#include <avtVariableCache.h>
......@@ -75,10 +77,6 @@
#include <vtkUnstructuredGrid.h>
#include <vtkVisItUtility.h>
#ifdef __APPLE__
#include <dlfcn.h>
#endif
using std::string;
using std::vector;
......@@ -87,6 +85,9 @@ using std::vector;
#include <avtParallel.h>
#endif
#include <VisItControlInterfaceRuntime.h>
#include <VisItDataInterfaceRuntime.h>
#ifndef MDSERVER
vtkDataSet *SimV2_GetMesh_Curvilinear(VisIt_CurvilinearMesh *);
vtkDataSet *SimV2_GetMesh_Rectilinear(VisIt_RectilinearMesh *);
......@@ -95,10 +96,6 @@ vtkDataSet *SimV2_GetMesh_Point(VisIt_PointMesh *);
vtkDataSet *SimV2_GetMesh_CSG(VisIt_CSGMesh *csgm);
#endif
#include <VisItControlInterfaceRuntime.h>
#include <VisItDataInterfaceRuntime.h>
// ****************************************************************************
// Function: FreeDataArray
//
......@@ -227,6 +224,27 @@ avtSimV2FileFormat::FreeUpResources(void)
{
}
// ****************************************************************************
// Method: avtSimV2FileFormat::ActivateTimestep
//
// Purpose:
// Calls ActivateTimestep on all of the simulation processors.
//
// Programmer: Brad Whitlock
// Creation: Mon Mar 16 16:51:20 PDT 2009
//
// Modifications:
//
// ****************************************************************************
void
avtSimV2FileFormat::ActivateTimestep()
{
#ifndef MDSERVER
visit_invoke_ActivateTimestep();
#endif
}
// Make sure that the variable metadata is not crap.
static bool
VisIt_VariableMetaData_valid(const VisIt_VariableMetaData *obj, std::string &err)
......@@ -274,6 +292,9 @@ VisIt_VariableMetaData_valid(const VisIt_VariableMetaData *obj, std::string &err
// Brad Whitlock, Mon Feb 9 14:21:08 PST 2009
// I added species and deletion of metadata objects.
//
// Brad Whitlock, Wed Mar 25 14:18:07 PDT 2009
// I added domain nesting and domain boundaries.
//
// ****************************************************************************
void
......@@ -283,6 +304,7 @@ avtSimV2FileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
#ifdef MDSERVER
md->SetSimInfo(simInfo);
#else
const char *mName = "avtSimV2FileFormat::PopulateDatabaseMetaData: ";
VisIt_SimulationMetaData *vsmd = visit_invoke_GetMetaData();
if(vsmd == NULL)
......@@ -327,6 +349,9 @@ avtSimV2FileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
case VISIT_MESHTYPE_CSG:
mesh->meshType = AVT_CSG_MESH;
break;
case VISIT_MESHTYPE_AMR:
mesh->meshType = AVT_AMR_MESH;
break;
default:
VisIt_SimulationMetaData_free(vsmd);
EXCEPTION1(ImproperUseException,
......@@ -342,6 +367,11 @@ avtSimV2FileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
mesh->blockTitle = mmd->blockTitle;
if (mmd->blockPieceName)
mesh->blockPieceName = mmd->blockPieceName;
if(mmd->blockNames != NULL)
{
for(int i = 0; i < mmd->numBlocks; ++i)
mesh->blockNames.push_back(mmd->blockNames[i]);
}
mesh->numGroups = mmd->numGroups;
if (mesh->numGroups > 0 && mmd->groupTitle)
......@@ -349,11 +379,11 @@ avtSimV2FileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
if (mesh->numGroups > 0 && mmd->groupPieceName)
mesh->groupPieceName = mmd->groupPieceName;
mesh->groupIds.resize(mesh->numGroups);
for (int g = 0; g<mesh->numGroups; g++)
{
int groupLen = (mmd->meshType == VISIT_MESHTYPE_AMR) ?
mmd->numBlocks : mmd->numGroups;
mesh->groupIds.resize(groupLen);
for (int g = 0; g<groupLen; g++)
mesh->groupIds[g] = mmd->groupIds[g];
}
if (mmd->xLabel)
mesh->xLabel = mmd->xLabel;
......@@ -612,6 +642,105 @@ avtSimV2FileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
md->AddExpression(newexp);
}
// Get domain boundary information
int numMultiblock = 0;
for (int m=0; m<vsmd->numMeshes; m++)
{
VisIt_MeshMetaData *mmd = &vsmd->meshes[m];
if(mmd->numBlocks > 1)
numMultiblock++;
}
if(numMultiblock > 0)
{
for (int m=0; m<vsmd->numMeshes; m++)
{
VisIt_MeshMetaData *mmd = &vsmd->meshes[m];
if(mmd->numBlocks > 1)
{
debug4 << mName << "Getting domain boundaries for mesh: " << mmd->name << endl;
visit_handle boundaries = visit_invoke_GetDomainBoundaries(mmd->name);
if(boundaries != VISIT_INVALID_HANDLE)
{
// Cache the domain boundary information
avtStructuredDomainBoundaries *sdb = (avtStructuredDomainBoundaries *)
visit_DomainBoundaries_avt(boundaries);
if(sdb != NULL)
{
sdb->CalculateBoundaries();
void_ref_ptr vr = void_ref_ptr(sdb,avtStructuredDomainBoundaries::Destruct);
const char *cache_meshname = (numMultiblock > 1) ? mmd->name : "any_mesh";
debug4 << mName << "Caching domain boundaries for mesh:" << cache_meshname << endl;
cache->CacheVoidRef(cache_meshname,
AUXILIARY_DATA_DOMAIN_BOUNDARY_INFORMATION,
timestep, -1, vr);
}
else
{
debug4 << mName << "Could not obtain domain boundaries from returned "
"simulation object."
<< endl;
}
visit_DomainBoundaries_free(boundaries);
}
else
{
debug4 << mName << "The simulation did not return a valid "
"domain boundaries object for mesh "
<< mmd->name << endl;
}
}
}
}
// Get domain nesting information
int numAMR = 0;
for (int m=0; m<vsmd->numMeshes; m++)
{
VisIt_MeshMetaData *mmd = &vsmd->meshes[m];
if(mmd->meshType == VISIT_MESHTYPE_AMR)
numAMR++;
}
if(numAMR > 0)
{
for (int m=0; m<vsmd->numMeshes; m++)
{
VisIt_MeshMetaData *mmd = &vsmd->meshes[m];
if(mmd->meshType == VISIT_MESHTYPE_AMR)
{
debug4 << mName << "Getting domain nesting for mesh: " << mmd->name << endl;
visit_handle nesting = visit_invoke_GetDomainNesting(mmd->name);
if(nesting != VISIT_INVALID_HANDLE)
{
avtStructuredDomainNesting *sdn = (avtStructuredDomainNesting *)
visit_DomainNesting_avt(nesting);
if(sdn != NULL)
{
void_ref_ptr vr = void_ref_ptr(sdn, avtStructuredDomainNesting::Destruct);
const char *cache_meshname = (numAMR > 1) ? mmd->name : "any_mesh";
debug4 << mName << "Caching domain nesting for mesh:" << cache_meshname << endl;
cache->CacheVoidRef(cache_meshname,
AUXILIARY_DATA_DOMAIN_NESTING_INFORMATION,
timestep, -1, vr);
}
else
{
debug4 << mName << "Could not obtain domain nesting from returned "
"simulation object."
<< endl;
}
visit_DomainNesting_free(nesting);
}
else
{
debug4 << mName << "The simulation did not return a valid "
"domain nesting object for mesh "
<< mmd->name << endl;
}
}
}
}
//md->Print(cout);
VisIt_SimulationMetaData_free(vsmd);
#endif
......
......@@ -46,7 +46,6 @@
#include <database_exports.h>
#include <avtSTMDFileFormat.h>
#include <VisItDataInterface_V2.h>
#include <avtSimulationInformation.h>
#include <avtMaterial.h>
......@@ -83,6 +82,8 @@ class avtSimV2FileFormat : public avtSTMDFileFormat
virtual void FreeUpResources(void);
virtual int GetCycle() { return -1; }
virtual void ActivateTimestep(void);
virtual vtkDataSet *GetMesh(int, const char *);
virtual vtkDataArray *GetVar(int, const char *);
virtual vtkDataArray *GetVectorVar(int, const char *);
......
......@@ -53,8 +53,6 @@
#include <DebugStream.h>
#include <VisItDataInterfaceRuntime.h>
// ****************************************************************************
// Method: avtSimV2Writer::avtSimV2Writer
//
......
......@@ -40,7 +40,7 @@
#include <avtDatabaseWriter.h>
#include <vectortypes.h>
#include <VisItDataInterface_V2.h>
#include <VisItDataInterfaceRuntime.h>
class vtkDataSet;
class vtkRectilinearGrid;
......
......@@ -180,6 +180,9 @@ const int INTERRUPT_MESSAGE_TAG = GetUniqueStaticMessageTag();
// Tom Fogal, Mon Sep 1 12:48:36 EDT 2008
// Initialize the display for rendering.
//
// Brad Whitlock, Fri Mar 27 11:33:52 PDT 2009
// I initialized simulationCommandCallbackData.
//
// ****************************************************************************
Engine::Engine()
......@@ -195,6 +198,7 @@ Engine::Engine()
lb = NULL;
procAtts = NULL;
simulationCommandCallback = NULL;
simulationCommandCallbackData = NULL;
metaData = NULL;
silAtts = NULL;
commandFromSim = NULL;
......@@ -2476,6 +2480,11 @@ Engine::ResetTimeout(int timeout)
// Programmer: Jeremy Meredith
// Creation: August 24, 2004
//
// Modifications:
// Brad Whitlock, Fri Mar 27 14:12:16 PDT 2009
// Allow xfer's updates so we can send the data back to the viewer in
// case we're already responding to an update from the viewer.
//
// ****************************************************************************
void
Engine::PopulateSimulationMetaData(const std::string &db,
......@@ -2503,6 +2512,7 @@ Engine::PopulateSimulationMetaData(const std::string &db,
// Send the metadata and SIL to the viewer
if(!quitRPC->GetQuit())
{
xfer->SetUpdate(true);
metaData->Notify();
silAtts->SelectAll();
silAtts->Notify();
......@@ -2568,6 +2578,9 @@ Engine::SimulationTimeStepChanged()
// Brad Whitlock, Thu Feb 26 13:59:36 PST 2009
// I changed the argument to std::string.
//
// Brad Whitlock, Fri Mar 27 13:55:27 PDT 2009
// Enable xfer updates.
//
// ****************************************************************************
void
......@@ -2575,6 +2588,10 @@ Engine::SimulationInitiateCommand(const std::string &command)
{
if(!quitRPC->GetQuit())
{
// Allow the command to be sent, even if we're in the middle of an
// Xfer::Process. This fixes a synchronization bug.
xfer->SetUpdate(true);
commandFromSim->SetCommand(command);
commandFromSim->Notify();
}
......@@ -2656,16 +2673,21 @@ Engine::DisconnectSimulation()
// Programmer: Jeremy Meredith
// Creation: March 18, 2005
//
// Modifications:
// Brad Whitlock, Fri Mar 27 11:34:54 PDT 2009
// I changed the function pointer type and added a callback data pointer.
//
// ****************************************************************************
void
Engine::SetSimulationCommandCallback(void (*scc)(const char*,
int,float,const char*))
Engine::SetSimulationCommandCallback(void (*scc)(const char*,const char*,void*),
void *sccdata)
{
simulationCommandCallback = scc;
simulationCommandCallbackData = sccdata;
}
// ****************************************************************************
// Method: Engine::SetSimulationCommandCallback
// Method: Engine::ExecuteSimulationCommand
//
// Purpose:
// Set the callback to control a simulation.
......@@ -2676,18 +2698,21 @@ Engine::SetSimulationCommandCallback(void (*scc)(const char*,
// Programmer: Jeremy Meredith
// Creation: March 18, 2005
//
// Modifications:
// Brad Whitlock, Fri Mar 27 11:35:59 PDT 2009
// I added simulationCommandCallbackData.
//
// ****************************************************************************
void
Engine::ExecuteSimulationCommand(const std::string &command,
int int_data,
float float_data,
const std::string &string_data)
{
if (!simulationCommandCallback)
return;
simulationCommandCallback(command.c_str(),
int_data,float_data,string_data.c_str());
string_data.c_str(),
simulationCommandCallbackData);
}
// ****************************************************************************
......
......@@ -196,6 +196,10 @@ class Xfer;
// Brad Whitlock, Mon Mar 2 16:11:36 PST 2009
// I added a SaveWindow method.
//
// Brad Whitlock, Fri Mar 27 11:32:32 PDT 2009
// I changed the command callback mechanism so it only accepts string
// arguments and it also accepts user-provided callback data.
//
// ****************************************************************************
class Engine
......@@ -215,10 +219,9 @@ class Engine
const std::string &fmt);
void SimulationTimeStepChanged();
void SimulationInitiateCommand(const std::string &);
void SetSimulationCommandCallback(void(*)(const char*,
int,float,const char*));
void SetSimulationCommandCallback(void(*)(const char*, const char*, void*), void*);
void ExecuteSimulationCommand(const std::string&,
int,float,const std::string&);
const std::string&);
static void DisconnectSimulation();
void Message(const std::string &msg);
void Error(const std::string &msg);
......@@ -355,8 +358,8 @@ class Engine
avtDatabaseMetaData *metaData;
SILAttributes *silAtts;
SimulationCommand *commandFromSim;
void (*simulationCommandCallback)(const char*,
int,float,const char*);
void (*simulationCommandCallback)(const char*,const char*,void*);
void *simulationCommandCallbackData;
// unix process attributes
ProcessAttributes *procAtts;
......
......@@ -1503,6 +1503,10 @@ RPCExecutor<CloneNetworkRPC>::Execute(CloneNetworkRPC *rpc)
// Programmer: Jeremy Meredith
// Creation: March 18, 2005
//
// Modifications:
// Brad Whitlock, Fri Mar 27 11:31:31 PDT 2009
// I made the arguments only be type string.
//
// ****************************************************************************
template<>
void
......@@ -1514,8 +1518,6 @@ RPCExecutor<SimulationCommandRPC>::Execute(SimulationCommandRPC *rpc)
TRY
{
engine->ExecuteSimulationCommand(rpc->GetCommand(),
rpc->GetIntData(),
rpc->GetFloatData(),
rpc->GetStringData());
rpc->SendReply();
}
......
......@@ -1747,7 +1747,7 @@ EngineProxy::UpdateExpressions(const ExpressionList &expressions)
void
EngineProxy::ExecuteSimulationControlCommand(const std::string &cmd)
{
simulationCommandRPC(cmd, 0,0,"");
simulationCommandRPC(cmd, "");
}
// ****************************************************************************
......@@ -1769,7 +1769,7 @@ void
EngineProxy::ExecuteSimulationControlCommand(const std::string &cmd,
const std::string &arg)
{
simulationCommandRPC(cmd, 0,0,arg);
simulationCommandRPC(cmd, arg);
}
// ****************************************************************************
......
......@@ -39,11 +39,9 @@
#include <SimulationCommandRPC.h>
#include <DebugStream.h>
SimulationCommandRPC::SimulationCommandRPC() : BlockingRPC("sifs")
SimulationCommandRPC::SimulationCommandRPC() : NonBlockingRPC("ss")
{
command="";
int_data=0;
float_data=0;
string_data="";
}
......@@ -54,18 +52,14 @@ SimulationCommandRPC::~SimulationCommandRPC()
void
SimulationCommandRPC::operator()(const std::string &c,
int i,float f,const std::string &s)
const std::string &s)
{
debug3 << "Executing SimulationCommandRPC"
<< "\n\t command='"<<c.c_str()<<"'"
<< "\n\t int_data="<<i
<< "\n\t float_data="<<f
<< "\n\t string_data='"<<s.c_str()<<"'"
<< endl;
SetCommand(c);
SetIntData(i);
SetFloatData(f);
SetStringData(s);
Execute();
......@@ -75,9 +69,7 @@ void
SimulationCommandRPC::SelectAll()
{
Select(0, (void*)&command);
Select(1, (void*)&int_data);
Select(2, (void*)&float_data);
Select(3, (void*)&string_data);
Select(1, (void*)&string_data);
}
void
......@@ -86,18 +78,6 @@ SimulationCommandRPC::SetCommand(const std::string &c)
command = c;
}
void
SimulationCommandRPC::SetIntData(int i)
{
int_data = i;
}
void
SimulationCommandRPC::SetFloatData(float f)
{
float_data = f;
}
void
SimulationCommandRPC::SetStringData(const std::string &s)
{
......@@ -110,18 +90,6 @@ SimulationCommandRPC::GetCommand() const
return command;
}
int
SimulationCommandRPC::GetIntData() const
{
return int_data;
}
float
SimulationCommandRPC::GetFloatData() const
{
return float_data;
}
std::string
SimulationCommandRPC::GetStringData() const
{
......
......@@ -53,9 +53,14 @@
// Programmer: Jeremy Meredith
// Creation: March 18, 2005
//
// Modifications:
// Brad Whitlock, Fri Mar 27 11:29:39 PDT 2009
// I simplified it so it only accepts string arguments. I also changed it
// to nonblocking.
//
// ****************************************************************************
class ENGINE_RPC_API SimulationCommandRPC : public BlockingRPC
class ENGINE_RPC_API SimulationCommandRPC : public NonBlockingRPC
{
public:
SimulationCommandRPC();
......@@ -64,33 +69,21 @@ class ENGINE_RPC_API SimulationCommandRPC : public BlockingRPC
virtual const std::string TypeName() const { return "SimulationCommandRPC"; }
// Invokation methods
/*
void operator()(const std::string &command);
void operator()(const std::string &command, int);
void operator()(const std::string &command, float);
void operator()(const std::string &command, const std::string&);
*/
void operator()(const std::string &command, int,float,const std::string&);
// Property selection methods
virtual void SelectAll();
// Property setting methods
void SetCommand(const std::string&);
void SetIntData(int);
void SetFloatData(float);
void SetStringData(const std::string&);
// Property getting methods
std::string GetCommand() const;
int GetIntData() const;
float GetFloatData() const;
std::string GetStringData() const;
private:
std::string command;
int int_data;
float float_data;
std::string string_data;
};
......
......@@ -1751,8 +1751,9 @@ QvisSimulationWindow::executePushButtonCommand(const QString &btncmd)
string host = engines->GetEngines()[index];
string sim = engines->GetSimulationName()[index];
QString cmd("clicked();" + btncmd + ";QPushButton;Simulations;NONE");
GetViewerMethods()->SendSimulationCommand(host, sim, cmd.toStdString());
QString cmd(btncmd);
QString args(QString("clicked();%1;QPushButton;Simulations;NONE").arg(cmd));
GetViewerMethods()->SendSimulationCommand(host, sim, btncmd.toStdString(), args.toStdString());
}
// ****************************************************************************
......@@ -1780,8 +1781,9 @@ QvisSimulationWindow::executeEnableTimeRange(const QString &value)
string host = engines->GetEngines()[index];
string sim = engines->GetSimulationName()[index];
QString cmd("clicked();TimeLimitsEnabled;QCheckBox;Simulations;" + value);
GetViewerMethods()->SendSimulationCommand(host, sim, cmd.toStdString());
QString cmd("TimeLimitsEnabled");
QString args(QString("clicked();%1;QCheckBox;Simulations;%2").arg(cmd).arg(value));
GetViewerMethods()->SendSimulationCommand(host, sim, cmd.toStdString(), args.toStdString());
}
......@@ -1815,8 +1817,9 @@ QvisSimulationWindow::executeStartCommand(const QString &value)
string host = engines->GetEngines()[index];
string sim = engines->GetSimulationName()[index];
QString cmd(QString("returnedPressed();StartCycle;QLineEdit;Simulations;") + value);
GetViewerMethods()->SendSimulationCommand(host, sim, cmd.toStdString());
QString cmd("StartCycle");
QString args(QString("returnedPressed();%1;QLineEdit;Simulations;%2").arg(cmd).arg(value));
GetViewerMethods()->SendSimulationCommand(host, sim, cmd.toStdString(), args.toStdString());
}
// ****************************************************************************
......@@ -1849,8 +1852,9 @@ QvisSimulationWindow::executeStepCommand(const QString &value)
string host = engines->GetEngines()[index];
string sim = engines->GetSimulationName()[index];
QString cmd(QString("returnedPressed();StepCycle;QLineEdit;Simulations;") + value);
GetViewerMethods()->SendSimulationCommand(host, sim, cmd.toStdString());
QString cmd("StepCycle");
QString args(QString("returnedPressed();%1;QLineEdit;Simulations;%2").arg(cmd).arg(value));
GetViewerMethods()->SendSimulationCommand(host, sim, cmd.toStdString(), args.toStdString());
}
// ****************************************************************************
......@@ -1878,9 +1882,10 @@ QvisSimulationWindow::executeStopCommand(const QString &value)
int index = simulationToEngineListMap[simindex];
string host = engines->GetEngines()[index];
string sim = engines->GetSimulationName()[index];
QString cmd(QString("returnedPressed();StopCycle;QLineEdit;Simulations;") + value);
GetViewerMethods()->SendSimulationCommand(host, sim, cmd.toStdString());
QString cmd("StopCycle");
QString args(QString("returnedPressed();%1;QLineEdit;Simulations;%2").arg(cmd).arg(value));
GetViewerMethods()->SendSimulationCommand(host, sim, cmd.toStdString(), args.toStdString());
}