-
Notifications
You must be signed in to change notification settings - Fork 199
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
Only allocate edge_lengths
and face_areas
when using the ECT solver
#5593
Only allocate edge_lengths
and face_areas
when using the ECT solver
#5593
Conversation
@@ -43,7 +43,7 @@ | |||
|
|||
flag_correct_div = False | |||
|
|||
solver = picmi.ElectromagneticSolver(grid=grid, method="Yee", cfl=1.0) | |||
solver = picmi.ElectromagneticSolver(grid=grid, method="ECT", cfl=1.0) |
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.
This test fails when using the "Yee" solver, because the MultiFab that are accessed with PICMI do not exist ; not sure how we want to handle this type of error in general.
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.
One way to handle this would be to create a python accessible function that would create those multifabs if they don't exist and return them. But that would still require this test to change since in that case Python would have to take ownership of the multifabs themselves, not just wrappers for them. I think it is okay to not support that at this time. If it turns out there are users that rely on those multifabs we can fix it when they come forward. How does that sound?
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.
OK, that works.
Following #5558, the MultiFab
edge_lengths
andface_areas
are not used anymore, expect for the ECT solver. Thus, only allocateing them when using the ECT solver saves a considerable amount of memory.