Version 1.2 (June 2013)
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | List of all members
simulator.geometry.shape.Planar Class Reference

Create a planar shaped boundary. More...

Inheritance diagram for simulator.geometry.shape.Planar:
simulator.geometry.shape.IsShape

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...
 

Detailed Description

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

Member Function Documentation

boolean simulator.geometry.shape.Planar.followBoundary ( DiscreteVector  dcIn,
DiscreteVector  dcOut,
SpatialGrid  aSG 
)

Find the next valid point.

Find the next valid point

Parameters
dcInDiscrete vector within the shape
dcOutDiscrete vector outside the shape
aSGSpatial grid in which the boundary is associated
Returns
Whether a valid point was found

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)

Returns
Double stating distance to that shape

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)

Returns
Double stating distance to that shape

Implements simulator.geometry.shape.IsShape.

DiscreteVector simulator.geometry.shape.Planar.getNormalDC ( )

Return vector normal to the plane.

Return vector normal to the plane

Returns
Discrete 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

Parameters
ccVector outside the shape
Returns
ContinuousVector that is pointing towards the inside of 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

Parameters
ccInCoordinates to be corrected
Returns
Corrected coordinates

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

Parameters
positionPosition used to calculate the line
vectorVector of coordinate positions used to calculate the line
Returns
: coordinates of the intersection between a line and the plane

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

Parameters
cCContinuousVector containing the coordinates of a point to test
resResolution of the domain that this shape is associated with
Returns
Boolean noting whether this coordinate is on the boundary of the domain

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

Parameters
cCContinuousVector of coordinates that should be tested
Returns
Boolean stating whether the point is cooplanar with the definition point
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

Parameters
ccContinuousVector containing the coordinates of a point to test
Returns
Boolean noting whether this coordinate is inside or outside this shape

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

Parameters
ccInCoordinates to be corrected
ccOutCorrected coordinates

Implements simulator.geometry.shape.IsShape.

void simulator.geometry.shape.Planar.readShape ( XMLParser  shapeRoot,
Domain  aDomain 
)

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

Parameters
shapeRootXML elements from the protocol file that contain coordinates specifying the edge of a boundary
aDomainThe 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

Parameters
aSGThe 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


The documentation for this class was generated from the following file: