/[escript]/branches/doubleplusgood/paso/src/PasoUtil.h
ViewVC logotype

Diff of /branches/doubleplusgood/paso/src/PasoUtil.h

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

revision 1388 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 3482 by gross, Wed Mar 23 04:06:52 2011 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2010 by University of Queensland
5   *       Copyright 2007 by University of Queensland  * Earth Systems Science Computational Center (ESSCC)
6   *  * http://www.uq.edu.au/esscc
7   *                http://esscc.uq.edu.au  *
8   *        Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
9   *  Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
10   *     http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
11   *  *
12   *******************************************************/  *******************************************************/
13    
14    
15  #ifndef INC_PASO_UTIL  #ifndef INC_PASO_UTIL
16  #define INC_PASO_UTIL  #define INC_PASO_UTIL
# Line 23  Line 22 
22  /**************************************************************/  /**************************************************************/
23    
24  /*   Copyrights by ACcESS Australia, 2003,2004,2005 */  /*   Copyrights by ACcESS Australia, 2003,2004,2005 */
25  /*   author: gross@access.edu.au */  /*   author: l.gross@uq.edu.au */
26    
27  /**************************************************************/  /**************************************************************/
28    
29  #include "Common.h"  #include "Common.h"
30    #include "esysUtils/Esys_MPI.h"
31    #ifdef _OPENMP
32    #include <omp.h>
33    #endif
34    
35  /**************************************************************/  /**************************************************************/
36    
37  index_t Paso_Util_cumsum(dim_t,index_t*);  index_t Paso_Util_cumsum(dim_t,index_t*);
 void Paso_copyDouble(dim_t n,double* source, double* target);  
38  bool_t Paso_Util_isAny(dim_t N,index_t* array,index_t value);  bool_t Paso_Util_isAny(dim_t N,index_t* array,index_t value);
39    void Paso_zeroes(const dim_t n, double* x);
40    void Paso_Update(const dim_t n, const double a, double* x, const double b, const double* y);
41    void Paso_LinearCombination(const dim_t n, double*z, const double a,const double* x, const double b, const double* y);
42    double Paso_InnerProduct(const dim_t n,const double* x, const double* y, Esys_MPIInfo* mpiinfo);
43    double Paso_l2(const dim_t n, const double* x, Esys_MPIInfo* mpiinfo);
44    void ApplyGivensRotations(const dim_t n,double* v,const double* c,const double* s);
45    void Paso_Copy(const dim_t n, double* out, const double* in);
46    bool_t Paso_fileExists( const char* filename );
47    double Paso_lsup(const dim_t n, const double* x, Esys_MPIInfo* mpiinfo);
48    index_t Paso_Util_cumsum_maskedTrue(dim_t N,index_t* array, bool_t* mask);
49    index_t Paso_Util_cumsum_maskedFalse(dim_t N,index_t* array, bool_t* mask);
50    index_t Paso_Util_arg_max(dim_t n, dim_t* lambda);
51    index_t Paso_Util_iMax(const dim_t N,const index_t* array);
52    dim_t Paso_Util_numPositives(const dim_t N, const double *x);
53    
54    #define Paso_Scale(n, x, a) Paso_Update(n, a, x, 0, x);
55    #define Paso_AXPY(n, x, a, y) Paso_Update(n, 1., x, a,  y);
56    #define Paso_copyShortDouble(n, source, target)  memcpy(target,source,sizeof(double)*(size_t)n)
57    
 #endif /* #ifndef INC_PASO_UTIL */  
58    
59  /*  #endif /* #ifndef INC_PASO_UTIL */
  * $Log$  
  * Revision 1.2  2005/09/15 03:44:39  jgs  
  * Merge of development branch dev-02 back to main trunk on 2005-09-15  
  *  
  * Revision 1.1.2.1  2005/09/05 06:29:48  gross  
  * These files have been extracted from finley to define a stand alone libray for iterative  
  * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but  
  * has not been tested yet.  
  *  
  *  
  */  

Legend:
Removed from v.1388  
changed lines
  Added in v.3482

  ViewVC Help
Powered by ViewVC 1.1.26