edu.bonn.xulu.plugin.model.parallel.demo
Class AverageNeighborhoodParallelDemoModel

java.lang.Object
  extended by AbstractNamedObject
      extended by edu.bonn.xulu.model.AbstractXuluModel
          extended by edu.bonn.xulu.model.AbstractStepModel
              extended by appl.parallel.model.AbstractParallelStepModel
                  extended by edu.bonn.xulu.plugin.model.parallel.demo.AverageNeighborhoodParallelDemoModel
All Implemented Interfaces:
ParallelStepModel, StepModel, XuluModel, Serializable

public class AverageNeighborhoodParallelDemoModel
extends AbstractParallelStepModel

This class is a simple demo algorithm for the usage of Xulu / V. It implements exactly the same functionality as the serial counterpart, but makes heavy use of parallel computations. See AverageNeighborhoodSerialDemoModel for details about the model semantics. The Model needs three resources, which are specified using the AverageNeighborhoodContentManager:

  1. Input Grid (inputGrid): A grid with input values
  2. Output Grid (outputGrid): A grid where the output is stored
  3. Number of steps (steps): the number of steps to compute.

Version:
1.0
Author:
Dominik Appl
See Also:
AverageNeighborhoodContentManager

Field Summary
protected  AverageNeighborhoodContentManager contManager
          Speichert den ContentManager fuer das Modell.
 
Fields inherited from class edu.bonn.xulu.model.AbstractStepModel
stepCount
 
Fields inherited from class edu.bonn.xulu.model.AbstractXuluModel
disposed, events, initialised, listeners, modelResourceProvider, running, statusOut, stopped
 
Constructor Summary
AverageNeighborhoodParallelDemoModel()
          Creates a new instance.
 
Method Summary
 void performModelDispose()
          frees read / write access
 void performModelInit()
          Performes the initalization.
 void performModelStep(int stepNo)
          Executes one model step:
 
Methods inherited from class appl.parallel.model.AbstractParallelStepModel
getAdvancedSPMDController, getSPMDController, setSPMDController
 
Methods inherited from class edu.bonn.xulu.model.AbstractStepModel
fireModelStepFinished, fireModelStepStarted, getStepCount, performModelStart
 
Methods inherited from class edu.bonn.xulu.model.AbstractXuluModel
addModelListener, checkBreakingCommands, determineCaption, disposeModel, fireModelDisposed, fireModelEvent, fireModelInitialised, fireModelStarted, fireModelStopped, getContentManager, getEvents, getModelSpecificGUI, getResourceProvider, getStatusOut, initModel, isDisposed, isInitialised, isRunning, isStopped, performError, releaseAccess, removeModelListener, resetCaptions, setStatusOut, startModelling, stopModelling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.bonn.xulu.model.StepModel
getStepCount
 
Methods inherited from interface edu.bonn.xulu.model.XuluModel
addModelListener, disposeModel, getContentManager, getEvents, getModelSpecificGUI, getResourceProvider, getStatusOut, initModel, isDisposed, isInitialised, isRunning, isStopped, performError, removeModelListener, setStatusOut, startModelling, stopModelling
 

Field Detail

contManager

protected AverageNeighborhoodContentManager contManager
Speichert den ContentManager fuer das Modell.

See Also:
AverageNeighborhoodContentManager
Constructor Detail

AverageNeighborhoodParallelDemoModel

public AverageNeighborhoodParallelDemoModel()
Creates a new instance.

Method Detail

performModelInit

public void performModelInit()
Performes the initalization. In addition to the work in the serial version here the SPMDClientInterface is retrieved. The neighborhood range is set and the two grids are submitted to Xulu / V - control.

Specified by:
performModelInit in class AbstractXuluModel

performModelDispose

public void performModelDispose()
frees read / write access

Specified by:
performModelDispose in class AbstractXuluModel

performModelStep

public void performModelStep(int stepNo)
Executes one model step:

Specified by:
performModelStep in interface StepModel
Specified by:
performModelStep in class AbstractStepModel
Parameters:
stepNo - Nummer des Modellschritts (beginnend bei 1)