Create a planar shaped boundary. More...
Public Member Functions | |
void | readShape (XMLParser shapeRoot, Domain aDomain) |
Reads the coordinates that specify a boundary from the protocol file, creating a shape. More... | |
Boolean | isOutside (ContinuousVector cc) |
Test if a given set of coordinates is outside this shape. More... | |
Boolean | isOnBoundary (ContinuousVector cC, double res) |
ContinuousVector | intersection (ContinuousVector position, ContinuousVector vector) |
Calculates the coordinates of the interaction between a line (point a vector) and the plane. More... | |
ContinuousVector | getNormalInside (ContinuousVector cc) |
Takes a vector and returns that vector pointing towards the inside of the shape. More... | |
void | orthoProj (ContinuousVector ccIn, ContinuousVector ccOut) |
Correct coordinates of a point that has gone outside this shape. More... | |
ContinuousVector | getOrthoProj (ContinuousVector ccIn) |
Correct coordinates of a point that has gone outside this shape, returning these coordinates. More... | |
double | getDistance (IsShape aShape) |
Used in cyclic boundaries - gets the distance from the opposite side (aShape) More... | |
double | getDistance (ContinuousVector cc) |
Used in cyclic boundaries - gets the distance from a point on the other side (ContinuousVector) More... | |
void | readyToFollowBoundary (SpatialGrid aSG) |
Initialisation to create the features of and go along the boundary. More... | |
boolean | followBoundary (DiscreteVector dcIn, DiscreteVector dcOut, SpatialGrid aSG) |
Find the next valid point. More... | |
void | stepBoundary () |
Process next location in the boundary. More... | |
boolean | isOnShape (ContinuousVector cC) |
Test that the received point is coplanar with the definition point. More... | |
DiscreteVector | getNormalDC () |
Return vector normal to the plane. More... | |
Create a planar shaped boundary.
Each boundaryCondition also includes a shape mark-up to define the shape of the boundary. In this release only the 'Planar' class is available, and it requires specification of a point on the boundary and a vector pointing outside the domain. These shape parameters must be given in index coordinates
boolean simulator.geometry.shape.Planar.followBoundary | ( | DiscreteVector | dcIn, |
DiscreteVector | dcOut, | ||
SpatialGrid | aSG | ||
) |
Find the next valid point.
Find the next valid point
dcIn | Discrete vector within the shape |
dcOut | Discrete vector outside the shape |
aSG | Spatial grid in which the boundary is associated |
Implements simulator.geometry.shape.IsShape.
double simulator.geometry.shape.Planar.getDistance | ( | IsShape | aShape | ) |
Used in cyclic boundaries - gets the distance from the opposite side (aShape)
Used in cyclic boundaries - gets the distance from the opposite side (aShape)
Implements simulator.geometry.shape.IsShape.
double simulator.geometry.shape.Planar.getDistance | ( | ContinuousVector | cc | ) |
Used in cyclic boundaries - gets the distance from a point on the other side (ContinuousVector)
Used in cyclic boundaries - gets the distance from a point on the other side (ContinuousVector)
Implements simulator.geometry.shape.IsShape.
DiscreteVector simulator.geometry.shape.Planar.getNormalDC | ( | ) |
Return vector normal to the plane.
Return vector normal to the plane
Implements simulator.geometry.shape.IsShape.
ContinuousVector simulator.geometry.shape.Planar.getNormalInside | ( | ContinuousVector | cc | ) |
Takes a vector and returns that vector pointing towards the inside of the shape.
Takes a vector and returns that vector pointing towards the inside of the shape
cc | Vector outside the shape |
Implements simulator.geometry.shape.IsShape.
ContinuousVector simulator.geometry.shape.Planar.getOrthoProj | ( | ContinuousVector | ccIn | ) |
Correct coordinates of a point that has gone outside this shape, returning these coordinates.
Correct coordinates of a point that has gone outside this shape, returning these coordinates
ccIn | Coordinates to be corrected |
Implements simulator.geometry.shape.IsShape.
ContinuousVector simulator.geometry.shape.Planar.intersection | ( | ContinuousVector | position, |
ContinuousVector | vector | ||
) |
Calculates the coordinates of the interaction between a line (point a vector) and the plane.
Calculates the coordinates of the interaction between a line (point a vector) and the plane. Returns null if none exists
position | Position used to calculate the line |
vector | Vector of coordinate positions used to calculate the line |
Implements simulator.geometry.shape.IsShape.
Boolean simulator.geometry.shape.Planar.isOnBoundary | ( | ContinuousVector | cC, |
double | res | ||
) |
Computes orthogonal distance and if this distance is lower than the resolution and if the point is outside, then the point tested is declared to be on the boundary of the domain
cC | ContinuousVector containing the coordinates of a point to test |
res | Resolution of the domain that this shape is associated with |
Implements simulator.geometry.shape.IsShape.
boolean simulator.geometry.shape.Planar.isOnShape | ( | ContinuousVector | cC | ) |
Test that the received point is coplanar with the definition point.
Test that the received point is coplanar with the definition point
cC | ContinuousVector of coordinates that should be tested |
Boolean simulator.geometry.shape.Planar.isOutside | ( | ContinuousVector | cc | ) |
Test if a given set of coordinates is outside this shape.
Test if a given set of coordinates is outside this shape
cc | ContinuousVector containing the coordinates of a point to test |
Implements simulator.geometry.shape.IsShape.
void simulator.geometry.shape.Planar.orthoProj | ( | ContinuousVector | ccIn, |
ContinuousVector | ccOut | ||
) |
Correct coordinates of a point that has gone outside this shape.
Correct coordinates of a point that has gone outside this shape
ccIn | Coordinates to be corrected |
ccOut | Corrected coordinates |
Implements simulator.geometry.shape.IsShape.
Reads the coordinates that specify a boundary from the protocol file, creating a shape.
Reads the coordinates that specify a boundary from the protocol file, creating a shape
shapeRoot | XML elements from the protocol file that contain coordinates specifying the edge of a boundary |
aDomain | The computation domain that this boundary is associated with |
Implements simulator.geometry.shape.IsShape.
void simulator.geometry.shape.Planar.readyToFollowBoundary | ( | SpatialGrid | aSG | ) |
Initialisation to create the features of and go along the boundary.
Initialisation to create the features of and go along the boundary
aSG | The grid to which this boundary is a part |
Implements simulator.geometry.shape.IsShape.
void simulator.geometry.shape.Planar.stepBoundary | ( | ) |
Process next location in the boundary.
Process next location in the boundary