/[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 123 by jgs, Fri Jul 8 04:08:13 2005 UTC temp/finley/src/Finley.c revision 1387 by trankine, Fri Jan 11 07:45:26 2008 UTC
# Line 1  Line 1 
 /* $Id$ */  
1    
2  /**************************************************************/  /* $Id$ */
3    
4  /*    Finley finite element solver */  /*******************************************************
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  /**************************************************************/  /**************************************************************/
17    
18  /*   Copyrights by ACcESS Australia, 2003 */  /*    Finley finite element solver */
 /*   Version: $Id$ */  
19    
20  /**************************************************************/  /**************************************************************/
21    
 #include "Common.h"  
22  #include "Finley.h"  #include "Finley.h"
 #ifdef _OPENMP  
 #include <omp.h>  
 #else  
 #include <time.h>  
 #endif  
   
23    
24    /* This function returns a time mark */
25    double Finley_timer(void) {
26       return Paso_timer();
27    }
28    
29  /* 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
30     error is raised and TRUE is returned. */     error is raised and TRUE is returned. */
31    bool_t Finley_checkPtr(void* arg) {
32       return Paso_checkPtr(arg);
33    }
34    
35  bool_t Finley_checkPtr(void* ptr) {  /* reset the error to NO_ERROR */
36     if (ptr==NULL) {  void Finley_resetError(void) {
37        Finley_ErrorCode=MEMORY_ERROR;    Paso_resetError();
38        sprintf(Finley_ErrorMsg,"Out of memory.");  }
       return TRUE;  
    } else {  
       return FALSE;  
    }  
 }  
39    
40  /* This function returns a timer */  /* sets an error */
41  double Finley_timer(void) {  void Finley_setError(Finley_ErrorCodeType err,char* msg) {
42    double out;    Paso_setError(err,msg);
   #ifdef _OPENMP  
   out=omp_get_wtime();  
   #else  
   out=((double) clock())/CLOCKS_PER_SEC;  
   #endif  
   return out;  
43  }  }
44    
45  /**************************************************************/  /* checks if there is no error */
46    bool_t Finley_noError(void) {
47       return Paso_noError();
48    }
49    
50    /* return the error code */
51    Finley_ErrorCodeType Finley_getErrorType(void) {
52        return Paso_getErrorType();
53    }
54    
55    /* return the error message */
56    char* Finley_getErrorMessage(void) {
57      return Paso_getErrorMessage();
58    }
59    /* return the error message */
60    void Finley_convertPasoError(void) {
61      /* nothing has to be done here */
62    }
63    
64    /* checks that there is no error accross all processes in a communicator */
65    /* NOTE : does not make guarentee consistency of error string on each process */
66    bool_t Finley_MPI_noError( Paso_MPIInfo *mpi_info )
67    {
68        return Paso_MPIInfo_noError( mpi_info );
69    }
70    
71    
 /*  
  * $Log$  
  * Revision 1.2  2005/07/08 04:07:50  jgs  
  * Merge of development branch back to main trunk on 2005-07-08  
  *  
  * Revision 1.1.1.1.2.1  2005/06/29 02:34:50  gross  
  * some changes towards 64 integers in finley  
  *  
  * Revision 1.1.1.1  2004/10/26 06:53:57  jgs  
  * initial import of project esys2  
  *  
  * Revision 1.2  2004/07/02 04:21:13  gross  
  * Finley C code has been included  
  *  
  * Revision 1.1.1.1  2004/06/24 04:00:40  johng  
  * Initial version of eys using boost-python.  
  *  
  *  
  */  

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

  ViewVC Help
Powered by ViewVC 1.1.26