3.1.13. c3po.Coupler module

Inheritance diagram of c3po.Coupler

Contain the class Coupler.

class c3po.Coupler.Coupler(physics, exchangers, dataManagers=[])

Bases: PhysicsDriver

Coupler is the base class for the definition of a coupling.

A coupling is defined using PhysicsDriver, DataManager and Exchanger objects. A user needs to define his own class inheriting from Coupler and to define its solveTimeStep() method. It may also be necessary to overload the I/O methods (for fields and/or of scalars) inherited from PhysicsDriver.

Note

Coupler inherits from PhysicsDriver, it is therefore possible to couple of Coupler objects!

__init__(physics, exchangers, dataManagers=[])

Build an Coupler object.

Parameters:
abortTimeStep()

See PhysicsDriver.abortTimeStep().

computeTimeStep()

See PhysicsDriver.computeTimeStep().

denormalizeData(norms)

Multiply the DataManager objects by the scalar values provided.

Parameters:

norms (list) – List of scalar values. The DataManager are multiplied by these scalars.

getIterateStatus()

See PhysicsDriver.getSolveStatus().

getMEDCouplingMajorVersion()

See PhysicsDriver.getMEDCouplingMajorVersion().

getNorm(data)

Return the norm choosen by setNormChoice() of data (a DataManager).

Parameters:

data (DataManager) – A DataManager object.

Return type:

The asked norm of data.

getSolveStatus()

See PhysicsDriver.getSolveStatus().

getStationaryMode()

See PhysicsDriver.getStationaryMode().

initTimeStep(dt)

See PhysicsDriver.initTimeStep().

initialize()

See PhysicsDriver.initialize().

isMEDCoupling64Bits()

See PhysicsDriver.isMEDCoupling64Bits().

isStationary()

See PhysicsDriver.isStationary().

normalizeData(norms)

Divide the DataManager objects by the scalar values provided.

Parameters:

norms (list) – List of scalar values. The DataManager are divided by these scalars.

presentTime()

See PhysicsDriver.presentTime().

readNormData()

Return a list of the norms of the DataManager objects hold by self.

Returns:

List of the norm of the DataManager objects.

Return type:

list

resetTime(time_)

See PhysicsDriver.resetTime().

setNormChoice(choice)

Choose a norm for future use.

Parameters:

choice (NormChoice.normMax, NormChoice.norm2) –

To be choosen between :

setStationaryMode(stationaryMode)

See PhysicsDriver.setStationaryMode().

terminate()

See PhysicsDriver.terminate().

validateTimeStep()

See PhysicsDriver.validateTimeStep().

class c3po.Coupler.NormChoice

Bases: object

Enum definition of norm choice.

Values :
norm2 = 1
normMax = 0