BoundaryCyclic : close the system along a dimension. More...
Public Member Functions | |
BoundaryCyclic () | |
Declare a cyclic boundary and set isCyclic to true to note this is the case. More... | |
void | init (Simulator aSim, Domain aDomain, XMLParser aBCParser) |
Initialises the boundary from information contained in the simulation protocol file. More... | |
void | readGeometry (XMLParser geometryRoot, Domain aDomain) |
Read the geometry of this boundary from the protocol file and construct both this boundary and the opposite side (as this is cyclic) More... | |
ContinuousVector | lookAt (ContinuousVector cc) |
Method used by another which gets the indexed grid position of a continuous vector. Some boundary conditions need the input corrected, some don't and just return the input. More... | |
void | setBoundary (LocatedGroup aGroup) |
Change the status of a specified LocatedGroup to note that it has been identified as being outside this boundary. More... | |
void | applyBoundary (LocatedAgent anAgent, ContinuousVector target) |
Applies the boundary condition by modifying the movement vector. New position is orthogonal projection of the outside point on the boundary surface. More... | |
void | refreshBoundary (SoluteGrid aSoluteGrid) |
Solver for the cyclic boundary condition. Initialises the course along the shape of the boundary, setting the values of solute near the boundary as required. More... | |
void | applyBoundary (SoluteGrid aSpGrid, DiscreteVector dC) |
Applies boundary conditions for all other BC types - but not used for cyclic boundaries. More... | |
double | getValueFromBoundary (SoluteGrid aSpGrid, int i, int j, int k) |
Returns the value within a boundary. Not used for cyclic boundaries. More... | |
BoundaryCyclic | createOtherSide () |
Creates the opposite side of the cyclic boundary such that agents can 'roll around' to the other side. More... | |
boolean | isOutside (ContinuousVector cc) |
Determines if a point is outside the boundary. More... | |
boolean | isOnBoundary (ContinuousVector cC, SpatialGrid aSpatialGrid) |
Determines if a point is on the boundary. More... | |
double | getDistance (ContinuousVector cc) |
Returns the distance from a point to the boundary. More... | |
ContinuousVector | getSymmetric (ContinuousVector cc) |
Return the intersection between the opposite shape and a provided point. More... | |
String | toString () |
Returns a string noting the side of the domain that this boundary condition is on. More... | |
![]() | |
void | readGeometry (XMLParser geometryRoot, Domain aDomain) |
Used during the initialisation, load the class describing the shape of the boundary defined in the parent class. More... | |
boolean | isOutside (ContinuousVector cc) |
Determines if a point is outside the boundary. More... | |
String | getSideName () |
Return the name of the side of the domain which this boundary is on. More... | |
void | refreshDiffBoundary (SoluteGrid relDiff, SoluteGrid aSolutegrid) |
Method used if a boundary modifies the local diffusivity constant. Most of boundaries do not modify it. More... | |
boolean | isCyclic () |
Determine if this boundary is cyclic. More... | |
boolean | isSupport () |
Determine whether this boundary is the supporting structure (substratum) More... | |
boolean | isActive () |
Determine if this boundary is active for solute. More... | |
boolean | hasBulk () |
Determine if this boundary is attached to a bulk. More... | |
void | updateBulk (SoluteGrid[] soluteGrid, SoluteGrid[] reacGrid, double timeStep) |
Updates the levels in the bulk. Allows reaction or flux-based bulk treatment. More... | |
boolean | hasAgar () |
Determine if the boundary condition is modelling agar. More... | |
void | updateAgar (SoluteGrid[] soluteGrid, SoluteGrid[] reactionGrid, double timeStep) |
If modelling an agar plate boundary, this method updates the boundary. More... | |
boolean | isOutside (DiscreteVector dc, SpatialGrid aSpatialGrid) |
Determines if a discrete vector location is outside the boundary. More... | |
ContinuousVector | getIntersection (ContinuousVector position, ContinuousVector vector) |
Calculate the intersection between the boundary and a line (defined by a position and a vector) More... | |
ContinuousVector | getOrthoProj (ContinuousVector cc) |
Calculate the orthogonal projection of a location on the boundary. More... | |
Bulk | getBulk () |
Return the bulk that is connected to this boundary. More... | |
IsShape | getShape () |
Returns the Shape object that represents this boundary. More... | |
String | getSide () |
Return the name of the side of the domain which this boundary is on. More... | |
double | getDistance (ContinuousVector cc) |
Returns the distance from a point to the boundary. More... | |
double | getBulkValue (int soluteIndex) |
For a specified solute, returns the level of that solute in the bulk. More... | |
Additional Inherited Members | |
![]() | |
static AllBC | staticBuilder (XMLParser root, Simulator aSim, Domain aDomain) |
Generic constructor called to dynamically instantiate a child class object. More... | |
![]() | |
String | _mySide |
IsShape | _myShape |
boolean | isCyclic = false |
boolean | _isSupport = false |
boolean | hasBulk = false |
boolean | activeForSolute = true |
boolean | hasAgar = false |
![]() | |
static DiscreteVector | dcIn = new DiscreteVector() |
static DiscreteVector | dcOut = new DiscreteVector() |
BoundaryCyclic : close the system along a dimension.
BoundaryCyclic : close the system along a dimension. It is computationally unfeasible to simulate a micro-scale world on a macro-scale level, so oftentimes a small spatial sub-region is assumed to represent the system as a whole; in this case, periodic boundaries are used to remove artificial edge effects by assuming the simulated region adjoins other, similar, regions. As a consequence, boundaries in some chosen directions (generally for movements parallel to the substratum) are periodic, which means that the solute concentrations and solute gradients are constant across the boundary, and that agents travelling through one boundary will be translated to the other side of the domain
simulator.geometry.boundaryConditions.BoundaryCyclic.BoundaryCyclic | ( | ) |
Declare a cyclic boundary and set isCyclic to true to note this is the case.
Declare a cyclic boundary and set isCyclic to true to note this is the case
|
virtual |
Applies the boundary condition by modifying the movement vector. New position is orthogonal projection of the outside point on the boundary surface.
Applies the boundary condition by modifying the movement vector. New position is orthogonal projection of the outside point on the boundary surface
anAgent | The Located Agent which is attempting to cross the boundary |
target | The target position that the agent is moving to |
Implements simulator.geometry.boundaryConditions.AllBC.
void simulator.geometry.boundaryConditions.BoundaryCyclic.applyBoundary | ( | SoluteGrid | aSpGrid, |
DiscreteVector | dC | ||
) |
Applies boundary conditions for all other BC types - but not used for cyclic boundaries.
Applies boundary conditions for all other BC types - but not used for cyclic boundaries.
aSpGrid | SoluteGrid |
dC | DiscreteVector |
BoundaryCyclic simulator.geometry.boundaryConditions.BoundaryCyclic.createOtherSide | ( | ) |
Creates the opposite side of the cyclic boundary such that agents can 'roll around' to the other side.
Creates the opposite side of the cyclic boundary such that agents can 'roll around' to the other side
double simulator.geometry.boundaryConditions.BoundaryCyclic.getDistance | ( | ContinuousVector | cc | ) |
Returns the distance from a point to the boundary.
Returns the distance from a point to the boundary
cc | The continuous vector of points to calculate how far the point is from the boundary |
ContinuousVector simulator.geometry.boundaryConditions.BoundaryCyclic.getSymmetric | ( | ContinuousVector | cc | ) |
Return the intersection between the opposite shape and a provided point.
Return the intersection between the opposite shape and a provided point
cc | A position on a boundary |
double simulator.geometry.boundaryConditions.BoundaryCyclic.getValueFromBoundary | ( | SoluteGrid | aSpGrid, |
int | i, | ||
int | j, | ||
int | k | ||
) |
Returns the value within a boundary. Not used for cyclic boundaries.
Returns the value within a boundary. Not used for cyclic boundaries
aSpGrid | Solute grid which the boundary is being applied |
i | I Coordinate of grid space to query |
j | J Coordinate of grid space to query |
k | K Coordinate of grid space to query |
|
virtual |
Initialises the boundary from information contained in the simulation protocol file.
Initialises the boundary from information contained in the simulation protocol file
aSim | The simulation object used to simulate the conditions specified in the protocol file |
aDomain | The domain which this boundary condition is associated with |
aBCParser | The XML tags that have declared this boundary in the protocol file |
Implements simulator.geometry.boundaryConditions.AllBC.
boolean simulator.geometry.boundaryConditions.BoundaryCyclic.isOnBoundary | ( | ContinuousVector | cC, |
SpatialGrid | aSpatialGrid | ||
) |
Determines if a point is on the boundary.
Determines if a point is on the boundary
cC | ContinuousVector to check |
aSpatialGrid | Spatial grid to check |
boolean simulator.geometry.boundaryConditions.BoundaryCyclic.isOutside | ( | ContinuousVector | cc | ) |
Determines if a point is outside the boundary.
Determines if a point is outside the boundary
cc | ContinuousVector to check |
|
virtual |
Method used by another which gets the indexed grid position of a continuous vector. Some boundary conditions need the input corrected, some don't and just return the input.
Method used by another which gets the indexed grid position of a continuous vector. Some boundary conditions (e.g. BoundaryCyclic_ need the input corrected due to the condition, some don't and just return the input. Maybe we'll change this at some point as to just return the input looks a bit daft - but we'll leave it here for the moment
cc | ContinuousVector that gives the current location of an agent to check on the grid |
Implements simulator.geometry.boundaryConditions.AllBC.
void simulator.geometry.boundaryConditions.BoundaryCyclic.readGeometry | ( | XMLParser | geometryRoot, |
Domain | aDomain | ||
) |
Read the geometry of this boundary from the protocol file and construct both this boundary and the opposite side (as this is cyclic)
Read the geometry of this boundary from the protocol file and construct both this boundary and the opposite side (as this is cyclic)
geometryRoot | XML tags in the protocol file that describe this boundary |
aDomain | The domain which this boundary is associated with |
|
virtual |
Solver for the cyclic boundary condition. Initialises the course along the shape of the boundary, setting the values of solute near the boundary as required.
Solver for the cyclic boundary condition. Initialises the course along the shape of the boundary, , setting the values of solute near the boundary as required
aSoluteGrid | Grid of solute information which is to be refreshed by the solver |
Implements simulator.geometry.boundaryConditions.AllBC.
|
virtual |
Change the status of a specified LocatedGroup to note that it has been identified as being outside this boundary.
Change the status of a specified LocatedGroup to note that it has been identified as being outside this boundary
aGroup | LocatedGroup object which has been detected to be outside the boundary |
Implements simulator.geometry.boundaryConditions.AllBC.
String simulator.geometry.boundaryConditions.BoundaryCyclic.toString | ( | ) |
Returns a string noting the side of the domain that this boundary condition is on.
Returns a string noting the side of the domain that this boundary condition is on