Skip to content

Conversation

@RemDelaporteMathurin
Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin commented Jul 15, 2025

Proposed changes

Closes #685

Needs #1006

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)

@codecov
Copy link

codecov bot commented Jul 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.37%. Comparing base (34ad136) to head (42ce9cc).
⚠️ Report is 146 commits behind head on fenicsx.

Additional details and impacted files
@@             Coverage Diff             @@
##           fenicsx    #1013      +/-   ##
===========================================
+ Coverage    95.30%   95.37%   +0.07%     
===========================================
  Files           45       46       +1     
  Lines         2876     2920      +44     
===========================================
+ Hits          2741     2785      +44     
  Misses         135      135              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RemDelaporteMathurin RemDelaporteMathurin linked an issue Jul 15, 2025 that may be closed by this pull request
@RemDelaporteMathurin RemDelaporteMathurin marked this pull request as ready for review July 16, 2025 14:24
Copy link
Collaborator

@jhdark jhdark left a comment

Choose a reason for hiding this comment

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

Just some additions to the docs, and don't know if we can move some of the lines to the export class instead? Maybe not necessary

Comment on lines +976 to +986
if export._dofs is None:
index = self.species.index(export.field)
V0, export._dofs = self.u.function_space.sub(index).collapse()
coords = V0.tabulate_dof_coordinates()[:, 0]
export._sort_coords = np.argsort(coords)
x = coords[export._sort_coords]
export.x = x

c = self.u.x.array[export._dofs][export._sort_coords]

export.data.append(c)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this something that could be moved into the Profile1DExport class? Into say a function with the args index and u? Granted it wouldn't save that many lines, maybe not necessary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was thinking of something like that but the trick is that this is fairly minimal code and it would be hard to make a generic function since it also stores data in export.

It could be a method of ProfileExport but then it would be different for the discontinuous case .... Happy to leave that for later

RemDelaporteMathurin and others added 2 commits July 17, 2025 11:04
Co-authored-by: James Dark <[email protected]>
Co-authored-by: James Dark <[email protected]>
@RemDelaporteMathurin RemDelaporteMathurin merged commit db9ae13 into fenicsx Jul 17, 2025
14 checks passed
@RemDelaporteMathurin RemDelaporteMathurin deleted the profile_1d branch July 17, 2025 15:53
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.

Profile export (1D)

3 participants