Skip to content

Improve test suite coverage or remove unused code #267

@speth

Description

@speth

The Cantera codebase contains a number of classes that are potentially unused. They are not used internally within Cantera, have no test coverage, and have no examples available, making them essentially useless to any potential users. These classes are identified below, with notes from relevant commits. The status of each of these classes should be individually resolved in one of two ways:

  • Add examples and tests
  • Deprecate and remove

The current state of affairs is not sustainable, making it difficult for users to understand the code and creating unnecessary barriers to effectively maintaining and improving Cantera. Specific details about these classes are described below, based on looking through the commit history. This list excludes classes which have already been deprecated in Cantera 2.2.

  • ThermoPhase derivatives:
    • SemiconductorPhase: Added in 8ee5b76 (2007). Untouched since then. No tests, and unconstructible by ThermoFactory. Deprecated in 111b490. Removed in 2.3.
    • MixtureFugacityTP / RedlichKwongMFTP - Tests added by @decaluwe in f9d5f16.
    • MineralEQ3 Added in 3afa913 (2008) no test cases or examples deprecated in 6d22be2
    • IonsFromNeutralVPSSTP, Added in 06276fb (2009) Regression tests added in 338b216 and 3a11938
    • MetalSHEelectrons Added in 321d387 (2009) no test cases or examples deprecated in 6d22be2
    • PhaseCombo_Interaction Added in 30d59b8 (2011) no test cases or examples deprecated in 6d22be2
    • MixedSolventElectrolyte Added in ff7e66e (2011) no test cases or examples. Not constructible by ThermoFactory. Deprecated in 2b73fe2.
    • MolarityIonicVPSSTP Added in b9c9f81 (2011) no test cases or examples deprecated in 6d22be2
    • RedlichKisterVPSSTP Added in 5d1e555 (2011) Test case added in 1183479
  • Other thermo classes
  • Kinetics
    • AqueousKinetics: Introduced in a5f37df (2009) with the commit message "First stab at aqueous kinetics. This has not been checked." No meaningful changes since then, as far as I can tell. Most of the implementation is (unnecessarily) directly copied from GasKinetics. deprecated in 6d22be2
  • Transport
    • LiquidTransport - Initially added in 0127285 (2009), with some ongoing work. Pending tests/examples from @jchewson. deprecated in 6d22be2
    • HighPressureGasTransport - Added in 14019cf (2014). No tests yet. Could probably use some notation as to its current state.
    • SolidTransport - Predates the existing project history (pre-2003). Various updates over the years. Pending tests/examples from @jchewson. deprecated in 6d22be2
    • SimpleTransport - Initially added in 2009, with a few updates and one nearly-trivial regression test. deprecated in 6d22be2
  • Other classes
    • DAE_Solver and IDA_Solver - Added in d5211ff (2006). An unused wrapper for the Sundials IDA solver. Retained in anticipation of use in PFR with surface reactions. DAE_Solver base class removed and IDA_Solver (renamed IdasIntegrator) now in use and tested with non-homogeneous FlowReactor in FlowReactor with heterogeneous chemistry #1490.
    • ResidJacEval - Used only in IDA_Solver, which is itself unused. Retained in anticipation of use in PFR with surface reactions. Deprecated in 10a3913. Removed in 3.1.
    • RootFind - Added in 1644b1c (2010). Used only in RedlichKwongMFTP in the methods densSpinodalLiquid and densSpinodalGas which are currently untested. Deprecated in fb9a4b1 (usage in RedlichKwongMFTP migrated to use Boost root finder). Removed in 2.3.
    • Tortuosity and descendants - added in e8d545f (2010). Pending tests/examples from @jchewson. deprecated in 6d22be2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions