/[escript]/trunk/paso/src/PasoUtil.h
ViewVC logotype

Contents of /trunk/paso/src/PasoUtil.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1669 - (show annotations)
Thu Jul 24 01:10:04 2008 UTC (11 years, 6 months ago) by gross
File MIME type: text/plain
File size: 1810 byte(s)
A problem with VTK writer and MPI is fixed: Apparently MPI_file_open does not "delete" the file  which has the effect that 
if less date are written into the file as the file contained when opened bits of the previous containt remains in the file. This problem is fixed
by deleting the file if it exists before open it with MPI. The additional function Paso_existFile needed to be added as there is no standart C 
function to test the exists of a file.


1
2 /* $Id$ */
3
4 /*******************************************************
5 *
6 * Copyright 2003-2007 by ACceSS MNRF
7 * Copyright 2007 by University of Queensland
8 *
9 * http://esscc.uq.edu.au
10 * Primary Business: Queensland, Australia
11 * Licensed under the Open Software License version 3.0
12 * http://www.opensource.org/licenses/osl-3.0.php
13 *
14 *******************************************************/
15
16 #ifndef INC_PASO_UTIL
17 #define INC_PASO_UTIL
18
19 /**************************************************************/
20
21 /* Some utility routines: */
22
23 /**************************************************************/
24
25 /* Copyrights by ACcESS Australia, 2003,2004,2005 */
26 /* author: gross@access.edu.au */
27
28 /**************************************************************/
29
30 #include "Common.h"
31 #include "Paso_MPI.h"
32 #ifdef _OPENMP
33 #include <omp.h>
34 #endif
35
36 /**************************************************************/
37
38 index_t Paso_Util_cumsum(dim_t,index_t*);
39 bool_t Paso_Util_isAny(dim_t N,index_t* array,index_t value);
40 void Paso_zeroes(const dim_t n, double* x);
41 void Paso_Update(const dim_t n, const double a, double* x, const double b, const double* y);
42 void Paso_LinearCombination(const dim_t n, double*z, const double a,const double* x, const double b, const double* y);
43 double Paso_InnerProduct(const dim_t n,const double* x, const double* y, Paso_MPIInfo* mpiinfo);
44 double Paso_l2(const dim_t n, const double* x, Paso_MPIInfo* mpiinfo);
45 void ApplyGivensRotations(const dim_t n,double* v,const double* c,const double* s);
46 void Paso_Copy(const dim_t n, double* out, const double* in);
47 bool_t Paso_fileExists( const char* filename );
48
49 #define Paso_copyShortDouble(n, source, target) memcpy(target,source,sizeof(double)*(size_t)n)
50
51 #endif /* #ifndef INC_PASO_UTIL */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26