pmgbergen / porepy

Python Simulation Tool for Fractured and Deformable Porous Media

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test numerical values returned by AD model methods

jhabriel opened this issue · comments

Motivation

Following #918, we aim at improving the test coverage of the models natively offered in PorePy by providing integration tests that compare known hard-coded values against values returned by AD model methods.

To be precise, the tested methods will be those that have either a list of subdomains or interfaces as input and return a pp.ad.Operator or a pp.ad.DenseArray.

Recipe for setting up tests

  1. Fix a minimal geometry.
  2. Use "real" physical parameters to set up an instance of the model being tested, e.g., water for fluid and granite for the solid.
  3. Set non-trivial (but constant) states for the primary variables.
  4. Prepare to simulate (but do not run the model).
  5. Write the test for all testable methods with hard-coded expected values. You can use the helper method get_model_methods_returning_ad_operators() located in tests.integration.models.setup_utils to get a list of all the methods that should be tested.

Roadmap

T: Thermo
H: Hydro
M: Mechanical

Decision not to prioritize this.