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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 201 - (show annotations)
Wed Nov 23 04:10:21 2005 UTC (14 years ago) by jgs
Original Path: trunk/finley/src/finley/Util.h
File MIME type: text/plain
File size: 4651 byte(s)
copy finleyC and CPPAdapter to finley and finley/CPPAdapter to
facilitate scons builds

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26