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

Interface class used by boundary condition classes. Defines the methods used to monitor the boundaries of the computation domain. More...

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

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...
 
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...
 
ContinuousVector getNormalInside (ContinuousVector cc)
 Takes a vector and returns that vector pointing towards the inside of the shape. 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...
 
DiscreteVector getNormalDC ()
 Return vector normal to the plane. More...
 

Detailed Description

Interface class used by boundary condition classes. Defines the methods used to monitor the boundaries of the computation domain.

Interface class used by boundary condition classes. Defines the methods used to monitor the boundaries of the computation domain

Member Function Documentation

boolean simulator.geometry.shape.IsShape.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

Implemented in simulator.geometry.shape.Planar.

double simulator.geometry.shape.IsShape.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

Implemented in simulator.geometry.shape.Planar.

double simulator.geometry.shape.IsShape.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

Implemented in simulator.geometry.shape.Planar.

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

Return vector normal to the plane.

Return vector normal to the plane

Returns
Discrete vector normal to the plane

Implemented in simulator.geometry.shape.Planar.

ContinuousVector simulator.geometry.shape.IsShape.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

Implemented in simulator.geometry.shape.Planar.

ContinuousVector simulator.geometry.shape.IsShape.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

Implemented in simulator.geometry.shape.Planar.

ContinuousVector simulator.geometry.shape.IsShape.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

Implemented in simulator.geometry.shape.Planar.

Boolean simulator.geometry.shape.IsShape.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

Implemented in simulator.geometry.shape.Planar.

Boolean simulator.geometry.shape.IsShape.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

Implemented in simulator.geometry.shape.Planar.

void simulator.geometry.shape.IsShape.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

Implemented in simulator.geometry.shape.Planar.

void simulator.geometry.shape.IsShape.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

Implemented in simulator.geometry.shape.Planar.

void simulator.geometry.shape.IsShape.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

Implemented in simulator.geometry.shape.Planar.


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