3.1.4.13. c3po.mpi.MPIRemote module
Contain the class MPIRemote.
- class c3po.mpi.MPIRemote.MPIRemote(mpiComm)
Bases:
PhysicsDriver,DataManagerMPIRemotereplaces a remotePhysicsDriveror a remoteDataManager.Inherits from
c3po.PhysicsDriver.PhysicsDriverandc3po.DataManager.DataManagerbut passes most of the methods: it does nothing.- 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:
- Raises:
AssertionError – If called before
initialize()or afterterminate().ValueError – If the
methodorlabelargument is invalid.
- getStationaryMode()
return self._stationaryMode
- initTimeStep(dt)
self._dt = dtandreturn 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
labelandmethodarguments. Thesave()method must have been called at some point or in some previous run with this combination.- Parameters:
- Raises:
AssertionError – If called inside the
TIME_STEP_DEFINEDcontext (seePhysicsDriverdocumentation), meaning we shouldn’t restore a previous time step while the computation of a new time step is in progress.AssertionError – If called before
initialize()or afterterminate().ValueError – If the
methodorlabelargument is invalid.
- save(label, method)
(Optional) Save the state of the code.
The saved state is identified by the combination of
labelandmethodarguments. Ifsave()has already been called with the same two arguments, the saved state is overwritten.- Parameters:
- Raises:
AssertionError – If called inside the
TIME_STEP_DEFINEDcontext (seePhysicsDriverdocumentation), meaning we shouldn’t save a previous time step while the computation of a new time step is in progress.AssertionError – If called before
initialize()or afterterminate().ValueError – If the
methodorlabelargument is invalid.
- 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