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

Custom variable norm #1136

Closed
wants to merge 7 commits into from
Closed

Custom variable norm #1136

wants to merge 7 commits into from

Conversation

jwboth
Copy link
Contributor

@jwboth jwboth commented Mar 7, 2024

Proposed changes

This PR is in line with #987 and should be understood as later extension - therefore current work is stopped. The goal for later will be a unified suite for measuring lengths of vectors (increments and residuals in mixed-dimensional sense).

For increased modularization, the existing functionality for checking convergence as part of the solution strategy is suggested to be splitted, such that specifying the norm to be used can be performed in an isolated manner. In addition, an example implementation of an L2-norm (in Lebesgue) sense is added. User-defined / or model-tailored choices e.g. depending on material parameters can be added in a simple fashion, especially starting from the latter.

This PR is first of all a suggestion. This means, feedback is requested whether such modularization (i.e., an explicit interface) is wished; off-the-shelf examples for different choices than the Euclidean norm is useful (then a dedicated test would be added to test the implementation for exactness).

Note the structure of method placement as well as modifications of pp.ad.Variable are light suggestions, but serve especially for completeness of this PR as ground for presenting a concept. In case of rejection, removing this PR is recommended. If accepted, smaller modifications of the core may be benefitial to make some present implementation choices less hardcoded.

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.

@jwboth jwboth marked this pull request as draft March 7, 2024 12:57
@jwboth jwboth changed the title WIP: Custom variable norm Custom variable norm Apr 15, 2024
@jwboth jwboth added the PR - stale A PR that is stale, but it will be resumed eventually. label Apr 15, 2024
@jwboth jwboth closed this Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR - stale A PR that is stale, but it will be resumed eventually.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant