public class UpdateScheduler extends Object
| Constructor and Description |
|---|
UpdateScheduler(Simulation simulation) |
| Modifier and Type | Method and Description |
|---|---|
void |
addModule(UpdateModule module) |
void |
decreaseTimeStep() |
void |
evaluateGlobalNumericalAccuracy() |
javax.measure.Quantity<javax.measure.quantity.Frequency> |
getAccuracyGain() |
CountDownLatch |
getCountDownLatch() |
double |
getLargestGlobalError() |
LocalError |
getLargestLocalError() |
UpdateModule |
getLocalErrorModule() |
double |
getLocalErrorUpdate() |
int |
getNumberOfModules() |
double |
getRecalculationCutoff() |
long |
getTimestepsDecreased() |
long |
getTimestepsIncreased() |
void |
increaseTimeStep() |
boolean |
interruptAllBut(Thread callingThread,
UpdateModule callingModule)
Returns true if the calling module was the first to call the method, therefore being allowed to optimize the
time step.
|
void |
nextEpoch() |
boolean |
recalculationRequired()
Recalculations are required if:
the time step was rescaled during this calculation
any module was interrupted during this calculation
the global error was larger than the recalculation cutoff
|
void |
resetCalculation() |
void |
setLargestLocalError(LocalError localError,
UpdateModule associatedModule,
double associatedConcentration) |
void |
setRecalculationCutoff(double recalculationCutoff) |
boolean |
timeStepWasAlteredInThisEpoch() |
boolean |
timeStepWasRescaled() |
public UpdateScheduler(Simulation simulation)
public double getRecalculationCutoff()
public void setRecalculationCutoff(double recalculationCutoff)
public long getTimestepsDecreased()
public long getTimestepsIncreased()
public void nextEpoch()
public void evaluateGlobalNumericalAccuracy()
public boolean recalculationRequired()
public LocalError getLargestLocalError()
public void setLargestLocalError(LocalError localError, UpdateModule associatedModule, double associatedConcentration)
public UpdateModule getLocalErrorModule()
public double getLocalErrorUpdate()
public double getLargestGlobalError()
public boolean timeStepWasRescaled()
public boolean timeStepWasAlteredInThisEpoch()
public javax.measure.Quantity<javax.measure.quantity.Frequency> getAccuracyGain()
public void increaseTimeStep()
public void decreaseTimeStep()
public CountDownLatch getCountDownLatch()
public void addModule(UpdateModule module)
public int getNumberOfModules()
public boolean interruptAllBut(Thread callingThread, UpdateModule callingModule)
callingThread - The calling thread.callingModule - The associated module.public void resetCalculation()
Copyright © 2019. All rights reserved.