pw:: Block

Block type

Derives From

pw::Object pw::Entity pw::GridEntity

Summary
Block type
This action finds blocks adjacent to a starting list of blocks.
This action returns a list of blocks that use the given domains.
This action sets the user specified sort order of blocks.
This action deletes this block.
This action initializes the interior points of this block.
This action gets the interior state of this block.
This action gets the dimension of this block.
This action gets the position of a block grid point.
This action sets the position of a block interior grid point.
This action checks to see if an index corresponds to a point in the interior of the block.
This action returns the indices that are directly connected to the specified index.
This action returns the indices that are directly connected to the specified index.
This action gets the position in the defining space of the block at the given index.
This action gets the position of the block in model space at the given index.
This action gets the number of cells in this block.
This action gets the indices of the given cell.
This action gets the number of faces in this block.
This action gets the face at the given index.
This action adds a face to the block.
This action removes the last face added to this block.
This action checks to see if the block has a valid face definition.
This action clears overset grid assembly data from the block.
This action returns the IBLANK data for a block.
This action returns the IBLANK type for a block.
This action returns the list of original block indices for a given overset object type.
This action returns the original block point or cell dimensions used by the most recent import of overset assembly data.
This action returns whether the overset data for a block is up to date.
This action returns overset data of the given type at the specified index.
Return the volume for an overset data object.
Return the list of vertices for an overset data object.
Return the donor information for an overset fringe object.
Return the donor candidate information for an overset fringe or orphan object.

Static Actions

getAdjacentBlocks

pw::Block getAdjacentBlocks ?-all? blocks

This action finds blocks adjacent to a starting list of blocks.

Parameters

-allThis optional flag is a notification to repeat the search on the adjacent blocks found until there are no more adjacent blocks.
blocksThis parameter is a list of starting pw::Block objects.

Returns

This action returns the list of adjacent pw::Block objects found.

Information

The returned list will not include any blocks specified in the original blocks list.

getBlocksFromDomains

pw::Block getBlocksFromDomains domains

This action returns a list of blocks that use the given domains.

Parameters

domainsThis parameter is a list of pw::Domain objects.

Returns

This action returns a list of pw::Block objects.

setSortOrder

pw::Block setSortOrder blocks

This action sets the user specified sort order of blocks.

Parameters

blocksThis parameter is a list of pw::Block objects and the order they should appear in for sorting.

Returns

This action returns nothing.

Information

Any blocks that are not in the given list, or that are created after calling this command will be placed after these entities in the sort order by the pw::Entity.sort action.

See Also

pw::Entity.sort, pw::Domain.setSortOrder

Instance Actions

delete

$block delete ?-force? ?-domains? ?-connectors?

This action deletes this block.

Parameters

-forceThis optional flag is a notification to delete the entity as well as higher level entities that depend on this entity.
-domainsThis optional flag is a notification to delete the block domains if they will be left orphaned.
-connectorsThis optional flag is a notification to delete the block connectors if they will be left orphaned; the -domains flag must be present for this flag to have any effect.

Returns

This action returns nothing.

See Also

pw::Entity.delete

initialize

$block initialize

This action initializes the interior points of this block.

Parameters

There are no parameters.

Returns

This action returns nothing.

getInteriorState

$block getInteriorState

This action gets the interior state of this block.

Parameters

There are no parameters.

Returns

This action returns a string; < Empty | Initialized | Locked | Refined >.

getDimensions

$block getDimensions

This action gets the dimension of this block.

Parameters

There are no parameters.

Returns

This action returns the block dimensions as a three-element integer list.  Unstructured blocks have second and third dimensions of 1: [N 1 1].

getPoint

$block getPoint ?-constrained constrainedVar? index

This action gets the position of a block grid point.

Parameters

indexThis parameter is the integer linear index of the grid point to get with the range [1, number of points].
-constrained constrainedVarThis optional parameter is the string name of a variable.  If the grid point is database constrained, this variable is set to true.  If not constrained, it is set to false.

Returns

This action returns a point giving the grid point position (may be in the form “u v dbentity”).

Information

Block points are not currently db-constrained, so this command returns only XYZ coordinates.

setPoint

$block setPoint index point

This action sets the position of a block interior grid point.

Parameters

indexThis parameter is the integer linear index of the grid point to set with the range [1, number of points].  The index must be for an interior grid point.
pointThis parameter is the new point value of the grid point.

Returns

This action returns nothing.

Information

Block points are not currently db-constrained, so any database information in the point argument is converted to pure XYZ data before being stored.

isInteriorIndex

$block isInteriorIndex index

This action checks to see if an index corresponds to a point in the interior of the block.

Parameters

indexThis parameter is the integer linear index of the grid point to check with the range [1, number of points].

Returns

This action returns true if the index refers to an interior point.

getAdjacentIndices

$block getAdjacentIndices ?-linear? index

This action returns the indices that are directly connected to the specified index.

Parameters

-linearIf this option is specified, the results will be a list of integer linear indices regardless of the input form.  This is the default option and is present to maintain consistency with the form of the command used for pw::BlockStructured and pw::BlockExtruded objects.
indexThis parameter is the integer linear index of the grid point with the range [1, number of points].

Returns

This action returns a list of integer indices representing the adjacent coordinates.

getCellsUsingIndex

$block getCellsUsingIndex ?-linear? index

This action returns the indices that are directly connected to the specified index.

Parameters

-linearIf this option is specified, the results will be a list of integer linear indices regardless of the input form.  This is the default option and is present to maintain consistency with the form of the command used for pw::BlockStructured and pw::BlockExtruded objects.
indexThis parameter is the integer linear index of the grid point with the range [1, number of points].

Returns

This action returns a list of cell entries using the specified point.  Each cell entry is a list of integer point indices comprising the cell.

getPosition

$block getPosition ?-grid? index

This action gets the position in the defining space of the block at the given index.

Parameters

-gridThis optional flag is a notification to get the position at a grid point; this is the default.
indexThis parameter is the integer linear index to get the position at with the range [1, number of points].

Returns

This action returns a point giving the position on the block (may be in the form “u v dbentity”).

Information

Block points are not currently db-constrained, so this command returns only XYZ coordinates.

Even though it is not needed, the -grid switch is included here to be consistent with the other grid entity getPosition methods.  The following calls are equivalent:

$blk1 getPosition -grid 5
$blk1 getPosition 5

See Also

pw::BlockStructured.getPosition pw::BlockExtruded.getPosition pw::Connector.getPosition pw::Domain.getPosition pw::DomainStructured.getPosition

getXYZ

$block getXYZ ?-grid? index

This action gets the position of the block in model space at the given index.

Parameters

-gridThis optional flag is notification to get the position at a grid point; this is the default.
indexThis parameter is the integer linear index to get the position at with the range [1, number of points].

Returns

This action returns an XYZ vector.

Information

Even though it is not needed, the -grid switch is included here to be consistent with the other grid entity getXYZ methods.  The following calls are equivalent:

$blk1 getXYZ -grid 5
$blk1 getXYZ 5

See Also

pw::BlockStructured.getXYZ pw::BlockExtruded.getXYZ pw::Connector.getXYZ pw::Domain.getXYZ pw::DomainStructured.getXYZ

getCellCount

$block getCellCount

This action gets the number of cells in this block.

Parameters

There are no parameters.

Returns

This action returns the integer number of cells.

getCell

$block getCell index

This action gets the indices of the given cell.

Parameters

indexThis parameter is the integer index of the target cell; [1, number of cells].

Returns

This action returns an integer list of point indices.

getFaceCount

$block getFaceCount

This action gets the number of faces in this block.

Parameters

There are no parameters.

Returns

This action returns the integer number of faces.

getFace

$block getFace index

This action gets the face at the given index.

Parameters

indexThis parameter is the integer index of the target face [1, number of faces].

Returns

This action returns a pw::Face object.

addFace

$block addFace face

This action adds a face to the block.

Parameters

faceThis parameter is the pw::Face object to add.

Returns

This action returns nothing.

removeLastFace

$block removeLastFace

This action removes the last face added to this block.

Parameters

There are no parameters.

Returns

This action returns nothing.

isValid

$block isValid

This action checks to see if the block has a valid face definition.

Parameters

There are no parameters.

Returns

This action returns a boolean.

Overset Data Actions

clearOversetData

$block clearOversetData

This action clears overset grid assembly data from the block.

Parameters

Returns

This action returns nothing.

getIblank

$block getIblank index

This action returns the IBLANK data for a block.

Parameters

indexthe block index at which to return the iblank value.  The index will be a cell index if the iblank type is cell-based, or a point index if the type is point-based.

Returns

This action returns the iblank value at the given index.

Example

Code

$block getIblank {1 1 1}

getIblankType

$block getIblankType

This action returns the IBLANK type for a block.

Parameters

None.

Returns

This action returns the IBLANK type.

Example

Code

$block getIblankType

getOversetIndexList

$block getOversetIndexList ?-fringe? ?-hole? ?-orphan?

This action returns the list of original block indices for a given overset object type.  If no parameters are given, the block indices for all non-field overset objects are returned.

Parameters

-fringethis optional parameter indicates that the original block indices for fringe objects should be included in the result list.
-holethis optional parameter indicates that the original block indices for hole objects should be included in the result list.
-orphanthis optional parameter indicates that the original block indices for orphan objects should be included in the result list.

Returns

This action returns a list of index for the given overset object types.  The elements are the original block cell or point indices from the most recently imported overset grid assembly.

Example

Code

$block getOversetIndexList -fringe

getOversetDataDimensions

$block getOversetDataDimensions

This action returns the original block point or cell dimensions used by the most recent import of overset assembly data.

Parameters

None.

Returns

This action returns an index representing the maximum IJK dimensions for which overset data is stored for this block.

Example

Code

$block getOversetDataDimensions

isOversetDataUpToDate

$block isOversetDataUpToDate

This action returns whether the overset data for a block is up to date.  Overset data is considered out of date if it either does not exist or if the block or any of the donor blocks have been modified since the most recent import after overset grid assembly.

Parameters

None.

Returns

This action returns a boolean, true if there is overset data and it is up to date with respect to the block.

Example

Code

$block isOversetDataUpToDate

getOversetData

$block getOversetData <Volume | VertexList | Donor | DonorCandidateList> index

This action returns overset data of the given type at the specified index.  If the overset object type at the given index is not valid for the requested type, then an error is returned.

Parameters

typeVolume, VertexList, Donor, or DonorCandidateList
indexthe block index at which to return the overset object data.  The index must be within the original, as-assembled dimensions of the block, which are returned by getOversetDataDimensions

Returns

This action returns a single value or a list of string, float, integer and/or list of other values representing the overset data at the specified index.

See the description of the structure of the return values in the corresponding type description.

Example

Code

$block getOversetData Volume $index

Overset Data Types

Volume

$block getOversetData Volume index

Return the volume for an overset data object.

Type

Overset object volume is a float and is valid for fringe, hole and orphan objects.

VertexList

$block getOversetData VertexList index

Return the list of vertices for an overset data object.

Type

For point-based data, this is a single point.  For cell-based data, this is a list of point defining the cell stencil.  Overset object vertex list is valid for fringe, hole and orphan objects.

Donor

$block getOversetData Donor index

Return the donor information for an overset fringe object.

Type

Donor information is a list of

  • donor pw::Block
  • the donor cell index
  • a float representing the donor cell volume
  • donor cell vertex point (point-based data) or list of point (cell-based data)
  • an integer representing the assembler-dependent donor cell status

Donor information is valid only for fringe objects.

DonorCandidateList

$block getOversetData DonorCandidateList index

Return the donor candidate information for an overset fringe or orphan object.

Type

Donor candidate information is a list of donor information.  See Donor for the description of a donor in list form.  Donor information is valid for fringe and orphan objects.

pw::Block getAdjacentBlocks ?-all? blocks
This action finds blocks adjacent to a starting list of blocks.
pw::Block getBlocksFromDomains domains
This action returns a list of blocks that use the given domains.
pw::Block setSortOrder blocks
This action sets the user specified sort order of blocks.
$block delete ?-force? ?-domains? ?-connectors?
This action deletes this block.
$block initialize
This action initializes the interior points of this block.
$block getInteriorState
This action gets the interior state of this block.
$block getDimensions
This action gets the dimension of this block.
$block getPoint ?-constrained constrainedVar? index
This action gets the position of a block grid point.
$block setPoint index point
This action sets the position of a block interior grid point.
$block isInteriorIndex index
This action checks to see if an index corresponds to a point in the interior of the block.
$block getAdjacentIndices ?-linear? index
This action returns the indices that are directly connected to the specified index.
$block getCellsUsingIndex ?-linear? index
This action returns the indices that are directly connected to the specified index.
$block getPosition ?-grid? index
This action gets the position in the defining space of the block at the given index.
$block getXYZ ?-grid? index
This action gets the position of the block in model space at the given index.
$block getCellCount
This action gets the number of cells in this block.
$block getCell index
This action gets the indices of the given cell.
$block getFaceCount
This action gets the number of faces in this block.
$block getFace index
This action gets the face at the given index.
$block addFace face
This action adds a face to the block.
$block removeLastFace
This action removes the last face added to this block.
$block isValid
This action checks to see if the block has a valid face definition.
$block clearOversetData
This action clears overset grid assembly data from the block.
$block getIblank index
This action returns the IBLANK data for a block.
$block getIblankType
This action returns the IBLANK type for a block.
$block getOversetIndexList ?-fringe? ?-hole? ?-orphan?
This action returns the list of original block indices for a given overset object type.
$block getOversetDataDimensions
This action returns the original block point or cell dimensions used by the most recent import of overset assembly data.
$block isOversetDataUpToDate
This action returns whether the overset data for a block is up to date.
$block getOversetData <Volume | VertexList | Donor | DonorCandidateList> index
This action returns overset data of the given type at the specified index.
$block getOversetData Volume index
Return the volume for an overset data object.
$block getOversetData VertexList index
Return the list of vertices for an overset data object.
$block getOversetData Donor index
Return the donor information for an overset fringe object.
$block getOversetData DonorCandidateList index
Return the donor candidate information for an overset fringe or orphan object.
Base type for all glyph types
Entity type
Block type
Domain type
pw::Entity sort entities
This action sorts the given entities.
pw::Domain setSortOrder domains
This action sets the user specified sort order of domains.
pw::Entity delete entities
This action deletes the given entities.
A string is an array of characters.
An integer is a whole number.
A point is a position either in model space or database parameter space.
Structured block type
Extruded block type
$block getPosition ?-grid? < index | ijk_index >
This action gets the position in the defining space of the block at the given index.
$block getPosition ?-grid? < index | ijk_index >
This action gets the position in the defining space of the block at the given index.
$con getPosition ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets a position on a connector in the defining space of the connector.
$dom getPosition ?-grid? value
This action gets a position in the defining space of the domain.
$dom getPosition ?-grid? value
This action gets the position in the defining space of the domain at the given index.
A vector is a list of float values.
$block getXYZ ?-grid? < index | ijk_index >
This action gets the position of the block in model space at the given index.
$block getXYZ ?-grid? < index | ijk_index >
This action gets the position of the block in model space at the given index.
$con getXYZ ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets the model space position on a connector.
$dom getXYZ ?-grid? value
This action gets a position of the domain in model space.
$dom getXYZ ?-grid? value
This action gets the position of the domain in model space at the given index.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
An index is a list of integer values.
A float is a fractional number.