Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
- mkl poisson solver with periodic and dirichlet boundary condition

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Soumya_B_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-23-2015
05:26 AM

55 Views

mkl poisson solver with periodic and dirichlet boundary condition

Hello Sir,

I am trying to solve electrostatic Poisson's equation using Poisson MKL library 'd_Poisson_2D_c.c' but my boundary conditions are periodic (X direction) and fixed in Y direction. How shall i incorporate periodic condition in the X direction ?

I tried in this way but i donot think it is correct,

for( iy = 0; iy <= ny; iy++){

bd_ax[iy] = bd_bx[iy];

}

and applied BCtype='PPDD' .

I am very new in this field. Please help me.

Thanks

Link Copied

9 Replies

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-23-2015
11:15 AM

55 Views

Hi,

Everything is correct. Moreover, you don't need to describe value of boundary condition on x=ax and x=bx - you set them as periodical so bd_ax and bd_bx have not use in computational.

Thanks,

Alex

Soumya_B_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-23-2015
07:17 PM

55 Views

Dear Alex,

Thanks for your reply, but i am not getting it. Do you mean that if i impose the condition 'bd_ax[iy] = bd_bx[iy]', the routine doesnot

at all use this in the computation ? If so, then what kind of value will it take ? Actually it is not clear to me.

sorry for the inconvinience.

Thanks,

Soumya

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-24-2015
04:21 AM

55 Views

Hi Soumya,

It will use condition like u(i,j) = u(N+i,j) for any i,j. That's mean left edge of square is equal to right one.

Thanks,

Alex

Soumya_B_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-24-2015
07:26 AM

55 Views

I got it..Thanks alot....!!

Soumya_B_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-12-2015
04:47 AM

55 Views

Hi,

i have a query. when i am imposing periodic boundary condition do i need to write both the conditions as shown in the manual.

For periodic in X direction i gave bd_ax(iy) = bd_bx(iy)(for iy = 0:ny)

Now do i need to specify the derivative boundary condition also ? if yes how to specify in terms of bd_ax and bd_bx or when i impose bc_type as

'PPDD' it automatically takes care of both the conditions ? Please help.

Thanks,

Soumya

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-21-2015
07:22 AM

55 Views

Hi

> 'PPDD' automatically takes care of both the conditions - correct

Thanks,

Alex

Leonardo_B_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-23-2016
03:44 AM

55 Views

Hi, I am using the d_Helmholtz_2D routine to solve the poisson equation with full Neumann boundary conditions (NNNN). I am sure that the output is correct but the warning message ''The problem is degenerate up to rounding errors! ...'' on screen bothers me. I found in previous forums that one solution is to set ipar(2) equals to zero. I tried it but I didn't work. I realized that the warning message appears after the call of routine d_Helmholtz_2D. If it might help find below an excerpt of the code and the output.

Thanks in advance

%%%%%%%%%%%%%

do i=1,128

ipar(i)=0

enddo

! print*,ipar(2),' setting warning signal'

! Initializing simple data structures of Poisson Library for 2D Poisson Solver

call d_init_Helmholtz_2D(0.D0, sizex, 0.D0, sizey, nx, ny, BCtype, q, ipar, dpar, istat)

print*,ipar(2),' first warning'

ipar(2)=0

if (istat.lt.0) goto 999

! Initializing complex data structures of Poisson Library for 2D Poisson Solver

! NOTE: Right-hand side f may be altered after the Commit step. If you want

! to keep it, you should save it in another memory location!

call d_commit_Helmholtz_2D(f, bd_ax, bd_bx, bd_ay, bd_by, xhandle, ipar, dpar, istat)

print*,ipar(2), ' second warning'

if (istat.lt.0) goto 999

! Computing the approximate solution of 2D Poisson problem

! NOTE: Boundary data stored in the arrays bd_ax, bd_bx, bd_ay, bd_by

! should not be changed between the Commit step and the subsequent call to

! the Solver routine! Otherwise the results may be wrong.

call d_Helmholtz_2D(f, bd_ax, bd_bx, bd_ay, bd_by, xhandle, ipar, dpar, istat)

print*,ipar(2),' third warning'

if (istat.lt.0) goto 999

! Cleaning the memory used by xhandle

call free_Helmholtz_2D(xhandle, ipar, istat)

print*,ipar(2),' fourth warning'

if (istat.lt.0) goto 999

! Now we can use xhandle to solve another 2D Poisson problem

%%%%%%%%%%%%%%%%%%%%%%%%

1 first warning

0 second warning

-------------------------------------------------------------------------------

MKL POISSON LIBRARY WARNING:

The problem is degenerate up to rounding errors! The approximate solution

that provides the minimal Euclidean norm of the solution will be computed...

0 third warning

0 fourth warning

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-23-2016
04:23 AM

55 Views

Hi,

I see that you use Fortran based code to call Helmholtz solver. In such case set ipar(3) to zero instead of ipar(2)

Thanks,

Alex

Leonardo_B_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-23-2016
09:26 AM

55 Views

Dear

Alex

Thanks for your reply. I did what you suggested and it worked.

Best regards,

Leonardo

For more complete information about compiler optimizations, see our Optimization Notice.