pg_utils.eigen.collect_matrix_elements

pg_utils.eigen.collect_matrix_elements(read_from: Union[str, Tuple[LabeledCollection, List]], manual_select: Optional[List], expansion_recipe: ExpansionRecipe, save_to: Optional[str] = None, overwrite: bool = False, verbose: int = 0) Tuple[SystemMatrix, SystemMatrix, List][source]

Eigensolver step II: collect matrix elements in symbolic forms

Parameters:
  • read_from (Union[str, Tuple[base.LabeledCollection, List]]) –

    the starting set of equations. * If read_from is str, then this will be interpreted as a

    json file name to be loaded as equations;

    • if read_from is a 2-tuple of base.LabeledCollection and

      List, these will be understood as the set of equations and a list of required unknown parameters.

  • manual_select (Optional[List]) – if specified, a boolean array indicating which equations to be used.

  • expansion_recipe (xpd.ExpansionRecipe) – spectral expansion

  • save_to (Optional[str]) – output json file name, if None (default), no file will be written.

  • overwrite (bool) – whether to overwrite existing file upon output, False by default.

  • verbose (int) – verbosity level, default to 0.

Returns:

Mass matrix (expression), stiffness matrix (expression) and a list of required unknown parameters