aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgoodale <goodale@bfcf8e34-485d-4d46-a995-1fd6fa6fb178>2000-12-08 14:30:52 +0000
committergoodale <goodale@bfcf8e34-485d-4d46-a995-1fd6fa6fb178>2000-12-08 14:30:52 +0000
commit7d5745ea721bffe69097a6134b4765d94d94ff97 (patch)
tree896e089e1cccf6e0526ed277f4b9a8b846acf590 /src
parentc547c0907680586bbdfab70cb039b74c8b698bb3 (diff)
Fix parameter steering for parallel case.
Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IsoSurfacer/trunk@27 bfcf8e34-485d-4d46-a995-1fd6fa6fb178
Diffstat (limited to 'src')
-rw-r--r--src/IsoSurfacer.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/IsoSurfacer.c b/src/IsoSurfacer.c
index e5e87ed..f9d8ea7 100644
--- a/src/IsoSurfacer.c
+++ b/src/IsoSurfacer.c
@@ -58,8 +58,10 @@ static void WriteHDF5(cGH *GH, polypatch *totals, isosurfacerGH *myGH,
/***************************************************************************/
static int IsoSurfacerHandleCommands(cGH *GH)
{
+ DECLARE_CCTK_PARAMETERS
IsoCommand *Iso_PollCommand(cGH *cctkGH,IsoCommand *cmd);
IsoCommand command;
+ CCTK_REAL new_isovalue;
isosurfacerGH *myGH = (isosurfacerGH *) GH->extensions [CCTK_GHExtensionHandle ("IsoSurfacer")];
if(!myGH->RunIsoSurfacer) return 0; /* not running */
@@ -110,7 +112,7 @@ static int IsoSurfacerHandleCommands(cGH *GH)
/* Here it just needs to read from the control socket
and then change the isosurface appropriately */
-
+#define VERBOSE
#ifdef CCTK_MPI
/* now we need to bcast this value to all procs */
{
@@ -122,13 +124,18 @@ static int IsoSurfacerHandleCommands(cGH *GH)
printf("+++++++++Process Command [%s] [%s] [%s]\n",
command.cmd.object,command.cmd.target,command.cmd.value);
#endif
- myGH->isovalue=atof(command.cmd.value); /* steer it. */
+ new_isovalue=atof(command.cmd.value); /* steer it. */
}
- tmpval=myGH->isovalue;
+ else
+ {
+ new_isovalue = isovalue;
+ }
+
+ tmpval=new_isovalue;
CACTUS_MPI_ERROR(MPI_Bcast(&tmpval,1,
PUGH_MPI_REAL,0, /* ugh. nor REAL8 */
pughGH->PUGH_COMM_WORLD));
- myGH->isovalue=tmpval; /* copyback */
+ new_isovalue=tmpval; /* copyback */
sprintf(stringval,"%f", tmpval);
CCTK_ParameterSet("isovalue","isosurfacer",stringval);
@@ -140,7 +147,7 @@ static int IsoSurfacerHandleCommands(cGH *GH)
printf("+++++++++Process Command [%s] [%s] [%s]\n",
command.cmd.object,command.cmd.target,command.cmd.value);
#endif
- myGH->isovalue=atof(command.cmd.value); /* steer it. */
+ //new_isovalue=atof(command.cmd.value); /* steer it. */
/* If we have MPI, must propagate the steering info
to all processes */
/* CCTK_SetParameter(); how? */