Attach

class itasca.attach.Attach
Objects of this type should not be created (instantiated) directly in Python. Use the module functions that return instances of this type.
attach_delete() → None.

Deletes an attachment.

extra(slot: int) → any.

Get the attach extra data in the given slot.

group([slot: str or int]) → str.

Get the attach group name in a given slot.

group_remove(group_name: str or int[, slot: str or int]) → bool.

Remove from the given group from all group slots of the attach. One argument of type string, giving the group name, is required. The return value is a bool which is True if the group was removed from any slot, otherwise False.

groups() → {slot: group_name}.

Get a dictionary describing which groups this attach is part of. The keys of the dictionary are the slot names and the values are the group names.

id() → int.

Get the attach id.

in_group(group_name: str or int[, slot: str or int]) → bool.

Test if the attach is part of a given group. If the optional argument slot is given, only that slot is searched. Otherwise, all group slots are searched.

master() → tuple of gridpoint objects.

This function returns a tuple of 1, 2 or 4 gridpoint objects for gridpoint, edge or face attach types.

master_face() → int or None.

Get the face index associated with this attach condition (from 0 to 5), or None if this is not a face attach.

master_zone() → Zone object or None.

Get a pointer to the master zone for face attachments. If the attachment type is not a face, the function returns None.

pos() → vec3.

Get the attach point location.

set_extra(slot: int, value: any) → None.

Set the attach extra data in the given slot.

set_group(group_name: str or int[, slot: str or int]) → None.

Set the attach group name in a given slot.

set_snap(value: bool) → None.

Det the attach point snap option. Gridpoints on opposite attached faces will maintain their position if snap is True. Snap is True by default.

set_weight_edge(weight: float) → None.

Set a value in the range 0.0 to 1.0 which describes the location of the gridpoint in the edge attach. If the attachment type is not edge, the function raises a ValueError.

set_weight_face(weight: vec3) → None.

Set the face weight components with the vector value weight. The indiviual values must be in the range 0 to 1.0 and must sum to less that 1.0. The value corresponds to the location of the gridpoints in the face with respect to the face vertices; for face attachments. The fourth quad weight can be computed by subtracting all three weights on the vector from 1.0. If the attachment is not of face type a ValueError is raised.

slave() → Gridpoint object.

Get the slave gridpoint.

snap() → bool.

Get the attach point snap option. Gridpoints on opposite attached faces will maintain their position if snap is True. Snap is True by default.

type() → str.

A value of “gridpoint”, “edge”, or “face” depending on the attach type.

valid() → bool.

Returns True if this attach is live.

weight_edge() → float or None.

Get a value in the range 0.0 to 1.0 which describes the location of the gridpoint in the edge attach. If the attachment type is not edge, the function returns None.

weight_face() → vec3.

Get a vector with all components in the range 0 to 1.0. The value corresponds to the location of the gridpoints in the face with respect to the face vertices; for face attachments. The fourth quad weight can be computed by subtracting all three weights on the vector from 1.0. If the attachment is not of face type None is returned.