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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 798 - (hide annotations)
Fri Aug 4 01:05:36 2006 UTC (13 years, 3 months ago) by gross
File MIME type: text/plain
File size: 4598 byte(s)
Reimplementation of the assemblage with persistent jacobeans.
There are also a few changes to the tests which has now
dramatically reduced the memory demand.


1 jgs 150 /*
2 elspeth 626 ************************************************************
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 jgs 150 */
13 jgs 82
14     /**************************************************************/
15    
16     /* Some utility routines: */
17    
18     /**************************************************************/
19    
20     /* author: gross@access.edu.au */
21     /* Version: $Id$ */
22    
23     /**************************************************************/
24    
25 jgs 150 #ifndef INC_FINLEY_UTIL
26     #define INC_FINLEY_UTIL
27 jgs 82
28 jgs 150 #include "Finley.h"
29    
30 jgs 82 /**************************************************************/
31    
32 jgs 123 void Finley_Util_Gather_double(dim_t len,index_t* index,dim_t numData,double* in,double * out);
33     void Finley_Util_Gather_int(dim_t len,index_t* index,dim_t numData,index_t* in,index_t * out);
34 gross 798 void Finley_Util_AddScatter(dim_t len,index_t* index,dim_t numData,double* in,double * out, index_t bound);
35 jgs 123 void Finley_Util_SmallMatMult(dim_t A1,dim_t A2, double* A, dim_t B2, double*B, double* C);
36     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(dim_t len,dim_t dim,double* A,double *invA, double* det);
38     void Finley_Util_DetOfSmallMat(dim_t len,dim_t dim,double* A,double* det);
39     void Finley_NormalVector(dim_t len, dim_t dim, dim_t dim1, double* A,double* Normal);
40     void Finley_LengthOfNormalVector(dim_t len, dim_t dim, dim_t dim1, double* A,double* length);
41     void Finley_Util_InvertMap(dim_t, index_t*,dim_t, index_t*);
42     index_t Finley_Util_getMaxInt(dim_t dim,dim_t N,index_t* values);
43     index_t Finley_Util_getMinInt(dim_t dim,dim_t N,index_t* values);
44     dim_t Finley_Util_packMask(dim_t N,bool_t* mask,index_t* index);
45     bool_t Finley_Util_isAny(dim_t N,index_t* array,index_t value);
46     void Finley_copyDouble(dim_t n,double* source,double* target);
47     index_t Finley_Util_cumsum(dim_t,index_t*);
48 jgs 147 bool_t Finley_Util_anyNonZeroDouble(dim_t N,double* values);
49 jgs 82
50 bcumming 751 #ifdef PASO_MPI
51     void Finley_printDoubleArray( FILE *fid, dim_t n, double *array, char *name );
52     void Finley_printIntArray( FILE *fid, dim_t n, int *array, char *name );
53     void Finley_printMaskArray( FILE *fid, dim_t n, int *array, char *name );
54     #endif
55 jgs 82
56 jgs 102
57 bcumming 751
58 jgs 82 /* Finley_Util_orderValueAndIndex is used to sort items by a value */
59     /* index points to the location of the original item array. */
60     /* it can be used to reorder the array */
61     struct Finley_Util_ValueAndIndex {
62 jgs 123 index_t index;
63     index_t value;
64 jgs 82 };
65     typedef struct Finley_Util_ValueAndIndex Finley_Util_ValueAndIndex;
66    
67 jgs 123 void Finley_Util_sortValueAndIndex(dim_t n,Finley_Util_ValueAndIndex* array);
68 jgs 82 int Finley_Util_ValueAndIndex_compar(const void *, const void *);
69    
70     #endif /* #ifndef INC_FINLEY_UTIL */
71 jgs 123
72     /*
73 jgs 147 * Revision 1.8 2005/08/12 01:45:43 jgs
74     * erge of development branch dev-02 back to main trunk on 2005-08-12
75     *
76 jgs 150 * Revision 1.7.2.2 2005/09/07 06:26:22 gross
77     * the solver from finley are put into the standalone package paso now
78     *
79 jgs 147 * Revision 1.7.2.1 2005/08/04 22:41:11 gross
80     * some extra routines for finley that might speed-up RHS assembling in some cases (not actived right now)
81     *
82 jgs 123 * Revision 1.7 2005/07/08 04:07:59 jgs
83     * Merge of development branch back to main trunk on 2005-07-08
84     *
85     * Revision 1.1.1.1.2.4 2005/06/29 02:34:57 gross
86     * some changes towards 64 integers in finley
87     *
88     * Revision 1.1.1.1.2.3 2005/03/02 23:35:06 gross
89     * reimplementation of the ILU in Finley. block size>1 still needs some testing
90     *
91     * Revision 1.1.1.1.2.2 2005/02/18 02:27:31 gross
92     * two function that will be used for a reimplementation of the ILU preconditioner
93     *
94     * Revision 1.1.1.1.2.1 2004/11/12 06:58:19 gross
95     * 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
96     *
97     * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
98     * initial import of project esys2
99     *
100     * Revision 1.3 2004/08/26 12:03:52 gross
101     * Some other bug in Finley_Assemble_gradient fixed.
102     *
103     * Revision 1.2 2004/07/02 04:21:13 gross
104     * Finley C code has been included
105     *
106     * Revision 1.1.1.1 2004/06/24 04:00:40 johng
107     * Initial version of eys using boost-python.
108     *
109     *
110     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26