Muscle Java API: muscle::core::kernel::RawInstance Class Reference

muscle::core::kernel::RawInstance Class Reference

Inheritance diagram for muscle::core::kernel::RawInstance:

muscle::core::kernel::Module muscle::core::kernel::Instance muscle::core::kernel::VoidKernel muscle::core::kernel::CAController muscle::core::kernel::Mapper muscle::core::kernel::Submodel muscle::core::standalone::NativeKernel muscle::core::kernel::FanInMapper< T extends Serializable > muscle::core::kernel::FanOutMapper< T extends Serializable > muscle::core::standalone::MPIKernel

List of all members.


Public Member Functions

boolean willStop ()
void executeDirectly ()
Scale getScale ()
void setArguments (Object[] args)
Object[] getArguments ()
void setInstanceController (InstanceController ic)
final void connectPortals ()
final void beforeExecute ()
final void start ()
String infoText ()

Static Public Member Functions

static String getCxAProperty (String key)
static CxADescription getCxA ()
static String info (Class<?extends RawInstance > controllerClass)
static void main (String[] args) throws java.lang.ClassNotFoundException

Protected Member Functions

void beforeSetup ()
abstract void addPortals ()
abstract void execute ()
void setScale (Scale scale)
Logger getLogger ()
void log (String msg)
void log (String msg, Level lvl)

Protected Attributes

Map< String,
ConduitEntranceController > 
entrances = new ArrayMap<String,ConduitEntranceController>()
Map< String,
ConduitExitController > 
exits = new ArrayMap<String,ConduitExitController>()
InstanceController controller
Timestamp maxTime = null
Timestamp originTime = null

Package Functions

protected< T extends
Serializable > ConduitExit< T > 
addExit (String portName, Class< T > dataClass)
protected< T extends
Serializable > ConduitEntrance
< T > 
addEntrance (String portName, Class< T > dataClass)
protected< T extends
Serializable > ConduitEntrance
< T > 
addSynchronizedEntrance (String portName, Class< T > dataClass)
private< T extends
Serializable > void 
addExitToList (String portName, ConduitExitController< T > exit)
private< T extends
Serializable > void 
addEntranceToList (String portName, ConduitEntranceController< T > entrance)

Detailed Description

A basic kernel, that all kernels must extend
Author:
Jan Hegewald

Member Function Documentation

boolean muscle::core::kernel::RawInstance::willStop (  )  [inline]

currently returns true if all portals of this kernel have passed a maximum timestep given in the cxa properties (this is a temporary implementation because this mechanism is going to change anyway) note: if init portals are being used, they do increment their time only once! do not change signature! (used from native code)

Reimplemented in muscle::core::kernel::Submodel.

void muscle::core::kernel::RawInstance::beforeSetup (  )  [inline, protected]

abstract void muscle::core::kernel::RawInstance::addPortals (  )  [protected, pure virtual]

abstract void muscle::core::kernel::RawInstance::execute (  )  [protected, pure virtual]

void muscle::core::kernel::RawInstance::executeDirectly (  )  [inline]

Just executes the kernel.

This method is used by running MPI tasks for all nodes with non-zero rank.

Override this method to provide own method of starting a slave kernel.

Scale muscle::core::kernel::RawInstance::getScale (  )  [inline]

SI Scale will be specified in the CxA file, not in MUSCLE. return the SI scale of a kernel
for a 1D kernel with dx=1meter and dt=1second this would e.g. be
javax.measure.DecimalMeasure<javax.measure.quantity.Duration> dt = javax.measure.DecimalMeasure.valueOf(new java.math.BigDecimal(1), javax.measure.unit.SI.SECOND);
javax.measure.DecimalMeasure<javax.measure.quantity.Length> dx = javax.measure.DecimalMeasure.valueOf(new java.math.BigDecimal(1), javax.measure.unit.SI.METER);
return new Scale(dt,dx); return null if the kernel is dimensionless

Reimplemented in muscle::core::kernel::Mapper, and muscle::core::kernel::VoidKernel.

void muscle::core::kernel::RawInstance::setScale ( Scale  scale  )  [inline, protected]

protected<T extends Serializable> ConduitExit<T> muscle::core::kernel::RawInstance::addExit ( String  portName,
Class< T >  dataClass 
) [inline, package]

protected<T extends Serializable> ConduitEntrance<T> muscle::core::kernel::RawInstance::addEntrance ( String  portName,
Class< T >  dataClass 
) [inline, package]

protected<T extends Serializable> ConduitEntrance<T> muscle::core::kernel::RawInstance::addSynchronizedEntrance ( String  portName,
Class< T >  dataClass 
) [inline, package]

static String muscle::core::kernel::RawInstance::getCxAProperty ( String  key  )  [inline, static]

do not change signature! (used from native code)

static CxADescription muscle::core::kernel::RawInstance::getCxA (  )  [inline, static]

reference to the CxA of this kernel do not change signature! (used from native code)

Logger muscle::core::kernel::RawInstance::getLogger (  )  [inline, protected]

void muscle::core::kernel::RawInstance::log ( String  msg  )  [inline, protected]

void muscle::core::kernel::RawInstance::log ( String  msg,
Level  lvl 
) [inline, protected]

void muscle::core::kernel::RawInstance::setArguments ( Object[]  args  )  [inline]

Object [] muscle::core::kernel::RawInstance::getArguments (  )  [inline]

void muscle::core::kernel::RawInstance::setInstanceController ( InstanceController  ic  )  [inline]

static String muscle::core::kernel::RawInstance::info ( Class<?extends RawInstance controllerClass  )  [inline, static]

prints info about a given kernel to stdout

final void muscle::core::kernel::RawInstance::connectPortals (  )  [inline]

final void muscle::core::kernel::RawInstance::beforeExecute (  )  [inline]

Reimplemented from muscle::core::kernel::Module.

final void muscle::core::kernel::RawInstance::start (  )  [inline]

String muscle::core::kernel::RawInstance::infoText (  )  [inline]

static void muscle::core::kernel::RawInstance::main ( String[]  args  )  throws java.lang.ClassNotFoundException [inline, static]

pass one or more controller class names to get an info about these controllers

private<T extends Serializable> void muscle::core::kernel::RawInstance::addExitToList ( String  portName,
ConduitExitController< T >  exit 
) [inline, package]

private<T extends Serializable> void muscle::core::kernel::RawInstance::addEntranceToList ( String  portName,
ConduitEntranceController< T >  entrance 
) [inline, package]


Member Data Documentation

Map<String,ConduitEntranceController> muscle::core::kernel::RawInstance::entrances = new ArrayMap<String,ConduitEntranceController>() [protected]

Map<String,ConduitExitController> muscle::core::kernel::RawInstance::exits = new ArrayMap<String,ConduitExitController>() [protected]


Generated on Thu Oct 18 14:28:29 2012 for Muscle Java API by  doxygen 1.5.6