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

Subdomain classes #593

Merged
merged 25 commits into from
Oct 11, 2023
Merged

Subdomain classes #593

merged 25 commits into from
Oct 11, 2023

Conversation

jhdark
Copy link
Collaborator

@jhdark jhdark commented Oct 10, 2023

Proposed changes

Introducing subdomains, the subdomains will be used to create the meshtags and measures of the simulation. Additionally, when material classes are made, they will be an attribute of a volume subdomain class.

Types of changes

What types of changes does your code introduce to FESTIM?

  • 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)
  • Code refactoring
  • Documentation Update (if none of the other choices apply)
  • New tests

Checklist

  • Black formatted
  • Unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (c95993e) 89.23% compared to head (59037d4) 91.77%.

Additional details and impacted files
@@             Coverage Diff             @@
##           fenicsx     #593      +/-   ##
===========================================
+ Coverage    89.23%   91.77%   +2.54%     
===========================================
  Files            5        7       +2     
  Lines          130      158      +28     
===========================================
+ Hits           116      145      +29     
+ Misses          14       13       -1     
Files Coverage Δ
festim/__init__.py 63.15% <100.00%> (+4.33%) ⬆️
festim/hydrogen_transport_problem.py 94.18% <100.00%> (+3.41%) ⬆️
festim/mesh/mesh.py 100.00% <ø> (ø)
festim/mesh/mesh_1d.py 100.00% <ø> (ø)
festim/subdomain/surface_subdomain.py 100.00% <100.00%> (ø)
festim/subdomain/volume_subdomain.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jhdark jhdark marked this pull request as ready for review October 10, 2023 20:42
Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things are starting to take shape

A few things:

  • please take the habit to add docstrings to your test to detail what they do
  • Please open an issue to implement check in the code to test that borders match with each other, the borders match with the start point and the end point of the mesh

festim/hydrogen_transport_problem.py Outdated Show resolved Hide resolved
festim/hydrogen_transport_problem.py Outdated Show resolved Hide resolved
festim/hydrogen_transport_problem.py Outdated Show resolved Hide resolved
festim/subdomain/surface_subdomain.py Outdated Show resolved Hide resolved
festim/subdomain/surface_subdomain.py Show resolved Hide resolved
festim/subdomain/volume_subdomain.py Outdated Show resolved Hide resolved
test/test_subdomains.py Outdated Show resolved Hide resolved
jhdark and others added 4 commits October 11, 2023 08:05
Co-authored-by: Rémi Delaporte-Mathurin <40028739+RemDelaporteMathurin@users.noreply.github.com>
Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another round of comments

festim/subdomain/surface_subdomain.py Show resolved Hide resolved
festim/subdomain/surface_subdomain.py Outdated Show resolved Hide resolved
festim/subdomain/surface_subdomain.py Outdated Show resolved Hide resolved
festim/subdomain/volume_subdomain.py Show resolved Hide resolved
@jhdark jhdark added the enhancement New feature or request label Oct 11, 2023
Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of tiny comments. I think we can remove the dofs attribute of Subdomain1D since we don't use it anywhere else

After addressing these comments feel free to merge

festim/subdomain/surface_subdomain.py Outdated Show resolved Hide resolved
festim/subdomain/volume_subdomain.py Outdated Show resolved Hide resolved
@jhdark jhdark merged commit 028fff4 into festim-dev:fenicsx Oct 11, 2023
5 checks passed
@jhdark jhdark deleted the subdomains branch October 11, 2023 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants