[petsc-users] Combine DM and FFTW
Gerhard Ungersbäck
gerhard.ungersback at uis.no
Fri Sep 10 13:23:51 CDT 2021
Hello,
I want to solve a time dependent differential equation in 3D (Scalar field theory in Hamilton formulation) .
The crucial part is that at some time steps I need to FFT the 3D grid.
I have written a sequential code without petsc and now I would like to use petsc to get a parallel version.
I worked through the examples and now I understand DMDACreate and also the FFTW examples.
What is missing though is how I combine both!
DMDACreate takes care of ghost points and periodic boundary conditions. As far as I know FFTW requires each process to have a slab of the grid to work. I know how to create this grid with DMDACreate. Normally I would proceed by creating a global vector by DMCreateGlobalVector. But this vector needs then to be linked with fftw arrays. How does this work?
Or should I first allocate local memory for fftw and then somehow stitch them together to form a global petsc vector?
Thanks
best, gerhard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210910/eadee1b2/attachment.html>
More information about the petsc-users
mailing list