The FARGO_THORIN code developer's guide
 All Data Structures Files Functions Variables Typedefs Macros
Functions
LowTasks.c File Reference

Contains many low level short functions. More...

#include "fargo.h"
#include <stdarg.h>
Include dependency graph for LowTasks.c:

Go to the source code of this file.

Functions

real GetGlobalIFrac (real r)
 
void prs_exit (int numb)
 
void masterprint (const char *template,...)
 
void mastererr (const char *template,...)
 
void prs_error (char *string)
 
void message (char *msg)
 
PolarGridCreatePolarGrid (int Nr, int Ns, char *name)
 
void MultiplyPolarGridbyConstant (PolarGrid *arraysrc, real constant)
 
void DumpSources (int argc, argv)
 
void MakeDir (char *string)
 
FILE * fopenp (char *string, char *mode)
 

Detailed Description

Contains many low level short functions.

The name of these functions should be self-explanatory in most cases. The prefix 'prs_' stands for 'personal'. The prefix 'master' means that only the process 0 executes the function [note that the architecture is not of the kind master/slaves, all processes perform similar tasks, but a minor number of tasks (like output of information on the standard output) do not need to be performed by several processes.] The function fopenp() is an upper layer of fopen(), which should be used only in the case of writing or appending a file (and not reading a file). It tries to create the output directory if it does not exist, and it issues an error message if it fails, so that the calling function does not need to worry about these details.

Definition in file LowTasks.c.

Function Documentation

PolarGrid* CreatePolarGrid ( int  Nr,
int  Ns,
char *  name 
)

Definition at line 73 of file LowTasks.c.

References polargrid::Field, polargrid::Name, polargrid::Nrad, polargrid::Nsec, and prs_error().

Referenced by InitComputeAccel(), InitEuler(), InitPebbleArrays(), InitRadiatDiffusionFields(), InitTransport(), InitViscosity(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

void DumpSources ( int  argc,
argv   
)

Definition at line 123 of file LowTasks.c.

References CPU_Master, fopenp(), and OUTPUTDIR.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

FILE* fopenp ( char *  string,
char *  mode 
)
real GetGlobalIFrac ( real  r)

Definition at line 21 of file LowTasks.c.

References GLOBALNRAD, and GlobalRmed.

Referenced by AccretePebblesOntoPlanets(), and UpdateLog().

Here is the caller graph for this function:

void MakeDir ( char *  string)

Definition at line 142 of file LowTasks.c.

References CPU_Number, CPU_Rank, fargostat, MAX1D, MPI_COMM_WORLD, MPI_INT, MPI_Recv(), and MPI_Send().

Referenced by fopenp(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

void mastererr ( const char *  template,
  ... 
)

Definition at line 49 of file LowTasks.c.

References CPU_Master.

Referenced by CheckRebin(), Energy(), FillPolar1DArrays(), GetfromPlanetFile(), GetOmegaFrame(), Initialization(), main(), mpi_make1Dprofile(), PrintUsage(), ReadVariables(), and SplitDomain().

Here is the caller graph for this function:

void masterprint ( const char *  template,
  ... 
)
void message ( char *  msg)

Definition at line 66 of file LowTasks.c.

Referenced by merge().

Here is the caller graph for this function:

void MultiplyPolarGridbyConstant ( PolarGrid arraysrc,
real  constant 
)

Definition at line 106 of file LowTasks.c.

References polargrid::Nrad.

Referenced by main().

Here is the caller graph for this function:

void prs_error ( char *  string)

Definition at line 59 of file LowTasks.c.

References prs_exit().

Referenced by CreatePolarGrid().

Here is the call graph for this function:

Here is the caller graph for this function:

void prs_exit ( int  numb)