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

GMSH workflow #885

Merged
merged 11 commits into from
Nov 4, 2024
Merged

GMSH workflow #885

merged 11 commits into from
Nov 4, 2024

Conversation

celyneira
Copy link
Contributor

added GMSH workflow

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

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...

added GMSH workflow
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.55%. Comparing base (a1e3aec) to head (c4addd4).
Report is 29 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #885      +/-   ##
==========================================
- Coverage   99.56%   99.55%   -0.01%     
==========================================
  Files          61       60       -1     
  Lines        2750     2717      -33     
==========================================
- Hits         2738     2705      -33     
  Misses         12       12              

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

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.

Thanks @celyneira for this great contribution! As you can see on this link the documentation didn't compile properly:

https://festim--885.org.readthedocs.build/en/885/userguide/mesh.html#meshes-from-gmsh

I've added a bunch of comments with corrections.

You can alos check that the docs compile correctly locally by following the Documentation Guide

docs/source/userguide/mesh.rst Outdated Show resolved Hide resolved
docs/source/userguide/mesh.rst Outdated Show resolved Hide resolved
docs/source/userguide/mesh.rst Outdated Show resolved Hide resolved
docs/source/userguide/mesh.rst Outdated Show resolved Hide resolved
Comment on lines 533 to 557
import festim as F

model = F.Simulation()

model.mesh = F.MeshFromXDMF(volume_file ="volume_mesh.xdmf", boundary_file = "surface_mesh.xdmf")

model.materials = [F.Material(id=1, D_0=1, E_D=0),
F.Material(id=2, D_0=5, E_D=0)]

model.T = F.Temperature(800)

model.boundary_conditions = [F.DirichletBC(surfaces = [top_id], value = 1, field = 0),
F.DirichletBC(surfaces = [inner_cylinder_surface_id], value = 0, field = 0)]

model.exports = [F.XDMFExport("solute")]

model.settings = F.Settings(
absolute_tolerance=1e-10,
relative_tolerance=1e-10,
transient=False,
)

model.initialise()
model.run()

Copy link
Collaborator

Choose a reason for hiding this comment

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

can you format this code using black please?

@celyneira celyneira marked this pull request as draft September 27, 2024 20:28
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.

This looks much better! I'll still need to run the tutorial to test things.

Could you format the python code blocks so that it conforms with black? Don't hesitate if you don't know how to do it

A few more comments

docs/source/userguide/mesh.rst Outdated Show resolved Hide resolved
docs/source/userguide/mesh.rst Outdated Show resolved Hide resolved
docs/source/userguide/mesh.rst Outdated Show resolved Hide resolved
docs/source/userguide/mesh.rst Outdated Show resolved Hide resolved
@RemDelaporteMathurin RemDelaporteMathurin marked this pull request as ready for review October 1, 2024 11:50
@RemDelaporteMathurin RemDelaporteMathurin changed the title Update mesh.rst GMSH workflow Oct 1, 2024
@RemDelaporteMathurin RemDelaporteMathurin linked an issue Oct 8, 2024 that may be closed by this pull request
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.

Tested locally and confirm it works! Thanks so much @celyneira !!! 🎉

@RemDelaporteMathurin RemDelaporteMathurin merged commit 9b2fede into festim-dev:main Nov 4, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GMSH guide
3 participants