Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- solve the Poisson equation with d_Helmholtz_2D

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

zwgoodqq_com

Beginner

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

04-29-2011
01:37 AM

237 Views

solve the Poisson equation with d_Helmholtz_2D

Hi~

My problem looks like u/x+u/y=-F(x,y). Boundary conditions are u/x=0|(x=0,x=Lx) and u/y=0|(y=0,y=Ly). This is the Poisson equation. Because the Poisson problem is a special case of the Helmholtz problem. I want to use d_Helmholtz_2D(f, bd_ax, bd_bx, bd_ay, bd_by, bd_az, bd_bz, &xhandle, &yhandle, ipar, dpar, &stat)to solve the eqution with =0. Poisson Library uses the standard five-point finite difference approximation on this mesh to compute the approximation to the solution .It asks for f ,but I have no ideas on setting f on the boundary . In my opinion it is poisson eqution with the Neumann boundary condition,so should I set f=0 in the boundary?Or any advise?Thank you!!

Link Copied

21 Replies

Alexander_K_Intel2

Employee

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

04-29-2011
02:26 AM

216 Views

Hi,

Poisson library calculates approximate solution of both internal point and boundary point so you need to set correspondent values of rhs for boundary. If you know values of rhs (right-hand-side of initial differential equation) only inside domain you could continue it on boundary.

With best regards,

Alexander Kalinkin

zwgoodqq_com

Beginner

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

04-30-2011
08:59 PM

216 Views

Alexander_K_Intel2

Employee

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

05-01-2011
12:56 AM

216 Views

It's strongly depends on problem you want to solve. Are you want to solve differential problem and you have value of differential rhs in all points inside domain? Or you know value of rhs in several points inside domain (grid points)?

With best regards,

Alexander Kalinkin

zwgoodqq_com

Beginner

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

05-03-2011
01:25 AM

216 Views

In my poisson equation ,rhsare obtained by M(x,y)/x+N(x,y)/y ,and M(x,y) and N(x,y) are known in all points.I will use FDM to deal with M(x,y)/x+N(x,y)/y....Sorhs on the boundary arerelated to the Nboudary condition ? I don't know how to figure it out...Help me please~

Alexander_K_Intel2

Employee

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

05-03-2011
02:12 AM

216 Views

Just set rhs on boundary poinst as it set in all domain, for example on boundary x = o set rhs = (M(x,y)/x)|(x=0)+N(0,y)/y

With best regards,

Alexander Kalinkin

ilogin

Beginner

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

05-03-2011
03:31 AM

216 Views

This question is quite equal one I asked you before. My problem deals with second derivation in rhs and it is impossible to extend F to boundaries to be sure not to break physical meaning of the problem.

Do you have plans to change implementation ofd_Helmholtz_2D to suit its documentation or change documentation to suit real implementation? First option is much more preferred by me.

Thank you!

Regards,

Ilya

Alexander_K_Intel2

Employee

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

05-03-2011
04:40 AM

216 Views

I've answered on your question and proposed workaround of your problem here:http://software.intel.com/en-us/forums/showthread.php?t=82296&p=2#148755

With best regards,

Alexander Kalinkin

zwgoodqq_com

Beginner

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

05-03-2011
06:24 AM

216 Views

Dear Alexander Kalinkin

Thank you very much !!I've got it~

Thank you very much !!I've got it~

zwgoodqq_com

Beginner

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

05-03-2011
07:04 AM

216 Views

Another question...

I 've used matlab to solve the 3D poisson equation with N BCs in my programme(poisson equation is only a part of it),but it failed,and matlab was always out of memorybecause of its limitations.SoIwant to solve 3D poisson equation with MKL d_Helmholtz_3D .Matlab is major ,and I use C++ to connect matlab with MKL d_Helmholtz_3D.

The question is if it is easy to do ?Any examples?And what about the memory?3D may be 500*250*250...So any advises?

Alexander_K_Intel2

Employee

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

05-03-2011
09:04 AM

216 Views

Could you provide some information about matlab out of memory. Is it happened during call to helmholtz routine (if yes on what routine) or during allocating memory for helmholtz solver (solution vector + rhs) or sometimes else?

With best regards,

Alexander Kalinkin

zwgoodqq_com

Beginner

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

05-03-2011
08:22 PM

216 Views

You may misuderstand me...We use [LA,UA]=luinc(A,1e-6) and p=bicgstab(A,b,MinErr,1000,LA,UA)in matlab to solve3D poisson equtionand itturns out to be out of memory becauseof luinc.

My question is when I use matlab with C++,MKL to solve 3D poisson equation with MKL,is the memory a problem?That is when I do it ,how much memory the computer needs to solve 3D(maybe 500*250*250) poisson equations~Thank you

Alexander_K_Intel2

Employee

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

05-03-2011
09:02 PM

216 Views

Oh,

Ive understood you. The largest arrays in poisson library are solution and rhs vectors. Their size is a size of the problem so in your case it is equal 500*250*250 = 30*10^6 elements. In double precision you need to have about a half of Gb to allocate them. Size of internal arrays is significantly smaller so I think that for your problem it is enough to have 1Gb of RAM.

With best regards,Alexander Kalinkin

zwgoodqq_com

Beginner

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

05-03-2011
10:57 PM

216 Views

Thank you very much

Alexander_K_Intel2

Employee

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

05-03-2011
11:25 PM

216 Views

With best regards,

Alexander Kalinkin

zwgoodqq_com

Beginner

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

05-04-2011
01:47 AM

216 Views

Hi

If fact ,I have same trouble in setting ispar(40 through 59)

ispar(40 through 59)====Contain the first twenty elements of the ipar array of the first Trigonometric Transform that the Solver uses. (For details, see Common Parameters in the "Trigonometric Transform Routines" section.)

ipar[0] of the first Trigonometric TransformContains the size of the problem to solve is said to be the size of the problem...It confuses me?What is the size ?In 2D problem ,when using TTF ,the size is(nx+1)*(ny+1)(nx and ny are the number of mesh intervals)?Inotice that ipar[0] should be an eveninteger?Any ideas?

Thank you

Alexander_K_Intel2

Employee

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

05-04-2011
04:19 AM

216 Views

It's not recommended to change this parameters manually. Just call init and commit steps of poisson library with your input data like ax,bx,nx and etc and elements ipar[40-59] will set automatically.

With best regards,

Alexander Kalinkin

zwgoodqq_com

Beginner

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

05-04-2011
04:36 AM

216 Views

Thank you ~

I got you meanings.

d_init_Helmholtz_2D( &ax,& bx, &ay, &by,& nx, &ny, BCtype,& q, ipar, dpar, & stat);

d_commit_Helmholtz_2D(f, bd_ax, bd_bx, bd_ay, bd_by, &xhandle, ipar, dpar,&stat);

d_Helmholtz_2D( f, bd_ax, bd_bx, bd_ay, bd_by, &xhandle, ipar, dpar,&stat);

free_Helmholtz_2D( &xhandle,ipar, &stat);

So~What about dpar ipar?I also have difficuties in setting xhandle~

If it is no need to set the parameters related with TT routine ?

zwgoodqq_com

Beginner

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

05-04-2011
04:44 AM

216 Views

d_init_Helmholtz_2D( &ax,& bx, &ay, &by,& nx, &ny, BCtype,& q, ipar, dpar, & stat);

d_commit_Helmholtz_2D(f, bd_ax, bd_bx, bd_ay, bd_by, &xhandle, ipar, dpar,&stat);

I can get ipar ,dpar, stat,and xhandle (which are output patarmaters)automatically??
Alexander_K_Intel2

Employee

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

05-04-2011
04:55 AM

216 Views

in your example you need to setax,bx, ay, by,nx, ny, BCType, bd_ax,bd_bx, bd_ay, bd_by, f, u and stat and allocate ipar, dpar arrays and handle - pointer to internal structure (please look example named d_helmholtz_2D_c.c in example/pdepoissonc folder). After init and/or commit step you could change some ipar/dpar parameters (please look manual to find it exactly) which was setting automatically but it is not recommended.

With best regards,

Alexander Kalinkin

zwgoodqq_com

Beginner

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

05-04-2011
07:36 PM

65 Views

Hi~Thank you so much~I get it.

I tried the example in the folder...It seems that there are some problems with linkers. I use Intel MKL 10.3.xand Microsoft* Visual Studio 2008.And Select Build Components I choose sequential...But it turns out

MKLtest.exe: E:\Vc++\MKLtest\Debug\MKLtest.exe

MKLtest.exe: C:\WINDOWS\system32\ntdll.dll

MKLtest.exe: C:\WINDOWS\system32\kernel32.dll

MKLtest.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\mkl_sequential.dll

MKLtest.exe: C:\WINDOWS\system32\msvcrt.dll

MKLtest.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\mkl_core.dll

MKLtest.exe: C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcr90d.dll

MKLtest.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\mkl_p4m.dll

MKLtest.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\libimalloc.dll

MKLtest.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\libimalloc.dll

It is Chinese...Maybe...Any adviser?What is the problem?Thank you

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

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