~vcs-imports/escript-finley/trunk

« back to all changes in this revision

Viewing changes to dudley/src/Dudley.c

  • Committer: jfenwick
  • Date: 2010-10-11 01:48:14 UTC
  • Revision ID: svn-v4:77569008-7704-0410-b7a0-a92fef0b09fd:trunk:3259
Merging dudley and scons updates from branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*******************************************************
 
3
*
 
4
* Copyright (c) 2003-2010 by University of Queensland
 
5
* Earth Systems Science Computational Center (ESSCC)
 
6
* http://www.uq.edu.au/esscc
 
7
*
 
8
* Primary Business: Queensland, Australia
 
9
* Licensed under the Open Software License version 3.0
 
10
* http://www.opensource.org/licenses/osl-3.0.php
 
11
*
 
12
*******************************************************/
 
13
 
 
14
/**************************************************************/
 
15
 
 
16
/*    Dudley finite element solver */
 
17
 
 
18
/**************************************************************/
 
19
 
 
20
#include "Dudley.h"
 
21
 
 
22
/* This function returns a time mark */
 
23
double Dudley_timer(void)
 
24
{
 
25
    return Esys_timer();
 
26
}
 
27
 
 
28
/* This function checks if the pointer ptr has a target. If not an
 
29
   error is raised and TRUE is returned. */
 
30
bool_t Dudley_checkPtr(void *arg)
 
31
{
 
32
    return Esys_checkPtr(arg);
 
33
}
 
34
 
 
35
/* reset the error to NO_ERROR */
 
36
void Dudley_resetError(void)
 
37
{
 
38
    Esys_resetError();
 
39
}
 
40
 
 
41
/* sets an error */
 
42
void Dudley_setError(Dudley_ErrorCodeType err, __const char *msg)
 
43
{
 
44
    Esys_setError(err, msg);
 
45
}
 
46
 
 
47
/* checks if there is no error */
 
48
bool_t Dudley_noError(void)
 
49
{
 
50
    return Esys_noError();
 
51
}
 
52
 
 
53
/* return the error code */
 
54
Dudley_ErrorCodeType Dudley_getErrorType(void)
 
55
{
 
56
    return Esys_getErrorType();
 
57
}
 
58
 
 
59
/* return the error message */
 
60
char *Dudley_getErrorMessage(void)
 
61
{
 
62
    return Esys_getErrorMessage();
 
63
}
 
64
 
 
65
/* return the error message */
 
66
void Dudley_convertPasoError(void)
 
67
{
 
68
    /* nothing has to be done here */
 
69
}
 
70
 
 
71
/* checks that there is no error accross all processes in a communicator */
 
72
/* NOTE : does not make guarentee consistency of error string on each process */
 
73
bool_t Dudley_MPI_noError(Esys_MPIInfo * mpi_info)
 
74
{
 
75
    return Esys_MPIInfo_noError(mpi_info);
 
76
}