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) booleantrueif 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 inProgresstrueif 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:PDESupervisorUnload the supervisor and free resources.- Overrides:
unloadin 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×101grid.- Overrides:
nextin classPDESupervisor- Parameters:
stepDt- the time step to advance the PDE- Returns:
trueif system converged- See Also:
-