91 if ((t<=s_times->times->element[s_times->
times->
nl]) || (s1==NULL) || (s0==NULL)) {
94 t0=s_times->
times->element[k];
95 t1=s_times->
times->element[k+1];
101 }
else while ((t>t1) && (k<s_times->times->nh)) {
111 t1=s_times->
times->element[k+1];
114 if ((s1->
nh!=s0->
nh) || (sources->
nh!=s0->
nh)) printf(
"Error in get_sources: vector s0 [%ld]and s1 [%ld] and s[%ld] have different size!! \n",s1->
nh,s0->
nh,sources->
nh);
115 for(j=sources->
nl;j<=sources->nh;j++) {
116 sources->element[j]=(t-t0)/(t1-t0)*s1->element[j]+(t1-t)/(t1-t0)*s0->element[j];
120 if (map0!=NULL) free(map0);
121 if (map1!=NULL) free(map1);
140 if (!s_t)
t_error(
"In get_s_times: s_t was not allocated! ");
152 printf(
"Error in get_sorces: times and s_suffixes has different size %ld ad %ld respectively!! \n",s_t->
times->
nh,s_t->
s_suffixes->
index->
nh);
155 printf(
"Error in get_sorces: times %ld are less than two values!! \n",s_t->
times->
nh);
159 for (k=s_t->
times->
nl;k<s_t->times->nh;k++) {
160 if (s_t->
times->element[k+1]<s_t->
times->element[k]) printf(
"Error in get_sources: times[%ld]=%le is lower than times[%ld]=%le !! \n",k+1,s_t->
times->element[k+1],k,s_t->
times->element[k]);
176 if (s_t!=NULL) free(s_t);
195 static double t0,tp0;
196 static double t1,tp1;
204 if ((t<=dirichlet_times->times->element[dirichlet_times->
times->
nl]) || (d1==NULL) || (d0==NULL)) {
208 t0=dirichlet_times->
times->element[k];
209 t1=dirichlet_times->
times->element[k+1];
216 }
else while ((t>t1) && (k<dirichlet_times->times->nh)) {
225 t1=dirichlet_times->
times->element[k+1];
233 if ((d1->
nh!=d0->
nh) || (dirichlet->
nh!=d0->
nh)) printf(
"Error in get_sources: vector d0 [%ld]and d1 [%ld] and dirichlet[%ld] have different size!! \n",d1->
nh,d0->
nh,dirichlet->
nh);
234 for(j=dirichlet->
nl;j<=dirichlet->nh;j++) {
242 dirichlet->element[j]=(tp-tp0)/(tp1-tp0)*d1->element[j]+(tp1-tp)/(tp1-tp0)*d0->element[j];