gridBoundaryFunc

gridBoundaryFunc

UserFuncs of kind = gridBoundaryFunc return a result with information a <GridBoundary> object, i.e., information related to a surface (described by the <GridBoundary>).

UserFuncs of kind = gridBoundaryFunc take one argument, a cell index (a vector of integers with as many elements as spatial dimensions), and return information about the GridBoundary surface in that cell, depending on the result attribute.

gridBoundaryFunc parameters

gridBoundary (string, required)

The name of the <GridBoundary> object to query for information.

result (string, required)

Specifies what information the function should return; depending on result, different attributes will apply.

gridBoundaryFunc results that return an “interiorness” value specify whether a region is inside, outside, or cut by the boundary; these results should, if possible, be used as arguments to the functions isInside, isInterior, isOutside, isExterior, isCutByBndry (see Built-in functions for use with GridBoundaries). In the following, references to a node, a face, or an edge, refer to the node, face, or edge of the cell specified by the CellFunc argument (and also the dir attribute if appropriate).

Following is a list of results, the length and type of the vector returned, and the extra attributes (if any) that pertain to each specific result.

nodeInteriorness (returns 1 integer)

result = nodeInteriorness returns the interiorness of a node.

cellInteriorness (1 integer)

result = cellInteriorness returns the interiorness of a cell.

dualCellInteriorness (1 integer)

result = dualCellInteriorness returns the interiorness of a dual-grid cell.

cellCenterInteriorness (1 integer)

result = cellCenterInteriorness returns the interiorness of the cell center (a point).

edgesInteriorness (3 integers)

result = edgesInteriorness returns the interiorness of all 3 edges.

dualEdgesInteriorness (3 integers)

result = dualEdgesInteriorness returns the interiorness of all 3 edges of the dual-grid cell.

facesInteriorness (3 integers)

result = facesInteriorness returns the interiorness of all 3 faces.

dualFacesInteriorness (3 integers)

result = dualFacesInteriorness returns the interiorness of all 3 faces of the dual-grid cell.

cellInsideCentroid (NDIM floats)

result = cellInsideCentroid eturns the centroid of the interior volume of the cell.

cellOutsideCentroid (NDIM floats)

result = cellOutsideCentroid returns the centroid of the exterior volume of the cell.

surfaceCentroid (NDIM floats)

result = surfaceCentroid returns the centroid of the boundary surface cutting through the cell, or the zero vector if the cell is not cut by the boundary.

surfaceCenter (NDIM floats)

result = surfaceCenter returns a point which is approximately the centroid of the boundary surface cutting through the cell, but is approximately on the surface even if the surface is curved; if the cell is not cut by the boundary, returns the zero vector.

cellVolFrac (1 float)

result = cellVolFrac returns the fraction of the cell volume that is interior to the gridBoundary.

facesAreDmNeglected (3 boolean)

result = facesAreDmNeglected returns whether the 3 faces (that touch the node) of the cell would be neglected by the Dey-Mittra Faraday update, given the gridBoundary’s dmFrac.

surfaceArea (1 float)

result = surfaceArea returns the area of the gridBoundary surface cutting through the cell.

surfaceOutwardArea (NDIM floats)

result = surfaceOutwardArea returns a vector with direction in the surface-outward-normal and length equal to the surfaceArea within the cell.

surfaceOutwardArea3D (3 floats)

result = surfaceOutwardArea3D returns a vector with direction in the surface-outward-normal and length equal to the surfaceArea within the cell.

surfaceOutwardUnitNormal (NDIM floats)

result = surfaceOutwardUnitNormal returns a unit vector with direction in the surface-outward-normal.

surfaceOutwardUnitNormal3D (3 floats)

result = surfaceOutwardUnitNormal3D returns a unit vector with direction in the surface-outward-normal.

ndimZeroVector (NDIM booleans)
result = ndimZeroVector returns NDIM zeros (this can
be convenient for figuring out the spatial dimension).
edgeInteriorness (1 integer)

result = edgeInteriorness returns the interiorness of an edge.

dir (required; 0, 1, or 2)

The direction of the desired edge.

dualEdgeInteriorness (1 integer)

result = dualEdgeInteriorness returns the interiorness of a dual-grid edge.

dir (required; 0, 1, or 2)

The direction of the desired edge.

faceInteriorness (1 integer)

result = faceInteriorness returns the interiorness of a face.

dir (required; 0, 1, or 2)

The direction normal to the desired face.

dualFaceInteriorness (1 integer)

result = dualFaceInteriorness returns the interiorness of a dual-grid face.

dir (required; 0, 1, or 2)

The direction normal to the desired face.

faceInsideCentroid (NDIM floats)

result = faceInsideCentroid returns the centroid of the interior part of the face.

dir (required; 0, 1, or 2)

The direction normal to the desired face.

faceOutsideCentroid (NDIM floats)

result = faceOutsideCentroid returns the centroid of the exterior part of the face.

dir (required; 0, 1, or 2)

The direction normal to the desired face.

faceAreaFrac (1 float)

result = faceAreaFrac returns the fraction of the cell face that is interior to the gridBoundary.

dir (required; 0, 1, or 2)

The direction normal to the desired face.

edgeLengthFrac (1 float)

result = edgeLengthFrac returns the fraction of the cell edge that is interior to the gridBoundary.

dir (required; 0, 1, or 2)

The direction of the desired edge.

faceIsDmNeglected (1 boolean)

result = faceIsDmNeglected returns whether a given face would be neglected by the Dey-Mittra Faraday update, given the gridBoundary’s dmFrac.

dir (required; 0, 1, or 2)

The direction normal to the desired face.

edgeBordersDmNeglectedFace (1 boolean)

result = edgeBordersDmNeglectedFace returns whether the given cell edge borders a cell face that would be neglected by the Dey-Mittra Faraday update, given the gridBoundary’s dmFrac.