<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Poisson Solver: issue with corner values in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Poisson-Solver-issue-with-corner-values/m-p/1605325#M36206</link>
    <description>&lt;P&gt;I realized it was an error on my side.&amp;nbsp; The boundary arrays are of length nx+1 and ny+1, but I was wrongly only setting the first nx, ny values. Hence, there was by default a 0.0 in the last value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The boundary routine is supposed to read&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;   subroutine fbd(nx,ny,x,y,bd_ax,bd_bx,bd_ay,bd_by)
      integer, intent(in) :: nx, ny
      real(dp), intent(in) :: x(nx+1), y(ny+1)
      real(dp), intent(out) :: bd_ax(ny+1), bd_bx(ny+1)
      real(dp), intent(out) :: bd_ay(nx+1), bd_by(nx+1)

      ! boundaries are given by
      ! u(x,y) = cos( pi x ) - sin( 2 pi y )

      bd_ax = cos(pi*0.0_dp) - sin(2*pi*y) ! x = 0
      bd_bx = cos(pi*1.0_dp) - sin(2*pi*y) ! x = 1

      bd_ay = cos(pi*x) - sin(2*pi*0.0_dp) ! y = 0
      bd_by = cos(pi*x) - sin(2*pi*1.0_dp) ! y = 1
   end subroutine&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Now the solution matches the multigrid solver in the link in my original post.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Poisson solution (correct)" style="width: 640px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/55713i7983F8B0A8BB66E3/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="solution.png" alt="Poisson solution (correct)" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Poisson solution (correct)&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jun 2024 12:10:45 GMT</pubDate>
    <dc:creator>ivanp</dc:creator>
    <dc:date>2024-06-10T12:10:45Z</dc:date>
    <item>
      <title>Poisson Solver: issue with corner values</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Poisson-Solver-issue-with-corner-values/m-p/1604980#M36202</link>
      <description>&lt;P&gt;I'm attempting to use the Fast Poisson Solver routines from the oneMKL library. The driver, in Fortran, is provided in the attachment.&lt;BR /&gt;&lt;BR /&gt;The solver works, however the corner values at locations (1,1) and (1,0) seem to be wrong, when compared with the output of a &lt;A href="https://www.exastencils.fau.de/sphinx/tutorials/ExaStencils/2D_FD_Poisson_fromL4.html#visualization" target="_self"&gt;different solver.&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="poisson_solution.png" style="width: 640px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/55658i9891826052A75B42/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="poisson_solution.png" alt="poisson_solution.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What could be the problem?&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jun 2024 12:26:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Poisson-Solver-issue-with-corner-values/m-p/1604980#M36202</guid>
      <dc:creator>ivanp</dc:creator>
      <dc:date>2024-06-08T12:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Poisson Solver: issue with corner values</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Poisson-Solver-issue-with-corner-values/m-p/1605319#M36205</link>
      <description>&lt;P&gt;Ivan, I am not quite sure which results you are expecting to see here.&lt;/P&gt;
&lt;P&gt;running with the current version of oneMKL, I see&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.00000000000000 0.000000000000000E+000 &lt;STRONG&gt;0.000000000000000E+000&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;.....&lt;BR /&gt;1.00000000000000 1.00000000000000 &lt;STRONG&gt;0.000000000000000E+000&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which results do you see with another solvers?&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 11:59:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Poisson-Solver-issue-with-corner-values/m-p/1605319#M36205</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2024-06-10T11:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Poisson Solver: issue with corner values</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Poisson-Solver-issue-with-corner-values/m-p/1605325#M36206</link>
      <description>&lt;P&gt;I realized it was an error on my side.&amp;nbsp; The boundary arrays are of length nx+1 and ny+1, but I was wrongly only setting the first nx, ny values. Hence, there was by default a 0.0 in the last value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The boundary routine is supposed to read&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;   subroutine fbd(nx,ny,x,y,bd_ax,bd_bx,bd_ay,bd_by)
      integer, intent(in) :: nx, ny
      real(dp), intent(in) :: x(nx+1), y(ny+1)
      real(dp), intent(out) :: bd_ax(ny+1), bd_bx(ny+1)
      real(dp), intent(out) :: bd_ay(nx+1), bd_by(nx+1)

      ! boundaries are given by
      ! u(x,y) = cos( pi x ) - sin( 2 pi y )

      bd_ax = cos(pi*0.0_dp) - sin(2*pi*y) ! x = 0
      bd_bx = cos(pi*1.0_dp) - sin(2*pi*y) ! x = 1

      bd_ay = cos(pi*x) - sin(2*pi*0.0_dp) ! y = 0
      bd_by = cos(pi*x) - sin(2*pi*1.0_dp) ! y = 1
   end subroutine&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Now the solution matches the multigrid solver in the link in my original post.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Poisson solution (correct)" style="width: 640px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/55713i7983F8B0A8BB66E3/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="solution.png" alt="Poisson solution (correct)" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Poisson solution (correct)&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 12:10:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Poisson-Solver-issue-with-corner-values/m-p/1605325#M36206</guid>
      <dc:creator>ivanp</dc:creator>
      <dc:date>2024-06-10T12:10:45Z</dc:date>
    </item>
    <item>
      <title>Re:Poisson Solver: issue with corner values</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Poisson-Solver-issue-with-corner-values/m-p/1605337#M36207</link>
      <description>&lt;P&gt;ok, then the thread is closing.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Jun 2024 12:36:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Poisson-Solver-issue-with-corner-values/m-p/1605337#M36207</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2024-06-10T12:36:19Z</dc:date>
    </item>
  </channel>
</rss>

