|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdevisor2.foundation.base.BasicDomain
This is the first class in a long line of the Domain class hierarchy. Here, all basic data structures which hold the data of the domain are defined, and access methods are provided: For everything that can be included in a domain, numerous ADD and DELETE methods are available.
Nested Class Summary | |
class |
BasicDomain.DPoint
|
Field Summary | |
int |
BoundaryEdgeCount
number of Boundary Edges in the domain |
int |
BoundaryNodeCount
number of Boundary Nodes in the domain |
protected ControlCenter |
cc
|
java.util.Vector |
cells
|
int |
CellValueCount
|
protected boolean |
changed
flag to indicate that the domain was changed |
DomainBoundary |
db
the boundary of the domain |
protected java.lang.String |
domainfileformat
fileformat of the domain (use constants provided) |
protected java.lang.String |
domainfilename
filename of the domain |
int[] |
ecke1
|
java.util.Vector |
edges
|
static java.lang.String |
FEAST
constant for the FEAST file format |
static java.lang.String |
FEAT
constant for the FEAT file format |
java.lang.String |
name
name of the domain |
java.util.Vector |
nodes
the nodes and cells themselves |
int |
NodeValueCount
number of values in the domain |
protected int[] |
perimeter
perimter of the domain |
static java.lang.String |
UCD
constant for the UCD file format |
int[] |
validpx
|
int[] |
validpy
|
Constructor Summary | |
BasicDomain()
creates a new domain with default values for everything |
Method Summary | |
void |
add(GridItem item)
adds the given GridItem to the domain's corresponding vectors every time appending at the end (for segments, the working boundary is used |
Cell |
addCell(Cell n)
adds a cell at the end of the according list to the domain |
Edge |
addEdge(Edge e)
adds a edge at the end of the according list to the domain |
Node |
addNode(Node n)
adds a node/cell at the end of the according list to the domain |
Edge |
adjustEdge(Edge e)
adds a edge to the domain and checks for its existance |
Edge |
adjustEdge(Node a,
Node b)
adds a edge to the domain and checks for its existance |
Node |
adjustNode(Node neu)
adds a node/cell to the domain and checks for its existance |
void |
centerDomain()
scales a domain to adapt the grid size to the gui frame size |
void |
centerDomain(boolean modus)
|
void |
centerDomain(java.awt.Rectangle box)
|
void |
construct_boundary()
|
void |
del(GridItem item)
removes the given GridItem from the domain |
void |
delCell(Cell c)
deletes an cell element of the domain, and recursively all afterwards isolated edges |
void |
delEdge(Edge e)
deletes an edge of the domain, but WITHOUT deleting its nodes, which will remain isolated afterwards. |
void |
delNode(Node n)
deletes an node element of the domain |
void |
draw(java.awt.Graphics g)
draws the whole domain |
void |
drawGrid(java.awt.Graphics g)
|
int |
getBoundaryEdgeCount()
|
int |
getBoundaryNodeCount()
returns the number of boundary nodes in the domain |
Cell |
getCell(int number)
|
int |
getCellCount()
returns the number of cells in the domain |
java.util.Vector |
getCells()
|
Edge |
getEdge(int number)
|
int |
getEdgeCount()
returns the number of edges in the domain |
Edge |
getEdgeForNode(Node n,
double eps)
gets the edge the node n resides on |
java.util.Vector |
getEdges()
|
java.lang.String |
getFileformat()
returns the file format of the domain (UCD, FEAT or FEAST) |
java.lang.String |
getFilename()
returns the filename of the domain |
int |
getMaxParallelBlock()
returns the maximum number of parallel blocks |
java.lang.String |
getName()
gets the name of the domain |
int[] |
getNearestCells(int ipb,
int izpb,
BasicDomain.DPoint mp)
|
Node |
getNode(int number)
|
int |
getNodeCount()
returns the number of nodes in the domain |
java.util.Vector |
getNodes()
|
Node |
getNodeWithSameCoords(Node n)
gets the Node in the Domain with the same coords |
BasicDomain.DPoint |
getParallelBlockCenter(int ipb)
|
int[] |
getPerimeter()
returns the perimeter of the domain |
int[] |
getPerimeter(boolean trf)
|
boolean |
hasChanged()
returns if the domain has been changed recently |
boolean |
isFeastable()
Performs a check if the domain is containing elements only supported by the FEAST file format. |
void |
rectifyElement(Node n1,
Node n2,
Node n3,
Node n4)
|
void |
resetCellMarkers()
resets the cell markers to a value of 0 |
void |
resetEdgeMarkers()
resets the edge markers to a value of 0 |
void |
resetNodeMarkers()
resets the node markers to a value of 0 |
Edge |
searchEdge(Node a,
Node b)
searches for an edge with nodes a and b. |
void |
setDomainPerimeter(int[] p)
|
void |
setName(java.lang.String s)
sets the name of this domain |
void |
updateAll()
update all numbers |
void |
updateCellNeighbours()
sets the nodes in the cells according to their edges |
void |
updateCellNodes()
sets the nodes in the cells according to their edges |
void |
updateCellNumbers()
sets the cell numbers according to their index in the cell vector |
void |
updateEdgeNumbers()
sets the cell numbers according to their index in the cell vector |
void |
updateNodeNumbers()
sets the node numbers according to their index in the node vector |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ControlCenter cc
protected boolean changed
public int BoundaryEdgeCount
public int BoundaryNodeCount
public java.util.Vector nodes
public java.util.Vector edges
public java.util.Vector cells
public int NodeValueCount
public int CellValueCount
public DomainBoundary db
public java.lang.String name
protected java.lang.String domainfilename
protected java.lang.String domainfileformat
protected int[] perimeter
public int[] ecke1
public int[] validpx
public int[] validpy
public static final java.lang.String UCD
public static final java.lang.String FEAT
public static final java.lang.String FEAST
Constructor Detail |
public BasicDomain()
Method Detail |
public void resetCellMarkers()
public void resetEdgeMarkers()
public void resetNodeMarkers()
public void construct_boundary()
public int[] getNearestCells(int ipb, int izpb, BasicDomain.DPoint mp)
public BasicDomain.DPoint getParallelBlockCenter(int ipb)
public void rectifyElement(Node n1, Node n2, Node n3, Node n4)
public int getMaxParallelBlock()
public void updateNodeNumbers()
public void updateEdgeNumbers()
public void updateCellNumbers()
public void updateCellNodes()
public void updateCellNeighbours()
public void updateAll()
public int getNodeCount()
public int getBoundaryNodeCount()
public int getCellCount()
public int getEdgeCount()
public java.util.Vector getNodes()
public java.util.Vector getEdges()
public java.util.Vector getCells()
public int getBoundaryEdgeCount()
public Node getNode(int number)
public Edge getEdge(int number)
public Cell getCell(int number)
public void add(GridItem item)
item
- - a node, cell, edge, or segmentpublic Node adjustNode(Node neu)
public Edge adjustEdge(Node a, Node b)
public Edge adjustEdge(Edge e)
public Node addNode(Node n)
n
- element to be insertedpublic Cell addCell(Cell n)
n
- element to be insertedpublic Edge addEdge(Edge e)
public void setName(java.lang.String s)
public void del(GridItem item)
public void delNode(Node n)
n
- element to be deletedpublic void delCell(Cell c)
c
- element to be deletedpublic void delEdge(Edge e)
e
- - edge to be deletedpublic java.lang.String getName()
public Edge getEdgeForNode(Node n, double eps)
public Node getNodeWithSameCoords(Node n)
n
- node to be searched
public Edge searchEdge(Node a, Node b)
public void drawGrid(java.awt.Graphics g)
public void draw(java.awt.Graphics g)
g
- graphics context
public int[] getPerimeter()
public int[] getPerimeter(boolean trf)
public void centerDomain()
public void setDomainPerimeter(int[] p)
public void centerDomain(boolean modus)
public void centerDomain(java.awt.Rectangle box)
public boolean isFeastable()
public java.lang.String getFilename()
public java.lang.String getFileformat()
public boolean hasChanged()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |