/[escript]/trunk/dudley/src/Util.c
ViewVC logotype

Diff of /trunk/dudley/src/Util.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4285 by jfenwick, Tue Jan 22 09:30:23 2013 UTC revision 4286 by caltinay, Thu Mar 7 04:28:11 2013 UTC
# Line 32  Line 32 
32    
33  /************************************************************************************/  /************************************************************************************/
34    
35  /*   returns true if any of the values in the short array values is not equalt to Zero */  /*   returns true if any of the values in the short array values is not equal to zero */
36    
37  bool_t Dudley_Util_anyNonZeroDouble(dim_t N, double *values)  bool_t Dudley_Util_anyNonZeroDouble(dim_t N, double *values)
38  {  {
# Line 122  void Dudley_Util_SmallMatMult(dim_t A1, Line 122  void Dudley_Util_SmallMatMult(dim_t A1,
122      }      }
123  }  }
124    
125  /*    multiplies a two sets of matries: */  /*    multiplies two sets of matrices: */
126    
127  /*        A(1:A1,1:A2,i)=B(1:A1,1:B2,i)*C(1:B2,1:A2,i) i=1,len */  /*        A(1:A1,1:A2,i)=B(1:A1,1:B2,i)*C(1:B2,1:A2,i) i=1,len */
128    
# Line 145  void Dudley_Util_SmallMatSetMult(dim_t l Line 145  void Dudley_Util_SmallMatSetMult(dim_t l
145      }      }
146  }  }
147    
148  /*    multiplies a set of matries with a single matrix: */  /*    multiplies a set of matrices with a single matrix: */
149    
150  /*        A(1:A1,1:A2,i)=B(1:A1,1:B2,i)*C(1:B2,1:A2) i=1,len */  /*        A(1:A1,1:A2,i)=B(1:A1,1:B2,i)*C(1:B2,1:A2) i=1,len */
151    
# Line 169  void Dudley_Util_SmallMatSetMult1(dim_t Line 169  void Dudley_Util_SmallMatSetMult1(dim_t
169  }  }
170    
171  /*    inverts the set of dim x dim matrices A(:,:,1:len) with dim=1,2,3 */  /*    inverts the set of dim x dim matrices A(:,:,1:len) with dim=1,2,3 */
172  /*    the determinante is returned. */  /*    the determinant is returned. */
173    
174  void Dudley_Util_InvertSmallMat(dim_t len, dim_t dim, double *A, double *invA, double *det)  void Dudley_Util_InvertSmallMat(dim_t len, dim_t dim, double *A, double *invA, double *det)
175  {  {
# Line 262  void Dudley_Util_InvertSmallMat(dim_t le Line 262  void Dudley_Util_InvertSmallMat(dim_t le
262      return;      return;
263  }  }
264    
265  /*    sets the derterminate of a set of dim x dim matrices A(:,:,1:len) with dim=1,2,3 */  /*    sets the determinant of a set of dim x dim matrices A(:,:,1:len) with dim=1,2,3 */
266    
267  void Dudley_Util_DetOfSmallMat(dim_t len, dim_t dim, double *A, double *det)  void Dudley_Util_DetOfSmallMat(dim_t len, dim_t dim, double *A, double *det)
268  {  {
# Line 602  bool_t Dudley_Util_isAny(dim_t N, index_ Line 602  bool_t Dudley_Util_isAny(dim_t N, index_
602      return out;      return out;
603  }  }
604    
605  /* calculates the cummultative sum in array and returns the total sum */  /* calculates the cummulative sum in array and returns the total sum */
606  index_t Dudley_Util_cumsum(dim_t N, index_t * array)  index_t Dudley_Util_cumsum(dim_t N, index_t * array)
607  {  {
608      index_t out = 0, tmp;      index_t out = 0, tmp;

Legend:
Removed from v.4285  
changed lines
  Added in v.4286

  ViewVC Help
Powered by ViewVC 1.1.26