qimpy.transport.geometry.Geometry
- class Geometry(*, material, quad_set, grid_spacing, contacts, grid_size_max, save_rho=False, cent_diff_deriv=False, process_grid, checkpoint_in=(None, ''))
Bases:
TreeNodeGeometry specification.
- Parameters:
material (Material)
quad_set (QuadSet)
grid_spacing (float)
contacts (dict[str, dict | None])
grid_size_max (int)
save_rho (bool)
cent_diff_deriv (bool)
process_grid (ProcessGrid)
checkpoint_in (CheckpointPath)
- __init__(*, material, quad_set, grid_spacing, contacts, grid_size_max, save_rho=False, cent_diff_deriv=False, process_grid, checkpoint_in=(None, ''))
Initialize geometry parameters, typically used from a derived class.
- Parameters:
quad_set (QuadSet) – Geometry specification from derived class.
grid_spacing (float) – [Input file] Maximum spacing between grid points anywhere in the geometry. This is used to select the number of grid points in each domain.
contacts (dict[str, dict | None]) – [Input file] Dictionary of contact names to parameters. The available contact parameters depend on the contact models implemented in the corresponding material. If None, the contact is treated like a regular boundary, but stored in the checkpoint, enabling consistent plotting of ‘floating’ contacts.
grid_size_max (int) – [Input file] Maximum grid points per dimension after quad subdvision. If 0, will be determined automatically from number of processes. Note that this only affects parallelization and performance by changing how data is divided into patches, and does not affect the accuracy of format of the output.
save_rho (bool) – [Input file] Whether to write the full density matrices to the checkpoint file. If not (default), only observables are written to the checkpoint file.
cent_diff_deriv (bool) – [Input file] Whether to use the simple central-difference derivative operator. The default is choosing from the backward, central or forward derivative.
material (Material)
process_grid (ProcessGrid)
checkpoint_in (CheckpointPath)
Methods
Initialize geometry parameters, typically used from a derived class.
add_childConstruct child object self.`attr_name` of type cls.
add_child_one_ofInvoke add_child on one of several child options in args.
Return list of drho/dt corresponding to each rho at time t.
save_checkpointSave self and all children in hierarchy to cp_path.
Stash results for current step for a future save_checkpoint call.
Attributes
Get current values of density matrices.
Communicator for real-space split over patches
Corresponding material
Grid spacing used for discretization
SVG contact names to material parameters
Original geometry specification from SVG
Division into smaller quads for tuning parallelization
Advection for each quad patch local to this process
Division of patches over comm
Saved results for collating into fewer checkpoints
Maximum stable time step
whether to write rho to checkpoint file
cent_diff_derivchild_namesNames of attributes with child objects.
variant_nameVersion of children having variants (if any)
- abstractmethod rho_dot(rho, t)
Return list of drho/dt corresponding to each rho at time t.
- Parameters:
rho (TensorList)
t (float)
- Return type:
- update_stash(i_step, t)
Stash results for current step for a future save_checkpoint call.
- Parameters:
i_step (int)
t (float)
- Return type:
None
- comm: Comm
Communicator for real-space split over patches
- contacts: dict[str, dict | None]
SVG contact names to material parameters
- dt_max: float
Maximum stable time step
- grid_spacing: float
Grid spacing used for discretization
- patch_division: TaskDivision
Division of patches over comm
- property rho: TensorList
Get current values of density matrices.
- save_rho: bool
whether to write rho to checkpoint file
- stash: ResultStash
Saved results for collating into fewer checkpoints
- sub_quad_set: SubQuadSet
Division into smaller quads for tuning parallelization