public class DiffusionSimulation extends java.lang.Object implements DataSource
Modifier and Type | Field and Description |
---|---|
static double |
border
likely border in which to clone bits of substrate
|
static int |
calls
counter for the number of times the substrate initialiser function is called
|
static int |
D
the dimensionality of the simulation.
|
static double |
DIFF_CONST
the self-diffusion constant of water at room temperature
|
double |
dt
time increment associated with a timestep
|
Constructor and Description |
---|
DiffusionSimulation(SimulationParams simParams) |
DiffusionSimulation(SimulationParams simParams,
SimulableScheme imParams)
debug file writers
|
Modifier and Type | Method and Description |
---|---|
double |
getMeanSquareDisplacement()
calulate the mean square displacement of walkers at their current
locations.
|
StepGenerator |
getStepGenerator() |
Substrate |
getSubstrate() |
Walker[] |
getWalkers() |
void |
initialiseWalkers()
sets all walkers in initial conditions
|
static void |
main(java.lang.String[] args) |
boolean |
more()
Tests whether there are unprocessed voxels in the data source.
|
double[] |
nextVoxel()
initialises a simulation and runs the main loop before
constructing a
|
void |
runMainLoop()
runs the simualtion.
|
static void |
testDiffusionSimulation() |
public static final int D
public static final double DIFF_CONST
public static double border
public final double dt
public static int calls
public DiffusionSimulation(SimulationParams simParams, SimulableScheme imParams)
public DiffusionSimulation(SimulationParams simParams)
public void initialiseWalkers()
public void runMainLoop()
public double[] nextVoxel() throws DataSourceException
nextVoxel
in interface DataSource
DataSourceException
DataSource.nextVoxel()
public boolean more()
DataSource
more
in interface DataSource
DataSource.more()
public double getMeanSquareDisplacement()
public final Walker[] getWalkers()
public final Substrate getSubstrate()
public final StepGenerator getStepGenerator()
public static final void testDiffusionSimulation()
public static void main(java.lang.String[] args)