<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
</p>
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
Hello,</p>
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
<br>
</p>
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
I want to solve a time dependent differential equation in 3D (Scalar field theory in Hamilton formulation) .</p>
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
The crucial part is that at some time steps I need to FFT the 3D grid.</p>
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
<br>
</p>
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
I have written a sequential code without petsc and now I would like to use petsc to get a parallel version.
</p>
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
I worked through the examples and now I understand DMDACreate and also the FFTW examples.</p>
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
<br>
</p>
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
What is missing though is how I combine both!</p>
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
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?</p>
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
Or should I first allocate local memory for fftw and then somehow stitch them together to form a global petsc vector?
</p>
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
<br>
</p>
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
Thanks</p>
<p style="margin-bottom:0in;line-height:100%;background:transparent none repeat scroll 0% 0%">
best, gerhard </p>
<br>
</div>
</body>
</html>