HARM
harm and utilities
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros | Functions
initbase.c File Reference

General initialization of code. More...

#include "decs.h"
#include "initbase.defaultnprlists.c"
#include <sys/stat.h>
Include dependency graph for initbase.c:

Go to the source code of this file.

Macros

#define NUMSELFGRAVITER   1
 

Functions

int init (int *argc, char **argv[])
 General-Primary init() routine Uses globals inside init() because sets memory and sets physics. More...
 
void set_grid_all (FTYPE thetarot, int restartmode)
 
void init_all_conservatives (FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*utemp)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR])
 initialize conserved quantities if(RESTARTMODE==0) More...
 
int prepre_init (void)
 Called before pre_init() : i.e. before MPI init. More...
 
void setup_nprlocalist (int whichprimtype, int *nprlocalstart, int *nprlocalend, int *nprlocallist, int *numprims)
 used to setup local versions of lists currently used in interpline.c for NUMPRIMSLOOP() More...
 
int pre_init (int *argc, char **argv[])
 initialize MPI and other things NO computations should be performed here More...
 
int init_defdefcoord (void)
 init default defcoord More...
 
int init_defgrid (void)
 init default grid More...
 
int init_defglobal (void)
 init default global paramters More...
 
int init_defconsts (void)
 init default constants More...
 
int post_init (FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*faraday)[NSTORE2][NSTORE3][NUMCURRENTSLOTS][3])
 post init More...
 
int set_box_grid_parameters (void)
 bounds, etc. use enerpos type stuff that is set by recompute_fluxpositions() More...
 
int init_arrays_before_set_pu (void)
 set certain arrays to zero for diagnostic purposes (must come after all basic init stuff that sets up grid parms and all other parms) More...
 
int post_par_set (void)
 after all parameters are set, can call this More...
 
int addremovefromnpr (int doadd, int *whichpltoavg, int *ifnotavgthencopy, int *nprlocalstart, int *nprlocalend, int *nprlocallist, FTYPE(*in)[NSTORE2][NSTORE3][NPR], FTYPE(*out)[NSTORE2][NSTORE3][NPR])
 acts on globals, assumes static internals that get recalled upon reentering More...
 
int transform_primitive_vB (int whichvel, int whichcoord, int i, int j, int k, FTYPE(*p)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR])
 used to transform from one coordinate system to PRIMECOORDS when acting on pstag, only relevant for magnetic field part, and in that case if didn't use vector potential to define pstag then assume not too important to get high accuracy, so average field to other positions in simple way More...
 
int assert_func_empty (int is_bad_val, char *s,...)
 report emtpy More...
 
int assert_func (int is_bad_val, char *s,...)
 report More...
 

Detailed Description

General initialization of code.

Definition in file initbase.c.

Macro Definition Documentation

#define NUMSELFGRAVITER   1

Function Documentation

int addremovefromnpr ( int  doadd,
int *  whichpltoavg,
int *  ifnotavgthencopy,
int *  nprlocalstart,
int *  nprlocalend,
int *  nprlocallist,
FTYPE(*)  in[NSTORE2][NSTORE3][NPR],
FTYPE(*)  out[NSTORE2][NSTORE3][NPR] 
)

acts on globals, assumes static internals that get recalled upon reentering

Definition at line 2910 of file initbase.c.

int assert_func ( int  is_bad_val,
char *  s,
  ... 
)

report

Definition at line 3006 of file initbase.c.

int assert_func_empty ( int  is_bad_val,
char *  s,
  ... 
)

report emtpy

Definition at line 3000 of file initbase.c.

int init ( int *  argc,
char **  argv[] 
)

General-Primary init() routine Uses globals inside init() because sets memory and sets physics.

Definition at line 21 of file initbase.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void init_all_conservatives ( FTYPE(*)  prim[NSTORE2][NSTORE3][NPR],
FTYPE(*)  pstag[NSTORE2][NSTORE3][NPR],
FTYPE(*)  utemp[NSTORE2][NSTORE3][NPR],
FTYPE(*)  ucons[NSTORE2][NSTORE3][NPR] 
)

initialize conserved quantities if(RESTARTMODE==0)

Definition at line 666 of file initbase.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int init_arrays_before_set_pu ( void  )

set certain arrays to zero for diagnostic purposes (must come after all basic init stuff that sets up grid parms and all other parms)

Definition at line 1649 of file initbase.c.

Here is the caller graph for this function:

int init_defconsts ( void  )

init default constants

Definition at line 1407 of file initbase.c.

Here is the caller graph for this function:

int init_defdefcoord ( void  )

init default defcoord

Definition at line 1132 of file initbase.c.

Here is the caller graph for this function:

int init_defglobal ( void  )

init default global paramters

FIXUP PARAMETERS

Definition at line 1164 of file initbase.c.

Here is the caller graph for this function:

int init_defgrid ( void  )

init default grid

Definition at line 1141 of file initbase.c.

Here is the caller graph for this function:

int post_init ( FTYPE(*)  prim[NSTORE2][NSTORE3][NPR],
FTYPE(*)  faraday[NSTORE2][NSTORE3][NUMCURRENTSLOTS][3] 
)

post init

Definition at line 1523 of file initbase.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int post_par_set ( void  )

after all parameters are set, can call this

Definition at line 1692 of file initbase.c.

Here is the caller graph for this function:

int pre_init ( int *  argc,
char **  argv[] 
)

initialize MPI and other things NO computations should be performed here

Definition at line 995 of file initbase.c.

Here is the caller graph for this function:

int prepre_init ( void  )

Called before pre_init() : i.e. before MPI init.

Definition at line 684 of file initbase.c.

Here is the caller graph for this function:

int set_box_grid_parameters ( void  )

bounds, etc. use enerpos type stuff that is set by recompute_fluxpositions()

Definition at line 1584 of file initbase.c.

Here is the caller graph for this function:

void set_grid_all ( FTYPE  thetarot,
int  restartmode 
)

Definition at line 571 of file initbase.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void setup_nprlocalist ( int  whichprimtype,
int *  nprlocalstart,
int *  nprlocalend,
int *  nprlocallist,
int *  numprims 
)

used to setup local versions of lists currently used in interpline.c for NUMPRIMSLOOP()

functions for loop stuff

Definition at line 970 of file initbase.c.

Here is the caller graph for this function:

int transform_primitive_vB ( int  whichvel,
int  whichcoord,
int  i,
int  j,
int  k,
FTYPE(*)  p[NSTORE2][NSTORE3][NPR],
FTYPE(*)  pstag[NSTORE2][NSTORE3][NPR] 
)

used to transform from one coordinate system to PRIMECOORDS when acting on pstag, only relevant for magnetic field part, and in that case if didn't use vector potential to define pstag then assume not too important to get high accuracy, so average field to other positions in simple way

Definition at line 2987 of file initbase.c.

Here is the call graph for this function:

Here is the caller graph for this function: