Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
7234 Discussions

Problems with 2D poisson solver and periodic conditions

Camilo_P_
Beginner
1,432 Views

Hello, 

I am coding a fluid solver in the Vorticity-Potential formulation. I need to solve a poisson equation for the stream function. I was trying to use MKL's. In my problem, I have Dirichlet BCs in the y walls and periodic in the x walls. When I solve the poisson equation with the MKL solver I get wrong results at the corners, but when I solve it using SOR I get the correct results.

 I know that I am using the solver appropiately because I have tested it with other functions and I have gotten correct results.

I can see  from the results that the periodicity is not being enforced when MKL is used. 

I am using Intel Visual Fortran XE 2011 Update 10. I have attached the code, I use the variable useMKL to switch between MKL solver and SOR. It would be great if I can use MKL's as I need to move to a 3D implementation and the SOR method will be very slow then. 

If more information is needed let me know. Thanks in advance,

Camilo

 

 

0 Kudos
3 Replies
Gennady_F_Intel
Moderator
1,432 Views

Will the s_Helmholtz_2D_f.f90 help you to understand how to solve 2d Helmholtz problem with BC properly by using MKL Poisson? You may find out this example from s_Helmholtz_2D_f.f90  <mklroot>/examples/pdepoissonf/source directory.

0 Kudos
Camilo_P_
Beginner
1,432 Views

I found my error, in line 205 it read:

do ix=2,nx

it should have read

do ix=1,nx+1

It works perfect now. 

 

0 Kudos
Chatterjee__Swagnik
1,432 Views

Hello Sir,

  Can you please explain me how to solve a diffusion equation using the mkl poisson solver with periodic in X and Y and neumann in Z ? i am very new in this field and the exact algorithm is not clear to me.

Thanks,

Swagnik

0 Kudos
Reply