/[escript]/trunk/finley/src/Util.h
ViewVC logotype

Diff of /trunk/finley/src/Util.h

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

trunk/esys2/finley/src/finleyC/Util.h revision 97 by jgs, Tue Dec 14 05:39:33 2004 UTC trunk/finley/src/Util.h revision 626 by elspeth, Thu Mar 23 02:16:36 2006 UTC
# Line 1  Line 1 
1  /* $Id$ */  /*
2     ************************************************************
3     *          Copyright 2006 by ACcESS MNRF                   *
4     *                                                          *
5     *              http://www.access.edu.au                    *
6     *       Primary Business: Queensland, Australia            *
7     *  Licensed under the Open Software License version 3.0    *
8     *     http://www.opensource.org/licenses/osl-3.0.php       *
9     *                                                          *
10     ************************************************************
11    
12  #ifndef INC_FINLEY_UTIL  */
 #define INC_FINLEY_UTIL  
13    
14  /**************************************************************/  /**************************************************************/
15    
# Line 9  Line 17 
17    
18  /**************************************************************/  /**************************************************************/
19    
 /*   Copyrights by ACcESS Australia, 2003 */  
20  /*   author: gross@access.edu.au */  /*   author: gross@access.edu.au */
21  /*   Version: $Id$ */  /*   Version: $Id$ */
22    
23  /**************************************************************/  /**************************************************************/
24    
25  #include "Common.h"  #ifndef INC_FINLEY_UTIL
26    #define INC_FINLEY_UTIL
27    
28    #include "Finley.h"
29    
30  /**************************************************************/  /**************************************************************/
31    
32  void Finley_Util_Gather_double(int len,maybelong* index,int numData,double* in,double * out);  void Finley_Util_Gather_double(dim_t len,index_t* index,dim_t numData,double* in,double * out);
33  void Finley_Util_Gather_int(int len,maybelong* index,int numData,maybelong* in,maybelong * out);  void Finley_Util_Gather_int(dim_t len,index_t* index,dim_t numData,index_t* in,index_t * out);
34  void Finley_Util_AddScatter(int len,maybelong* index,int numData,double* in,double * out);  void Finley_Util_AddScatter(dim_t len,index_t* index,dim_t numData,double* in,double * out);
35  void Finley_Util_SmallMatMult(int A1,int A2, double* A, int B2, double*B, double* C);  void Finley_Util_SmallMatMult(dim_t A1,dim_t A2, double* A, dim_t B2, double*B, double* C);
36  void Finley_Util_SmallMatSetMult(int len,int A1,int A2, double* A, int B2, double*B, double* C);  void Finley_Util_SmallMatSetMult(dim_t len,dim_t A1,dim_t A2, double* A, dim_t B2, double*B, double* C);
37  void Finley_Util_InvertSmallMat(int len,int dim,double* A,double *invA, double* det);  void Finley_Util_InvertSmallMat(dim_t len,dim_t dim,double* A,double *invA, double* det);
38  void Finley_Util_DetOfSmallMat(int len,int dim,double* A,double* det);  void Finley_Util_DetOfSmallMat(dim_t len,dim_t dim,double* A,double* det);
39  void Finley_NormalVector(int len, int dim, int dim1, double* A,double* Normal);  void Finley_NormalVector(dim_t len, dim_t dim, dim_t dim1, double* A,double* Normal);
40  void Finley_LengthOfNormalVector(int len, int dim, int dim1, double* A,double* length);  void Finley_LengthOfNormalVector(dim_t len, dim_t dim, dim_t dim1, double* A,double* length);
41  void Finley_Util_InvertMap(int, maybelong*,int, maybelong*);  void Finley_Util_InvertMap(dim_t, index_t*,dim_t, index_t*);
42  maybelong Finley_Util_getMaxInt(int dim,int N,maybelong* values);  index_t Finley_Util_getMaxInt(dim_t dim,dim_t N,index_t* values);
43  maybelong Finley_Util_getMinInt(int dim,int N,maybelong* values);  index_t Finley_Util_getMinInt(dim_t dim,dim_t N,index_t* values);
44  maybelong Finley_Util_packMask(maybelong N,maybelong* mask,maybelong* index);  dim_t Finley_Util_packMask(dim_t N,bool_t* mask,index_t* index);
45  int Finley_Util_isAny(maybelong N,maybelong* array,maybelong value);  bool_t Finley_Util_isAny(dim_t N,index_t* array,index_t value);
46  void Finley_copyDouble(int n,double* source,double* target);  void Finley_copyDouble(dim_t n,double* source,double* target);
47  int Finley_Util_SmallMatLU(int,double*,double*,int*);  index_t Finley_Util_cumsum(dim_t,index_t*);
48  void Finley_Util_SmallMatForwardBackwardSolve(int,int,double*,int*,double*,double*);  bool_t Finley_Util_anyNonZeroDouble(dim_t N,double* values);
49    
50    
51    
# Line 43  void Finley_Util_SmallMatForwardBackward Line 53  void Finley_Util_SmallMatForwardBackward
53  /* index points to the location of the original item array. */  /* index points to the location of the original item array. */
54  /* it can be used to reorder the array */  /* it can be used to reorder the array */
55  struct Finley_Util_ValueAndIndex {  struct Finley_Util_ValueAndIndex {
56     maybelong index;     index_t index;
57     maybelong value;     index_t value;
58  };  };
59  typedef struct Finley_Util_ValueAndIndex Finley_Util_ValueAndIndex;  typedef struct Finley_Util_ValueAndIndex Finley_Util_ValueAndIndex;
60    
61  void Finley_Util_sortValueAndIndex(int n,Finley_Util_ValueAndIndex* array);  void Finley_Util_sortValueAndIndex(dim_t n,Finley_Util_ValueAndIndex* array);
   
62  int Finley_Util_ValueAndIndex_compar(const void *, const void *);  int Finley_Util_ValueAndIndex_compar(const void *, const void *);
63    
64  #endif /* #ifndef INC_FINLEY_UTIL */  #endif /* #ifndef INC_FINLEY_UTIL */
65    
66  /*  /*
67   * $Log$   * Revision 1.8  2005/08/12 01:45:43  jgs
68   * Revision 1.2  2004/12/14 05:39:31  jgs   * erge of development branch dev-02 back to main trunk on 2005-08-12
69   * *** empty log message ***   *
70     * Revision 1.7.2.2  2005/09/07 06:26:22  gross
71     * the solver from finley are put into the standalone package paso now
72     *
73     * Revision 1.7.2.1  2005/08/04 22:41:11  gross
74     * some extra routines for finley that might speed-up RHS assembling in some cases (not actived right now)
75     *
76     * Revision 1.7  2005/07/08 04:07:59  jgs
77     * Merge of development branch back to main trunk on 2005-07-08
78     *
79     * Revision 1.1.1.1.2.4  2005/06/29 02:34:57  gross
80     * some changes towards 64 integers in finley
81     *
82     * Revision 1.1.1.1.2.3  2005/03/02 23:35:06  gross
83     * reimplementation of the ILU in Finley. block size>1 still needs some testing
84     *
85     * Revision 1.1.1.1.2.2  2005/02/18 02:27:31  gross
86     * two function that will be used for a reimplementation of the ILU preconditioner
87   *   *
88   * Revision 1.1.1.1.2.1  2004/11/12 06:58:19  gross   * Revision 1.1.1.1.2.1  2004/11/12 06:58:19  gross
89   * a lot of changes to get the linearPDE class running: most important change is that there is no matrix format exposed to the user anymore. the format is chosen by the Domain according to the solver and symmetry   * a lot of changes to get the linearPDE class running: most important change is that there is no matrix format exposed to the user anymore. the format is chosen by the Domain according to the solver and symmetry

Legend:
Removed from v.97  
changed lines
  Added in v.626

  ViewVC Help
Powered by ViewVC 1.1.26