Glyph Version 7.22.2 |
pw:: DomainA domain is a computationally two-dimensional grid entity, bounded by one or more pw::Edges. A grid surface. Derives Frompw::Object pw::Entity pw::GridEntity Summary
getAdjacentDomains
This action returns a list of domains adjacent to the given domains. Parameters
ReturnsThis action returns a list of adjacent pw::Domain objects. InformationIf the -all flag is specified, the process is repeated until no more adjacent domains are found. The return list will not include any domains specified in the argument list. ExampleThis example shows how to get all adjacent domains to the given domain and any other domains that are found and then find their total cell count. $dom(1) is referencing an existing domain. Code set doms [pw::Domain getAdjacentDomains -all $dom(1)] Output 22 domains have 10978 cells. getDomainsFromConnectors
This action returns a list of domains that use the given connectors. Parameters
ReturnsThis action returns a list of pw::Domain objects. ExampleThis example shows how to get the domains used by a list of given connectors and join as many of them as possible (for unstructured). $con(1) and $con(2) are referencing existing connectors. Code set doms \ Output 3 domains of the 3 found were joined. setSortOrder
This action sets the user specified sort order of domains. Parameters
ReturnsThis action returns nothing. InformationAny domains 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 Alsopw::Entity.sort, pw::Block.setSortOrder ExampleThis example shows how to set the sort order of several domains. If the pw::Entity.sort command is called later after more domains are created, these domains will be sorted first and then the newer placed after them. $dom(1), $dom(2) and $dom(3) are referencing existing domains. Code pw::Domain setSortOrder [list $dom(2) $dom(3) $dom(1)] getIntersectingCells
This action determines the set of intersecting cells among the provided domains. Parameters
ReturnsThis action returns a list of lists, where each list contains the cell indices for cells that intersect. Lists are returned in the order the domains were provided in. ExampleThis example looks for cell intersections across all domains. If intersecting cells are detected, they are marked with a point that is placed at the centroid of the intersecting cell. Code set domains [pw::Grid getAll -type pw::Domain] delete
This action deletes this domain. Parameters
ReturnsThis action returns nothing. See AlsoExampleThis example shows how to delete a domain, as well as the blocks it is apart of. $dom(1) is referencing an existing domain. Code $dom(1) delete -force getDimensions
This action gets the dimensions of this domain. ParametersThis action has no parameters. ReturnsThis action returns the domain dimensions as a two element integer list. Unstructured domains have a second dimension of 1. ExampleThis example shows how to get the dimension of an unstructured domain. This will return the number of points in the unstructured domain as the first element. $dom(1) is referencing an existing domain. Code puts [$dom(1) getDimensions] Output 262 1 getPoint
This action gets the position of a domain grid point. Parameters
ReturnsThis action returns a point giving the grid point position (may be in the form “u v dbentity”). ExampleThis example shows how to get position of a domain grid point. The first output is from a domain that is not database constrained; the second is from a domain that is database constrained. $dom(1) is referencing an existing domain. Code puts [pw::Application getDescription [$dom(1) getPoint 35]] Output (26.2092,-10.3035,11.6549) setPoint
This action sets the position of a domain interior grid point. Parameters
ReturnsThis action returns nothing. ExampleThis example shows how to set an interior grid point on a domain; it checks to see if it is an interior grid point first. $dom(1) is referencing an existing domain. Code if [$dom(1) isInteriorIndex 35] { isInteriorIndex
This action checks to see if an index corresponds to a point in the interior of the domain. Parameters
ReturnsThis action returns boolean true if the index is an interior point. ExampleThis example shows how to check to see if an index is an interior point. In this case, it is not. $dom(1) is referencing an existing domain. Code puts [$dom(1) isInteriorIndex 35] Output 0 getAdjacentIndices
This action returns the indices that are directly connected to the specified index. Parameters
InformationEither index or ij_index must be specified. ReturnsThis action returns a list of integer indices representing the adjacent coordinates. The form of each index will be the same as the input form. If index is used or -linear is specified, the result will be a list of integer linear indices. If ij_index is used and -linear is not specified, the result will be a list of ij indices. ExampleThis example shows how to get the adjacent indices on an unstructured domain. The ij_index for an unstructured domain has a second index of 1. $dom(1) is referencing an existing domain. Code puts [$dom(1) getAdjacentIndices {150 1}] Output {151 1} {152 1} {182 1} {184 1} {198 1} getPosition
This action gets a position in the defining space of the domain. Parameters
ReturnsThis action returns a point giving the position on the domain (may be in the form “u v dbentity”). ExampleThis example shows how to get the position of a grid point in a domain. $dom(1) is referencing an existing domain. Code puts [pw::Application getDescription \ Output Outer-Surf-3 (0.393111,0.0775636) getXYZ
This action gets a position of the domain in model space. Parameters
ReturnsThis action returns an XYZ vector. ExampleThis example shows how to get the XYZ vector of a grid point in a domain. $dom(1) references an existing domain. Code puts [$dom(1) getXYZ -grid 100]] Output 0 7.86223 1.55127 getCellCount
This action gets the number of cells in this domain. ParametersThis action has no parameters. ReturnsThis action returns the integer number of cells. ExampleThis example shows how to get the number of cells in a domain. $dom(1) is referencing an existing domain. Code puts [$dom(1) getCellCount] Output 466 getCell
This action gets the indices of the given cell. Parameters
ReturnsThis action returns a list of integer point indices. ExampleThis example shows how to get the indices for a cell. The first output is for unstructured and the second is for structured. $dom(1) is referencing an existing domain. Code puts [$dom(1) getCell 55] Output 78 135 136 getCellsUsingIndex
Returns the indices of the cells whose connectivity includes the specified index. Parameters
ReturnsThis action returns a list of cell entries using the specified point. Each cell entry is a list of integer point indices comprising the cell. getEdgeCount
This action gets the number of edges in this domain. ParametersThis action has no parameters. ReturnsThis action returns the integer number of edges. ExampleThis example shows how to get the number of edges in a domain. In this case, the domain is structured. $dom(1) is referencing an existing domain. Code puts [$dom(1) getEdgeCount] Output 4 getEdge
This action gets the edge at the given index. Parameters
ReturnsThis action returns a pw::Edge object. ExampleThis example shows how to get a edge and then find the connector count of that edge. In this case, the domain is unstructured, so the single edge has multiple connectors. $dom(1) is referencing an existing domain. Code puts [[$dom(1) getEdge 1] getConnectorCount] Output 6 getEdges
This action gets the edges of the domain. ParametersThis action has no parameters. ReturnsThis action returns a list of pw::Edge objects. ExampleThis example shows how to get the edges and then find the connector count of an edge. In this case, the domain is unstructured, so an edge can have multiple connectors. $dom(1) is referencing an existing domain. Code puts [[[$dom(1) getEdges 1] lindex 0] getConnectorCount] Output 6 addEdge
This action adds an edge to the domain. Parameters
ReturnsThis action returns nothing. See AlsoExampleThis example shows how to add edges to a structured domain. $edge(1), $edge(2), $edge(3) and $edge(4) are referencing existing edges. Code set dom(1) [pw::DomainStructured create] removeLastEdge
This action removes the last edge added to this domain. ParametersThis action has no parameters. ReturnsThis action returns nothing. ExampleThis example shows how to remove the last edge added to a structured domain and then add a different edge in its place. $dom(1) and $edge(5) are referencing an existing domain and edge. Code $dom(1) removeLastEdge getDefaultProjectDirection
This action gets the default projection direction for this domain. ParametersThis action has no parameters. ReturnsThis action returns a normalized vector. ExampleThis example shows how to get the default projection direction for the given domain. $dom(1) is referencing an existing domain. Code puts [$dom(1) getDefaultProjectDirection] Output 6.948464792806903e-17 0.0 1.0 createPeriodic
This action creates a periodic copy of this domain. This action will fail if the domain is already part of a periodic pair or if any of its connectors are part of a different periodic transformation. Parameters
ReturnsThis action returns a new pw::Domain object. Under certain circumstances (such as the transform resulting in conflicting mappings in the domain’s connectors), the copy will be created but the periodic link will be broken. Call getPeriodic to verify the periodicity. InformationOne of either -translate or -rotate options must be specified with appropriate arguments. ExampleThis example shows how to create a periodic copy of a domain via translation and find the layer it is in. $dom(1) is referencing an existing domain. Code set dom(2) [$dom(1) createPeriodic -translate "5 5 0"] Output 0 getPeriodic
This action gets the domain that shares a periodic link with this domain. Parameters
ReturnsThis action returns a pw::Domain object if there is a periodic link, or an empty string if there is no periodic link. ExampleThis example shows how to get the domain that has a periodic link with the given domain. $dom(1) is referencing an existing domain. Code puts [[$dom(2) getPeriodic] getName] Output dom-1 breakPeriodic
This action breaks the periodic link that this domain has with another domain. This action has no effect if the domain was not part of a periodic pair. ParametersThis action has no parameters. ReturnsThis action returns nothing. ExampleThis example shows how to break a periodic link between domains. $dom(1) is referencing an existing domain. Code $dom(1) breakPeriodic isValid
This action checks to see if the domain has a valid edge definition. ParametersThis action has no parameters. ReturnsThis action returns a boolean. ExampleThis examples shows how to check to see if a domain has a valid edge distribution. This returns invalid because the structured domain only has 3 edges added to it. $dom(1) is referencing an existing domain. Code puts [$dom(1) isValid] Output 0 isConstrained
This action checks to see if the domain is database constrained. ParametersThis action has no parameters. ReturnsThis action returns a boolean. ExampleThis example checks to see if the domain is database constrained. $dom(1) is referencing an existing domain. Code puts [$dom(1) isConstrained] Output 0 getInteriorState
This action gets the interior state of this domain. ParametersThis action has no parameters. ReturnsThis action returns a string interior state with options < Empty | Initialized | Refined >. ExampleThis example shows how to get the state of a domain. $dom(1) is referencing an existing domain. Code puts [$dom(1) getInteriorState] Output Initialized getDatabaseEntities
This action gets all database entities the grid entity is using. Parameters
ReturnsThis action returns a list of pw::DatabaseEntity objects. ExampleThis example shows how to get the number of database entities the given grid entity is using. $dom(1) is referencing an existing domain. Code puts [llength [$dom(1) getDatabaseEntities]] Output 2 |
This action returns a list of domains adjacent to the given domains.
pw::Domain getAdjacentDomains ?-maximumAngle angle? ?-all? ?-visibleOnly? domains
This action returns a list of domains that use the given connectors.
pw::Domain getDomainsFromConnectors connectors
This action sets the user specified sort order of domains.
pw::Domain setSortOrder domains
This action determines the set of intersecting cells among the provided domains.
pw::Domain getIntersectingCells domains
This action deletes this domain.
$dom delete ?-force? ?-connectors?
This action initializes the interior points of this domain.
$dom initialize
This action gets the dimensions of this domain.
$dom getDimensions
This action gets the position of a domain grid point.
$dom getPoint ?-constrained constrainedVar? index
This action sets the position of a domain interior grid point.
$dom setPoint index point
This action checks to see if an index corresponds to a point in the interior of the domain.
$dom isInteriorIndex index
This action returns the indices that are directly connected to the specified index.
$dom getAdjacentIndices ?-linear? < index | ij_index >
This action gets a position in the defining space of the domain.
$dom getPosition ?-grid? value
This action gets a position of the domain in model space.
$dom getXYZ ?-grid? value
This action gets the number of cells in this domain.
$dom getCellCount
This action gets the indices of the given cell.
$dom getCell index
Returns the indices of the cells whose connectivity includes the specified index.
$dom getCellsUsingIndex ?-linear? index
This action gets the average edge length of the given cell.
$dom getCellAverageEdgeLength index
This action gets the centroid of the given cell.
$dom getCellCentroid index
This action gets the area of the given cell.
$dom getCellArea index
This action gets the number of edges in this domain.
$dom getEdgeCount
This action gets the edge at the given index.
$dom getEdge index
This action gets the edges of the domain.
$dom getEdges
This action adds an edge to the domain.
$dom addEdge edge
This action removes the last edge added to this domain.
$dom removeLastEdge
This action gets the default projection direction for this domain.
$dom getDefaultProjectDirection
This action creates a periodic copy of this domain.
$dom createPeriodic < -translate vector | -rotate point normal angle >
This action gets the domain that shares a periodic link with this domain.
$dom getPeriodic ?-transform matrixVar?
This action breaks the periodic link that this domain has with another domain.
$dom breakPeriodic
This action checks to see if the domain has a valid edge definition.
$dom isValid
This action checks to see if the domain is database constrained.
$dom isConstrained
This action gets the interior state of this domain.
$domain getInteriorState
This action gets all database entities the grid entity is using.
$entity getDatabaseEntities
This action sorts the given entities.
pw::Entity sort entities
This action sets the user specified sort order of blocks.
pw::Block setSortOrder blocks
This action deletes the given entities.
pw::Entity delete entities