Class DependentUpdate
- java.lang.Object
-
- bio.singa.simulation.model.modules.concentration.scope.DependentUpdate
-
- All Implemented Interfaces:
UpdateScope
public class DependentUpdate extends Object implements UpdateScope
Dependent UpdatableConcentrationBasedModules require an integer state of basically all updatables in a simulation. First all updates for all updatables are calculated. Afterwards all half step concentrations are determined and further all errors are calculated, looking for theUpdatablewith the largestNumericalError(e.g.Diffusion).- Author:
- cl
-
-
Constructor Summary
Constructors Constructor Description DependentUpdate(ConcentrationBasedModule<?> module)Initializes the update scope for the corresponding module.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearPotentialDeltas()Clears all concentration deltas that may be assigned by this moduleConcentrationContainergetHalfStepConcentration(Updatable updatable)Return the half step concentration of a node after the full update has been calculated for the full step and the resulting delta is known.voidprocessAllUpdatables(Collection<? extends Updatable> updatables)Processes all given updatables.voidprocessUpdatable(Updatable updatable)Calculates the given updatable.
-
-
-
Constructor Detail
-
DependentUpdate
public DependentUpdate(ConcentrationBasedModule<?> module)
Initializes the update scope for the corresponding module.- Parameters:
module- The module.
-
-
Method Detail
-
processAllUpdatables
public void processAllUpdatables(Collection<? extends Updatable> updatables)
Description copied from interface:UpdateScopeProcesses all given updatables. This includes calculating the delta functions of the corresponding module, calculating the current numerical error and pushing potential Deltas to the updatables, ready to be applied.- Specified by:
processAllUpdatablesin interfaceUpdateScope- Parameters:
updatables- The updatables to be processed.
-
processUpdatable
public void processUpdatable(Updatable updatable)
Description copied from interface:UpdateScopeCalculates the given updatable. If it is required to calculate other updatables to evaluate the state of this updatable this will be done depending on the implementation of the scope.- Specified by:
processUpdatablein interfaceUpdateScope- Parameters:
updatable- The updatable.
-
clearPotentialDeltas
public void clearPotentialDeltas()
Description copied from interface:UpdateScopeClears all concentration deltas that may be assigned by this module- Specified by:
clearPotentialDeltasin interfaceUpdateScope
-
getHalfStepConcentration
public ConcentrationContainer getHalfStepConcentration(Updatable updatable)
Description copied from interface:UpdateScopeReturn the half step concentration of a node after the full update has been calculated for the full step and the resulting delta is known.- Specified by:
getHalfStepConcentrationin interfaceUpdateScope- Parameters:
updatable- The updatable.- Returns:
- A concentration container with the concentrations at the half time step.
-
-