PLUTO  4.4-patch2
Functions
debug_tools.c File Reference

Collection of functions for debugging purposes. More...

#include "pluto.h"

Functions

int CheckNaN (double **u, int ibeg, int iend, const char *str)
 
void Show (double **a, int ip)
 
void ShowMatrix (double **A, int n, double eps)
 
void ShowState (double *vc, int primitive)
 
void ShowVector (double *v, int n)
 
void Trace (double xx)
 
void Where (int i, Grid *grid)
 

Detailed Description

Author
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
Date
Apr 03, 2020

Function Documentation

◆ CheckNaN()

int CheckNaN ( double **  u,
int  ibeg,
int  iend,
const char *  str 
)

Check whether the array u contains Not-a-Number (NaN). QUIT if true.

Parameters
[in]upointer to an array of type u[i][nv]
[in]ibegstarting index
[in]ibegending index
[in]stra reference string

◆ Show()

void Show ( double **  a,
int  ip 
)

Print the component of the array a at grid index ip

◆ ShowMatrix()

void ShowMatrix ( double **  A,
int  n,
double  eps 
)

Make a nice printLoging of a 2D square matrix A[0..n-1][0..n-1] Entries with values below eps will display "0.0"

◆ ShowState()

void ShowState ( double *  vc,
int  primitive 
)

Print the components of the array v. Call it as ShowState (vc,1) if vc[] is an array of primitive variables Call it as ShowState (vc,0) if vc[] is an array of conservative variables

◆ ShowVector()

void ShowVector ( double *  v,
int  n 
)

Print the first n components of the vector v[]

◆ Trace()

void Trace ( double  xx)

Print a number xx and the number of times it has been called.

◆ Where()

void Where ( int  i,
Grid grid 
)

Print the location of a particular zone (i,j,k) in the computational domain.

Note
This function must be initialized before using it to store grid information. This is done by calling Where(i, grid) the very first time. Subsequent calls can be then done by simply using Where(i,NULL).