Hi, I'm trying to solve the Poisson equation with the Fast Poisson solver. I'm started by imposing a fully periodic 3D domain, then my BCtype='PPPPPP', but I get strange results, with a warning message:
Intel MKL POISSON SOLVER WARNING:
The problem is degenerate due to rounding errors. The approximate solution
that provides the minimal Euclidean norm of the solution will be computed.
I looked at the values of ipar, by referring to this page https://software.intel.com/content/www/us/en/develop/documentation/mkl-d...
From this page, one can see that the integer values of the array ipar from 4 to 9, takes this value according to BCtype. In my case, they could be all equal to 2.
Then I print the values of ipar and they have different values form 2. I get 0 0 0 2 2 2.
Here there is my code written in fortran
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
subroutine solvermkl(phi)
implicit none
real(rp) :: ax,bx,ay,by,az,bz
integer :: i,j,k,l,stat
integer, parameter :: nx=(imax-1), ny=(jmax-1),nz=(kmax-1)
real(rp), parameter :: q = 0. ! constant for Helmotz equation --> 0 for Poisson
integer, dimension(128) :: ipar
real(rp), dimension(13.*(nx+ny)/2.+9.) :: dpar
type(DFTI_DESCRIPTOR), pointer :: xhandle, yhandle
character(6) BCtype
real(rp), dimension(imax,jmax,kmax), intent(out) :: phi
real(rp) :: bd_ax(jmax,kmax), bd_bx(jmax,kmax), bd_ay(imax,kmax), bd_by(imax,kmax), bd_az(imax,jmax), bd_bz(imax,jmax)
ax= 0.
bx= lx
ay= 0.
by= ly
az= 0.
bz= lz
do l=1,128
ipar(l)=0
enddo
BCtype = 'PPPPPP'
call d_init_Helmholtz_3D(ax, bx, ay, by, az, bz, nx, ny, nz, BCtype, q, ipar, dpar, stat)
do l=4,9
print *, 'ipar=', ipar(l)
enddo
call d_commit_Helmholtz_3D(RHS, bd_ax, bd_bx, bd_ay, bd_by, bd_az, bd_bz, xhandle,yhandle, ipar, dpar, stat)
call d_Helmholtz_3D(RHS, bd_ax, bd_bx, bd_ay, bd_by, bd_az, bd_bz, xhandle, yhandle, ipar, dpar, stat)
call free_Helmholtz_3D(xhandle, yhandle, ipar, stat)
phi(:,:,:) = RHS(:,:,:)
end subroutine solvermkl
end module mod_solver_mkl
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
There is someone can help me??