pw::DomainUnstructured

An unstructured domain is a watertight collection of edge-connected surface elements (triangle, quadrilateral, etc.) bounded by one or more pw::Edges, none of which can be degenerate (pole).

Derives From

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

Summary
pw::DomainUnstructuredAn unstructured domain is a watertight collection of edge-connected surface elements (triangle, quadrilateral, etc.)
Static Actions
createThis action creates a new unstructured domain object.
createOnDatabaseThis creates new unstructured domain objects on the given database entities.
createFromConnectorsThis action creates new unstructured domain objects from the given connectors.
createFromPointsThis action, given a list of point values (XYZ or database- constrained) and at least one cell-type array, creates a new unstructured domain.
joinThis action joins as many of the given unstructured domains together as possible.
qualifyEdgesThis action checks if a list of edges would be valid for defining an unstructured domain.
getAutoCompleteHintThis action gets a list of connectors that will close an edge to be used for an unstructured domain.
getDomainsFromDatabaseThis action gets a list of domains that are constrained to the given databases.
Static Defaults
Algorithm (Default)This default is the meshing algorithm of an unstructured domain when it is created.
IsoCellType (Default)This default attribute controls what type of cells a domain will contain in the isotropic region (all cells if T-Rex is not applied) after generation.
BoundaryDecay (Default)This default is the boundary decay factor of an unstructured domain when it is created.
TRexCellType (Default)This default attribute contains what type of cells a T-Rex generated domain will contain after generation.
EdgeMaximumLength (Default)This default is the maximum edge length of an unstructured domain when it is created.
EdgeMinimumLength (Default)This default is the minimum edge length of an unstructured domain when it is created.
NormalMaximumDeviation (Default)This default is the maximum angle of normal deviation of an unstructured domain when it is created.
SurfaceMaximumDeviation (Default)This default is the maximum distance of geometric deviation of an unstructured domain when it is created.
QuadMaximumIncludedAngle (Default)This default is the maximum included angle in degrees at a corner of a quad in an unstructured domain when it is created.
QuadMaximumWarpAngle (Default)This default is the maximum warp (dihedral) angle in degrees between the two tris comprising a quad in an unstructured domain when it is created.
TRexMaximumLayers (Default)This default is the maximum number of T-Rex layers of an unstructured domain when it is created.
TRexFullLayers (Default)This default is the minimum number of fully structured TRex layers of the domain.
TRexGrowthRate (Default)This default is the growth rate of TRex layers of an unstructured domain when it is created.
TRexIsotropicHeight (Default)This default is the scale factor to be applied to the local isotropic height at which T-Rex stops layer growth via deformation.
TRexPushAttributes (Default)This default sets the option for pushing TRex attributes onto the connectors of domain when a new domain is created.
TRexSpacingSmoothing (Default)This default is the number of smoothing sweeps to apply to the initial spacing values of TRex layers of the domain.
TRexSpacingRelaxationFactor (Default)This default is the relaxation factor of smoothing sweeps to apply to the intial spacing values of TRex layers for the domain when it is created.
Static Attributes
InitializeInteriorThis attribute indicates, if true the interior points are inserted when the domain is initialized or re-initialized; if false interior points will not be automatically generated.
Instance Actions
getPerimeterPointCountThis action gets the number of grid points on the perimeter of the entity.
getStructuredLinkThis action gets the underlying structured domain this domain is linked to.
getTRexCellCountThis action gets the number of T-Rex cells in the domain generated by the last run of the solver.
getTRexTriCellCountThis action gets the number of T-Rex triangular cells in the domain generated by the last run of the solver.
getTRexQuadCellCountThis action gets the number of T-Rex quadrilateral cells in the domain generated by the last run of the solver.
getTRexFullLayerCountThis action gets the number of T-Rex full layers in the domain generated by the last run of the solver.
getTRexTotalLayerCountThis action gets the number of T-Rex total layers in the domain generated by the last run of the solver.
getTRexMatchConnectorCountThis action gets the number of match connectors emanating from the adjacent grid/wall BC conditions within this domain.
getTRexMatchInitialSpacingThis action gets the minimum, average, and maximum initial spacing of the match connectors connected to the adj grid/wall BCs of this domain.
getTRexMatchGrowthRateThis action gets the minimum, average, and maximum growth rates of the match connectors connected to the adj grid/wall BCs of this domain.
getTRexMatchLayerCountThis action gets the minimum, average, and maximum layer count of the match connectors connected to the adj grid/wall BCs of this domain.
removeEdgesThis action removes all of the domain’s edges.
projectThis action projects this domain onto one or more database entities.
joinThis action joins the given domain to this domain; for joining multiple domains construct a pw::FaceUnstructured object.
triangulateThis action creates a new unstructured domain by triangulating the quads in this domain.
flipOrientationThis action flips the orientation of this domain.
alignOrientationThis action aligns the normal orientation of the given domains with this domain.
getSolvedAlgorithmThis action gets the algorithm that was used when initializing the interior of the domain.
getSurfaceEdgeMinimumLengthThis action gets the calculated minimum surface edge length based on triangluar area of the cells.
getSurfaceEdgeMaximumLengthThis action gets the calculated maximum surface edge length based on triangluar area of the cells.
getBoundaryEdgeMinimumLengthThis action gets the minimum boundary edge length.
getBoundaryEdgeMaximumLengthThis action gets the maximum boundary edge length.
getUnstructuredSolverAttributeThis action gets the named unstructured solver attribute.
setUnstructuredSolverAttributeThis action sets the named unstructured solver attribute.
Unstructured Solver Attributes
AlgorithmThis attribute is the algorithm to use when initializing the interior of the domain.
IsoCellTypeThis attribute controls what type of cells a domain will contain in the isotropic region (all cells if T-Rex is not applied) after generation.
ShapeConstraintThis attribute is the shape constraint of the unstructured domain.
ShapeProjectionThis attribute is the shape projection method when constrained to database entities.
EdgeMaximumLengthThis attribute is the maximum edge length of the domain.
EdgeMinimumLengthThis attribute is the minimum edge length of the domain.
NormalMaximumDeviationThis attribute is the maximum angle of normal deviation of the domain.
SurfaceMaximumDeviationThis attribute is the maximum distance of geometric deviation of the domain.
QuadMaximumIncludedAngleThis attribute is the maximum included angle in degrees at a corner of a quad in the domain.
QuadMaximumWarpAngleThis attribute is the maximum warp (dihedral) angle in degrees between the two tris comprising a quad in the domain.
SwapCellsWithNoInteriorPointsThis attribute is the flag which controls whether triangle cells should swap diagonals with a neighboring triangle cell if it contains no interior points.
AlignCellsToSourcesThis attribute is the flag which controls whether cells should be aligned to source curves.
TRexMaximumLayersThis attribute is the maximum number of TRex layers of the domain.
TRexFullLayersThis attribute is the minimum number of fully structured TRex layers of the domain.
TRexGrowthRateThis attribute is the growth rate of TRex layers for the domain.
TRexGrowthProfileThis attribute specifies the growth rate for each anisotropic layer.
TRexIsotropicHeightThis attribute specifies the scale factor to be applied to the local isotropic height at which T-Rex stops layer growth via deformation.
TRexPushAttributesThis attribute is the flag for pushing TRex attributes onto the connectors of this domain.
TRexSpacingSmoothingThis attribute is the number of smoothing sweeps to apply to the initial spacing values of TRex layers of the domain.
TRexSpacingRelaxationFactorThis attribute is the relaxation factor of smoothing sweeps to apply to the intial spacing values of TRex layers for the domain.
TRexCellTypeThis attribute controls what type of cells a T-Rex generated domain will contain in the anisotropic region after generation.

Static Actions

create

pw::DomainUnstructured create

This action creates a new unstructured domain object.

Parameters

none

Returns

This action returns a new pw::DomainUnstructured object.

Example

In this example, an unstructured domain is created using 4 existing connectors.  For an unstructured domain, all connectors are added to the same edge object.

Code

set edge(1) [pw::Edge create]
$edge(1) addConnector $con(1)
$edge(1) addConnector $con(2)
$edge(1) addConnector $con(3)
$edge(1) addConnector $con(4)
set dom(1) [pw::DomainUnstructured create]
$dom(1) addEdge $edge(1)
puts [$dom(1) getName]

Output

dom-1

See Also

pw::Edge

createOnDatabase

pw::DomainUnstructured createOnDatabase ?-merge tolerance? ?-splitConnectors split_angle? ?-joinConnectors join_con_angle? ?-joinDomains join_dom_angle? ?-parametricConnectors mode? ?-reject rejectVar? entities

This creates new unstructured domain objects on the given database entities.

Parameters

-merge toleranceThis optional parameter is the tolerance for automatic connector merging; float [0, infinity); the default is 0 which means that no merging will be done.
-splitConnectors split_angleThis optional parameter is the turning angle at which to split connectors; float [0, 180); the default is 0, which means that no splitting will be done.
-joinConnectors join_con_angleThis optional parameter is the turning angle at which to join connectors; float [0, 180); the default is 0, which means that no joining will be done.
-joinDomains join_dom_angleThis optional parameter is the turning angle at which to join domains; float [0, 180]; the default is 0, which means that no joining will be done; 180 means everything will be joined.
-parametricConnectors modeThis optional parameter is the string mode for how connectors are created on parametric surfaces with options < EndToEnd | Aligned >.  The default is EndToEnd.
-reject rejectVarThis optional parameter is a variable name to receive a list of pw::DatabaseEntity objects that were rejected for placing connectors on; if this is not given, no rejections will be reported.
entitiesThis required parameter is a list of pw::DatabaseEntity objects.

Returns

This action returns a list of new pw::DomainUnstructured objects.

Information

This command supports progress updates.

Example

This example automatically creates unstructured domains on the database entities already existent within the file.  The -joinDomains parameter is used to indicate that domains will be joined for a turning angle of 60 degrees.

Code

set dbEnts [pw::Database getAll]
set unstDoms [pw::DomainUnstructured createOnDatabase \
    -joinDomains 60 $dbEnts]
set totalPts 0
foreach ent $unstDoms {
    set totalPts [expr {$totalPts + [$ent getPointCount]}]
}
puts "The total number of grid points is $totalPts."

Output

The total number of grid points is 5543.

createFromConnectors

pw::DomainUnstructured createFromConnectors ?-manifold? ?-solid? ?-reject rejectVar? connectors

This action creates new unstructured domain objects from the given connectors.

Parameters

-manifoldThis optional flag indicates to limit domain creation to maintain a manifold topology.
-solidThis optional flag indicates to create domains to close groups of domains into solids.
-reject rejectVarThis optional parameter is a variable name to receive a list of pw::Connector objects that were not used in creating the domains.
connectorsThis required parameter is a list of pw::Connector objects.

Returns

This action returns a list of new pw::DomainUnstructured objects.

Information

This command supports progress updates.

Notes

While this command will produce identical results when run with the exact same input, it may produce different results for slight variations in the input connectors.  The domains may be created in a different order or may be created with different orientations.  Use the explicit domain building routines (pw::Edge.create, pw::DomainUnstructured.create, pw::Edge.addConnector, and pw::Domain.addEdge commands) to build the domain in a controlled manner.

If this command is run inside of a Create pw::Mode, it will only be able to assemble domains from entities that were created within the same pw::Mode.  If entities created outside of the pw::Mode are also included, the assembly will fail.  Instead, use explicit assembly by creating the pw::Edge objects directly.

Example

This example automatically creates unstructured domains from the list of connectors provided.  The -reject parameter is used to specify which connectors were unused.

Code

set cons [pw::Grid getAll -type pw::Connector]
set unstDoms [pw::DomainUnstructured createFromConnectors \
    -reject rejectCons $cons]
foreach ent $unstDoms {
    puts [$ent getName]
}
foreach ent $rejectCons {
    puts [$ent getName]
}

Output

dom-1
dom-2
dom-3
con-13
con-14

createFromPoints

pw::DomainUnstructured createFromPoints ?-triangles triCellArray? ?-quadrilaterals quadCellArray? ?-splitAngle angle? ?-splitMultiloop? points

This action, given a list of point values (XYZ or database- constrained) and at least one cell-type array, creates a new unstructured domain.

Parameters

The following cell array parameters (at least one of which is required) are each a list of lists.  The sub-lists represent indices into the points list for each vertex of a particular cell.  For example, there are 3 vertices for each triangle.  Therefore, the ‘triCellArray’ will consist of a number of sub-lists, where each contains 3 indices representing the vertices of a triangle.

-triangles triCellArrayThis optional parameter is a list of cells, where each cell list is 3 elements long (one element for each triangle vertex, each of which is an index into the points array).
-quadrilaterals quadCellArrayThis optional parameter is a list of N cells, where each cell list is 4 elements long (one element for each quadrilateral vertex, each of which is an index into the points array).
-splitAngle splitAnglethis optional parameter specifies an angle at which to split connectors.
-splitMultiloopthis optional flag will split domains with more than 1 loop.
pointsThis required parameter is an ordered list of point values to be used to define the domain.

Returns

This action constructs and returns an unstructured domain from a list of point values and triangle/quad cells.  If the new domain matches an existing one, the existing domain will be returned.

Example

This example creates an unstructured domain from a list of triangles and quads from a given list of points.

Code

set verts [list {15.0 17.0 10.0} {15.0 16.0 10.0} {15.0 15.0 10.0}
  {15.0 14.0 10.0} {15.0 13.0 10.0} {15.0 12.0 10.0} {15.0 11.0 10.0}
  {14.0 17.0 10.0} {14.0 16.0 10.0} {14.0 15.0 10.0} {14.0 14.0 10.0}
  {14.0 13.0 10.0} {14.0 12.0 10.0} {14.0 11.0 10.0} {13.0 17.0 10.0}
  {13.0 16.0 10.0} {13.0 15.0 10.0} {13.0 14.0 10.0} {13.0 13.0 10.0}
  {13.0 12.0 10.0} {13.0 11.0 10.0} {12.0 17.0 10.0} {12.0 16.0 10.0}
  {12.0 15.0 10.0} {12.0 14.0 10.0} {12.0 13.0 10.0} {12.0 12.0 10.0}
  {12.0 11.0 10.0} {11.0 17.0 10.0} {11.0 16.0 10.0} {11.0 15.0 10.0}
  {11.0 14.0 10.0} {11.0 13.0 10.0} {11.0 12.0 10.0} {11.0 11.0 10.0}]

set tris [list {28 29 21} {29 30 22} {30 31 23} {31 32 24} {32 33 25}
  {33 34 26} {21 29 22} {22 30 23} {23 31 24} {24 32 25} {25 33 26}
  {26 34 27} {21 22 14} {22 23 15} {23 24 16} {24 25 17} {25 26 18}
  {26 27 19} {14 22 15} {15 23 16} {16 24 17} {17 25 18} {18 26 19}
  {19 27 20}]

set quads [list {14 15 8 7} {15 16 9 8} {16 17 10 9} {17 18 11 10}
  {18 19 12 11} {19 20 13 12} {7 8 1 0} {8 9 2 1} {9 10 3 2}
  {10 11 4 3} {11 12 5 4} {12 13 6 5}];

# Test building from XYZs
set dom1 [pw::DomainUnstructured createFromPoints \
  -triangles $tris -quadrilaterals $quads -split 90.0 $verts]
puts "Cell Count [$dom1 getCellCount]"
puts "Triangles [pw::Grid getElementCount Triangle [list $dom1]]"
puts "Quadrilaterals [pw::Grid getElementCount Quad [list $dom1]]"

Output

Cell Count 36
Triangles 24
Quads 12

join

pw::DomainUnstructured join ?-reject rejectVar? domains

This action joins as many of the given unstructured domains together as possible.

Parameters

-reject rejectVarThis optional parameter is a variable name to receive a list of pw::DomainUnstructured objects that were not used in joining.
domainsThis required parameter is a list of pw::DomainUnstructured objects to join.

Returns

This action returns a list of the pw::DomainUnstructured objects that were joined.

Information

This command supports progress updates.

Example

This example joins as many unstructured domains as possible.  The -reject parameter is used to specify which domains were not joined.

Code

set doms [pw::Grid getAll -type pw::Domain]
set joinDoms \
    [pw::DomainUnstructured join -reject unjoinDoms $doms]
puts "[llength $joinDoms] domains were joined."
puts "[llength $unjoinDoms] domains were not joined."

Output

3 domains were joined.
2 domains were not joined.

qualifyEdges

pw::DomainUnstructured qualifyEdges edges

This action checks if a list of edges would be valid for defining an unstructured domain.

Parameters

edgesThis required parameter is a list of pw::Edge objects.

Returns

This action returns a boolean, which is true if this is a valid set of edges.

Example

This example checks to see if the edge object created is valid for defining an unstructured domain.

Code

set edge(1) [pw::Edge create]
$edge(1) addConnector $con(1)
$edge(1) addConnector $con(2)
$edge(1) addConnector $con(3)
puts [pw::DomainUnstructured qualifyEdges $edge(1)]

Output

0

getAutoCompleteHint

pw::DomainUnstructured getAutoCompleteHint edge

This action gets a list of connectors that will close an edge to be used for an unstructured domain.  It will attempt to close the loop by adding connectors to either end of the edge until it either closes or a branch is encountered.

Parameters

edgeThis required parameter is a pw::Edge object for which to get the hint.

Returns

This action returns a list of two lists of pw::Connector objects.

Information

The first list in the return value is a list of connectors to insert at the front of the edge definition (such that the first connector should be inserted at the beginning, the second connector should be inserted next at the beginning, etc.).  The second list in the return value is a list of connectors to append to the edge definition.  Either may be an empty list.

Example

This example is used to find which connectors will close an edge in order for it to be used for an unstructured domain.  The Tcl commmand lassign is used to split the list that is returned.

Code

set hint [pw::DomainUnstructured getAutoCompleteHint $edge(1)]
lassign $hint front end
set frontNames {}; set endNames {}
foreach ent $front {
    lappend frontNames [$ent getName]
}
foreach ent $end {
    lappend endNames [$ent getName]
}
puts $frontNames; puts $endNames

Output

(empty string)
con-4 con-5

getDomainsFromDatabase

pw::DomainUnstructured getDomainsFromDatabase ?-exclusive? database

This action gets a list of domains that are constrained to the given databases.

Parameters

-exclusiveThis optional flag indicatest to return domains that are exclusively on the given database.
databasesThis required parameter is a list of pw::DatabaseEntity objects.

Returns

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

Example

This example shows how to get a list of constrained unstructured domains from a given quilt and shell.  $shell(1) and $qlt(1) are referencing an existing shell and quilt.

Code

set doms [pw::DomainUnstructured getDomainsFromDatabase [list $qlt(1) $shell(1)]]

Static Defaults

Algorithm (Default)

pw::DomainUnstructured get/setDefault Algorithm algorithm

This default is the meshing algorithm of an unstructured domain when it is created.

Type

A string with options < Delaunay | AdvancingFront | AdvancingFrontOrtho | ThinSurfaceInterpolation >.

Default

The default value of this attribute is Delaunay.

See Also

Algorithm

Example

This example shows how to set and get the default algorithm for unstructured domains created within a script.

Code

pw::DomainUnstructured setDefault Algorithm AdvancingFront
puts [pw::DomainUnstructured getDefault Algorithm]

Output

AdvancingFront

IsoCellType (Default)

pw::DomainUnstructured get/setDefault IsoCellType type

This default attribute controls what type of cells a domain will contain in the isotropic region (all cells if T-Rex is not applied) after generation.

Type

A string with one of the values < Triangle | TriangleQuad >.  Triangle indicates that generated cells in the isotropic region (all cells when T-Rex is not applied) will be stored as triangles upon completion.  TriangleQuad indicates that isotropic cells will be stored in a quad-dominant fashion, generally containing both triangle and quadrilateral cell types.

Default

The default value of this attribute is Triangle.

See Also

IsoCellType

Example

This example shows how to set and get the default option to store generated cells as triangles for unstructured domains created within a script.

Code

pw::DomainUnstructured setDefault IsoCellType Triangle
puts [pw::DomainUnstructured getDefault IsoCellType]

Output

Triangle

BoundaryDecay (Default)

pw::DomainUnstructured get/setDefault BoundaryDecay value

This default is the boundary decay factor of an unstructured domain when it is created.  This default is being replaced by pw::GridEntity.SizeFieldDecay and will be deprecated soon.  Getting or setting this default is the same as getting or setting the pw::GridEntity.SizeFieldDecay default.

Higher values of this attribute indicate a slower progression of cell sizes toward the domain inteior (more, smaller cells).  Lower values indicate a more rapid progression (less, larger cells)

Type

A float in the range [0, 1].

Default

The default value of this attribute is 0.5.

Example

This example shows how to set and get the default boundary decay factor for unstructured domains created within a script.

Code

pw::DomainUnstructured setDefault BoundaryDecay 0.7
puts [pw::DomainUnstructured getDefault BoundaryDecay]

Output

0.7

TRexCellType (Default)

pw::DomainUnstructured get/setDefault TRexCellType type

This default attribute contains what type of cells a T-Rex generated domain will contain after generation.

Type

A string with the options < Triangle | TriangleQuad >.  Triangle indicates that generated cells in the anisotropic (T-Rex) region will be stored as triangles upon completion.  TriangleQuad indicates that anisotropic cells will be stored in a quad-dominant fashion, generally containing both triangle and quadrilateral cell types.

Default

The default value of this attribute is Triangle.

See Also

TRexCellType

Example

This example shows how to set and get the default option to store T-Rex generated cells as triangles for unstructured domains created within a script.

Code

pw::DomainUnstructured setDefault TRexCellType Triangle
puts [pw::DomainUnstructured getDefault TRexCellType]

Output

Triangle

EdgeMaximumLength (Default)

pw::DomainUnstructured get/setDefault EdgeMaximumLength value

This default is the maximum edge length of an unstructured domain when it is created.

Type

A string with the options < Automatic | Boundary | TRexBoundary | NotApplied > or a float in the range (0, infinity).

Default

The default value of this attribute is Automatic.

See Also

EdgeMaximumLength

Example

This example shows how to set and get the default maximum edge length for unstructured domains created within a script.

Code

pw::DomainUnstructured setDefault EdgeMaximumLength 50
puts [pw::DomainUnstructured getDefault EdgeMaximumLength]

Output

50.0

EdgeMinimumLength (Default)

pw::DomainUnstructured get/setDefault EdgeMinimumLength value

This default is the minimum edge length of an unstructured domain when it is created.

Type

A string with the options < Automatic | Boundary | TRexBoundary | NotApplied > or a float in the range (0, infinity).

Default

The default value of this attribute is Automatic.

See Also

EdgeMinimumLength

Example

This example shows how to set and get the default minimum edge length for unstructured domains created within a script.

Code

pw::DomainUnstructured setDefault EdgeMinimumLength 10
puts [pw::DomainUnstructured getDefault EdgeMinimumLength]

Output

10.0

NormalMaximumDeviation (Default)

pw::DomainUnstructured get/setDefault NormalMaximumDeviation value

This default is the maximum angle of normal deviation of an unstructured domain when it is created.

Type

A float in the range [0, 180).  0 means do not restrict normal deviation.

Default

The default value of this attribute is 0.

See Also

NormalMaximumDeviation

Example

This example shows how to set and get the default maximum angle of normal deviation for unstructured domains created within a script.

Code

pw::DomainUnstructured setDefault NormalMaximumDeviation 15
puts [pw::DomainUnstructured getDefault NormalMaximumDeviation]

Output

15.0

SurfaceMaximumDeviation (Default)

pw::DomainUnstructured get/setDefault SurfaceMaximumDeviation value

This default is the maximum distance of geometric deviation of an unstructured domain when it is created.

Type

A float in the range [0, infinity).  0 means do not restrict surface deviation.

Default

The default value of this attribute is 0.

See Also

SurfaceMaximumDeviation

Example

This example shows how to set and get the default maximum distance of geometric deviation for unstructured domains created within a script.

Code

pw::DomainUnstructured setDefault SurfaceMaximumDeviation .001
puts [pw::DomainUnstructured getDefault SurfaceMaximumDeviation]

Output

0.001

QuadMaximumIncludedAngle (Default)

pw::DomainUnstructured get/setDefault QuadMaximumIncludedAngle value

This default is the maximum included angle in degrees at a corner of a quad in an unstructured domain when it is created.

Type

A float in the range (90, 180).

Default

The default value of this attribute is 150.0.

See Also

QuadMaximumIncludedAngle

Example

This example shows how to set and get the default quad maximum included angle for unstructured domains created within a script.

Code

pw::DomainUnstructured setDefault QuadMaximumIncludedAngle 140.0
puts [pw::DomainUnstructured getDefault QuadMaximumIncludedAngle]

Output

140.0

QuadMaximumWarpAngle (Default)

pw::DomainUnstructured get/setDefault QuadMaximumWarpAngle value

This default is the maximum warp (dihedral) angle in degrees between the two tris comprising a quad in an unstructured domain when it is created.

Type

A float in the range (0, 90).

Default

The default value of this attribute is 30.0.

See Also

QuadMaximumWarpAngle

Example

This example shows how to set and get the default maximum quad warp angle for unstructured domains created within a script.

Code

pw::DomainUnstructured setDefault QuadMaximumWarpAngle 60.0
puts [pw::DomainUnstructured getDefault QuadMaximumWarpAngle]

Output

60.0

TRexMaximumLayers (Default)

pw::DomainUnstructured get/setDefault TRexMaximumLayers layers

This default is the maximum number of T-Rex layers of an unstructured domain when it is created.

Type

An integer in the range [0, infinity), where 0 means that there should be no TRex layers.

Default

The default value of this attribute is 0.

See Also

TRexMaximumLayers

TRexFullLayers (Default)

pw::DomainUnstructured get/setDefault TRexFullLayers layers

This default is the minimum number of fully structured TRex layers of the domain.

Type

An integer in the range [0, infinity), where 0 means that there should be no minimum fully structured TRex layers.

Default

The default value of this attribute is 0.

See Also

TRexFullLayers

TRexGrowthRate (Default)

pw::DomainUnstructured get/setDefault TRexGrowthRate growth_rate

This default is the growth rate of TRex layers of an unstructured domain when it is created.

Type

A float in the range [1.0, infinity).

Default

The default value of this attribute is 1.2.

See Also

TRexGrowthRate

TRexIsotropicHeight (Default)

pw::DomainUnstructured get/setDefault TRexIsotropicHeight value

This default is the scale factor to be applied to the local isotropic height at which T-Rex stops layer growth via deformation.

When set to 1.0, anisotropic cell growth continues at each vertex until one of the tets below the vertex reaches its isotropic height.  When a value other that 1.0 is selected, the isotropic height criteria is multiplied by the value, meaning that it is possible to stop vertex advancement prior (value < 1) or beyond (value> 1) true isotropy.

Type

A float in the range (0.0, infinity).

Default

The default value of this attribute is 1.0.

See Also

TRexIsotropicHeight

TRexPushAttributes (Default)

pw::DomainUnstructured get/setDefault TRexPushAttributes push

This default sets the option for pushing TRex attributes onto the connectors of domain when a new domain is created.

Type

A boolean, where true means that TRex attributes (initial spacing and growth rate or schedule) are pushed down onto the connectors.

Default

The default value of this attribute is false.

See Also

TRexPushAttributes

TRexSpacingSmoothing (Default)

pw::DomainUnstructured get/setDefault TRexSpacingSmoothing smooth

This default is the number of smoothing sweeps to apply to the initial spacing values of TRex layers of the domain.

Type

An integer in the range [0, infinity), where 0 means no smoothing is applied to the initial spacing values.

Default

The default value of this attribute is 10.

See Also

TRexSpacingSmoothing

TRexSpacingRelaxationFactor (Default)

pw::DomainUnstructured get/setDefault TRexSpacingRelaxationFactor factor

This default is the relaxation factor of smoothing sweeps to apply to the intial spacing values of TRex layers for the domain when it is created.

Type

A float in the range [0.0, 1.0), where 0 means no smoothing is applied to the initial spacing values.

Default

The default value of this attribute is 0.7.

See Also

TRexSpacingRelaxationFactor

Static Attributes

InitializeInterior

pw::DomainUnstructured get/setInitializeInterior init

This attribute indicates, if true the interior points are inserted when the domain is initialized or re-initialized; if false interior points will not be automatically generated.

Type

A boolean where true indicates that the interior should be initialized, and false indicates that only boundary triangulation should be done.

Default

The default value of this attribute is true.

Example

This example shows how to set and get the InitializeInterior attribute for unstructured domains created within a script.

Code

pw::DomainUnstructured setInitializeInterior false
puts [pw::DomainUnstructured getInitializeInterior]

Output

0

Instance Actions

getPerimeterPointCount

$dom getPerimeterPointCount

This action gets the number of grid points on the perimeter of the entity.  The first points of an unstructured domain are the perimeter points.

Parameters

none

Returns

This action returns the number of perimeter points.

Example

This example shows how to get the number of perimeter points for an unstructured domain.  $dom(1) is referencing an existing domain.

Code

puts [$dom(1) getPerimeterPointCount]

Output

40

getStructuredLink

$dom getStructuredLink

This action gets the underlying structured domain this domain is linked to.  A link is created via the pw::DomainStructured.triangulate command.

Parameters

none

Returns

This action returns a pw::DomainStructured object if the domain is linked.  If the domain is not linked to a structured domain, the result will be an empty string.

Example

This example shows how to create an unstructured domain linked to a structured domain, and how to retrieve the structured domain from the unstructured domain.

Code

puts "Creating an unstructured domain linked to [$sdom getName]"
set udom [$sdom triangulate -link]
set ldom [$udom getStructuredLink]
if {[string length $ldom] > 0} {
    puts "[$udom getName] is linked to [$ldom getName]"
} else {
    puts "[$udom getName] is not linked to a structured domain"
}

Output

Creating an unstructured domain linked to dom-1
dom-2 is linked to dom-1

getTRexCellCount

$dom getTRexCellCount

This action gets the number of T-Rex cells in the domain generated by the last run of the solver.  Note that there is no distinction between non-recombinable and recombinable anisotropic cells.

Parameters

none

Returns

This action returns the number of anisotropic (T-Rex) cells.

Example

This example shows how to get the number of T-Rex cells for an unstructured domain.  $dom(1) is referencing an existing domain.

Code

puts [$dom(1) getTRexCellCount]

Output

82

getTRexTriCellCount

$dom getTRexTriCellCount

This action gets the number of T-Rex triangular cells in the domain generated by the last run of the solver.  Note that there is no distinction between non-recombinable and recombinable anisotropic cells.

Parameters

none

Returns

This action returns the number of anisotropic (T-Rex) cells.

Example

This example shows how to get the number of T-Rex cells for an unstructured domain.  $dom(1) is referencing an existing domain.

Code

puts [$dom(1) getTRexTriCellCount]

Output

82

getTRexQuadCellCount

$dom getTRexQuadCellCount

This action gets the number of T-Rex quadrilateral cells in the domain generated by the last run of the solver.  Note that there is no distinction between non-recombinable and recombinable anisotropic cells.

Parameters

none

Returns

This action returns the number of anisotropic (T-Rex) cells.

Example

This example shows how to get the number of T-Rex cells for an unstructured domain.  $dom(1) is referencing an existing domain.

Code

puts [$dom(1) getTRexQuadCellCount]

Output

82

getTRexFullLayerCount

$dom getTRexFullLayerCount

This action gets the number of T-Rex full layers in the domain generated by the last run of the solver.  This may be different than the user-specified amount in the solver attributes

Parameters

none

Returns

This action returns the number of T-Rex full layers.

getTRexTotalLayerCount

$dom getTRexTotalLayerCount

This action gets the number of T-Rex total layers in the domain generated by the last run of the solver.  This may be different than the user-specified amount in the solver attributes

Parameters

none

Returns

This action returns the number of T-Rex total layers.

getTRexMatchConnectorCount

$dom getTRexMatchConnectorCount ?-nodeCount nodeCountVar?

This action gets the number of match connectors emanating from the adjacent grid/wall BC conditions within this domain.

Parameters

-nodeCount nodeCountVarThis optional parameter is a variable name to receive the count of nodes where connectors emanate from the adjacent grid/wall BC conditions within this domain.  This can be greater than the number of connectors when both ends of a connector touch an adjacent grid/wall BC condition.

Returns

This action returns the number of connectors.

getTRexMatchInitialSpacing

$dom getTRexMatchInitialSpacing

This action gets the minimum, average, and maximum initial spacing of the match connectors connected to the adj grid/wall BCs of this domain.

Parameters

none

Returns

This action returns a vector of the minimum, average, and maximum of the initial spacings.  If there are no match connectors, 0.0 will be returned for each of these values

Example

This example shows how to get the initial spacing on match connectors from an unstructured domain.  $dom(1) is referencing an existing domain.

Code

puts [$dom(1) getTRexMatchInitialSpacing]

Output

[0.0100 0.0123 0.0200]

getTRexMatchGrowthRate

$dom getTRexMatchGrowthRate

This action gets the minimum, average, and maximum growth rates of the match connectors connected to the adj grid/wall BCs of this domain.

Parameters

none

Returns

This action returns a vector of the minimum, average, and maximum of the growth rates.  If there are no match connectors, 0.0 will be returned for each of these values

Example

This example shows how to get the average growth rate on match connectors from an unstructured domain.  $dom(1) is referencing an existing domain.

Code

puts [$dom(1) getTRexMatchGrowthRate]

Output

[1.0100 1.0123 1.0200]

getTRexMatchLayerCount

$dom getTRexMatchLayerCount

This action gets the minimum, average, and maximum layer count of the match connectors connected to the adj grid/wall BCs of this domain.

Parameters

none

Returns

This action returns a vector of the minimum, average, and maximum of the layer counts.  If there are no match connectors, 0.0 will be returned for each of these values

Example

This example shows how to get the average initial spacing on match connectors from an unstructured domain.  $dom(1) is referencing an existing domain.

Code

puts [$dom(1) getTRexMatchLayerCount]

Output

[10.0 20.0 30.0]

removeEdges

$dom removeEdges ?-preserve?

This action removes all of the domain’s edges.

Parameters

-preserveIf this optional flag is specified, the edges are not deleted after being removed.  The default behavior is to delete the edges (but not the connectors).

Returns

This action returns nothing.

project

$dom project ?-type proj_type? ?-direction direction? ?-center center? ?-axis point normal? ?-interior? ?dbentities?

This action projects this domain onto one or more database entities.

Parameters

-type proj_typeThis optional parameter is the string projection type to perform with options < ClosestPoint | Linear | SphericalIn | SphericalOut | CylindricalIn | CylindricalOut >.
-direction directionThis optional parameter is the projection vector for linear projection.  The default is determined by the entity and can be queried using pw::Domain.getDefaultProjectDirection.
-center centerThis optional parameter is the center point vector for spherical projection.  The default is (0, 0, 0).
-axis point normalThis optional parameter is the axis defined by a point vector and normal vector used by cylindrical projection.  The default point is (0, 0, 0) and the default normal is (1, 0, 0).
-interiorIf this optional flag is present, only the interior of the entities are projected.
dbentitiesThis optional parameter is a list of surface-like pw::DatabaseEntity to project onto.  If none are given, project to any currently enabled, visible database surface-like entities.

Returns

This action returns nothing.

See Also

pw::Domain.getDefaultProjectDirection

Example

This example shows how to project a domain linearly along the Z axis onto the given quilt.  $dom(1) and $qlt(1) are referencing an existing domain and quilt.

Code

$dom(1) project -type Linear -direction "0 0 1" $qlt(1)

join

$dom join domain

This action joins the given domain to this domain; for joining multiple domains construct a pw::FaceUnstructured object.

Parameters

domainThis required parameter is the pw::Domain object to join to this domain.

Returns

This action returns nothing.

Example

This example shows how to join two unstructured domains.  $dom(1) and $dom(2) are referencing existing domains.

Code

$dom(1) join $dom(2)

triangulate

$dom triangulate ?method?

This action creates a new unstructured domain by triangulating the quads in this domain.  The new domain is a copy whose attributes are the same as this domain, with the CellType and TRexCellType solver attributes set to TriangleQuad.  It is an error to triangulate an unstructured domain that does not contain quad elements.

Parameters

methodThis optional parameter is the triangulation method with options < BestFit | Initialized >.  The default is BestFit.

Returns

This action returns a pw::DomainUnstructured object.

flipOrientation

$dom flipOrientation

This action flips the orientation of this domain.  A domain used in a baffle face can not be flipped.

Parameters

none

Returns

This action returns nothing.

Example

This example shows how to flip the orientation of an unstructured domain.  $dom(1) is referencing an existing domain.

Code

$dom(1) flipOrientation

alignOrientation

$dom alignOrientation domains

This action aligns the normal orientation of the given domains with this domain.  If any domains in the given list are not topologically connected to this domain, they will be ignored.  An error is raised if a domain in a baffle face is specified in the list of domains.

Parameters

domainsThis required parameter is a list of pw::DomainUnstructured objects to align orientations.

Returns

This action returns nothing.

Example

This example shows how to align the orientation of several unstructured domains with $dom(1).  $dom(1), $dom(2) and $dom(3) are referencing existing domains.

Code

$dom(1) alignOrientation [list $dom(2) $dom(3)]

getSolvedAlgorithm

$dom getSolvedAlgorithm

This action gets the algorithm that was used when initializing the interior of the domain.

Parameters

none

Returns

This action returns a string with possible values < Delaunay | AdvancingFront | AdvancingFrontOrtho | ThinSurfaceInterpolation | NotSolved >.  See the unstructured solver attribute Algorithm for more information on the different algorithms.  NotSolved indicates that the domain is uninitialized.

Example

This example shows how to get the solved algoritm.  $dom(1) is referencing an existing domain.

Code

$dom(1) getSolvedAlgorithm
puts [$dom(1) getSolvedAlgorithm]

Output

Delaunay

getSurfaceEdgeMinimumLength

$dom getSurfaceEdgeMinimumLength

This action gets the calculated minimum surface edge length based on triangluar area of the cells.

Parameters

none

Returns

This action returns the minimum surface edge length.

Example

This example shows how to get the minimum surface edge length for an unstructured domain.  $dom(1) is referencing an existing domain.

Code

puts [$dom(1) getSurfaceEdgeMinimumLength]

Output

1.0344963221899095

getSurfaceEdgeMaximumLength

$dom getSurfaceEdgeMaximumLength

This action gets the calculated maximum surface edge length based on triangluar area of the cells.

Parameters

none

Returns

This action returns the maximum surface edge length.

Example

This example shows how to get the maximum surface edge length for an unstructured domain.  $dom(1) is referencing an existing domain.

Code

puts [$dom(1) getSurfaceEdgeMaximumLength]

Output

2.013040874595685

getBoundaryEdgeMinimumLength

$dom getBoundaryEdgeMinimumLength

This action gets the minimum boundary edge length.

Parameters

none

Returns

This action returns the minimum boundary edge length.

Example

This example shows how to get the minimum boundary edge length for an unstructured domain.  $dom(1) is referencing an existing domain.

Code

puts [$dom(1) getBoundaryEdgeMinimumLength]

Output

1.4729734060253794

getBoundaryEdgeMaximumLength

$dom getBoundaryEdgeMaximumLength

This action gets the maximum boundary edge length.

Parameters

none

Returns

This action returns the maximum boundary edge length.

Example

This example shows how to get the maximum boundary edge length for an unstructured domain.  $dom(1) is referencing an existing domain.

Code

puts [$dom(1) getBoundaryEdgeMaximumLength]

Output

1.4907229247565557

getUnstructuredSolverAttribute

$dom getUnstructuredSolverAttribute att_name ?value_type?

This action gets the named unstructured solver attribute.

Parameters

att_nameThis required parameter is the name string of the attribute to get.
value_typeThis optional parameter is the type string of value to get, one of < Actual | Default >.  The default is Actual.

Returns

This action returns the actual or default value of the attribute.

Example

This example shows how to set and get the default and actual values of the unstructured solver attribute: normal maximum deviation.  $dom(1) is referencing an existing domain.

Code

pw::DomainUnstructured setDefault NormalMaximumDeviation 10.0
$dom(1) setUnstructuredSolverAttribute NormalMaximumDeviation 15.0
puts [$dom(1) getUnstructuredSolverAttribute \
    NormalMaximumDeviation Actual]
puts [$dom(1) getUnstructuredSolverAttribute \
    NormalMaximumDeviation Default]

Output

15.0
10.0

See Also

setUnstructuredSolverAttribute, Unstructured Solver Attributes

setUnstructuredSolverAttribute

$dom setUnstructuredSolverAttribute att_name att_value

This action sets the named unstructured solver attribute.

Parameters

att_nameThis required parameter is the name string of the attribute to set.
att_valueThis required parameter is the string, integer or float value of the attribute to set.

Returns

This action returns nothing.

Example

This example shows how to set the unstructured solver attribute: maximum edge length.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute EdgeMaximumLength Boundary

See Also

getUnstructuredSolverAttribute, Unstructured Solver Attributes

Unstructured Solver Attributes

Algorithm

$dom get/setUnstructuredSolverAttribute Algorithm < Delaunay | AdvancingFront | AdvancingFrontOrtho | ThinSurfaceInterpolation >.

This attribute is the algorithm to use when initializing the interior of the domain.

Type

A string with options < Delaunay | AdvancingFront | AdvancingFrontOrtho | ThinSurfaceInterpolation >.  Algorithms are differentiated in the manner in which they place interior grid points.  The Delaunay method inserts points at the circumsphere centroid of existing triangles, later smoothing the position to improve cell quality.  The AdvancingFront method inserts points adjacent to the (advancing) boundary at positions that form nearly equilateral triangles with the front edge.  The AdvancingFrontOrtho method inserts grid point at positions normal to the front edge, generally resulting in two right angle triangles.  The ThinSurfaceInterpolation algorithm uses a psuedo-structured approach to generating interior points and is best suited for roughly quadrilateral domains with similar dimensions on opposing sides.

Default

The default value of this attribute is set using the current value of the default Algorithm (Default).

See Also

Algorithm (Default)

Example

This example shows how to set and get the unstructured solver Algorithm attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute Algorithm Delaunay
puts [$dom(1) getUnstructuredSolverAttribute Algorithm]

Output

Delaunay

IsoCellType

$dom get/setUnstructuredSolverAttribute IsoCellType type

This attribute controls what type of cells a domain will contain in the isotropic region (all cells if T-Rex is not applied) after generation.

Type

A string with one of the values < Triangle | TriangleQuad >.  Triangle indicates that generated cells in the isotropic region (all cells when T-Rex is not applied) will be stored as triangles upon completion.  TriangleQuad indicates that isotropic cells will be stored in a quad-dominant fashion, generally containing both triangle and quad cell types.

Default

The default value of this attribute is set using the current value of the default IsoCellType (Default).

See Also

IsoCellType (Default)

Example

This example shows how to set and get the unstructured solver IsoCellType attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute IsoCellType TriangleQuad
puts [$dom(1) getUnstructuredSolverAttribute IsoCellType]

Output

TriangleQuad

ShapeConstraint

$dom get/setUnstructuredSolverAttribute ShapeConstraint < constraint | db_list >

This attribute is the shape constraint of the unstructured domain.

Type

A string with one of the values < Free | Database > or an explicit list of pw::DatabaseEntity objects.  Database indicates that the constraint(s) will be derived from the domain’s pw::Edges (pw::Connectors).

Default

The default value of this attribute is Free or Database, depending on the connectors used in constructing this domain.

Example

This example shows how to set and get the unstructured solver ShapeConstraint attributes.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute ShapeConstraint Free
puts [$dom(1) getUnstructuredSolverAttribute ShapeConstraint]

Output

Free

ShapeProjection

$dom get/setUnstructuredSolverAttribute ShapeProjection < method | normal >

This attribute is the shape projection method when constrained to database entities.

Type

A string with options < Closest | Linear > or an explicit normal vector for linear projection.  When Linear is specified the projection uses the domain’s default projection direction, which can be queried with pw::Domain.getDefaultProjectDirection.

Default

The default value of this attribute is Closest.

See Also

pw::Domain.getDefaultProjectDirection

Example

This example shows how to set and get the unstructured solver ShapeProjection attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute ShapeProjection Linear
puts [$dom(1) getUnstructuredSolverAttribute ShapeProjection]

Output

Linear

EdgeMaximumLength

$dom get/setUnstructuredSolverAttribute EdgeMaximumLength value

This attribute is the maximum edge length of the domain.

Type

A string with options < Automatic | Boundary | TRexBoundary | NotApplied > or a float in the range (0, infinity).

Default

The default value of this attribute is set using the current value of the default EdgeMaximumLength (Default).

See Also

EdgeMaximumLength (Default)

Example

This example shows how to set and get the unstructured solver EdgeMaximumLength attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute EdgeMaximumLength 2.5
puts [$dom(1) getUnstructuredSolverAttribute EdgeMaximumLength]

Output

2.5

EdgeMinimumLength

$dom get/setUnstructuredSolverAttribute EdgeMinimumLength value

This attribute is the minimum edge length of the domain.

Type

A string with options < Automatic | Boundary | TRexBoundary | NotApplied > or a float in the range (0, infinity).

Default

The default value of this attribute is set using the current value of the default EdgeMinimumLength (Default).

See Also

EdgeMinimumLength (Default)

Example

This example shows how to set and get the unstructured solver EdgeMinimumLength attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute EdgeMinimumLength Boundary
puts [$dom(1) getUnstructuredSolverAttribute EdgeMinimumLength]

Output

Boundary

NormalMaximumDeviation

$dom get/setUnstructuredSolverAttribute NormalMaximumDeviation value

This attribute is the maximum angle of normal deviation of the domain.

Type

A float in the range [0, 180), where 0 means do not restrict normal deviation.

Default

The default value of this attribute is set using the current value of the default NormalMaximumDeviation (Default).

See Also

NormalMaximumDeviation (Default)

Example

This example shows how to set and get the unstructured solver NormalMaximumDeviation attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute NormalMaximumDeviation 10
puts [$dom(1) getUnstructuredSolverAttribute NormalMaximumDeviation]

Output

10.0

SurfaceMaximumDeviation

$dom get/setUnstructuredSolverAttribute SurfaceMaximumDeviation value

This attribute is the maximum distance of geometric deviation of the domain.

Type

A float in the range [0, infinity), where 0 means do not restrict surface deviation.

Default

The default value of this attribute is set using the current value of the default SurfaceMaximumDeviation (Default).

See Also

SurfaceMaximumDeviation (Default)

Example

This example shows how to set and get the unstructured solver SurfaceMaximumDeviation attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute SurfaceMaximumDeviation .01
puts [$dom(1) getUnstructuredSolverAttribute \
    SurfaceMaximumDeviation]

Output

0.01

QuadMaximumIncludedAngle

$dom get/setUnstructuredSolverAttribute QuadMaximumIncludedAngle value

This attribute is the maximum included angle in degrees at a corner of a quad in the domain.

Type

A float in the range (90, 180).

Default

The default value of this attribute is set using the current value of the default QuadMaximumIncludedAngle (Default), typically 174.0 degrees.

See Also

QuadMaximumIncludedAngle (Default)

Example

This example shows how to set and get the unstructured solver QuadMaximumIncludedAngle attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute QuadMaximumIncludedAngle 160
puts [$dom(1) getUnstructuredSolverAttribute \
    QuadMaximumIncludedAngle]

Output

160.0

QuadMaximumWarpAngle

$dom get/setUnstructuredSolverAttribute QuadMaximumWarpAngle value

This attribute is the maximum warp (dihedral) angle in degrees between the two tris comprising a quad in the domain.

Type

A float in the range (0, 90).

Default

The default value of this attribute is set using the current value of the default QuadMaximumWarpAngle (Default).

See Also

QuadMaximumWarpAngle (Default)

Example

This example shows how to set and get the unstructured solver QuadMaximumWarpAngle attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute QuadMaximumWarpAngle 30
puts [$dom(1) getUnstructuredSolverAttribute QuadMaximumWarpAngle]

Output

30.0

SwapCellsWithNoInteriorPoints

$dom get/setUnstructuredSolverAttribute SwapCellsWithNoInteriorPoints value

This attribute is the flag which controls whether triangle cells should swap diagonals with a neighboring triangle cell if it contains no interior points.  If this is set to true, the unstructured solver will attempt to swap diagonals of triangle cells in order to ensure at least one interior point, although this is not guaranteed for domains with a coarse interior or for cells without a neighboring triangle that has at least one interior point.

Type

A boolean, where true means to swap cell edges for triangle cells that have no interior points.

Default

The default value of this attribute is false.

AlignCellsToSources

$dom get/setUnstructuredSolverAttribute AlignCellsToSources value

This attribute is the flag which controls whether cells should be aligned to source curves.  This only has an effect when the domain is constrained to database entities, and those same database entities have source curves constrained to them.  Also, this only affects the isotropic cells and not the TRex cells.

Type

A boolean, where true means to align cell edges to source curves.

Default

The default value of this attribute is true.

TRexMaximumLayers

$dom get/setUnstructuredSolverAttribute TRexMaximumLayers value

This attribute is the maximum number of TRex layers of the domain.

Type

An integer in the range [0, infinity), where 0 means do not grow TRex layers.

Default

The default value of this attribute is 0.

See Also

TRexMaximumLayers (Default)

Example

This example shows how to set and get the unstructured solver TRexMaximumLayers attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute TRexMaximumLayers 20
puts [$dom(1) getUnstructuredSolverAttribute TRexMaximumLayers]

Output

20

TRexFullLayers

$dom get/setUnstructuredSolverAttribute TRexFullLayers value

This attribute is the minimum number of fully structured TRex layers of the domain.

Type

An integer in the range [0, infinity), where 0 means there is no minimum number of fully structured TRex layers.

Default

The default value of this attribute is 0.

See Also

TRexFullLayers (Default)

Example

This example shows how to set and get the unstructured solver TRexFullLayers attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute TRexFullLayers 10
puts [$dom(1) getUnstructuredSolverAttribute TRexFullLayers]

Output

10

TRexGrowthRate

$dom get/setUnstructuredSolverAttribute TRexGrowthRate value

This attribute is the growth rate of TRex layers for the domain.

Type

A float in the range [1.0, infinity).

Default

The default value of this attribute is 1.2.

See Also

TRexGrowthRate (Default)

Example

This example shows how to set and get the unstructured solver TRexGrowthRate $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute TRexGrowthRate 1.1
puts [$dom(1) getUnstructuredSolverAttribute TRexGrowthRate]

Output

1.1

TRexGrowthProfile

$domain get/setUnstructuredSolverAttribute TRexGrowthProfile profile

This attribute specifies the growth rate for each anisotropic layer.

Type

A list of float values indicating the growth rate to apply at each layer in the anisotropic region of the domain to compute the height of the next layer.  Each float in the list must be greater than zero.  If this attribute is specified as a non-empty list, the TRexGrowthRate attribute is ignored.  If the length of this list is less than the prescribed number of layers for the domain, the last element is used as the growth rate for all subsequent layers.

Default

The default value of this attribute is no growth profile, indicating that the scalar TRexGrowthRate value be used for all layer height calculations.

TRexIsotropicHeight

$dom get/setUnstructuredSolverAttribute TRexIsotropicHeight value

This attribute specifies the scale factor to be applied to the local isotropic height at which T-Rex stops layer growth via deformation.

When set to 1.0, anisotropic cell growth continues at each vertex until one of the tets below the vertex reaches its isotropic height.  When a value other that 1.0 is selected, the isotropic height criteria is multiplied by the value, meaning that it is possible to stop vertex advancement prior (value < 1) or beyond (value> 1) true isotropy.

Type

A float in the range (0.0, infinity).

Default

The default value of this attribute is 1.0.

See Also

TRexIsotropicHeight (Default)

Example

This example shows how to set and get the unstructured solver TRexIsotropicHeight attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute TRexIsotropicHeight 1.1
puts [$dom(1) getUnstructuredSolverAttribute TRexIsotropicHeight]

Output

1.1

TRexPushAttributes

$dom get/setUnstructuredSolverAttribute TRexPushAttributes value

This attribute is the flag for pushing TRex attributes onto the connectors of this domain.

Type

A boolean, where true means that TRex attributes (initial spacing and growth rate or profile) are pushed down onto the connectors.

Default

The default value of this attribute is false.

See Also

TRexPushAttributes (Default)

Example

This example shows how to set and get the unstructured solver TRexPushAttributes attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute TRexPushAttributes true
puts [$dom(1) getUnstructuredSolverAttribute TRexPushAttributes]

Output

1

TRexSpacingSmoothing

$dom get/setUnstructuredSolverAttribute TRexSpacingSmoothing value

This attribute is the number of smoothing sweeps to apply to the initial spacing values of TRex layers of the domain.

Type

An integer in the range [0, infinity), where 0 means no smoothing is applied to the initial spacing values.

Default

The default value of this attribute is 3.

See Also

TRexSpacingSmoothing (Default)

Example

This example shows how to set and get the unstructured solver TRexSpacingSmoothing attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute TRexSpacingSmoothing 0
puts [$dom(1) getUnstructuredSolverAttribute TRexSpacingSmoothing]

Output

0

TRexSpacingRelaxationFactor

$dom get/setUnstructuredSolverAttribute TRexSpacingRelaxationFactor value

This attribute is the relaxation factor of smoothing sweeps to apply to the intial spacing values of TRex layers for the domain.

Type

A float in the range [0.0, 1.0), where 0 means no smoothing is applied to the initial spacing values.

Default

The default value of this attribute is 0.7.

See Also

TRexSpacingRelaxationFactor (Default)

Example

This example shows how to set and get the unstructured solver TRexSpacingRelaxationFactor attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute \
    TRexSpacingRelaxationFactor .5
puts [$dom(1) getUnstructuredSolverAttribute \
    TRexSpacingRelaxationFactor]

Output

0.5

TRexCellType

$dom get/setUnstructuredSolverAttribute TRexCellType value

This attribute controls what type of cells a T-Rex generated domain will contain in the anisotropic region after generation.

Type

A string with the options < Triangle | TriangleQuad >.  Triangle indicates that generated cells in the anisotropic (T-Rex) region will be stored as triangles upon completion.  TriangleQuad indicates that anisotropic cells will be stored in a quad-dominant fashion, generally containing both triangle and quad cell types.

Default

The default value of this attribute is set using the current value of the default TRexCellType.

See Also

TRexCellType (Default)

Example

This example shows how to set and get the unstructured solver TRexCellType attribute.  $dom(1) is referencing an existing domain.

Code

$dom(1) setUnstructuredSolverAttribute TRexCellType TriangleQuad
puts [$dom(1) getUnstructuredSolverAttribute TRexCellType]

Output

TriangleQuad
pw::DomainUnstructured create
This action creates a new unstructured domain object.
pw::DomainUnstructured createOnDatabase ?-merge tolerance? ?-splitConnectors split_angle? ?-joinConnectors join_con_angle? ?-joinDomains join_dom_angle? ?-parametricConnectors mode? ?-reject rejectVar? entities
This creates new unstructured domain objects on the given database entities.
pw::DomainUnstructured createFromConnectors ?-manifold? ?-solid? ?-reject rejectVar? connectors
This action creates new unstructured domain objects from the given connectors.
pw::DomainUnstructured createFromPoints ?-triangles triCellArray? ?-quadrilaterals quadCellArray? ?-splitAngle angle? ?-splitMultiloop? points
This action, given a list of point values (XYZ or database- constrained) and at least one cell-type array, creates a new unstructured domain.
A point is a position either in model space or database parameter space.
pw::DomainUnstructured join ?-reject rejectVar? domains
This action joins as many of the given unstructured domains together as possible.
pw::DomainUnstructured qualifyEdges edges
This action checks if a list of edges would be valid for defining an unstructured domain.
pw::DomainUnstructured getAutoCompleteHint edge
This action gets a list of connectors that will close an edge to be used for an unstructured domain.
pw::DomainUnstructured getDomainsFromDatabase ?-exclusive? database
This action gets a list of domains that are constrained to the given databases.
pw::DomainUnstructured get/setDefault Algorithm algorithm
This default is the meshing algorithm of an unstructured domain when it is created.
pw::DomainUnstructured get/setDefault IsoCellType type
This default attribute controls what type of cells a domain will contain in the isotropic region (all cells if T-Rex is not applied) after generation.
pw::DomainUnstructured get/setDefault BoundaryDecay value
This default is the boundary decay factor of an unstructured domain when it is created.
pw::DomainUnstructured get/setDefault TRexCellType type
This default attribute contains what type of cells a T-Rex generated domain will contain after generation.
pw::DomainUnstructured get/setDefault EdgeMaximumLength value
This default is the maximum edge length of an unstructured domain when it is created.
pw::DomainUnstructured get/setDefault EdgeMinimumLength value
This default is the minimum edge length of an unstructured domain when it is created.
pw::DomainUnstructured get/setDefault NormalMaximumDeviation value
This default is the maximum angle of normal deviation of an unstructured domain when it is created.
pw::DomainUnstructured get/setDefault SurfaceMaximumDeviation value
This default is the maximum distance of geometric deviation of an unstructured domain when it is created.
pw::DomainUnstructured get/setDefault QuadMaximumIncludedAngle value
This default is the maximum included angle in degrees at a corner of a quad in an unstructured domain when it is created.
pw::DomainUnstructured get/setDefault QuadMaximumWarpAngle value
This default is the maximum warp (dihedral) angle in degrees between the two tris comprising a quad in an unstructured domain when it is created.
pw::DomainUnstructured get/setDefault TRexMaximumLayers layers
This default is the maximum number of T-Rex layers of an unstructured domain when it is created.
pw::DomainUnstructured get/setDefault TRexFullLayers layers
This default is the minimum number of fully structured TRex layers of the domain.
pw::DomainUnstructured get/setDefault TRexGrowthRate growth_rate
This default is the growth rate of TRex layers of an unstructured domain when it is created.
pw::DomainUnstructured get/setDefault TRexIsotropicHeight value
This default is the scale factor to be applied to the local isotropic height at which T-Rex stops layer growth via deformation.
pw::DomainUnstructured get/setDefault TRexPushAttributes push
This default sets the option for pushing TRex attributes onto the connectors of domain when a new domain is created.
pw::DomainUnstructured get/setDefault TRexSpacingSmoothing smooth
This default is the number of smoothing sweeps to apply to the initial spacing values of TRex layers of the domain.
pw::DomainUnstructured get/setDefault TRexSpacingRelaxationFactor factor
This default is the relaxation factor of smoothing sweeps to apply to the intial spacing values of TRex layers for the domain when it is created.
pw::DomainUnstructured get/setInitializeInterior init
This attribute indicates, if true the interior points are inserted when the domain is initialized or re-initialized; if false interior points will not be automatically generated.
$dom getPerimeterPointCount
This action gets the number of grid points on the perimeter of the entity.
$dom getStructuredLink
This action gets the underlying structured domain this domain is linked to.
$dom getTRexCellCount
This action gets the number of T-Rex cells in the domain generated by the last run of the solver.
$dom getTRexTriCellCount
This action gets the number of T-Rex triangular cells in the domain generated by the last run of the solver.
$dom getTRexQuadCellCount
This action gets the number of T-Rex quadrilateral cells in the domain generated by the last run of the solver.
$dom getTRexFullLayerCount
This action gets the number of T-Rex full layers in the domain generated by the last run of the solver.
$dom getTRexTotalLayerCount
This action gets the number of T-Rex total layers in the domain generated by the last run of the solver.
$dom getTRexMatchConnectorCount ?-nodeCount nodeCountVar?
This action gets the number of match connectors emanating from the adjacent grid/wall BC conditions within this domain.
$dom getTRexMatchInitialSpacing
This action gets the minimum, average, and maximum initial spacing of the match connectors connected to the adj grid/wall BCs of this domain.
$dom getTRexMatchGrowthRate
This action gets the minimum, average, and maximum growth rates of the match connectors connected to the adj grid/wall BCs of this domain.
$dom getTRexMatchLayerCount
This action gets the minimum, average, and maximum layer count of the match connectors connected to the adj grid/wall BCs of this domain.
$dom removeEdges ?-preserve?
This action removes all of the domain’s edges.
$dom project ?-type proj_type? ?-direction direction? ?-center center? ?-axis point normal? ?-interior? ?dbentities?
This action projects this domain onto one or more database entities.
An unstructured face is a collection of edge-connected pw::Domain objects that are used to build watertight boundaries of unstructured blocks.
$dom triangulate ?method?
This action creates a new unstructured domain by triangulating the quads in this domain.
$dom flipOrientation
This action flips the orientation of this domain.
$dom alignOrientation domains
This action aligns the normal orientation of the given domains with this domain.
$dom getSolvedAlgorithm
This action gets the algorithm that was used when initializing the interior of the domain.
$dom getSurfaceEdgeMinimumLength
This action gets the calculated minimum surface edge length based on triangluar area of the cells.
$dom getSurfaceEdgeMaximumLength
This action gets the calculated maximum surface edge length based on triangluar area of the cells.
$dom getBoundaryEdgeMinimumLength
This action gets the minimum boundary edge length.
$dom getBoundaryEdgeMaximumLength
This action gets the maximum boundary edge length.
$dom getUnstructuredSolverAttribute att_name ?value_type?
This action gets the named unstructured solver attribute.
$dom setUnstructuredSolverAttribute att_name att_value
This action sets the named unstructured solver attribute.
$dom get/setUnstructuredSolverAttribute Algorithm < Delaunay | AdvancingFront | AdvancingFrontOrtho | ThinSurfaceInterpolation >.
This attribute is the algorithm to use when initializing the interior of the domain.
$dom get/setUnstructuredSolverAttribute IsoCellType type
This attribute controls what type of cells a domain will contain in the isotropic region (all cells if T-Rex is not applied) after generation.
$dom get/setUnstructuredSolverAttribute ShapeConstraint < constraint | db_list >
This attribute is the shape constraint of the unstructured domain.
$dom get/setUnstructuredSolverAttribute ShapeProjection < method | normal >
This attribute is the shape projection method when constrained to database entities.
$dom get/setUnstructuredSolverAttribute EdgeMaximumLength value
This attribute is the maximum edge length of the domain.
$dom get/setUnstructuredSolverAttribute EdgeMinimumLength value
This attribute is the minimum edge length of the domain.
$dom get/setUnstructuredSolverAttribute NormalMaximumDeviation value
This attribute is the maximum angle of normal deviation of the domain.
$dom get/setUnstructuredSolverAttribute SurfaceMaximumDeviation value
This attribute is the maximum distance of geometric deviation of the domain.
$dom get/setUnstructuredSolverAttribute QuadMaximumIncludedAngle value
This attribute is the maximum included angle in degrees at a corner of a quad in the domain.
$dom get/setUnstructuredSolverAttribute QuadMaximumWarpAngle value
This attribute is the maximum warp (dihedral) angle in degrees between the two tris comprising a quad in the domain.
$dom get/setUnstructuredSolverAttribute SwapCellsWithNoInteriorPoints value
This attribute is the flag which controls whether triangle cells should swap diagonals with a neighboring triangle cell if it contains no interior points.
$dom get/setUnstructuredSolverAttribute AlignCellsToSources value
This attribute is the flag which controls whether cells should be aligned to source curves.
$dom get/setUnstructuredSolverAttribute TRexMaximumLayers value
This attribute is the maximum number of TRex layers of the domain.
$dom get/setUnstructuredSolverAttribute TRexFullLayers value
This attribute is the minimum number of fully structured TRex layers of the domain.
$dom get/setUnstructuredSolverAttribute TRexGrowthRate value
This attribute is the growth rate of TRex layers for the domain.
$domain get/setUnstructuredSolverAttribute TRexGrowthProfile profile
This attribute specifies the growth rate for each anisotropic layer.
$dom get/setUnstructuredSolverAttribute TRexIsotropicHeight value
This attribute specifies the scale factor to be applied to the local isotropic height at which T-Rex stops layer growth via deformation.
$dom get/setUnstructuredSolverAttribute TRexPushAttributes value
This attribute is the flag for pushing TRex attributes onto the connectors of this domain.
$dom get/setUnstructuredSolverAttribute TRexSpacingSmoothing value
This attribute is the number of smoothing sweeps to apply to the initial spacing values of TRex layers of the domain.
$dom get/setUnstructuredSolverAttribute TRexSpacingRelaxationFactor value
This attribute is the relaxation factor of smoothing sweeps to apply to the intial spacing values of TRex layers for the domain.
$dom get/setUnstructuredSolverAttribute TRexCellType value
This attribute controls what type of cells a T-Rex generated domain will contain in the anisotropic region after generation.
An edge is part of a domain boundary, consisting of oriented, node-connected pw::Connector objects.
Base type for all glyph types
Entity type
Base type for all grid entities.
A domain is a computationally two-dimensional grid entity, bounded by one or more pw::Edges.
An unstructured domain is a watertight collection of edge-connected surface elements (triangle, quadrilateral, etc.)
A string is an array of characters.
Base type for all database entities
A connector is a computationally one-dimensional grid entity, defined in the parameter space of one or more end-connected curve segments.
pw::Edge create
This action creates a new edge object.
$edge addConnector connector
This action adds a connector to the end of this edge.
$dom addEdge edge
This action adds an edge to the domain.
The mode base type
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
$entity get/setSizeFieldDecay decay
This attribute is the size field decay factor used as the decay when a size field is generated for this entity.
A float is a fractional number.
An integer is a whole number.
$dom triangulate ?-link? ?-unbalanced option? ?method?
This action creates an unstructured domain by triangulating this domain.
A structured domain is a computationally orthogonal surface grid bounded by exactly four edges, any of which can be degenerate in the zero dimension (pole).
A vector is a list of float values.
$dom getDefaultProjectDirection
This action gets the default projection direction for this domain.
Close