/[escript]/branches/domexper/dudley/src/Dudley.c
ViewVC logotype

Diff of /branches/domexper/dudley/src/Dudley.c

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

trunk/esys2/finley/src/finleyC/Finley.c revision 82 by jgs, Tue Oct 26 06:53:54 2004 UTC trunk/finley/src/Finley.c revision 730 by bcumming, Mon May 15 04:03:49 2006 UTC
# Line 1  Line 1 
1  /* $Id$ */  /*
2     ************************************************************
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    
13  /**************************************************************/  /**************************************************************/
14    
# Line 6  Line 16 
16    
17  /**************************************************************/  /**************************************************************/
18    
19  /*   Copyrights by ACcESS Australia, 2003 */  /*  Author: gross@access.edu.au */
20  /*   Version: $Id$ */  /*  Version: $Id$ */
21    
22  /**************************************************************/  /**************************************************************/
23    
 #include "Common.h"  
24  #include "Finley.h"  #include "Finley.h"
 #ifdef _OPENMP  
 #include <omp.h>  
 #else  
 #include <time.h>  
 #endif  
25    
26    
27    /* This function returns a time mark */
28    double Finley_timer(void) {
29       return Paso_timer();
30    }
31    
32  /* This function checks if the pointer ptr has a target. If not an  /* This function checks if the pointer ptr has a target. If not an
33     error is raised and TRUE is returned. */     error is raised and TRUE is returned. */
34    bool_t Finley_checkPtr(void* arg) {
35       return Paso_checkPtr(arg);
36    }
37    
38    /* reset the error to NO_ERROR */
39    void Finley_resetError(void) {
40      Paso_resetError();
41    }
42    
43  int Finley_checkPtr(void* ptr) {  /* sets an error */
44     if (ptr==NULL) {  void Finley_setError(Finley_ErrorCodeType err,char* msg) {
45        Finley_ErrorCode=MEMORY_ERROR;    Paso_setError(err,msg);
46        sprintf(Finley_ErrorMsg,"Out of memory.");  }
       return TRUE;  
    } else {  
       return FALSE;  
    }  
 }  
47    
48  /* This function returns a timer */  /* checks if there is no error */
49  double Finley_timer(void) {  bool_t Finley_noError(void) {
50    double out;     return Paso_noError();
51    #ifdef _OPENMP  }
52    out=omp_get_wtime();  
53    #else  /* return the error code */
54    out=((double) clock())/CLOCKS_PER_SEC;  Finley_ErrorCodeType Finley_getErrorType(void) {
55    #endif      return Paso_getErrorType();
   return out;  
56  }  }
57    
58    /* return the error message */
59    char* Finley_getErrorMessage(void) {
60      return Paso_getErrorMessage();
61    }
62    /* return the error message */
63    void Finley_convertPasoError(void) {
64      /* nothing has to be done here */
65    }
66    
67    #ifdef PASO_MPI
68    /* checks that there is no error accross all processes in a communicator */
69    /* NOTE : does not make guarentee consistency of error string on each process */
70    bool_t Finley_MPI_noError( Paso_MPIInfo *mpi_info )
71    {
72        return Paso_MPI_noError( mpi_info );
73    }
74    #endif
75    
76    
77  /**************************************************************/  /**************************************************************/
78    
79    
80  /*  /*
81   * $Log$   * $Log$
82   * Revision 1.1  2004/10/26 06:53:57  jgs   * Revision 1.3  2005/09/15 03:44:22  jgs
83   * Initial revision   * Merge of development branch dev-02 back to main trunk on 2005-09-15
84     *
85     * Revision 1.2.2.1  2005/09/07 06:26:18  gross
86     * the solver from finley are put into the standalone package paso now
87     *
88     * Revision 1.2  2005/07/08 04:07:50  jgs
89     * Merge of development branch back to main trunk on 2005-07-08
90     *
91     * Revision 1.1.1.1.2.1  2005/06/29 02:34:50  gross
92     * some changes towards 64 integers in finley
93     *
94     * Revision 1.1.1.1  2004/10/26 06:53:57  jgs
95     * initial import of project esys2
96   *   *
97   * Revision 1.2  2004/07/02 04:21:13  gross   * Revision 1.2  2004/07/02 04:21:13  gross
98   * Finley C code has been included   * Finley C code has been included

Legend:
Removed from v.82  
changed lines
  Added in v.730

  ViewVC Help
Powered by ViewVC 1.1.26