## devisor2.foundation.base
Class DomainBoundary

    java.lang.Object
      devisor2.foundation.base.DomainBoundary

All Implemented Interfaces:
  java.io.Serializable

public class DomainBoundary
extends java.lang.Object
implements java.io.Serializable

This class DomainBoundary describes the boundaries of the domain. A DomainBoundary contains several boundaries, each of which is composed of the actual boundary segments.
Here, methods to modify the boundaries are provided.

See Also:
  Serialized Form

Field Summary
`protected java.util.Vector` `boundaries` the boundaries themselves
`protected ControlCenter` `cc`
`protected BasicDomain` `domain` the domain which contains this DomainBoundary

Constructor Summary
`DomainBoundary(BasicDomain d)` creates a new domain boundary

Method Summary
`void` `addBoundary()` adds a new boundary to the domain
`void` `addBoundary(Boundary b)` adds the given boundary to the domain
`void` `addMultipleBoundaryNodes(double incr, double startt, double endt, Boundary boundary)` Adds multiple Boundary Nodes to the specified boundary, evenly distributed between the given start and end parameter values with the given increment
`void` `addSegment(Boundary boundary, Segment s)` adds a segment to the domain boundary, as last segment to the given boundary
`void` `adjustBoundaryNodes(Boundary bn, int von, int bis)` adjusts all boundary nodes on boundary bn
`int` `continousBoundary()`
`double` `crossProduct(int a1, int a2, int a3, Node[] store)` calculates the crossproduct of the vectors in the given arrays at indices a1,a2 and a3
`void` `delBoundary(Boundary b)`
`void` `delSegment(Segment s)` deletes a segment of the domain boundary
`void` `draw(java.awt.Graphics g)` draws the whole domain boundary
`java.util.Vector` `getBoundaries()`
`Boundary` `getBoundary(int boundarynumber)` returns the boundary object with the index boundarynumber (0..count-1)
`int` `getBoundaryCount()` returns the number of boundaries in the domain
`double` `getBoundaryLength(Boundary b, double dt1, double dt2)`
`Node` `getCartesianCoords(Boundary boundary, double tsearch)` returns the coordinates of a parameter value on a boundary
`int[]` `getIntersection(int[] x)` returns the possible intersection point with an line:
`Boundary` `getLastBoundary()`
`int[]` `getPerimeter()` gets the perimeter of the domain boundary
`boolean` `isBoundary(Boundary b)`
`int` `linkBoundaries()`
`void` `printDomainBoundary()` prints out the DomainBoundary
`BoundaryNode` `reconfigureBoundaryNode(BoundaryNode n)` resets the boundary, segment and parameter value attributes of the given BoundaryNode according to its cartesian coords (used for copy and paste).
`void` `swapOrientation(Boundary b)` swaps/inverts the orientation of the given boundary
`void` `updateNumbering()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### boundaries

    protected java.util.Vector boundaries

  the boundaries themselves

### domain

    protected BasicDomain domain

  the domain which contains this DomainBoundary

### cc

    protected ControlCenter cc

Constructor Detail

### DomainBoundary

    public DomainBoundary(BasicDomain d)

  creates a new domain boundary

Method Detail

### getBoundaries

    public java.util.Vector getBoundaries()

### getBoundaryCount

    public int getBoundaryCount()

  returns the number of boundaries in the domain

  Returns:
    number of boundaries

### isBoundary

    public boolean isBoundary(Boundary b)

  Returns:
    true if the given Boundary is already part of the DomainBoundary

### getLastBoundary

    public Boundary getLastBoundary()

  Returns:
    the last boundary of the domain, null otherwise

### addSegment

    public void addSegment(Boundary boundary,
                           Segment s)

  adds a segment to the domain boundary, as last segment to the given boundary

  Parameters:
    `boundary` - boundary the segment should be inserted in
    `s` - segment to be inserted
  See Also:
    `Boundary.addSegment`

### delBoundary

    public void delBoundary(Boundary b)

### getBoundary

    public Boundary getBoundary(int boundarynumber)

  returns the boundary object with the index boundarynumber (0..count-1)

### delSegment

    public void delSegment(Segment s)

  deletes a segment of the domain boundary

  See Also:
    `Boundary.delSegment`

### getCartesianCoords

    public Node getCartesianCoords(Boundary boundary,
                                   double tsearch)

  returns the coordinates of a parameter value on a boundary

  Parameters:
    `boundary` - boundary where the parameter value should be located
    `tsearch` - parameter value
  Returns:
    node representation of the coordinates, null if it doesnt fit

### reconfigureBoundaryNode

    public BoundaryNode reconfigureBoundaryNode(BoundaryNode n)

  resets the boundary, segment and parameter value attributes of the given BoundaryNode according to its cartesian coords (used for copy and paste). returns null if it doesn't fit.

### addBoundary

    public void addBoundary()

  adds a new boundary to the domain

### addBoundary

    public void addBoundary(Boundary b)

  adds the given boundary to the domain

### addMultipleBoundaryNodes

    public void addMultipleBoundaryNodes(double incr,
                                         double startt,
                                         double endt,
                                         Boundary boundary)

  Adds multiple Boundary Nodes to the specified boundary, evenly distributed between the given start and end parameter values with the given increment

  Parameters:
    `incr` - - increment
    `startt` - - start parameter value
    `endt` - - end parameter value
    `boundary` - - the boundary to add nodes to

### draw

    public void draw(java.awt.Graphics g)

  draws the whole domain boundary

  Parameters:
    `g` - graphics context
  Returns:
    none

### updateNumbering

    public void updateNumbering()

### swapOrientation

    public void swapOrientation(Boundary b)

  swaps/inverts the orientation of the given boundary

### linkBoundaries

    public int linkBoundaries()

### continousBoundary

    public int continousBoundary()

### adjustBoundaryNodes

    public void adjustBoundaryNodes(Boundary bn,
                                    int von,
                                    int bis)

  adjusts all boundary nodes on boundary bn

### getPerimeter

    public int[] getPerimeter()

  gets the perimeter of the domain boundary

  Returns:
    double[4] perimeter (xmin,ymin,xmax,ymax)

### getIntersection

    public int[] getIntersection(int[] x)

  returns the possible intersection point with an line:

  Returns:
    double[0] flag, <0 intersection

### getBoundaryLength

    public double getBoundaryLength(Boundary b,
                                    double dt1,
                                    double dt2)

### crossProduct

    public double crossProduct(int a1,
                               int a2,
                               int a3,
                               Node[] store)

  calculates the crossproduct of the vectors in the given arrays at indices a1,a2 and a3

  Returns:
    the crossproduct of the two vectors (nodes[a1]-nodes[a2]) and (nodes[a3]-nodes[a1])

### printDomainBoundary

    public void printDomainBoundary()

  prints out the DomainBoundary