CoreNEURON
abort.cpp
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* File: abort.c
4
*
5
* Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990
6
* Duke University
7
*
8
******************************************************************************/
9
#include "
coreneuron/utils/nrnoc_aux.hpp
"
10
11
/*-----------------------------------------------------------------------------
12
*
13
* ABORT_RUN()
14
*
15
* Prints out an error message and returns to the main menu if a solver
16
* routine returns a nonzero error code.
17
*
18
* Calling sequence: abort_run(code)
19
*
20
* Argument: code int flag for error
21
*
22
* Returns:
23
*
24
* Functions called: abs(), cls(), cursrpos(), puts(), gets()
25
*
26
* Files accessed:
27
*---------------------------------------------------------------------------*/
28
29
#include <setjmp.h>
30
#include <stdio.h>
31
#include "
errcodes.h
"
32
namespace
coreneuron
{
33
int
abort_run
(
int
code) {
34
switch
((code >= 0) ? code : -code) {
35
case
EXCEED_ITERS
:
36
puts(
"Convergence not achieved in maximum number of iterations"
);
37
break
;
38
case
SINGULAR
:
39
puts(
"The matrix in the solution method is singular or ill-conditioned"
);
40
break
;
41
case
PRECISION
:
42
puts(
43
"The increment in the independent variable is less than machine "
44
"roundoff error"
);
45
break
;
46
case
CORR_FAIL
:
47
puts(
"The corrector failed to satisfy the error check"
);
48
break
;
49
case
DIVERGED
:
50
puts(
"The corrector iteration diverged"
);
51
break
;
52
case
INCONSISTENT
:
53
puts(
"Inconsistent boundary conditions"
);
54
puts(
"Convergence not acheived in maximum number of iterations"
);
55
break
;
56
case
BAD_START
:
57
puts(
"Poor starting estimate for initial conditions"
);
58
puts(
"The matrix in the solution method is singular or ill-conditioned"
);
59
break
;
60
case
NODATA
:
61
puts(
"No data found in data file"
);
62
break
;
63
case
NO_SOLN
:
64
puts(
"No solution was obtained for the coefficients"
);
65
break
;
66
case
LOWMEM
:
67
puts(
"Insufficient memory to run the model"
);
68
break
;
69
case
DIVCHECK
:
70
puts(
"Attempt to divide by zero"
);
71
break
;
72
case
NOFORCE
:
73
puts(
74
"Could not open forcing function file\nThe model cannot be run "
75
"without the forcing function"
);
76
break
;
77
case
NEG_ARG
:
78
puts(
"Cannot compute factorial of negative argument"
);
79
break
;
80
case
RANGE
:
81
puts(
82
"Value of variable is outside the range of the forcing function data "
83
"table"
);
84
break
;
85
default
:
86
puts(
"Origin of error is unknown"
);
87
}
88
hoc_execerror
(
"scopmath library error"
, (
char
*) 0);
89
return
0;
90
}
91
}
// namespace coreneuron
DIVCHECK
#define DIVCHECK
Definition:
errcodes.h:58
nrnoc_aux.hpp
CORR_FAIL
#define CORR_FAIL
Definition:
errcodes.h:52
coreneuron::hoc_execerror
void hoc_execerror(const char *s1, const char *s2)
Definition:
nrnoc_aux.cpp:39
BAD_START
#define BAD_START
Definition:
errcodes.h:54
NODATA
#define NODATA
Definition:
errcodes.h:55
LOWMEM
#define LOWMEM
Definition:
errcodes.h:57
coreneuron
THIS FILE IS AUTO GENERATED DONT MODIFY IT.
Definition:
corenrn_parameters.cpp:12
RANGE
#define RANGE
Definition:
errcodes.h:62
SINGULAR
#define SINGULAR
Definition:
errcodes.h:50
EXCEED_ITERS
#define EXCEED_ITERS
Definition:
errcodes.h:49
coreneuron::abort_run
int abort_run(int code)
Definition:
abort.cpp:40
errcodes.h
NO_SOLN
#define NO_SOLN
Definition:
errcodes.h:56
DIVERGED
#define DIVERGED
Definition:
errcodes.h:60
NOFORCE
#define NOFORCE
Definition:
errcodes.h:59
PRECISION
#define PRECISION
Definition:
errcodes.h:51
NEG_ARG
#define NEG_ARG
Definition:
errcodes.h:61
INCONSISTENT
#define INCONSISTENT
Definition:
errcodes.h:53
coreneuron
sim
scopmath
abort.cpp