public abstract class CellularLattice extends Substrate
Modifier and Type | Field and Description |
---|---|
static double |
TINYNUM
tolerence for floating point equality
|
a, border, factor, intersectsBoundary, spatialOptInitialised, voxToObjects
Constructor and Description |
---|
CellularLattice(SimulationParams simParams) |
Modifier and Type | Method and Description |
---|---|
void |
applyBoundaries(Walker[] walker)
applies periodic boundary conditions to walker positions
|
boolean |
crossesMembrane(Walker walker,
double[] offset,
double[] stepVector,
double[] normal,
double[] d,
boolean skipCurrent,
double origLength,
boolean[] in,
double[] p)
checks if a step will take a walker across a membrane or not
by comparing the cell coords before and after the step.
|
int[] |
getCell(double[] r)
gets the cell coords from the spatia location
|
boolean |
getCellOccupation(int[] cell)
check if given cell is occupied on the lattice
|
double |
getPeakCoord()
the reason for this is to avoid initialising everyone on top of a
membrane on lattices with even L.
|
double[] |
getSubstrateSize()
returns the size of the substrate
|
int[] |
getWindingNumbers(double[] r)
constructs the array of "winding numbers" for walker positions.
|
int[] |
getWindingNumbers(Walker walker)
wrapper for winding nimber routine using walker instead of position
|
void |
init()
initialiser.
|
abstract void |
initLattice()
abstract method for initialising cell activation.
|
boolean |
intracellular(Walker walker)
checks if a walker is in intracellular (true) or
extracellular (false) space
|
static void |
main(java.lang.String[] args) |
static void |
testBarrierReflection() |
static void |
testBoundaryCrossing() |
static void |
testGetCell() |
static void |
testPeriodicBoundaries() |
static void |
testWindingNumbers() |
amend, getBottomLeft, getDiffusivityAt, getLogMagnetisationChange, getN, getSubsObj, getSubstrateCoords, getSubVoxelIndex, getUpperRight, initBoundaryIntersectionArrays, initCandidates, initialiseSpatialOptimisation, mapStepIntoSubstrate, moreCandidates, nextCandidate, testAmendment, testStepAmendment, unmapStepFromSubstrate, voxelContains
public static final double TINYNUM
public CellularLattice(SimulationParams simParams)
public abstract void initLattice()
public int[] getCell(double[] r)
r
- spatial positionpublic boolean getCellOccupation(int[] cell)
cell
- cell coordspublic boolean crossesMembrane(Walker walker, double[] offset, double[] stepVector, double[] normal, double[] d, boolean skipCurrent, double origLength, boolean[] in, double[] p)
crossesMembrane
in class Substrate
walker
- the walker making the stepoffset
- displacement from walker position to check againststepVector
- the step vectornormal
- the normal of the surfaced
- space to store disance of barrier from originskipCurrent
- flag to skip barrier we're sitting on top ofsimulation.geometry.Geometry#crossesMembrane(simulation.dynamics.Walker, double[], double[])
public final double[] getSubstrateSize()
getSubstrateSize
in class Substrate
simulation.geometry.Geometry#getSubstrateSize()
public void applyBoundaries(Walker[] walker)
walker
- the array of walkers walkerpublic int[] getWindingNumbers(double[] r)
r
- euclidean position in spacepublic int[] getWindingNumbers(Walker walker)
walker
- walker whose winding number we want to findpublic double getPeakCoord()
getPeakCoord
in class Substrate
public static void testGetCell()
public static void testWindingNumbers()
public static void testBarrierReflection()
public static void testBoundaryCrossing()
public static void testPeriodicBoundaries()
public boolean intracellular(Walker walker)
Substrate
intracellular
in class Substrate
walker
- the walker to checkpublic static void main(java.lang.String[] args)