qimpy.transport.Geometry
- class Geometry(*, vertices, edges, quads, checkpoint_in=CheckpointPath(checkpoint=None, path=''))
Bases:
TreeNode
Geometry specification.
- Parameters
vertices (Tensor) –
edges (Tensor) –
quads (Tensor) –
checkpoint_in (CheckpointPath) –
- __init__(*, vertices, edges, quads, checkpoint_in=CheckpointPath(checkpoint=None, path=''))
Initialize geometry parameters.
- Parameters
vertices (Union[Sequence[Sequence[float]], ndarray, Tensor]) – [Input file] Caretsian vertex coordinates (n_vertices x 2).
edges (Union[Sequence[Sequence[int]], ndarray, Tensor]) – [Input file] Indices of vertices in edges (n_edges x 4). Each edge should have three 0-based indices into the vertices array, for the starting, end and mid point. The midpoint index can be set to -1 to make the edge linear (autocompute midpoint from extremes). The final entry is the number of subdivisions, or -1 for automatic
quads (Union[Sequence[Sequence[int]], ndarray, Tensor]) – [Input file] Indices of edges in each quad (n_quads x 4).
checkpoint_in (CheckpointPath) –
Methods
Initialize geometry parameters.
add_child
Construct child object self.`attr_name` of type cls.
add_child_one_of
Invoke add_child on one of several child options in args.
save_checkpoint
Save self and all children in hierarchy to cp_path.
Attributes
Cartesian coordinates of vertices (n_vertices x 2)
0-based vertex indices and edge resolution (n_edges x 4)
0-based edge indices in each quad (n_quads x 4)
edge_splines
- edges: Tensor
0-based vertex indices and edge resolution (n_edges x 4)
- quads: Tensor
0-based edge indices in each quad (n_quads x 4)
- vertices: Tensor
Cartesian coordinates of vertices (n_vertices x 2)