afl::Boundary Class Reference

#include <boundary.h>

Inheritance diagram for afl::Boundary:

afl::BoundaryTree_1 afl::BoundaryTree_2 afl::BoundaryTree_3 afl::BoundaryTree_4 List of all members.

Public Member Functions

 Boundary (const Field *field)
virtual ~Boundary ()
virtual troolean locate (const Point &p) const =0
virtual Point findNearest (const Point &p) const =0
virtual Value getNormal (const Point &p) const =0
virtual data_t intersect (const Point &p, const Point &v) const =0
virtual void addSegment (const Point &from, const Point &to)=0
virtual void addSegment (const Field *field)=0
virtual void toXML (std::ostream &doc, const std::string &componentsDir, const std::string &baseURI) const =0
virtual Point getBoundingBoxMin () const =0
virtual Point getBoundingBoxMax () const =0
virtual Boundaryclone ()=0
virtual bool hasNoSegments () const =0
const FieldgetParent () const
void setParentField (const Field *parent)

Protected Attributes

const Field_field

Detailed Description

Class Boundary A segment of boundary. It could either be solid (aka positive, red, island) or a hole (aka negative, black)


Constructor & Destructor Documentation

afl::Boundary::Boundary const Field field  ) 
 

constructor

Parameters:
field the field this boundary bounds

virtual afl::Boundary::~Boundary  )  [inline, virtual]
 

desructor is virtual


Member Function Documentation

virtual void afl::Boundary::addSegment const Field field  )  [pure virtual]
 

adds a segment of the opposite colour.

Parameters:
field a field of the appropriate dimensions to define the new boundary section
Exceptions:
ddf::GeometryException is thrown if the new segment has no hyper-volume
ddf::InvalidArgumentException is thrown if the new segment overlaps an existing segment or if the new segment is not of the right dimension/value.

Implemented in afl::BoundaryTree_1, afl::BoundaryTree_2, afl::BoundaryTree_3, and afl::BoundaryTree_4.

virtual void afl::Boundary::addSegment const Point from,
const Point to
[pure virtual]
 

adds a segment of the opposite colour.

Parameters:
from one hyper corner of the new rectangular segment
to the opposite hyper-corner of the new rectangular segment
Exceptions:
ddf::GeometryException is thrown if the new segment has no hyper-volume
ddf::InvalidArgumentException is thrown if the new segment overlaps an existing segment or if the new segment is not of the right dimension.

Implemented in afl::BoundaryTree_1, afl::BoundaryTree_2, afl::BoundaryTree_3, and afl::BoundaryTree_4.

virtual Boundary* afl::Boundary::clone  )  [pure virtual]
 

Returns:
a newly created and exact copy of the object

Implemented in afl::BoundaryTree_1, afl::BoundaryTree_2, afl::BoundaryTree_3, and afl::BoundaryTree_4.

virtual Point afl::Boundary::findNearest const Point p  )  const [pure virtual]
 

finds the nearest point on the boundary to a point.

Parameters:
p the point to find the nearest point of
Returns:
the nearest point to p that is on the boundary. If p is on the boundary, then p itself is returned.

Implemented in afl::BoundaryTree_1, afl::BoundaryTree_2, afl::BoundaryTree_3, and afl::BoundaryTree_4.

virtual Point afl::Boundary::getBoundingBoxMax  )  const [pure virtual]
 

Returns:
the largest point in the boundary. In a simple boundary, this is a point with the largest value of X, Y, Z and T. In a field boundary this is the point that corresponds to field's boundary's largest point

Implemented in afl::BoundaryTree_1, afl::BoundaryTree_2, afl::BoundaryTree_3, and afl::BoundaryTree_4.

virtual Point afl::Boundary::getBoundingBoxMin  )  const [pure virtual]
 

Returns:
the smallest point in the boundary. In a simple boundary, this is a point with the smallest value of X, Y, Z and T. In a field boundary this is the point that corresponds to field's boundary's smallest point

Implemented in afl::BoundaryTree_1, afl::BoundaryTree_2, afl::BoundaryTree_3, and afl::BoundaryTree_4.

virtual Value afl::Boundary::getNormal const Point p  )  const [pure virtual]
 

finds the vector normal to the boundary at a point p on the boundary

Parameters:
p the point on the boundary to find the normal to.
Returns:
a vector (i.e. 1 column value) that returns the unit normal to the boundary at p
Exceptions:
ddf::InvalidArgumentException if p is not on the boundary

Implemented in afl::BoundaryTree_1, afl::BoundaryTree_2, afl::BoundaryTree_3, and afl::BoundaryTree_4.

const Field* afl::Boundary::getParent  )  const [inline]
 

Returns:
a constant pointer to the field this boundary bounds

virtual bool afl::Boundary::hasNoSegments  )  const [pure virtual]
 

returns true iff the boudndary has no segments. Such boundaries are desirable for example to store boundary conditions without a boundary.

Returns:
true iff the boudndary has no segments. Such boundaries

Implemented in afl::BoundaryTree_1, afl::BoundaryTree_2, afl::BoundaryTree_3, and afl::BoundaryTree_4.

virtual data_t afl::Boundary::intersect const Point p,
const Point v
const [pure virtual]
 

Finds the distance from a point to the closest boundary in the direction of a vector.

Parameters:
p The point that is being queried.
v the vector to find an intersection in the direction of
Returns:
the distance from the point along the vector that the boundary intersects (or the shortest distance if there are multiple intersections) of the length of the vector if there is no intersection. If p is on the boundary then the return value is 0. if p is outside the domain the distance is still positive.

Implemented in afl::BoundaryTree_1, afl::BoundaryTree_2, afl::BoundaryTree_3, and afl::BoundaryTree_4.

virtual troolean afl::Boundary::locate const Point p  )  const [pure virtual]
 

Parameters:
p The point to locate
Returns:
`outside' if the point is outside the domain, `boundary' if it is on the boundary or 'inside' if it is inside the domain.

Implemented in afl::BoundaryTree_1, afl::BoundaryTree_2, afl::BoundaryTree_3, and afl::BoundaryTree_4.

void afl::Boundary::setParentField const Field parent  )  [inline]
 

sets the parent field of this interpolation

Parameters:
parent the field that this boundary should operator on

virtual void afl::Boundary::toXML std::ostream &  doc,
const std::string &  componentsDir,
const std::string &  baseURI
const [pure virtual]
 

represents the segment as an XML string that will be put onto doc

Parameters:
doc the stream to put the XML string on
componentsDir the path of a directory to store component files in
baseURI a URI that refers to the directory in componentsDir

Implemented in afl::BoundaryTree_1, afl::BoundaryTree_2, afl::BoundaryTree_3, and afl::BoundaryTree_4.


Member Data Documentation

const Field* afl::Boundary::_field [protected]
 

the field this boundary bounds


The documentation for this class was generated from the following file:
Generated on Fri Dec 22 07:17:51 2006 for afl by  doxygen 1.4.6