Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unification of variable names throughout the code base #1369

Merged
merged 54 commits into from
Mar 2, 2025

Conversation

keileg
Copy link
Contributor

@keileg keileg commented Feb 28, 2025

Proposed changes

This PR attempts to unify variable names used in the code base and tests to ease future maintenance. The following conventions are introduced:

  • An object representing a multiphysics model should be called model
  • An object of class EquationSystem should be called equation_system
  • A list of subdomains should be called subdomains. When iterating over the list, the iteration variable will normally be sd
  • A list of interfaces should be called interfaces. When iterating over the list, the iteration variable will normally be intf
  • A single boundary grid should be denoted bg
  • The domain boundary, returned by the method domain_boundary_sides should be called domain_sides

For most of these, there are exceptions that are somewhat vaguely defined (hence not written down here). Still, we will try to enforce these rules in future code reviews.

Types of changes

What types of changes does this PR introduce to PorePy?
Put an x in the boxes that apply.

  • Minor change (e.g., dependency bumps, broken links).
  • Bugfix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Testing (contribution related to testing of existing or new functionality).
  • Documentation (contribution related to adding, improving, or fixing documentation).
  • Maintenance (e.g., improve logic and performance, remove obsolete code).
  • Other:

Checklist

Put an x in the boxes that apply or explain briefly why the box is not relevant.

  • The documentation is up-to-date.
  • Static typing is included in the update.
  • This PR does not duplicate existing functionality.
  • The update is covered by the test suite (including tests added in the PR).
  • If new skipped tests have been introduced in this PR, pytest was run with the --run-skipped flag.

IngridKJ and others added 30 commits February 27, 2025 13:45
…ations

MAINT: Rename setup to model in convergence_analysis.py
…utorials

MAINT: Name unification (#1336) in tutorials.
TST: Renaming instances of porepy models to 'model' in tests/models/
MAINT: Rename boundary_grid to bg in porepy/examples
…ations

MAINT: Rename intf_map to interface_map
TST: Name unification in tests part 1
MAINT: Rename "bounds" and "sides" to "domain_sides" in porepy/examples
* TST: Name unification in tests part 2

* TST: Name unification in tests
Also some changes in the associated test
Also some changes in the corresponding test
domains -> subdomains, g -> grids etc.
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@IvarStefansson IvarStefansson merged commit 269d3ef into develop Mar 2, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants