GenericAlgorithm

class GenericAlgorithm(*args, **kwargs)[source]

Bases: openpnm.core.Base.Base, openpnm.core.Base.LegacyMixin, openpnm.core.Base.LabelMixin

Generic class to define the foundation of Algorithms.

Parameters
  • network ((OpenPNM Network object)) – The network object to which this algorithm will apply.

  • name ((string, optional)) – Name of the algorithm

  • project ((OpenPNM Project object, optional)) – Either a Network or a Project must be supplied

Notes

This class defines the following methods, which all raise a NotImplementedError and must be defined by the various subclasses

Methods

Description

results

Generates an array or arrays of data produced by the algorithm to be returned to the Phase

setup

Collects values to be placed in settings. The main benefit is defining default values and providing documentation on each settings

reset

Removes generated data, specified values, and any other information lingering on an Algorithm

reset()[source]
results()[source]