-
Notifications
You must be signed in to change notification settings - Fork 32
Profile 1d export #1013
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
Profile 1d export #1013
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
jhdark
left a comment
There was a problem hiding this 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
| 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Co-authored-by: James Dark <[email protected]>
Co-authored-by: James Dark <[email protected]>
Proposed changes
Closes #685
Needs #1006
Types of changes
What types of changes does your code introduce to FESTIM?
Checklist