control

Contents

control.c

These subroutines deal with control, including I/O, units, and files.

Author

Rory Barnes (RoryBarnes)

Date

Jan 7 2015

Functions

void BodyCopyNULL(BODY *dest, BODY *src, int foo, int iNumBodies, int iBody)
int strcicmp(char const *a, char const *b)

Case-insensitive strcmp

int compare_option_names(const void *p, const void *q)

Comparison function for option names.

int compare_output_names(const void *p, const void *q)

Comparison function for output names.

void sort_options(OPTIONS *options, int sorted[])

Sort the OPTIONS struct by name.

void sort_output(OUTPUT *output, int sorted[])

Sort the OUTPUT struct by name.

void InitializeFilesOptions(FILES *files, OPTIONS *options)
void InitializeFiles(FILES *files, OPTIONS *options, char *sPrimaryFile, char **saBodyFiles, int iNumBodies)
void InitializePropsAux(CONTROL *control, MODULE *module)
void InitilizeForceBehavior(CONTROL *control, MODULE *module)
void InitializeControlModules(CONTROL *control, MODULE *module)
void InitializeHalt(CONTROL *control)
void InitializeIo(CONTROL *control)
void InitializeControl(CONTROL *control, MODULE *module)
void InitializeControlEvolve(BODY *body, CONTROL *control, MODULE *module, UPDATE *update)

This function performs the following tasks:

1) Allocates control->Evolve.fnBodyCopy, iNumMultiProps, tmpUpdate, daDeriv, and control->iNumMultiProps. 2) Initializes control->bOrbiters 3) Initializes control->Evolve.iNumModules

void PrintFileTypes(int iFileType, int bPadString)
void WriteDescription(char cLongDescr[], char cDescr[], int iMaxChars)
void WriteHelpOption(OPTIONS *options, int bLong)
void WriteHelpOutput(OUTPUT *output, int bLong)
void HelpOptions(OPTIONS *options, int bLong)
void HelpOutput(OUTPUT *output, int bLong)
void Help(OPTIONS *options, OUTPUT *output, char exe[], int bLong)
void LineExit(char cFile[], int iLine)
char *sLower(char cString[])
void fprintd(FILE *fp, double x, int iExp, int iDig)
void AllocateStringMemory(char **sString, int iStringLength)
void fvFormattedString(char **sString, const char *sFormattedString, ...)
double fdUnitsLength(int iType)
void fsUnitsLength(int iType, char **cUnit)
double fdUnitsTime(int iType)
void fsUnitsTime(int iType, char **cUnit)
double fdUnitsMass(int iType)
void fsUnitsMass(int iType, char **cUnit)
double fdUnitsAngle(int iType)
void fsUnitsAngle(int iType, char **cUnit)
void fsUnitsViscosity(UNITS *units, char **cUnit)
void fsUnitsAngMom(UNITS *units, char **cUnit)
void fsUnitsDensity(UNITS *units, char **cUnit)
void fsUnitsVel(UNITS *units, char **cUnit)
void fsUnitsRate(int iType, char **cUnit)
void fsUnitsRateSquared(int iType, char **cUnit)
void fsUnitsAngRate(UNITS *units, char **cUnit)
void fsUnitsEnergy(UNITS *units, char **cUnit)
double fdUnitsEnergy(int iTime, int iMass, int iLength)
void fsUnitsPower(UNITS *units, char **cUnit)
double fdUnitsPower(int iTime, int iMass, int iLength)
void fsUnitsEnergyFlux(UNITS *units, char **cUnit)
double fdUnitsEnergyFlux(int iTime, int iMass, int iLength)
double fdUnitsTemp(double dTemp, int iOldType, int iNewType)
void fsUnitsTemp(int iType, char **cUnit)
void fsUnitsTempRate(int iType, char **cUnit)
void InfileCopy(INFILE *dest, INFILE *src)
struct SORTED_OPTIONS

Dummy struct used to sort options.

Public Members

int index
char *name
struct SORTED_OUTPUT

Dummy struct used to sort output.

Public Members

int index
char *name

control.h

These subroutines deal with control, including I/O, units, and files.

Author

Rory Barnes (RoryBarnes)

Date

Jan 7 2015