Closed tobson closed 7 years ago
I actually thought we had discontinued compatibility with ppic2 on purpose. I at least did not expect it to work for the new grid layout without making changes to ppic2_wrapper. Did you make such changes?
Just checked and we have hardcoded boundaries in the ppic2 manifold. So there is a good reason it does not work. I also did not add dx and dy to that manifold.
I did, yes. And I was actually a little surprised that I got the PPIC2 manifold working with the new grid layout so effortlessly. But now I know that's because there's no test anymore that checks the PPIC2 manifold.
Hardcoded boundaries in the PPIC2 manifold is fine. We only need to copy the active cells to and from the fields that PPIC2's Poisson solver is working with.
Anyway, let's make sure PPIC2's Poisson solver is working. There's no reason it shouldn't.
The suggestion of abandoning the PPIC2 manifold was under the assumption that we'll soon have a finite-difference Poisson solver. But I don't think implementing one is worth the trouble at the moment. Since ρ and E are colocated on the interlaced grid, I suggest we just keep using the FFT-based Poisson solver. We should, however, ditch all other FFT-based differential operators.
Anyway, let's make sure PPIC2's Poisson solver is working. There's no reason it shouldn't.
Well, unless of course they've hardcoded dx=dy=1
into their Poisson solver. But even if they did, I can't imagine that assumption would be difficult to relax.
Anyway, let's discuss this over Skype next week. That'll be much easier. I'll explain why I'd like to keep PPIC2's Poisson solver around.
But even if they did, I can't imagine that assumption would be difficult to relax.
To wit, I'm pretty sure all that needs to be changed in order to allow for arbitrary dx
and dy
are
these two lines.
None of the electrostatic tests seem to work if one changes
to
Here's a picture from
tests/test_plasmafrequency.py
: