Scrambler
1
|
Module defining tree node structure and basic operations. More...
Data Types | |
type | NodeBox |
Contains the processor ID and grid dimensions of the data the node represents. More... | |
type | NodeBoxList |
List of NodeBoxes. More... | |
type | NodeDef |
Contains information needed to manage nodes. More... | |
type | NodeDefList |
List of NodeDefs. More... | |
type | pNodeDef |
Contains a Pointer to a NodeDef. More... | |
type | pNodeDefList |
Contains a Pointer to a NodeDefList. More... | |
Public Member Functions | |
Routines for creating nodes | |
subroutine, public | AddNode (level, box, node, proclist, proctime) |
Create new node structure and add it to the appropriate current nodelist (Nodes(level)p). | |
subroutine, public | AddOldNode (level, box, node, proclist, proctime) |
Create new node structure and add it to the appropriate old nodelist (OldNodes(level)p). | |
subroutine, public | AddFindNode (level, box, node, proclist, proctime) |
Finds or Adds a node structure in the appropriate node list (Nodes(level)p). | |
subroutine, public | AddFindOldNode (level, box, node, proclist, proctime) |
Finds or Adds a node structure in the appropriate node list (OldNodes(level)p). | |
Node destruction routines | |
subroutine, public | NullifyNodeFields (node) |
Nullifes fields associated with a node. | |
subroutine, public | DestroyNode (node) |
Deallocates structures associated with a node. | |
subroutine, public | BackupNode (original, node, lRestore) |
Routine that duplicates a node. | |
Routines for adding connections in tree | |
subroutine, public | AddParent (node, parent) |
Assigns the parent of a node. | |
subroutine, public | AddOverlap (node, overlap) |
Singular version of AddOverlaps(), adds one new node to a node's overlaps list. | |
subroutine, public | AddFindOverlap (node, overlap) |
Find or append an overlap to a node's overlap list. | |
subroutine, public | AddNeighbor (node, neighbor) |
Append a single new node to a node's neighbors list. | |
subroutine, public | AddChild (node, child) |
Append new entries to a node's child list. | |
subroutine, public | AddFindChild (node, child) |
Find or append a child to a node's child lsit. | |
NodeList Operations | |
subroutine, public | AddNodeToList (node, lastnode, nodelist) |
Adds node to nodelist and updates lastnode pointer. | |
recursive subroutine, public | ClearNodeList (nodelist) |
Deallocate all the node objects in a given node list. | |
recursive subroutine, public | DestroyNodeList (nodelist) |
Deallocates and nullifies all links in a NodeList list. Unlike ClearNodeList(),. | |
subroutine, public | BackupNodelist (original, backup, lRestore, lastnode) |
Routine that duplicates a nodelist. | |
Routines for finding nodes | |
subroutine, public | FindNode (level, box, node) |
Find a node in the appropriate node list (Nodes(level)p) | |
subroutine, public | StrictFindNode (level, box, node, caller) |
Find a node in the appropriate node list or STOP! (Nodes(level)p) | |
subroutine, public | StrictFindAnyNode (level, box, node, caller) |
Find a node in the appropriate node list or STOP - using only mGlobal and not mpi_id. | |
subroutine, public | StrictFindBackupNode (level, box, node, caller) |
Find a node in the appropriate node list or STOP! (Nodes(level)p) | |
subroutine, public | FindOldNode (level, box, node) |
Find a node in the appropriate node list (OldNodes(level)p) | |
subroutine, public | FindBackupNode (level, box, node) |
Find a node in the appropriate node list (OldNodes(level)p) | |
subroutine, public | FindNodeInList (box, nodelist, node) |
subroutine, public | StrictFindOldNode (level, box, node, caller) |
Find a node in the appropriate node list or STOP! (OldNodes(level)p) | |
INTEGER function, public | GetChildID (node, child) |
Find the position of a child within a node's childlist. | |
Miscellaneous routines | |
LOGICAL function, public | isAncestor (childmask) |
Checks a childmask to determine whether or not it corresponds to an ancestor cell. | |
INTEGER function, public | GetFinestLevel () |
Finds the highest level ON THIS PROCESS that has any grids on it. On multiprocessor jobs, this is followed by an MPI_ALLREDUCE to aggregate the results. | |
INTEGER function, public | NodeCount (node_list) |
Counts number of nodes in a nodelist. | |
INTEGER function, public | CellCount (node_list) |
Counts number of nodes in a nodelist. | |
subroutine, public | traverse (node_list) |
Traverses a nodelist printing out useful information. | |
Routines for manipulating node box indices | |
INTEGER function, dimension(3, 2), public | GetChildMGlobal (node, mB, level) |
Get indices of parent box in node's level. | |
INTEGER function, dimension(3, 2), public | GetChildMBounds (node, childmGlobal, level) |
Transform indices of node child box into node's level. | |
Routines for manipulating node boxes | |
subroutine, public | CreateNodeBox (box_array, node_box, proc_id) |
Creates a node box. | |
subroutine, public | DestroyNodeBox (node_box) |
Destroys a node box. | |
LOGICAL function, public | MatchBox (box1, box2) |
Routine to match two boxes. | |
Routines for manipulating nodeboxlists | |
subroutine, public | AddNodeBoxToList (last_box, first_box, current_box) |
Adds a new NodeBoxList structure to the the block list passed in. | |
recursive subroutine, public | ClearNodeBoxList (box_list) |
Deletes elements from a NodeBox list structure, starting with the referenced element. | |
INTEGER function, public | NodeBoxCount (box_list) |
subroutine, public | FindParent (level, mGlobal, parent) |
Locates the parent node of the specified box, or returns null. | |
subroutine, public | StrictFindParent (level, mGlobal, parent, caller) |
Seeks the parent node for the specified grid, but kills the program if it can't be found. | |
Public Attributes | |
TYPE(pNodeDefList), dimension(:), pointer, public | Nodes |
TYPE(pNodeDefList), dimension(:), pointer, public | OldNodes |
TYPE(pNodeDefList), dimension(:), pointer, public | ExternalNodes |
TYPE(pNodeDefList), dimension(:), pointer, public | OldExternalNodes |
TYPE(pNodeDefList), dimension(:), pointer, public | BackupNodes |
TYPE(pNodeDefList), dimension(:), pointer, public | BackupExternalNodes |
TYPE(pNodeDefList), dimension(:), pointer, public | LastLocalNode |
TYPE(pNodeDefList), dimension(:), pointer, public | LastExternalNode |
TYPE(pNodeDefList), dimension(:), pointer, public | LastOldLocalNode |
TYPE(pNodeDefList), dimension(:), pointer, public | LastOldExternalNode |
Private Attributes | |
INTEGER | nNodes = 0 |
Routines for determining necessary connections in tree | |
LOGICAL function, public | ChildCanBeNeighbor (node, child, level) |
Determines whether or not a child needs to be communicated to neighboring nodes. | |
LOGICAL function, public | NephewCanBeNeighbor (neighbor, child, neighborlevel) |
Determines whether or not a child could neighbor the children of a neighbor. | |
LOGICAL function, public | NephewCanBeOverlap (overlap, child, level) |
Determines whether or not a child could overlap the children of an overlap. | |
LOGICAL function, public | Overlaps (child, overlapchild, level) |
Determines whether or not a child could overlap the child of an overlap. | |
LOGICAL function, public | Neighbors (child, neighborchild, level) |
Determines whether or not a child could neighbor the child of a neighbor. | |
LOGICAL function | Within (mGlobal1, mGlobal2) |
Determines whether or not box1 is entirely within box 2. |
Module defining tree node structure and basic operations.
Definition at line 39 of file tree_declarations.f90.
subroutine, public AddNode | ( | INTEGER | level, |
TYPE(NodeBox) | box, | ||
TYPE(NodeDef), pointer | node, | ||
INTEGER, dimension(:), optional, pointer | proclist, | ||
REAL, dimension(:), optional, pointer | proctime | ||
) |
Create new node structure and add it to the appropriate current nodelist (Nodes(level)p).
level | level of new node |
box | new node's box |
node | pointer to added node |
proclist | new node's processor list (optional) |
proctime | new node's processor times (optional) |
Definition at line 150 of file tree_declarations.f90.
subroutine, public AddOldNode | ( | INTEGER | level, |
TYPE(NodeBox) | box, | ||
TYPE(NodeDef), pointer | node, | ||
INTEGER, dimension(:), optional, pointer | proclist, | ||
REAL, dimension(:), optional, pointer | proctime | ||
) |
Create new node structure and add it to the appropriate old nodelist (OldNodes(level)p).
level | level of new node |
box | new node's box |
node | pointer to added node |
proclist | new node's processor list (optional) |
proctime | new node's processor times (optional) |
Definition at line 220 of file tree_declarations.f90.
subroutine, public AddFindNode | ( | INTEGER | level, |
TYPE(NodeBox) | box, | ||
TYPE(NodeDef), pointer | node, | ||
INTEGER, dimension(:), optional, pointer | proclist, | ||
REAL, dimension(:), optional, pointer | proctime | ||
) |
Finds or Adds a node structure in the appropriate node list (Nodes(level)p).
level | level of node |
box | node's box |
node | pointer to added/found node |
proclist | node's processor list (optional) |
proctime | node's processor times (optional) |
Definition at line 294 of file tree_declarations.f90.
subroutine, public AddFindOldNode | ( | INTEGER | level, |
TYPE(NodeBox) | box, | ||
TYPE(NodeDef), intent(out), pointer | node, | ||
INTEGER, dimension(:), optional, pointer | proclist, | ||
REAL, dimension(:), optional, pointer | proctime | ||
) |
Finds or Adds a node structure in the appropriate node list (OldNodes(level)p).
level | level of node |
box | node's box |
node | pointer to added/found node |
proclist | node's processor list (optional) |
proctime | node's processor times (optional) |
Definition at line 335 of file tree_declarations.f90.
subroutine, public NullifyNodeFields | ( | TYPE(NodeDef), pointer | node | ) |
Nullifes fields associated with a node.
node | node object |
Definition at line 376 of file tree_declarations.f90.
subroutine, public DestroyNode | ( | TYPE(NodeDef), pointer | node | ) |
Deallocates structures associated with a node.
node | node object |
Definition at line 394 of file tree_declarations.f90.
subroutine, public BackupNode | ( | TYPE(NodeDef), pointer | original, |
TYPE(NodeDef), pointer | node, | ||
LOGICAL | lRestore | ||
) |
Routine that duplicates a node.
original | original node |
node | backup node |
Definition at line 431 of file tree_declarations.f90.
Assigns the parent of a node.
node | current node |
parent | parent node |
Definition at line 462 of file tree_declarations.f90.
subroutine, public AddOverlap | ( | TYPE(NodeDef), pointer | node, |
TYPE(NodeDef), pointer | overlap | ||
) |
Singular version of AddOverlaps(), adds one new node to a node's overlaps list.
node | current node |
overlap | overlap node |
Definition at line 475 of file tree_declarations.f90.
subroutine, public AddFindOverlap | ( | TYPE(NodeDef), pointer | node, |
TYPE(NodeDef), pointer | overlap | ||
) |
Find or append an overlap to a node's overlap list.
node | current node |
overlap | The overlap node being found or added. |
Definition at line 487 of file tree_declarations.f90.
subroutine, public AddNeighbor | ( | TYPE(NodeDef), pointer | node, |
TYPE(NodeDef), pointer | neighbor | ||
) |
Append a single new node to a node's neighbors list.
node | current node |
neighbor | neighbor node |
Definition at line 508 of file tree_declarations.f90.
Append new entries to a node's child list.
node | current node |
child | child nodes |
Definition at line 520 of file tree_declarations.f90.
subroutine, public AddFindChild | ( | TYPE(NodeDef), pointer | node, |
TYPE(NodeDef), pointer | child | ||
) |
Find or append a child to a node's child lsit.
node | current node |
child | child to find or add |
Definition at line 531 of file tree_declarations.f90.
subroutine, public AddNodeToList | ( | TYPE(NodeDef), pointer | node, |
TYPE(NodeDefList), pointer | lastnode, | ||
TYPE(NodeDefList), optional, pointer | nodelist | ||
) |
Adds node to nodelist and updates lastnode pointer.
node | node object to add |
lastnode | pointer to last node of nodelist |
nodelist | nodelist to add to |
Definition at line 558 of file tree_declarations.f90.
recursive subroutine, public ClearNodeList | ( | TYPE(NodeDefList), pointer | nodelist | ) |
Deallocate all the node objects in a given node list.
nodelist | nodelist to clear |
Definition at line 609 of file tree_declarations.f90.
recursive subroutine, public DestroyNodeList | ( | TYPE(NodeDefList), pointer | nodelist | ) |
Deallocates and nullifies all links in a NodeList list. Unlike ClearNodeList(),.
DestroyNodeList() also destroys the Node object associated with each list entry.
nodelist | The pointer to a NodeList object |
Definition at line 620 of file tree_declarations.f90.
subroutine, public BackupNodelist | ( | TYPE(NodeDefList), pointer | original, |
TYPE(NodeDefList), pointer | backup, | ||
LOGICAL | lRestore, | ||
TYPE(NodeDefList), optional, pointer | lastnode | ||
) |
Routine that duplicates a nodelist.
original | original nodelist |
backup | backup nodelist |
Definition at line 634 of file tree_declarations.f90.
Find a node in the appropriate node list (Nodes(level)p)
level | level to search |
box | box to match |
node | pointer to found node |
Definition at line 664 of file tree_declarations.f90.
subroutine, public StrictFindNode | ( | INTEGER | level, |
TYPE(NodeBox) | box, | ||
TYPE(NodeDef), pointer | node, | ||
CHARACTER(*) | caller | ||
) |
Find a node in the appropriate node list or STOP! (Nodes(level)p)
level | level to search |
box | box to match |
node | pointer to found node |
caller | string passed in by calling routine |
Definition at line 683 of file tree_declarations.f90.
subroutine, public StrictFindAnyNode | ( | INTEGER | level, |
TYPE(NodeBox) | box, | ||
TYPE(NodeDef), pointer | node, | ||
CHARACTER(*) | caller | ||
) |
Find a node in the appropriate node list or STOP - using only mGlobal and not mpi_id.
level | level to search |
box | box to match |
node | pointer to found node |
caller | string passed in by calling routine |
Definition at line 708 of file tree_declarations.f90.
subroutine, public StrictFindBackupNode | ( | INTEGER | level, |
TYPE(NodeBox) | box, | ||
TYPE(NodeDef), pointer | node, | ||
CHARACTER(*) | caller | ||
) |
Find a node in the appropriate node list or STOP! (Nodes(level)p)
level | level to search |
box | box to match |
node | pointer to found node |
caller | string passed in by calling routine |
Definition at line 749 of file tree_declarations.f90.
subroutine, public FindOldNode | ( | INTEGER | level, |
TYPE(NodeBox) | box, | ||
TYPE(NodeDef), pointer | node | ||
) |
Find a node in the appropriate node list (OldNodes(level)p)
level | level to search |
box | box to match |
node | pointer to found node |
Definition at line 771 of file tree_declarations.f90.
subroutine, public FindBackupNode | ( | INTEGER | level, |
TYPE(NodeBox) | box, | ||
TYPE(NodeDef), pointer | node | ||
) |
Find a node in the appropriate node list (OldNodes(level)p)
level | level to search |
box | box to match |
node | pointer to found node |
Definition at line 791 of file tree_declarations.f90.
subroutine, public FindNodeInList | ( | TYPE(Nodebox) | box, |
TYPE(NodeDefList), pointer | nodelist, | ||
TYPE(NodeDef), pointer | node | ||
) |
Definition at line 808 of file tree_declarations.f90.
subroutine, public StrictFindOldNode | ( | INTEGER | level, |
TYPE(NodeBox) | box, | ||
TYPE(NodeDef), pointer | node, | ||
CHARACTER(*) | caller | ||
) |
Find a node in the appropriate node list or STOP! (OldNodes(level)p)
level | level to search |
box | box to match |
node | pointer to found node |
caller | string passed in by calling routine |
Definition at line 835 of file tree_declarations.f90.
INTEGER function, public GetChildID | ( | TYPE(NodeDef), pointer | node, |
TYPE(NodeDef), pointer | child | ||
) |
Find the position of a child within a node's childlist.
node | node object |
child | child to find |
Definition at line 855 of file tree_declarations.f90.
LOGICAL function, public isAncestor | ( | INTEGER | childmask | ) |
Checks a childmask to determine whether or not it corresponds to an ancestor cell.
childmask | value of childmask |
Definition at line 881 of file tree_declarations.f90.
INTEGER function, public GetFinestLevel | ( | ) |
Finds the highest level ON THIS PROCESS that has any grids on it. On multiprocessor jobs, this is followed by an MPI_ALLREDUCE to aggregate the results.
Definition at line 888 of file tree_declarations.f90.
INTEGER function, public NodeCount | ( | TYPE(NodeDefList), pointer | node_list | ) |
Counts number of nodes in a nodelist.
node_list | nodelist object |
Definition at line 913 of file tree_declarations.f90.
INTEGER function, public CellCount | ( | TYPE(NodeDefList), pointer | node_list | ) |
Counts number of nodes in a nodelist.
node_list | nodelist object |
Definition at line 932 of file tree_declarations.f90.
subroutine, public traverse | ( | TYPE(NodeDefList), pointer | node_list | ) |
Traverses a nodelist printing out useful information.
node_list | nodelist object |
Definition at line 947 of file tree_declarations.f90.
LOGICAL function, public ChildCanBeNeighbor | ( | TYPE(NodeDef) | node, |
TYPE(NodeDef) | child, | ||
INTEGER | level | ||
) |
Determines whether or not a child needs to be communicated to neighboring nodes.
node | node object |
child | node's child |
level | level |
Definition at line 978 of file tree_declarations.f90.
LOGICAL function Within | ( | INTEGER, dimension(3,2) | mGlobal1, |
INTEGER, dimension(3,2) | mGlobal2 | ||
) | [private] |
Determines whether or not box1 is entirely within box 2.
mGlobal1 | box 1 |
mGlobal2 | box 2 |
Definition at line 1011 of file tree_declarations.f90.
LOGICAL function, public NephewCanBeNeighbor | ( | TYPE(NodeDef) | neighbor, |
TYPE(NodeDef) | child, | ||
INTEGER | neighborlevel | ||
) |
Determines whether or not a child could neighbor the children of a neighbor.
neighbor | neighboring node |
child | child node |
neighborlevel | level of neighbor node |
Definition at line 1021 of file tree_declarations.f90.
LOGICAL function, public NephewCanBeOverlap | ( | TYPE(NodeDef) | overlap, |
TYPE(NodeDef) | child, | ||
INTEGER | level | ||
) |
Determines whether or not a child could overlap the children of an overlap.
overlap | overlapping node |
child | child node |
level | level of overlap node |
Definition at line 1061 of file tree_declarations.f90.
LOGICAL function, public Overlaps | ( | TYPE(NodeDef) | child, |
TYPE(NodeDef) | overlapchild, | ||
INTEGER | level | ||
) |
Determines whether or not a child could overlap the child of an overlap.
child | child node |
overlapchild | child of overlap node |
level | level of child and overlapchild |
Definition at line 1105 of file tree_declarations.f90.
LOGICAL function, public Neighbors | ( | TYPE(NodeDef) | child, |
TYPE(NodeDef) | neighborchild, | ||
INTEGER | level | ||
) |
Determines whether or not a child could neighbor the child of a neighbor.
child | child node |
neighborchild | child of neighbor node |
level | level of child and neighborchild |
Definition at line 1145 of file tree_declarations.f90.
INTEGER function, dimension(3,2), public GetChildMGlobal | ( | TYPE(NodeDef), pointer | node, |
INTEGER, dimension(3,2) | mB, | ||
INTEGER | level | ||
) |
Get indices of parent box in node's level.
node | node object |
mB | parent box's bounds |
level | level of node's parent |
Definition at line 1191 of file tree_declarations.f90.
INTEGER function, dimension(3,2), public GetChildMBounds | ( | TYPE(NodeDef), pointer | node, |
INTEGER, dimension(3,2) | childmGlobal, | ||
INTEGER | level | ||
) |
Transform indices of node child box into node's level.
node | node object |
childmGlobal | child box indices |
level | node's level |
Definition at line 1205 of file tree_declarations.f90.
subroutine, public CreateNodeBox | ( | INTEGER, dimension(3,2) | box_array, |
TYPE(NodeBox), pointer | node_box, | ||
INTEGER, optional | proc_id | ||
) |
Creates a node box.
box_array | indices of new box |
node_box | returns pointer to created box |
proc_id | processor location of new box |
Definition at line 1234 of file tree_declarations.f90.
subroutine, public DestroyNodeBox | ( | TYPE(NodeBox), pointer | node_box | ) |
Destroys a node box.
node_box | box to destroy |
Definition at line 1267 of file tree_declarations.f90.
Routine to match two boxes.
box1 | box 1 |
box2 | box 2 |
Definition at line 1281 of file tree_declarations.f90.
subroutine, public AddNodeBoxToList | ( | TYPE(NodeBoxList), pointer | last_box, |
TYPE(NodeBoxList), optional, pointer | first_box, | ||
TYPE(NodeBoxList), optional, pointer | current_box | ||
) |
Adds a new NodeBoxList structure to the the block list passed in.
last_box | The NodeBox list to which the new block will be appended. |
first_box | An optional MessageBlock pointer that will point to a freshly-created MessageBlock list. |
current_box | Another optional MessageBlock pointer that will point to a freshly-created MessageBlock list. |
Definition at line 1296 of file tree_declarations.f90.
recursive subroutine, public ClearNodeBoxList | ( | TYPE(NodeBoxList), pointer | box_list | ) |
Deletes elements from a NodeBox list structure, starting with the referenced element.
box_list | A reference to a node box list list. |
Definition at line 1335 of file tree_declarations.f90.
INTEGER function, public NodeBoxCount | ( | TYPE(NodeBoxList), pointer | box_list | ) |
Definition at line 1351 of file tree_declarations.f90.
subroutine, public FindParent | ( | INTEGER | level, |
INTEGER, dimension(max_dims, 2) | mGlobal, | ||
TYPE(NodeDef), pointer | parent | ||
) |
Locates the parent node of the specified box, or returns null.
level | The level of the grid whose parent is being sought. |
mGlobal | The dimensions of the grid whose parent is being sought. |
parent | A pointer that will be associated with a parent node. |
Definition at line 1375 of file tree_declarations.f90.
subroutine, public StrictFindParent | ( | INTEGER | level, |
INTEGER, dimension(max_dims, 2) | mGlobal, | ||
TYPE(NodeDef), pointer | parent, | ||
CHARACTER(LEN=*) | caller | ||
) |
Seeks the parent node for the specified grid, but kills the program if it can't be found.
level | The level of the grid whose parent is being sought. |
mGlobal | The dimensions of the grid whose parent is being sought. |
parent | A pointer that will be associated with a parent node. |
caller | A string containing the calling process (used only if a parent node isn't found). |
Definition at line 1418 of file tree_declarations.f90.
TYPE(pNodeDefList), dimension(:), pointer, public Nodes |
Definition at line 133 of file tree_declarations.f90.
TYPE(pNodeDefList), dimension(:), pointer, public OldNodes |
Definition at line 133 of file tree_declarations.f90.
TYPE(pNodeDefList), dimension(:), pointer, public ExternalNodes |
Definition at line 133 of file tree_declarations.f90.
TYPE(pNodeDefList), dimension(:), pointer, public OldExternalNodes |
Definition at line 133 of file tree_declarations.f90.
TYPE(pNodeDefList), dimension(:), pointer, public BackupNodes |
Definition at line 133 of file tree_declarations.f90.
TYPE(pNodeDefList), dimension(:), pointer, public BackupExternalNodes |
Definition at line 133 of file tree_declarations.f90.
TYPE(pNodeDefList), dimension(:), pointer, public LastLocalNode |
Definition at line 134 of file tree_declarations.f90.
TYPE(pNodeDefList), dimension(:), pointer, public LastExternalNode |
Definition at line 134 of file tree_declarations.f90.
TYPE(pNodeDefList), dimension(:), pointer, public LastOldLocalNode |
Definition at line 134 of file tree_declarations.f90.
TYPE(pNodeDefList), dimension(:), pointer, public LastOldExternalNode |
Definition at line 134 of file tree_declarations.f90.
INTEGER nNodes = 0 [private] |
Definition at line 136 of file tree_declarations.f90.