Template

class itasca.clump.template.Template
Objects of this type should not be created (instantiated) directly in Python. Use the module functions that return instances of this type.
add_pebble(pebble_radius: float, pebble_position: vec[, pebble_id: int]) → TemplatePebble object.

Add a pebble to a clump template. This operation has no impact on the clump template inertial attributes. If the optional argument ID is not specified the id if the newly created pebble is set to the next available number.

clone(new_template_name: str) → Template object.

Clone this clump template. The new clump template has name new_template_name and no clumps refer to the created clump template.

delete() → None.

Delete this clump template. All clumps that referred to this clump template no longer refer to any clump template.

delete_pebble(pebble: TemplatePebbel object) → None.

Delete a TemplatePebble from this clump. This operation has no impact on the clump template inertial attributes. The clump no longer refers to a clump template. This operation will raise an exception if any clumps refer to the clump template.

id() → int.

Get the clump template id.

moi() → tensor.

Get the clump template moment of intertia. In 2D the polar moment of intertial is used so the return value is a float.

moi_prin() → vec.

Get the clump template principal moment of inertia (vector).

moi_prin_x() → float.

Get the x-component of the clump template principal moment of inertia.

moi_prin_y() → float.

Get the y-component of the clump template principal moment of inertia.

moi_prin_z() → float.

Get the z-component of the clump template principal moment of inertia.

name() → str.

Get the clump template name.

orig_pos() → vec.

Get the clump template original position (vector).

orig_pos_x() → float.

Get the x-component of the clump template original position.

orig_pos_y() → float.

Get the y-component of the clump template original position.

orig_pos_z() → float.

Get the z-component of the clump template original position.

pebbles() → tuple of TemplatePebble objects.

Get the pebbles of this clump template.

set_moi() → tensor.

Get the clump template moment of intertia. In 2D the polar moment of intertial is used so the return value is a float. When modified no other clump attributes are changed (e.g., pebble sizes, clump volume, etc.). The specification of the moment of inertia in this way results in the principal moments of inertia being in a fixed state so that they will not be automatically updated when scaling a clump unless the user changes the fix state (see the Clump moi_fix() method).

set_moi_prin(value: vec) → None.

Set the clump template principal moment of inertia (vector).

set_moi_prin_x(value: float) → None.

Set the x-component of the clump template principal moment of inertia.

set_moi_prin_y(value: float) → None.

Set the y-component of the clump template principal moment of inertia.

set_moi_prin_z(value: float) → None.

Set the z-component of the clump template principal moment of inertia.

set_orig_pos(value: vec) → None.

Set the clump template original position (vector).

set_orig_pos_x(value: float) → None.

Set the x-component of the clump template original position.

set_orig_pos_y(value: float) → None.

Set the y-component of the clump template original position.

set_orig_pos_z(value: float) → None.

Set the z-component of the clump template original position.

set_vol(value: float) → None.

Set the clump template volume. In 2D this is the volume per unit thickness.

valid() → bool.

Returns True of this object is a live clump template.

vol() → float.

Get the clump template volume. In 2D this is the volume per unit thickness.