Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
qcc.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <assert.h>
#include "ast/ast.h"
Include dependency graph for qcc.c:

Go to the source code of this file.

Functions

chardname (const char *fname)
 
FILEdopen (const char *fname, const char *mode)
 
void includes (int argc, char **argv, char **grid, int *default_grid, int *2, int *bg, int *layers, int *gpu, const char *dir)
 
FILEwritepath (char *path, const char *mode)
 
static void exiting (void)
 
AstRootcompdir (FILE *fin, FILE *fout, FILE *swigfp, char *swigname, char *grid)
 
int main (int argc, char **argv)
 

Variables

 int = 2
 
 bghosts = 0
 
 layers = 0
 
int debug = 0
 
int catch = 0
 
int cadna = 0
 
int nolineno = 0
 
int events = 0
 
int progress = 0
 
int parallel = 0
 
int cpu = 0
 
int gpu = 0
 
static FILEdimensions = NULL
 
static int run = -1
 
static int finite = 1
 
static int redundant = 0
 
static int warn = 0
 
static int maxcalls = 20000000
 
char dir [] = ".qccXXXXXX"
 
charautolink = NULL
 
int autolinks = 0
 
int source = 0
 

Function Documentation

◆ compdir()

AstRoot * compdir ( FILE fin,
FILE fout,
FILE swigfp,
char swigname,
char grid 
)

Definition at line 115 of file qcc.c.

References autolink, autolinks, cpu, dimension, dopen(), fflush(), gpu, grid, nolineno, parallel, postlex_destroy(), postproc(), progress, source, swigfp, and x.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dname()

char * dname ( const char fname)

Definition at line 100 of file qcc.c.

References dir, fname, and x.

Referenced by dopen().

Here is the caller graph for this function:

◆ dopen()

FILE * dopen ( const char fname,
const char mode 
)

Definition at line 107 of file qcc.c.

References dname(), fname, free(), and x.

Referenced by compdir(), and main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exiting()

static void exiting ( void  )
static

Definition at line 89 of file qcc.c.

References autolink, debug, dir, free(), and x.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ includes()

void includes ( int  argc,
char **  argv,
char **  grid,
int default_grid,
int 2,
int bg,
int layers,
int gpu,
const char dir 
)

Definition at line 2886 of file include.c.

References alloc, assert, bghosts, compdir(), debug, dim, dimension, dir, fdepend, file, fp, free(), ftags, gpu, grid, hasgrid, i, is_code(), keywords_only, layers, openpath(), prepend_path(), s, strdup(), swigfp, target, warninclude, and x.

Referenced by kdt_query_sum(), main(), and query_sum().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 138 of file qcc.c.

References autolink, autolinks, bghosts, cadna, cc, compdir(), cpu, debug, dimension, dimensions, dir, dopen(), dst, events, exiting(), file, finite, fp, free(), gpu, grid, i, includes(), layers, line, maxcalls, nolineno, parallel, pclose, popen, progress, redundant, run, s, source, strdup(), swigfp, warn, and x.

Here is the call graph for this function:

◆ writepath()

FILE * writepath ( char path,
const char mode 
)

Definition at line 77 of file qcc.c.

References s, and x.

Referenced by compdir().

Here is the caller graph for this function:

Variable Documentation

◆ autolink

char* autolink = NULL

Definition at line 66 of file qcc.c.

Referenced by compdir(), exiting(), and main().

◆ autolinks

int autolinks = 0

Definition at line 67 of file qcc.c.

Referenced by compdir(), and main().

◆ bghosts

bghosts = 0

Definition at line 58 of file qcc.c.

Referenced by main().

◆ cadna

int cadna = 0

Definition at line 60 of file qcc.c.

Referenced by main().

◆ catch

int catch = 0

Definition at line 60 of file qcc.c.

◆ cpu

int cpu = 0

Definition at line 61 of file qcc.c.

Referenced by compdir(), main(), okada(), and terrain().

◆ debug

int debug = 0

Definition at line 60 of file qcc.c.

Referenced by exiting(), and main().

◆ dimensions

FILE* dimensions = NULL
static

Definition at line 62 of file qcc.c.

Referenced by main().

◆ dir

char dir[] = ".qccXXXXXX"

Definition at line 64 of file qcc.c.

Referenced by compdir(), dname(), exiting(), includes(), main(), periodic(), and tree_periodic().

◆ events

int events = 0

Definition at line 60 of file qcc.c.

Referenced by input_gfs(), last_events(), main(), run(), and run().

◆ finite

int finite = 1
static

Definition at line 63 of file qcc.c.

Referenced by main().

◆ gpu

int gpu = 0

Definition at line 61 of file qcc.c.

Referenced by compdir(), and main().

◆ int

int = 2

The Basilisk C to C99 pre-processor

This is the front-end for the Basilisk C to C99 translator described in [ast/README]().

Usage:

int x
Definition common.h:76

A summary of the options/switches:

-grid=GRID : specifies the grid to use (overloads any "in file" includes) -MD : generates .d dependency file -tags : generates .tags file -python : generates python wrapper code -debug : internal debugging -events : displays a trace of events on standard error -catch : catch floating point errors -source : generates C99 source file (with an underscore prefix) -prepost : as -source but before expansion of postmacros -autolink : uses the 'autolink' pragma to link required libraries -progress : the running code will generate a 'progress' file -cadna : support for CADNA -nolineno : does not generate code containing code line numbers -gpu : computation is done on GPU by default (this is the default) -cpu : computation is done on CPU by default -run=INT : runs the code with the interpreter with the verbosity level given by INT -dimensions[=FILE] : outputs a summary of the dimensions in a file which is the source file with a .dims extension if FILE == 'dims' or the given FILE name. if FILE is not specified the dimensions are written on stderr. -disable-dimensions : do not check dimensional consistency -non-finite : also outputs the dimensions of "non-finite" constants -redundant : also outputs the dimensions of redundant constants -Wdimensions : only warns on dimensional errors -maxcalls=VAL : maximum number of calls for the interpreter. The default is 15 millions. A negative value means no limit.

All other options will be passed directly to the C compiler.

Definition at line 58 of file qcc.c.

◆ layers

layers = 0

Definition at line 58 of file qcc.c.

Referenced by main().

◆ maxcalls

int maxcalls = 20000000
static

Definition at line 63 of file qcc.c.

Referenced by main().

◆ nolineno

int nolineno = 0

Definition at line 60 of file qcc.c.

Referenced by compdir(), and main().

◆ parallel

int parallel = 0

Definition at line 61 of file qcc.c.

Referenced by compdir(), and main().

◆ progress

int progress = 0

Definition at line 60 of file qcc.c.

Referenced by compdir(), kdt_create(), kdt_heap_sort(), main(), main(), and split().

◆ redundant

int redundant = 0
static

Definition at line 63 of file qcc.c.

Referenced by main().

◆ run

int run ( void  ) = -1
static

Definition at line 63 of file qcc.c.

Referenced by main().

◆ source

◆ warn

int warn = 0
static

Definition at line 63 of file qcc.c.

Referenced by main().