/[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

revision 123 by jgs, Fri Jul 8 04:08:13 2005 UTC revision 150 by jgs, Thu Sep 15 03:44:45 2005 UTC
# Line 1  Line 1 
1  /* $Id$ */  /*
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    
# Line 6  Line 18 
18    
19  /**************************************************************/  /**************************************************************/
20    
21  /*   Copyrights by ACcESS Australia, 2003 */  /*  Author: gross@access.edu.au */
22  /*   Version: $Id$ */  /*  Version: $Id$ */
23    
24  /**************************************************************/  /**************************************************************/
25    
 #include "Common.h"  
26  #include "Finley.h"  #include "Finley.h"
 #ifdef _OPENMP  
 #include <omp.h>  
 #else  
 #include <time.h>  
 #endif  
27    
28    
29    /* This function returns a time mark */
30    double Finley_timer(void) {
31       return Paso_timer();
32    }
33    
34  /* 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
35     error is raised and TRUE is returned. */     error is raised and TRUE is returned. */
36    bool_t Finley_checkPtr(void* arg) {
37       return Paso_checkPtr(arg);
38    }
39    
40  bool_t Finley_checkPtr(void* ptr) {  /* reset the error to NO_ERROR */
41     if (ptr==NULL) {  void Finley_resetError(void) {
42        Finley_ErrorCode=MEMORY_ERROR;    Paso_resetError();
43        sprintf(Finley_ErrorMsg,"Out of memory.");  }
       return TRUE;  
    } else {  
       return FALSE;  
    }  
 }  
44    
45  /* This function returns a timer */  /* sets an error */
46  double Finley_timer(void) {  void Finley_setError(Finley_ErrorCodeType err,char* msg) {
47    double out;    Paso_setError(err,msg);
48    #ifdef _OPENMP  }
49    out=omp_get_wtime();  
50    #else  /* checks if there is no error */
51    out=((double) clock())/CLOCKS_PER_SEC;  bool_t Finley_noError(void) {
52    #endif     return Paso_noError();
   return out;  
53  }  }
54    
55    /* return the error code */
56    Finley_ErrorCodeType Finley_getErrorType(void) {
57        return Paso_getErrorType();
58    }
59    
60    /* return the error message */
61    char* Finley_getErrorMessage(void) {
62      return Paso_getErrorMessage();
63    }
64    /* return the error message */
65    void Finley_convertPasoError(void) {
66      /* nothing has to be done here */
67    }
68    
69    
70  /**************************************************************/  /**************************************************************/
71    
72    
73  /*  /*
74   * $Log$   * $Log$
75     * Revision 1.3  2005/09/15 03:44:22  jgs
76     * Merge of development branch dev-02 back to main trunk on 2005-09-15
77     *
78     * Revision 1.2.2.1  2005/09/07 06:26:18  gross
79     * the solver from finley are put into the standalone package paso now
80     *
81   * Revision 1.2  2005/07/08 04:07:50  jgs   * Revision 1.2  2005/07/08 04:07:50  jgs
82   * Merge of development branch back to main trunk on 2005-07-08   * Merge of development branch back to main trunk on 2005-07-08
83   *   *

Legend:
Removed from v.123  
changed lines
  Added in v.150

  ViewVC Help
Powered by ViewVC 1.1.26