Package org.evoludo.simulator.models
Class PDESupervisorGWT
Object
PDESupervisor
PDESupervisorGWT
Supervisor of reaction-diffusion processes. Coordinates calculations of the
next step. Optimized implementation for GWT which uses scheduling to prevent
computations from blocking the GUI.
- Author:
- Christoph Hauert
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
true
if calculations are already in progress.Fields inherited from class PDESupervisor
charge, engine, nUnits
-
Constructor Summary
ConstructorsConstructorDescriptionPDESupervisorGWT
(EvoLudo engine, PDE charge) Creates a new supervisor to manage the PDE calculations of model charge with scheduling in GWT. -
Method Summary
Methods inherited from class PDESupervisor
diffuse, react, reset, update
-
Field Details
-
inProgress
boolean inProgresstrue
if calculations are already in progress. This prevents the concurrent scheduling of redundant tasks.
-
-
Constructor Details
-
PDESupervisorGWT
Creates a new supervisor to manage the PDE calculations of model charge with scheduling in GWT.- Parameters:
engine
- the pacemaker for running the modelcharge
- the model to supervise
-
-
Method Details
-
unload
public void unload()Description copied from class:PDESupervisor
Unload the supervisor and free resources.- Overrides:
unload
in classPDESupervisor
-
next
public boolean next(double stepDt) Advances the PDE model by a time step ofstepDt
. Subclasses may override this method to implement optimizations. For example, GWT uses scheduling to avoid blocking the GUI.Note: Reaction and diffusion steps could be scheduled independently or even split into smaller chunks but for now GUI remains responsive even for
101×101
grid.- Overrides:
next
in classPDESupervisor
- Parameters:
stepDt
- the time step to advance the PDE- Returns:
true
if system converged- See Also:
-