qimpy.transport.Material

class Material(*, fname, rotation=((1, 0, 0), (0, 1, 0, (0, 0, 1))), checkpoint_in=CheckpointPath(checkpoint=None, path=''))

Bases: TreeNode

Material specification.

Parameters
  • fname (str) –

  • rotation (Sequence[Sequence[float]]) –

  • checkpoint_in (CheckpointPath) –

__init__(*, fname, rotation=((1, 0, 0), (0, 1, 0, (0, 0, 1))), checkpoint_in=CheckpointPath(checkpoint=None, path=''))

Initialize material parameters.

Parameters
  • fname (str) – [Input file] File name to load materials data from.

  • rotation (Sequence[Sequence[float]]) – [Input file] 3 x 3 rotation matrix from material to simulation frame.

  • checkpoint_in (CheckpointPath) –

Methods

__init__

Initialize material 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

child_names: list[str]

Names of attributes with child objects.