3.1.4.13. c3po.mpi.MPIRemote module

Inheritance diagram of c3po.mpi.MPIRemote

Contain the class MPIRemote.

class c3po.mpi.MPIRemote.MPIRemote(mpiComm)

Bases: PhysicsDriver, DataManager

MPIRemote replaces a remote PhysicsDriver or a remote DataManager.

Inherits from c3po.PhysicsDriver.PhysicsDriver and c3po.DataManager.DataManager but passes most of the methods: it does nothing.

__init__(mpiComm)

Build a MPIRemote object.

Parameters:

mpiComm – MPI communicator.

abortTimeStep()

self._dt = 0.

cloneEmpty()

Return a clone.

computeTimeStep()

return (1.e30, True)

forget(label, method)

(Optional) Discard a previously saved state of the code.

After this call, the save-point cannot be restored anymore. This method can be used to free the space occupied by unused saved states.

Parameters:
  • label (int) – A user- (or code-) defined value identifying the state.

  • method (str) – A string specifying which method was used to save the state of the code. A code can provide different methods (for example in memory, on disk, etc.).

Raises:
getStationaryMode()

return self._stationaryMode

initTimeStep(dt)

self._dt = dt and return True

initialize()

return True

isStationary()

return True

iterateTimeStep()

return (True, True)

presentTime()

Return the time.

resetTime(time_)

Reset time.

restore(label, method)

(Optional) Restore the state of the code.

After restore, the code should behave exactly like after the corresponding call to save (except of course for save/restore methods, since the list of saved states may have changed). The state to be restored is identified by the combination of label and method arguments. The save() method must have been called at some point or in some previous run with this combination.

Parameters:
  • label (int) – A user- (or code-) defined value identifying the state.

  • method (str) – A string specifying which method was used to save the state of the code. A code can provide different methods (for example in memory, on disk, etc.).

Raises:
save(label, method)

(Optional) Save the state of the code.

The saved state is identified by the combination of label and method arguments. If save() has already been called with the same two arguments, the saved state is overwritten.

Parameters:
  • label (int) – A user- (or code-) defined value identifying the state.

  • method (str) – A string specifying which method is used to save the state of the code. A code can provide different methods (for example in memory, on disk, etc.).

Raises:
setDataFile(datafile)

Pass

setInputDoubleValue(name, value)

Pass

setInputIntValue(name, value)

Pass

setInputMEDDoubleField(name, field)

Pass

setInputMEDIntField(name, field)

Pass

setInputMEDStringField(name, field)

Pass

setInputStringValue(name, value)

Pass

setMPIComm(mpicomm)

Pass

setStationaryMode(stationaryMode)

self._stationaryMode = stationaryMode

solveTimeStep()

return True

terminate()

Pass

validateTimeStep()

self._time += self._dt