pyHarm.Substructures.FactorySubstructure

” This module is responsible for the creation of the ABCSubstructure instances used in pyHarm.

Attributes

SubstructureDico

List of available ABCSubstructure subclasses available for creation.

Functions

generate_substructure(...)

Factory function that creates an ABCSubstructure object.

Module Contents

pyHarm.Substructures.FactorySubstructure.SubstructureDico

List of available ABCSubstructure subclasses available for creation.

Type:

dict[str,ABCSubstructure]

pyHarm.Substructures.FactorySubstructure.generate_substructure(nh, name, data) pyHarm.Substructures.ABCSubstructure.ABCSubstructure

Factory function that creates an ABCSubstructure object.

Parameters:
  • nh (int) – number of harmonics.

  • name (str) – type of substructure to instantiate.

  • data (dict) – dictionary containing the definition of the substructure.

Returns:

Instance of the required ABCSubstructure class.

Return type:

ABCSubstructure