<?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:Not-a-knot spline not working with uniform partition of x in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Not-a-knot-spline-not-working-with-uniform-partition-of-x/m-p/1345875#M32478</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We are looking into this issue, we will get back to you soon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 22 Dec 2021 04:55:10 GMT</pubDate>
    <dc:creator>VidyalathaB_Intel</dc:creator>
    <dc:date>2021-12-22T04:55:10Z</dc:date>
    <item>
      <title>Not-a-knot spline not working with uniform partition of x</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Not-a-knot-spline-not-working-with-uniform-partition-of-x/m-p/1345611#M32476</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;I noticed that when trying to construct a natural cubic spline with not-a-knot boundary conditions, I get different results depending on how the partition x is specified.&lt;/P&gt;
&lt;P&gt;For example, I want to use x values 1.0, 3.0, 5.0, 7.0, 9.0. If I pass an array x = { 1.0, 3.0, 5.0, 7.0, 9.0 } and specify xhint = DF_NON_UNIFORM_PARTITION, I get a spline that looks like it satisfies the not-a-knot conditions (I can see that the third derivatives are the same for the first two polynomials, and for the last two polynomials). However, if I pass an array x = { 1.0, 9.0 } and specify xhint = DF_UNIFORM_PARTITION instead, I get a different spline, and it does not satisfy the boundary conditions. In my view, the results should be the same, since these are just two different ways of providing the same input data.&lt;/P&gt;
&lt;P&gt;The problem does not seem to appear when using other boundary conditions (I tried&amp;nbsp;DF_BC_1ST_LEFT_DER | DF_BC_1ST_RIGHT_DER with both derivative set to zero).&lt;/P&gt;
&lt;P&gt;Here's the complete source code:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;iostream&amp;gt;
#include &amp;lt;iomanip&amp;gt;
#include &amp;lt;mkl_df.h&amp;gt;

#define nx 5

int main() {
	double x[] = { 1.0, 9.0 };
	int xhint = DF_UNIFORM_PARTITION;
	// double x[] = { 1.0, 3.0, 5.0, 7.0, 9.0 };
	// int xhint = DF_NON_UNIFORM_PARTITION;
	double y[] = { 1.0, 4.0, 3.0, 5.0, 2.0 };
	int ny = 1;
	int nhint = DF_NO_HINT;
	DFTaskPtr task;
	int s_order = DF_PP_CUBIC;
	int s_type = DF_PP_NATURAL;
	int bc_type = DF_BC_NOT_A_KNOT;
	double* bc = NULL;
	int ic_type = DF_NO_IC;
	double* ic = NULL;
	double scoeff[nx * 4];
	int scoeffhint = DF_NO_HINT;
	int status1 = dfdNewTask1D(&amp;amp;task, nx, x, xhint, ny, y, nhint);
	int status2 = dfdEditPPSpline1D(task, s_order, s_type, bc_type, bc,	ic_type, ic, scoeff, scoeffhint);
	int status3 = dfdConstruct1D(task, DF_PP_SPLINE, DF_METHOD_STD);

	int counter = 0;
	for (int i = 0; i &amp;lt; nx - 1; i++)
	{
		for (int j = 0; j &amp;lt; 4; j++)
		{
			std::cout &amp;lt;&amp;lt; std::setw(12) &amp;lt;&amp;lt; scoeff[counter] &amp;lt;&amp;lt; "\t";
			counter++;
		}
		std::cout &amp;lt;&amp;lt; std::endl;
	}
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;The output is&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;           1      -0.0967262               2       -0.600818
           4        0.693452        -1.60491        0.504092
           3        0.322917         1.41964       -0.540551
           5       -0.485119        -1.82366         0.65811&lt;/LI-CODE&gt;
&lt;P&gt;However, if I replace the first two lines with the commented lines (to get a non-uniform partition), I get&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;           1         4.29167        -1.84375        0.223958
           4       -0.395833            -0.5        0.223958
           3        0.291667         0.84375       -0.244792
           5        0.729167          -0.625       -0.244792&lt;/LI-CODE&gt;
&lt;P&gt;What am I missing?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 07:44:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Not-a-knot-spline-not-working-with-uniform-partition-of-x/m-p/1345611#M32476</guid>
      <dc:creator>mahalex</dc:creator>
      <dc:date>2021-12-21T07:44:51Z</dc:date>
    </item>
    <item>
      <title>Re:Not-a-knot spline not working with uniform partition of x</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Not-a-knot-spline-not-working-with-uniform-partition-of-x/m-p/1345875#M32478</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We are looking into this issue, we will get back to you soon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Dec 2021 04:55:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Not-a-knot-spline-not-working-with-uniform-partition-of-x/m-p/1345875#M32478</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2021-12-22T04:55:10Z</dc:date>
    </item>
    <item>
      <title>Re:Not-a-knot spline not working with uniform partition of x</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Not-a-knot-spline-not-working-with-uniform-partition-of-x/m-p/1346384#M32497</link>
      <description>&lt;P&gt;Alex,&lt;/P&gt;&lt;P&gt;it's a bug and we will fix it in one of the next updates. The problem is escalated. This thread will keep being informed of the status.&lt;/P&gt;&lt;P&gt;-Gennady&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Dec 2021 02:10:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Not-a-knot-spline-not-working-with-uniform-partition-of-x/m-p/1346384#M32497</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-12-24T02:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Not-a-knot spline not working with uniform partition of x</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Not-a-knot-spline-not-working-with-uniform-partition-of-x/m-p/1348629#M32528</link>
      <description>&lt;P&gt;Hi Gennady,&lt;/P&gt;
&lt;P&gt;thanks for the quick response!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 07:25:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Not-a-knot-spline-not-working-with-uniform-partition-of-x/m-p/1348629#M32528</guid>
      <dc:creator>mahalex</dc:creator>
      <dc:date>2022-01-05T07:25:09Z</dc:date>
    </item>
    <item>
      <title>Re:Not-a-knot spline not working with uniform partition of x</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Not-a-knot-spline-not-working-with-uniform-partition-of-x/m-p/1388551#M33208</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 16px; font-family: intel-clear;"&gt;Thank you again for reaching us. This issue will be available in oneMKL 2022.2. Let's closing this thread now.&amp;nbsp;If you require additional assistance from Intel, please start a new thread.&amp;nbsp;Any further interaction in this thread will be considered community only.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 30 May 2022 08:41:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Not-a-knot-spline-not-working-with-uniform-partition-of-x/m-p/1388551#M33208</guid>
      <dc:creator>Ruqiu_C_Intel</dc:creator>
      <dc:date>2022-05-30T08:41:56Z</dc:date>
    </item>
  </channel>
</rss>

