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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 100 - (hide annotations)
Wed Dec 15 03:48:48 2004 UTC (15 years, 2 months ago) by jgs
Original Path: trunk/esys2/finley/src/finleyC/Util.h
File MIME type: text/plain
File size: 2635 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    
38    
39     /* Finley_Util_orderValueAndIndex is used to sort items by a value */
40     /* index points to the location of the original item array. */
41     /* it can be used to reorder the array */
42     struct Finley_Util_ValueAndIndex {
43     maybelong index;
44     maybelong value;
45     };
46     typedef struct Finley_Util_ValueAndIndex Finley_Util_ValueAndIndex;
47    
48     void Finley_Util_sortValueAndIndex(int n,Finley_Util_ValueAndIndex* array);
49    
50     int Finley_Util_ValueAndIndex_compar(const void *, const void *);
51    
52     #endif /* #ifndef INC_FINLEY_UTIL */
53    
54     /*
55     * $Log$
56 jgs 100 * Revision 1.3 2004/12/15 03:48:47 jgs
57 jgs 97 * *** empty log message ***
58 jgs 82 *
59 jgs 97 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
60     * initial import of project esys2
61     *
62 jgs 82 * Revision 1.3 2004/08/26 12:03:52 gross
63     * Some other bug in Finley_Assemble_gradient fixed.
64     *
65     * Revision 1.2 2004/07/02 04:21:13 gross
66     * Finley C code has been included
67     *
68     * Revision 1.1.1.1 2004/06/24 04:00:40 johng
69     * Initial version of eys using boost-python.
70     *
71     *
72     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26