Commit 61bfe207 authored by SamuelBrieden's avatar SamuelBrieden
Browse files

taken care of the case thatan x-array with 2 entries only needs to be splined...

taken care of the case thatan x-array with 2 entries only needs to be splined by using the natural_spline and not the estimated derivative spline method by default in this particular case
parent 779fc65d
......@@ -589,6 +589,8 @@ int array_spline_table_lines(
return _FAILURE_;
}
if (x_size==2) spline_mode = _SPLINE_NATURAL_; // in the case of only 2 x-values, only the natural spline method is appropriate, for _SPLINE_EST_DERIV_ at least 3 x-values are needed.
index_x=0;
......@@ -749,6 +751,8 @@ int array_logspline_table_lines(
return _FAILURE_;
}
if (x_size==2) spline_mode = _SPLINE_NATURAL_; // in the case of only 2 x-values, only the natural spline method is appropriate, for _SPLINE_EST_DERIV_ at least 3 x-values are needed.
index_x=0;
......@@ -910,6 +914,8 @@ int array_spline_table_columns(
return _FAILURE_;
}
if (x_size==2) spline_mode = _SPLINE_NATURAL_; // in the case of only 2 x-values, only the natural spline method is appropriate, for _SPLINE_EST_DERIV_ at least 3 x-values are needed.
index_x=0;
if (spline_mode == _SPLINE_NATURAL_) {
......@@ -1079,6 +1085,8 @@ int array_spline_table_columns2(
return _FAILURE_;
}
if (x_size==2) spline_mode = _SPLINE_NATURAL_; // in the case of only 2 x-values, only the natural spline method is appropriate, for _SPLINE_EST_DERIV_ at least 3 x-values are needed.
#pragma omp parallel \
shared(x,x_size,y_array,y_size,ddy_array,spline_mode,p,qn,un,u) \
private(index_y,index_x,sig,dy_first,dy_last)
......@@ -1201,6 +1209,8 @@ int array_spline_table_one_column(
return _FAILURE_;
}
if (x_size==2) spline_mode = _SPLINE_NATURAL_; // in the case of only 2 x-values, only the natural spline method is appropriate, for _SPLINE_EST_DERIV_ at least 3 x-values are needed.
/************************************************/
index_x=0;
......@@ -1334,6 +1344,8 @@ int array_logspline_table_one_column(
return _FAILURE_;
}
if (x_size==2) spline_mode = _SPLINE_NATURAL_; // in the case of only 2 x-values, only the natural spline method is appropriate, for _SPLINE_EST_DERIV_ at least 3 x-values are needed.
/************************************************/
index_x=0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment