Turn on suggestions

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 data fitting - boundary conditions for quadratic spline interpolation

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

Highlighted

Paolo_D

Beginner

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

11-10-2020
07:52 AM

71 Views

Hello All,

I'm quite new on using MKL data fitting function. I'm working with Visual Fortran and I have the 64bit MKL library - Version 2019.0.5.

I need to use the quadratic spline interpolation so I followed the relevant installed example (\mkl\examples\datafittingf\source\dfdquadraticspline.f) as well as the reference manual.

My issues are about the boundary conditions:

1. My first choice was setting bc_type = DF_NO_BC, but this gave me an error, although from the manual seems this option is allowed for all type of spline. Is there any possibility to not provide boundary conditions quadratic splines ?

2. In the mkl example is used bc_type = DF_BC_Q_VAL and with bc(1) = 1.0. In the manual is written the boundary condition value must be the Function value at point (x0 + x1)/2, when bc_type = DF_BC_Q_VAL, but I only have the function samples at breakpoints, how I can handle this case ?

3. If boundary conditions are mandatory, how can set them when the number of function to interpolate is greater than one (NNY > 1) ? For example, if I have two functions should I size bc(2) and put the bc of the first function in bc(1) and the bc of the second function in bc(2) ?

Thanks in advance for your help.

Best regards

Paolo

Accepted Solutions

Highlighted

Pavel_D_Intel1

Employee

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

11-12-2020
02:00 AM

51 Views

Hi Paolo,

Let me try to answer your questions.

Default quadratic splines support only DF_BC_Q_VAL boundary conditions type.

>> My first choice was setting bc_type = DF_NO_BC, but this gave me an error, although from the manual seems this option is allowed for all type of spline.

We will improve our oneMKL Data Fitting developer reference manual in the future releases. Thank you for finding an incorrect description!

>> In the manual is written the boundary condition value must be the Function value at point (x0 + x1)/2, when bc_type = DF_BC_Q_VAL, but I only have the function samples at breakpoints, how I can handle this case ?

I could suggest to use the another interpolation type to find this value (e.g. you can simply use linear interpolant).

>> If boundary conditions are mandatory, how can set them when the number of function to interpolate is greater than one (NNY > 1) ? For example, if I have two functions should I size bc(2) and put the bc of the first function in bc(1) and the bc of the second function in bc(2)

Size of bc array in case of DF_BC_Q_VAL is 1. Boundary conditions (the same as internal conditions) are applied for each coordinate of the vector-valued function.

Best regards,

Pavel

3 Replies

Highlighted

Pavel_D_Intel1

Employee

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

11-12-2020
02:00 AM

52 Views

Hi Paolo,

Let me try to answer your questions.

Default quadratic splines support only DF_BC_Q_VAL boundary conditions type.

>> My first choice was setting bc_type = DF_NO_BC, but this gave me an error, although from the manual seems this option is allowed for all type of spline.

We will improve our oneMKL Data Fitting developer reference manual in the future releases. Thank you for finding an incorrect description!

>> In the manual is written the boundary condition value must be the Function value at point (x0 + x1)/2, when bc_type = DF_BC_Q_VAL, but I only have the function samples at breakpoints, how I can handle this case ?

I could suggest to use the another interpolation type to find this value (e.g. you can simply use linear interpolant).

>> If boundary conditions are mandatory, how can set them when the number of function to interpolate is greater than one (NNY > 1) ? For example, if I have two functions should I size bc(2) and put the bc of the first function in bc(1) and the bc of the second function in bc(2)

Size of bc array in case of DF_BC_Q_VAL is 1. Boundary conditions (the same as internal conditions) are applied for each coordinate of the vector-valued function.

Best regards,

Pavel

Highlighted

Gennady_F_Intel

Moderator

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

11-12-2020
03:27 AM

48 Views

The documentation would be improved and this thread would be updated asap.

Highlighted

Paolo_D

Beginner

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

11-16-2020
12:47 AM

32 Views

Thank you very much Pavel.

Best Regards

Paolo

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