Dear All,

I am a new PETSc user and I am still in the middle of the manual (I have finally settled to choose PETSc as my main numerical library) so I am sorry beforehand if my questions would be naive.

I am trying to solve 6+1 dimensional Vlasov equation with spectral methods. More precisely, I will try to solve half-discretized equations of the form (approximate form) with pseudospectral Fourier method:

(Equations are in latex format, the nice website to see them is https://www.codecogs.com/latex/eqneditor.php)

\frac{dC_{m,m,p}}{dt} =\\
\partial_x \left ( a_n C_{n+1,m,p} +b_n C_{n,m,p} +c_n C_{n-1,m,p} \right ) \\ + \partial_y \left ( a_m C_{n,m+1,p} +b_m C_{n,m,p} +c_m C_{n,m-1,p} \right ) \\ + \partial_z \left ( a_p C_{n,m,p+1} +b_p C_{n,m,p} +c_p C_{n,m,p-1} \right ) \\
+ d_n E_x C_{n-1,m,p} + d_m E_x C_{n,m-1,p} + d_p E_x C_{n,m,p-1} \\
+ B_x (e_{m,p} C_{n,m-1,p-1} + f_{m,p}C_{n,m-1,p+1} + \dots) + B_y (\dots) + B_z (\dots)


where a,b,c,d,e,f are some constants which can depend on n,m,p,

n,m,p = 0...N,

C_{n,m,p} = C_{n,m,p}(x,y,z),

E_x = E_x(x,y,z), (same for E_y,B_x,...)

and fields are described with equation of the sort (linear pdes with source terms dependent on C):

\frac{dE_x}{dt} = \partial_y B_z - \partial_z B_x + (AC_{1,0,0} + BC_{0,0,0}) \\
\frac{dB_x}{dt} = -\partial_y E_z + \partial_z E_x

with A,B being some constants.

I will need fully implicit Crank–Nicolson method, so my plan is to use SNES or TS where

I will use one MPI PETSc vector which describes the state of the system (all, C, E, B), then I can evolve linear part with just matrix multiplication.

The first question is, should I use something like DMDA? if so, it is only 3dimensional but I need 6 dimensional vectots? Will it be faster then matrix multiplication?

Then to do nonlinear part I will need 3d mpi-fftw to compute convolutions. The problem is, how do I extract subvectors from full big vector state? (what is the best approach?)

If you have some other suggestions, please feel free to share

Thanks and best regards,

Oleksandr Koshkarov.

Reply via email to