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

Make restrict to subgrid a method of tensor #1333

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft

Conversation

IngridKJ
Copy link
Contributor

Proposed changes

This PR addresses something encountered when trying to use more than only the two default constitutive parameters (lambda and mu) of the momentum balance model class. The "discovery" is related to when (often large) grids are divided into subgrids for overcoming big memory usage upon discretization. In that case, the tensors (second order/fourth order) are restricted to the subgrids. The restriction-functionality was implemented as a function in fvutils, making adaptations in the case of several more constitutive parameters cumbersome. In this PR the restriction-functionality is moved to be part of the (new) Tensor class, which is intended to keep common parts between the second and fourth order tensors.

Implementation kudos to @IvarStefansson.

Currently only a draft PR as documentation is still a WIP.

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.

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.

3 participants