Collection of general-purpose functions. More...
#include "pluto.h"
Functions | |
int | LUDecomp (double **a, int n, int *indx, double *d) |
void | LUBackSubst (double **a, int n, int *indx, double b[]) |
void | Trace (double xx) |
void | Show (double **a, int ip) |
int | CheckNaN (double **u, int is, int ie, int id) |
void | Where (int i, Grid *grid) |
void | PlutoError (int condition, char *str) |
void | print (const char *fmt,...) |
void | print1 (const char *fmt,...) |
void | MakeState (State_1D *state) |
int | IsLittleEndian (void) |
void | SwapEndian (void *x, const int nbytes) |
void | ShowMatrix (double **A, double eps) |
This file contains some general Detailed description of the file goes here.
int CheckNaN | ( | double ** | u, |
int | is, | ||
int | ie, | ||
int | id | ||
) |
Cheeck whether the array u
contains Not-a-Number (NaN)
int IsLittleEndian | ( | void | ) |
Return 1 if the current architecture has little endian order
void LUBackSubst | ( | double ** | a, |
int | n, | ||
int * | indx, | ||
double | b[] | ||
) |
Solve a linear system after LUDecomp has been called. Adapted from Numerical Recipe.
int LUDecomp | ( | double ** | a, |
int | n, | ||
int * | indx, | ||
double * | d | ||
) |
Perform LU decomposition. Adapted from Numerical Recipe
void MakeState | ( | State_1D * | state | ) |
Allocate memory areas for arrays inside the state structure.
void PlutoError | ( | int | condition, |
char * | str | ||
) |
If condition is true, issue an error and quit the code.
void print | ( | const char * | fmt, |
... | |||
) |
Define print function for the static grid version of PLUTO. The Chombo version is defined in Chombo/amrPLUTO.cpp
void print1 | ( | const char * | fmt, |
... | |||
) |
Define print1 function
void Show | ( | double ** | a, |
int | ip | ||
) |
Print the component of the array a
at grid index ip
void ShowMatrix | ( | double ** | A, |
double | eps | ||
) |
Make a nice printing of a 2D matrix A
Entries with values below eps will display "0.0"
void SwapEndian | ( | void * | x, |
const int | nbytes | ||
) |
Swap the byte order of x.
[in] | x | pointer to the variable being swapped |
[in] | nbytes | data type size |
void Trace | ( | double | xx | ) |
Print a number xx and the number of times it has been called.
void Where | ( | int | i, |
Grid * | grid | ||
) |
Print the location of a particular zone (i,j,k) in the computational domain.