51 if ((V->element[1]>0 && x>=V->element[2]) || (V->element[1]<0 && x<=V->element[2])) {
84 if (l<xtensor->ndl && l>xtensor->
ndh) {
86 sprintf(error_message,
"Number of layers does not correspond in extract_new_map function with doubletensor NAME: %s l=%ld ndl=%ld ndh=%ld \n",xtensor->
name,l,xtensor->
ndl,xtensor->
ndh);
91 for(r=xm->
nrl;r<=xm->nrh;r++){
92 for(c=xm->
ncl;c<=xm->nch;c++){
94 xm->element[r][c]=UVref->
V->element[2];
96 xm->element[r][c]=xtensor->element[l][r][c];
125 if (m->
nch != v->
nh)
t_error(
"Error in prod_doublematvet(): The matrix and the vector have not proper dimensions\n");
126 for(i=m->
nrl;i<=m->nrh;i++) {
128 for (j=m->
ncl;j<=m->nch;j++) {
129 buf+=m->element[i][j]*v->element[j];
154 t_error(
"Error in prodscal(): The two vectors have not equal dimensions\n");
155 for(i=a->
nl;i<=a->nh;i++) {
156 p+=a->element[i]*b->element[i];
167 for(i=b->
nl;i<=b->nh;i++) {
168 p->element[i]= a * b->element[i];
200 t_error(
"Error in function linear_span_doubletensor: doubltensors do not have the same numbers of rows!! ");
201 }
else if (T1->
nch!=T2->
nch){
202 t_error(
"Error in function linear_span_doubletensor: doubletensors do not have the same numbers of columns!! ");
203 }
else if(T1->
ndh!=T2->
ndh) {
204 t_error(
"linear_span_doubletensor: doubletensors do not have the same numbers of columns!!");
207 for(r=T1->
nrl;r<=T1->nrh;r++){
208 for(c=T1->
ncl;c<=T1->nch;c++){
209 for(l=T1->
ndl;l<=T1->ndh;l++){
211 TL->element[l][r][c]=V->element[2];
213 TL->element[l][r][c]=V->element[2]=c1*T1->element[l][r][c]+c2*T2->element[l][r][c];
253 t_error(
"Error in function linear_span_doublematrix: doublematrices do not have the same numbers of rows!! ");
254 }
else if (M1a->
nch!=M2a->
nch)
t_error(
"Error in function linear_span_doublematrix: doublematrices do not have the same numbers of columns!! ");
257 for(r=M1a->
nrl;r<=M1a->nrh;r++){
258 for(c=M1a->
ncl;c<=M1a->nch;c++){
260 ML->element[r][c]=V->element[2];
262 ML->element[r][c]=V->element[2]=c1*M1a->element[r][c]+c2*M2a->element[r][c];
289 for(r=MR->
nrl;r<=MR->nrh;r++){
290 for(r=MR->
nrl;r<=MR->nrh;r++){
291 MR->element[r][c]=M->element[c][r];
319 if ((d>=M->
ncl) && (d<=M->nch)) {
320 for(r=M->
nrl;r<=M->nrh;r++){
321 VC->element[r]=M->element[r][d];
324 printf (
"Warning: d=%ld is out of range: %ld to %ld columns",d,M->
ncl,M->
nch);
352 if ((d>=M->
nrl) && (d<=M->nrh)) {
353 for(c=M->
nrl;c<=M->nrh;c++){
354 VC->element[c]=M->element[d][c];
357 printf (
"Warning: d=%ld is out of range: %ld to %ld rows",d,M->
nrl,M->
nrh);
387 if ((c>=T->
ncl) && (c<=T->nch) && (r>=T->
nrl) && (r<=T->nrh) ) {
388 for(i=VC->
nl;i<=VC->nh;i++){
389 VC->element[i]=T->element[i][r][c];
392 printf (
"Warning: r=%ld c=%ld is out of range: %ld to %ld columns and %ld to %ld rows ",r,c,T->
nrl,T->
nrh,T->
ncl,T->
nch);