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
- Fix a minimal geometry.
- Use "real" physical parameters to set up an instance of the model being tested, e.g., water for fluid and granite for the solid.
- Set non-trivial (but constant) states for the primary variables.
- Prepare to simulate (but do not run the model).
- 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 intests.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.