Global header file.
More...
#include "tree.h"
#include "assert.h"
#include "stdlib.h"
Go to the source code of this file.
|
| #define | TRUE 1 |
| |
| #define | FALSE 0 |
| |
| #define | debug(level,...) |
| |
| #define | NDEBUG /* To supress the asserts */ |
| |
| #define | warning(...) |
| |
| #define | fatal(...) |
| |
| #define | show_double(VAR_) printf (#VAR_ " = %g\n", VAR_) |
| |
| #define | show_int(VAR_) printf (#VAR_ " = %d\n", VAR_) |
| |
| #define | MYMAX(X_, Y_) ((X_) > (Y_)? (X_): (Y_)) |
| |
| #define | MYMIN(X_, Y_) ((X_) < (Y_)? (X_): (Y_)) |
| |
| #define | MAX_AT_LEVEL(X_, Y_, L_) MYMAX(X_, (Y_) << (L_)) |
| |
| #define | MIN_AT_LEVEL(X_, Y_, L_) MYMIN(X_, (Y_) << (L_)) |
| |
| #define | MAX_AT_LEVEL_WITH_SHIFT(X_, Y_, L_, S_) MYMAX(X_, ((Y_) << (L_)) + ((L_) > 0? ((S_) << (L_ - 1)): 0)) |
| |
| #define | MIN_AT_LEVEL_WITH_SHIFT(X_, Y_, L_, S_) MYMIN(X_, ((Y_) << (L_)) + ((L_) > 0? ((S_) << (L_ - 1)): 0)) |
| |
| #define | XCHG(X1_, X2_) |
| |
| #define | SQ(X_) ((X_) * (X_)) |
| |
| #define | decl_field_comp(_DIR) double (*ext_e_ ## _DIR) (double r, double z, double theta) |
| |
| #define | _CSTREAM_H_ |
| |
|
| typedef char * | string |
| | Information about each program parameter.
|
| |
| typedef double * | doublep |
| |
| typedef double | REAL |
| |
Global header file.
Definition in file cstream.h.
| #define debug |
( |
|
level, |
|
|
|
... |
|
) |
| |
| #define NDEBUG /* To supress the asserts */ |
Value:do{ \
fprintf (stderr, ## __VA_ARGS__); \
} while(0)
Definition at line 42 of file cstream.h.
Value:do{ \
fprintf (stderr,
"%s: Fatal error: ",
invok_name); \
fprintf (stderr, ## __VA_ARGS__); \
exit(-1); \
} while(0)
Definition at line 47 of file cstream.h.
| #define show_double |
( |
|
VAR_ | ) |
printf (#VAR_ " = %g\n", VAR_) |
| #define show_int |
( |
|
VAR_ | ) |
printf (#VAR_ " = %d\n", VAR_) |
| #define MYMAX |
( |
|
X_, |
|
|
|
Y_ |
|
) |
| ((X_) > (Y_)? (X_): (Y_)) |
| #define MYMIN |
( |
|
X_, |
|
|
|
Y_ |
|
) |
| ((X_) < (Y_)? (X_): (Y_)) |
| #define MAX_AT_LEVEL |
( |
|
X_, |
|
|
|
Y_, |
|
|
|
L_ |
|
) |
| MYMAX(X_, (Y_) << (L_)) |
| #define MIN_AT_LEVEL |
( |
|
X_, |
|
|
|
Y_, |
|
|
|
L_ |
|
) |
| MYMIN(X_, (Y_) << (L_)) |
| #define MAX_AT_LEVEL_WITH_SHIFT |
( |
|
X_, |
|
|
|
Y_, |
|
|
|
L_, |
|
|
|
S_ |
|
) |
| MYMAX(X_, ((Y_) << (L_)) + ((L_) > 0? ((S_) << (L_ - 1)): 0)) |
| #define MIN_AT_LEVEL_WITH_SHIFT |
( |
|
X_, |
|
|
|
Y_, |
|
|
|
L_, |
|
|
|
S_ |
|
) |
| MYMIN(X_, ((Y_) << (L_)) + ((L_) > 0? ((S_) << (L_ - 1)): 0)) |
| #define XCHG |
( |
|
X1_, |
|
|
|
X2_ |
|
) |
| |
Value:do { \
typeof(X1_) TMP_; \
TMP_ = X1_; \
X1_ = X2_; \
X2_ = TMP_; \
} while(0)
Definition at line 67 of file cstream.h.
| #define SQ |
( |
|
X_ | ) |
((X_) * (X_)) |
| #define decl_field_comp |
( |
|
_DIR | ) |
double (*ext_e_ ## _DIR) (double r, double z, double theta) |
The three components of the external field: ext_e_r, ext_e_z and ext_e_theta.
Definition at line 120 of file cstream.h.
Information about each program parameter.
These are the types for the global parameters.
Definition at line 87 of file cstream.h.
| decl_field_comp |
( |
theta |
| ) |
|
| void* xmalloc |
( |
size_t |
size | ) |
|
Allocates memory with check and (eventually) error reporting.
Definition at line 12 of file misc.c.
| void* xrealloc |
( |
void * |
ptr, |
|
|
size_t |
size |
|
) |
| |
Reallocates memory.
Definition at line 24 of file misc.c.
| void* xcalloc |
( |
size_t |
count, |
|
|
size_t |
size |
|
) |
| |
Reallocates memory, but now initializes the memory to zero.
Definition at line 37 of file misc.c.
The grid sizes
dr[i] and dz[i] represent the grid size at level i. Note that i can go from -extra_pois_levels...max_levels.
Definition at line 24 of file cstream.c.
See cstream.c
w2k[k] = 2 / dtheta^2 (1 - cos(k dtheta)). This numbers appear due to the finite-differences derivatives of a Fourier transform. If we would make a continuous fourier transform, they will approach k^2.
Definition at line 29 of file cstream.c.
Name of this program.
Definition at line 36 of file cstream.c.