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

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

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

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

Link Copied

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

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

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

Thank you very much Pavel.

Best Regards

Paolo

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

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

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