0001 #include <stdio.h>
0002 #include <stdlib.h>
0003 #include <math.h>
0004 #include "Fokker_Planck_DKE_loop.h"
0005
0006 int division(struct Tensor A,struct Tensor B,struct Tensor* C)
0007 {
0008 int i;
0009
0010
0011 for(i=0;iif(B.vals[i]==0.0){return -1;}
0013 }
0014
0015 if (B.ndims ==2 && B.sizedim[0]==1 && B.sizedim[1]==1)
0016
0017 Tensor_Create(A.ndims,A.sizedim,C);
0018
0019
0020
0021
0022 for(i=0;ireturn 0;
0026 }
0027
0028
0029
0030 else if(A.ndims !=B.ndims){return -1;}
0031 else {
0032 for(i=0;iif(A.sizedim[i] != B.sizedim[i]){return -1;}
0034 }
0035
0036
0037
0038
0039
0040
0041 Tensor_Create(A.ndims,A.sizedim,C);
0042
0043 for(i=0;i