Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

NodeSetOperations.H File Reference

#include "NodeFArrayBox.H"
#include "LevelData.H"
#include "IntVectSet.H"

Include dependency graph for NodeSetOperations.H:

Include dependency graph

Go to the source code of this file.

Functions

void interiorNodes (IntVectSet &a_ivs, const ProblemDomain &a_base_domain, const DisjointBoxLayout &a_boxes, const Box &a_box)
 Finds interior nodes of a DisjointBoxLayout in a particular box.

void interiorNodes (IntVectSet &a_ivs, const Box &a_base_domain, const DisjointBoxLayout &a_boxes, const Box &a_box)
 Finds interior nodes of a DisjointBoxLayout in a particular box.

void interiorBoundaryNodes (LayoutData< Vector< IntVectSet > > &a_IVSV, const DisjointBoxLayout &a_boxes, const ProblemDomain &a_domain)
 Finds interior boundary nodes of a DisjointBoxLayout.

void interiorBoundaryNodes (LayoutData< Vector< IntVectSet > > &a_IVSV, const DisjointBoxLayout &a_boxes, const Box &a_domain)
 Finds interior boundary nodes of a DisjointBoxLayout.

void interiorBoundaryNodes (LayoutData< Vector< IntVectSet > > &a_IVSV, const DisjointBoxLayout &a_dest, const DisjointBoxLayout &a_src, const ProblemDomain &a_domain)
 Finds interior boundary nodes of a DisjointBoxLayout.

void interiorBoundaryNodes (LayoutData< Vector< IntVectSet > > &a_IVSV, const DisjointBoxLayout &a_dest, const DisjointBoxLayout &a_src, const Box &a_domain)
 Finds interior boundary nodes of a DisjointBoxLayout.

void exteriorBoundaryNodes (LayoutData< Vector< IntVectSet > > &a_exterior, const LayoutData< Vector< IntVectSet > > &a_interior, const DisjointBoxLayout &a_boxes)
 Finds exterior boundary nodes of a DisjointBoxLayout.

void zeroBoundaryNodes (BoxLayoutData< NodeFArrayBox > &a_dest, const LayoutData< Vector< IntVectSet > > &a_IVSV)
 Sets data to zero on specified boundary nodes.

void copyInteriorNodes (LevelData< NodeFArrayBox > &a_dest, const LevelData< NodeFArrayBox > &a_src, const LayoutData< Vector< IntVectSet > > &a_IVSV)
 Copies data at interior nodes from one LevelData<NodeFArrayBox> to another.

void fullIntVectSets (LayoutData< BitSet > &a_IVSVfull, const LayoutData< Vector< IntVectSet > > &a_IVSV)
 Determines which IntVectSets are rectangular.


Function Documentation

void interiorNodes IntVectSet a_ivs,
const ProblemDomain a_base_domain,
const DisjointBoxLayout a_boxes,
const Box a_box
 

Finds interior nodes of a DisjointBoxLayout in a particular box.

Returns nodes inside and surrounding CELL-centered box a_box that are NOT on the interface of (CELL-centered) a_boxes with the next coarser level.

Example: for two particular boxes in the four-grid layout below, the interior nodes are those that are marked "O". For the second box, the nodes marked "Y" are interior nodes if and only if the domain is periodic in the vertical direction and the boxes extend to the top and bottom faces of the domain.

+-----+ +YY---+ | | |OOOOO| | | |OOOOO| | | |OOOOO| +---+OOO--+---+ +---+OOOOO+---+ |OOOOOOO | | | | |OOOOOOO | | | | |OOOOOOO | | | | +---+OOOOOO+------+ +---+------+------+ | | | | | | | | | | | | +----------+ +----------+
The set of interior nodes of a box is the disjoint union of the nodes surrounded by cells of the box, and the interior boundary nodes of the box.
Parameters:
a_ivs  interior nodes of a_box in the layout a_boxes
a_base_domain  CELL-centered physical domain containing a_boxes
a_boxes  layout of CELL-centered boxes
a_box  the box in a_boxes for which we find interior nodes

void interiorNodes IntVectSet a_ivs,
const Box a_base_domain,
const DisjointBoxLayout a_boxes,
const Box a_box
 

Finds interior nodes of a DisjointBoxLayout in a particular box.

Returns nodes inside and surrounding CELL-centered box a_box that are NOT on the interface of (CELL-centered) a_boxes with the next coarser level.

Example: for two particular boxes in the four-grid layout below, the interior nodes are those that are marked "O". For the second box, the nodes marked "Y" are interior nodes if and only if the domain is periodic in the vertical direction and the boxes extend to the top and bottom faces of the domain.

+-----+ +YY---+ | | |OOOOO| | | |OOOOO| | | |OOOOO| +---+OOO--+---+ +---+OOOOO+---+ |OOOOOOO | | | | |OOOOOOO | | | | |OOOOOOO | | | | +---+OOOOOO+------+ +---+------+------+ | | | | | | | | | | | | +----------+ +----------+
The set of interior nodes of a box is the disjoint union of the nodes surrounded by cells of the box, and the interior boundary nodes of the box.
Parameters:
a_ivs  interior nodes of a_box in the layout a_boxes
a_base_domain  CELL-centered physical domain containing a_boxes
a_boxes  layout of CELL-centered boxes
a_box  the box in a_boxes for which we find interior nodes

void interiorBoundaryNodes LayoutData< Vector< IntVectSet > > &  a_IVSV,
const DisjointBoxLayout a_boxes,
const ProblemDomain a_domain
 

Finds interior boundary nodes of a DisjointBoxLayout.

Returns a LayoutData containing, for each box in a_boxes, a Vector of IntVectSets that contain the indices of the nodes that lie on faces of the box but are not on the interface of a_boxes with the next coarser level.

Example: for two particular boxes, marked "me", in the four-grid layout below, the interior boundary nodes are those that are marked with "O". For the second box, the nodes marked "Y" are also interior boundary nodes if and only if the domain is periodic in the vertical direction and the grids extend to the top and bottom faces of the domain.

+-----+ +YY---+ | | | | | | | me | | | | | +---+OOO--+---+ +---+OOOOO+---+ | O | | | | | me O | | | | | O | | | | +---+OOOOOO+------+ +---+------+------+ | | | | | | | | | | | | +----------+ +----------+
The result a_IVSV is needed by copyInteriorNodes().

Question: Why not simply store the indices of all interior boundary nodes of a_boxes in a single IntVectSet, rather than a LayoutData< Vector<IntVectSet> >?
Answer: Because of the way IntVectSets are stored, this would be very slow.

The different components of the Vector<IntVectSet> contain indices of nodes on different faces of the box.

Parameters:
a_IVSV  object containing interior boundary nodes of a_boxes
a_boxes  layout of CELL-centered boxes
a_domain  CELL-centered physical domain containing a_boxes

void interiorBoundaryNodes LayoutData< Vector< IntVectSet > > &  a_IVSV,
const DisjointBoxLayout a_boxes,
const Box a_domain
 

Finds interior boundary nodes of a DisjointBoxLayout.

Returns a LayoutData containing, for each box in a_boxes, a Vector of IntVectSets that contain the indices of the nodes that lie on faces of the box but are not on the interface of a_boxes with the next coarser level.

Example: for two particular boxes, marked "me", in the four-grid layout below, the interior boundary nodes are those that are marked with "O". For the second box, the nodes marked "Y" are also interior boundary nodes if and only if the domain is periodic in the vertical direction and the grids extend to the top and bottom faces of the domain.

+-----+ +YY---+ | | | | | | | me | | | | | +---+OOO--+---+ +---+OOOOO+---+ | O | | | | | me O | | | | | O | | | | +---+OOOOOO+------+ +---+------+------+ | | | | | | | | | | | | +----------+ +----------+
The result a_IVSV is needed by copyInteriorNodes().

Question: Why not simply store the indices of all interior boundary nodes of a_boxes in a single IntVectSet, rather than a LayoutData< Vector<IntVectSet> >?
Answer: Because of the way IntVectSets are stored, this would be very slow.

The different components of the Vector<IntVectSet> contain indices of nodes on different faces of the box.

Parameters:
a_IVSV  object containing interior boundary nodes of a_boxes
a_boxes  layout of CELL-centered boxes
a_domain  CELL-centered physical domain containing a_boxes

void interiorBoundaryNodes LayoutData< Vector< IntVectSet > > &  a_IVSV,
const DisjointBoxLayout a_dest,
const DisjointBoxLayout a_src,
const ProblemDomain a_domain
 

Finds interior boundary nodes of a DisjointBoxLayout.

Returns a LayoutData containing, for each destination box, a Vector of IntVectSets that together represent the nodes of the destination box that are also interior boundary nodes of the source boxes.

Specifically, if IBN(a_src) is the set of interior boundary nodes of a_src, then the Vector<IntVectSet> a_IVSV[dit()] holds the intersection of IBN(a_src) and the nodes surrounding a_dest[dit()].

The result a_IVSV is used in copyInteriorNodes().

Parameters:
a_IVSV  object containing interior boundary nodes of a_boxes
a_dest  layout of CELL-centered destination boxes
a_src  layout of CELL-centered source boxes
a_domain  CELL-centered physical domain containing a_dest and a_src

void interiorBoundaryNodes LayoutData< Vector< IntVectSet > > &  a_IVSV,
const DisjointBoxLayout a_dest,
const DisjointBoxLayout a_src,
const Box a_domain
 

Finds interior boundary nodes of a DisjointBoxLayout.

Returns a LayoutData containing, for each destination box, a Vector of IntVectSets that together represent the nodes of the destination box that are also interior boundary nodes of the source boxes.

Specifically, if IBN(a_src) is the set of interior boundary nodes of a_src, then the Vector<IntVectSet> a_IVSV[dit()] holds the intersection of IBN(a_src) and the nodes surrounding a_dest[dit()].

The result a_IVSV is used in copyInteriorNodes().

Parameters:
a_IVSV  object containing interior boundary nodes of a_boxes
a_dest  layout of CELL-centered destination boxes
a_src  layout of CELL-centered source boxes
a_domain  CELL-centered physical domain containing a_dest and a_src

void exteriorBoundaryNodes LayoutData< Vector< IntVectSet > > &  a_exterior,
const LayoutData< Vector< IntVectSet > > &  a_interior,
const DisjointBoxLayout a_boxes
 

Finds exterior boundary nodes of a DisjointBoxLayout.

Returns a LayoutData containing, for each box, the exterior boundary nodes of the box.

The exterior boundary nodes are the nodes on a level that are not interior nodes: they lie on the physical boundary and on the interface with the coarser level.

Example: for two particular boxes, marked "me", in the four-grid layout below, the exterior boundary nodes are those that are marked "O". For the second box, the nodes marked "Y" are also exterior boundary nodes, unless the domain is periodic in the vertical direction and the grids extend to the top and bottom faces of the domain.

+-----+ OYYOOOO | | O O | | O me O | | O O OOOOO--+--+---+ +---O--+--O---+ O | | | | | O me | | | | | O | | | | | +---O------O------+ +---+------+------+ | | | | | | | | | | | | +----------+ +----------+
The argument a_interior is obtained from
interiorBoundaryNodes(a_interior, a_boxes, a_domain) where a_domain is the physical domain.

You don't need the physical domain a_domain as an argument to this function, even to get periodicities, because everything needed from a_domain is put into a_interior.

Parameters:
a_exterior  object containing exterior boundary nodes of a_boxes
a_interior  object containing interior boundary nodes of a_boxes
a_boxes  layout of CELL-centered boxes

void zeroBoundaryNodes BoxLayoutData< NodeFArrayBox > &  a_dest,
const LayoutData< Vector< IntVectSet > > &  a_IVSV
 

Sets data to zero on specified boundary nodes.

Sets a_dest to zero on the nodes in a_IVSV.

Specifically, a_dest[dit()] is set to zero on the nodes in a_IVSV[dit()].

We usually call this function with a_IVSV representing the exterior boundary nodes of a_dest. These are obtained with the sequence of calls:
interiorBoundaryNodes(a_IVSVint, a_dest.boxLayout(), a_domain)
where a_domain is the physical domain, and
exteriorBoundaryNodes(a_IVSV, a_IVSVint, a_dest.boxLayout()) .

Parameters:
a_dest  the data
a_IVSV  object containing boundary nodes

void copyInteriorNodes LevelData< NodeFArrayBox > &  a_dest,
const LevelData< NodeFArrayBox > &  a_src,
const LayoutData< Vector< IntVectSet > > &  a_IVSV
 

Copies data at interior nodes from one LevelData<NodeFArrayBox> to another.

Copies data from a_src to a_dest, over the interior nodes of a_src. They need not have the same layout.

The argument a_IVSV is obtained from
interiorBoundaryNodes(a_IVSV, a_dest.boxLayout(), a_src.boxLayout(), a_domain)
where a_domain is the physical domain.

If a_dest and a_src have the same layout, then we may obtain a_IVSV more efficiently from
interiorBoundaryNodes(a_IVSV, a_src.boxLayout(), a_domain) .
Do not use this shorter form if a_dest and a_src have different layouts.

Example: if a_src has the four-grid layout on the left below, then the nodes from which data are copied to a_dest are marked with "X" and "O" on the right below. (The distinction between "X" and "O" is that nodes marked "O" are on interior boundaries of the layout.) Data are copied from the nodes marked "Y" if and only if the domain is periodic in the vertical direction and the grids extend to the top and bottom faces of the domain.

+-----+ +YY---+ | | |OOOOO| | | |OOOOO| | | |OOOOO| +---+--+--+---+ +---+XXXXX+---+ | | | |OOOOOOXOOOOOO| | | | |OOOOOOXOOOOOO| | | | |OOOOOOXOOOOOO| +---+------+------+ +---+XXXXXX+------+ | | |OOOOOOOOOO| | | |OOOOOOOOOO| | | |OOOOOOOOOO| +----------+ +--------YY+
Both pictures represent the layout of a_src. The layout of a_dest may be completely different from that of a_src.

Data at nodes in a_dest that are not interior boundary nodes of a_src remain unchanged by this function.

Parameters:
a_dest  destination data
a_src  source data
a_IVSV  object containing interior boundary nodes of source layout that are also nodes of destination layout

void fullIntVectSets LayoutData< BitSet > &  a_IVSVfull,
const LayoutData< Vector< IntVectSet > > &  a_IVSV
 

Determines which IntVectSets are rectangular.

Sets the bit a_IVSVfull[dit()][comp] to be true if and only if a_IVSV[dit()][comp] is a full rectangle.

Parameters:
a_IVSVfull  object containing bit settings of whether each component is rectangular
a_IVSV  object containing interior boundary nodes of a layout


Generated on Fri Jul 2 17:55:03 2004 for Chombo by doxygen 1.3.2