-
Notifications
You must be signed in to change notification settings - Fork 307
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
[PIC] Poisson solver #80
Comments
About the EM solvers, I was wondering if we should re-invent the wheel or use an exsting EM solver. For a modular framework we would want a separate Maxwell solver for the fields. |
On the one hand, use of separate library will reduce our initial workload but it will create an extra dependency. Maybe depending on the license, we could simply merge one snapshot of an existing package and take it as a starting point. |
Is there a clean way to abstract the idea of an EM solver over the data structure such that you can drop-in any solver you want (provided you have a thin wrapper for some external solvers)? |
I have been thinking about it a quite a bit and my idea would be to have a function that takes every possible thing (grid, physics parameters, field values, time step, number of steps, anything else...) as a parameter and updates the fields for the desired number of steps, and finally returns the updated fields. Inside the solver, we would have cases for cartesian, cylindrical, spherical and whatever grids, and maybe a few different algorithms. A pure function without any side effects. Then, we can have wrappers on top of it for different cases we might want. |
Do these kinds of EM solvers go step by step, solving adjacent grid cells or does it take all the cells at once and try to come up with a global solution? If it's the former, and if the equations don't change between coordinate systems, then perhaps you can handle different grid/coordinate systems with decorators. |
A reasonable object oriented structure would probably also work for code organization. I don't have strong opinions on how to organize the computation itself in a way that's parallelizable. And with the direction we've been taking lately, I fear our code may soon approach 30% decorator applications. 😃 |
This issue will be closed in 90 days due to five years of inactivity unless the stale label or comment is removed. |
This issue was closed because it has had no activity for five years. |
task from #69 , for PIC simulation
For the Electrostatic PIC simulation, a Poisson solver will be needed.
We forget the 3D for Now. Boundaries can be : periodic, Dirichlet (Phi = Phi_0) or Neumann ( E = E_0) depending of the boundary.
The text was updated successfully, but these errors were encountered: