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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 102 - (hide annotations)
Wed Dec 15 07:08:39 2004 UTC (15 years ago) by jgs
Original Path: trunk/esys2/finley/src/finleyC/Util.h
File MIME type: text/plain
File size: 2415 byte(s)
*** empty log message ***

1 jgs 82 /* $Id$ */
2    
3     #ifndef INC_FINLEY_UTIL
4     #define INC_FINLEY_UTIL
5    
6     /**************************************************************/
7    
8     /* Some utility routines: */
9    
10     /**************************************************************/
11    
12     /* Copyrights by ACcESS Australia, 2003 */
13     /* author: gross@access.edu.au */
14     /* Version: $Id$ */
15    
16     /**************************************************************/
17    
18     #include "Common.h"
19    
20     /**************************************************************/
21    
22     void Finley_Util_Gather_double(int len,maybelong* index,int numData,double* in,double * out);
23     void Finley_Util_Gather_int(int len,maybelong* index,int numData,maybelong* in,maybelong * out);
24     void Finley_Util_AddScatter(int len,maybelong* index,int numData,double* in,double * out);
25     void Finley_Util_SmallMatMult(int A1,int A2, double* A, int B2, double*B, double* C);
26     void Finley_Util_SmallMatSetMult(int len,int A1,int A2, double* A, int B2, double*B, double* C);
27     void Finley_Util_InvertSmallMat(int len,int dim,double* A,double *invA, double* det);
28     void Finley_Util_DetOfSmallMat(int len,int dim,double* A,double* det);
29     void Finley_NormalVector(int len, int dim, int dim1, double* A,double* Normal);
30     void Finley_LengthOfNormalVector(int len, int dim, int dim1, double* A,double* length);
31     void Finley_Util_InvertMap(int, maybelong*,int, maybelong*);
32     maybelong Finley_Util_getMaxInt(int dim,int N,maybelong* values);
33     maybelong Finley_Util_getMinInt(int dim,int N,maybelong* values);
34     maybelong Finley_Util_packMask(maybelong N,maybelong* mask,maybelong* index);
35     int Finley_Util_isAny(maybelong N,maybelong* array,maybelong value);
36     void Finley_copyDouble(int n,double* source,double* target);
37 jgs 102 int Finley_Util_SmallMatLU(int,double*,double*,int*);
38     void Finley_Util_SmallMatForwardBackwardSolve(int,int,double*,int*,double*,double*);
39 jgs 82
40    
41 jgs 102
42 jgs 82 /* Finley_Util_orderValueAndIndex is used to sort items by a value */
43     /* index points to the location of the original item array. */
44     /* it can be used to reorder the array */
45     struct Finley_Util_ValueAndIndex {
46     maybelong index;
47     maybelong value;
48     };
49     typedef struct Finley_Util_ValueAndIndex Finley_Util_ValueAndIndex;
50    
51     void Finley_Util_sortValueAndIndex(int n,Finley_Util_ValueAndIndex* array);
52    
53     int Finley_Util_ValueAndIndex_compar(const void *, const void *);
54    
55     #endif /* #ifndef INC_FINLEY_UTIL */
56    
57     /*
58     * $Log$
59 jgs 102 * Revision 1.4 2004/12/15 07:08:34 jgs
60 jgs 97 * *** empty log message ***
61 jgs 82 *
62 jgs 97 *
63 jgs 82 *
64     */

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26