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

Add VTX Temperature Export (with rebased branch) #957

Open
wants to merge 3 commits into
base: fenicsx
Choose a base branch
from

Conversation

kaelyndunnell
Copy link
Contributor

@kaelyndunnell kaelyndunnell commented Mar 2, 2025

Proposed changes

Add VTX Temperature Export for HydrogenTransportProblem Class. Linked to PR #950 , but needed to rebase branch. Conflicts in branch for #950 too numerous to efficiently resolve.

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

if isinstance(self.temperature_fenics, (fem.Function, fem.Expression)):
temperature_field = self.temperature_fenics
else:
V = dolfinx.fem.FunctionSpace(self.mesh, ("CG", 1))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
V = dolfinx.fem.FunctionSpace(self.mesh, ("CG", 1))
V = dolfinx.fem.functionspace(self.mesh, ("CG", 1))

@@ -130,3 +131,4 @@ def test_filename_raises_error_when_wrong_type():
"""Test that the filename attribute raises an error if the extension is not .bp"""
with pytest.raises(TypeError):
F.VTXSpeciesExport(1, field=[F.Species("H")])
F.VTXTemperatureExport(1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since the line before triggers an error, this will not be tested

Please write another test

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.

2 participants