![]() |
Timothy
0.9
Tissue Modelling Framework
|
contains I/O functions More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <mpi.h>
#include <inttypes.h>
#include <float.h>
#include <math.h>
#include <fcntl.h>
#include "global.h"
#include "io.h"
#include "fields.h"
Go to the source code of this file.
Macros | |
#define | _GNU_SOURCE |
Functions | |
void | readRstFile (int argc, char **argv) |
void | printBasicInfo () |
void | printExecInfo () |
void | printHelp () |
void | initParams (int argc, char **argv) |
void | readParams (int argc, char **argv) |
void | ioDefineOutputFields () |
void | ioWriteStepVTK (int step) |
void | printStepNum () |
void | ioDefineRstGlobalParams () |
void | saveRstFile () |
void | ioDefineOutputGlobalFields () |
void | ioWriteFields (int step) |
void | switchStdOut (const char *newStream) |
void | revertStdOut () |
void | defineColormaps () |
void | ioWriteStepPovRay (int step, int type) |
contains I/O functions
Definition in file io.c.
void defineColormaps | ( | ) |
This function defines colormaps for PovRay output.
Definition at line 1813 of file io.c.
References colormapPoint_t::b, beta, cmaps, colormap_t::cp, colormapPoint_t::g, colormap_t::ncp, colormapPoint_t::position, and colormapPoint_t::r.
void initParams | ( | int | argc, |
char ** | argv | ||
) |
This function initializes all parameters.
Definition at line 102 of file io.c.
References addr, cg1, cg2, cm, cOutType, cs, desc, DOUBLE, fieldBC, fieldConsumption, fieldCriticalLevel1, fieldCriticalLevel2, fieldDiffCoef, fieldICMean, fieldICVar, fieldLambda, fieldProduction, fOutType, g1, g2, gfDt, gfH, gfields, GLUC, glucose, h, HYDR, hydrogenIon, INT, logdir, LONG, m, maxCells, maxSpeed, mitrand, nc, nhs, nsteps, nx, ny, nz, outdir, OXYG, oxygen, params, rd, REAL, req, rng, rstFileName, rstOutStep, rstReset, s, sdim, secondsPerStep, statOutStep, STRING, temperature, tgs, type, v, and vtkOutStep.
void ioDefineOutputFields | ( | ) |
This function defines output fields. Edit this part in order to introduce new output fields.
Definition at line 885 of file io.c.
References addrOut, cellData::age, cells, cellData::density, dimOut, cellData::halo, INT, jumpOut, lnc, MPIrank, nameOut, nfOut, cellData::phase, REAL, SCALAR, cellData::scalarField, cellData::size, cellData::tumor, typeOut, VECTOR, and velocity.
void ioDefineOutputGlobalFields | ( | ) |
void ioDefineRstGlobalParams | ( | ) |
This function defines global parametes for the restart file. Defined parameters are used during reading and writing of the restart file. Edit this function in order to introduce new restart file parameters.
Definition at line 1235 of file io.c.
References addrRst, cg1, cg2, CHAR, cm, cs, csize, DOUBLE, dummy, g1, g2, h, INT, INT64_T, m, nc, nRst, nx, ny, nz, one, outdir, rd, REAL, rng, s, sdim, secondsPerStep, simStart, simTime, sizeRst, typeRst, and v.
void ioWriteFields | ( | int | step | ) |
This function prints global fields data in VisNow data format http://visnow.icm.edu.pl
Definition at line 1672 of file io.c.
References endian, fieldAddr, gfields, gridBuffer, gridI, gridJ, gridK, gridSize, gridStartIdx, ioDefineOutputGlobalFields(), m, MPIrank, nameOut, NFIELDS, outdir, swap_Nbyte(), x, int64Vector3d::x, floatVector3d::x, int64Vector3d::y, floatVector3d::y, int64Vector3d::z, and floatVector3d::z.
void ioWriteStepPovRay | ( | int | step, |
int | type | ||
) |
This function prints PovRay output with cellular data.
Definition at line 1978 of file io.c.
References colormapPoint_t::b, beta, cellFields, cells, cm, cmaps, colormap_t::cp, csize, cellData::density, densityCriticalLevel2, fieldMax, fieldMin, colormapPoint_t::g, lnc, MPIrank, MPIsize, colormap_t::ncp, outdir, OXYG, colormapPoint_t::position, colormapPoint_t::r, cellData::size, stopRun(), x, cellData::x, cellData::y, floatVector3d::y, cellData::z, and floatVector3d::z.
void ioWriteStepVTK | ( | int | step | ) |
This function writes a VTK file with all cells for a given step.
Definition at line 1001 of file io.c.
References addrOut, cells, dimOut, endian, INT, ioDefineOutputFields(), jumpOut, lnc, MPIrank, nameOut, nc, nfOut, outdir, REAL, SCALAR, swap_Nbyte(), tlnc, typeOut, VECTOR, and x.
void printBasicInfo | ( | ) |
void printExecInfo | ( | ) |
This function prints the execution info.
Definition at line 62 of file io.c.
References endian, memPerProc, MPINodeSize, MPIrank, MPIsize, and OMPthreads.
void printHelp | ( | ) |
void printStepNum | ( | ) |
void readParams | ( | int | argc, |
char ** | argv | ||
) |
This function reads the parameter file.
Definition at line 600 of file io.c.
References addr, desc, DOUBLE, FNLEN, gfields, glucose, hydrogenIon, INT, logdir, LONG, MPIrank, nhs, NPAR, nx, ny, nz, outdir, oxygen, params, POWER_OF_TWO, readRstFile(), REAL, req, rst, set, stopRun(), STRING, tgs, and type.
void readRstFile | ( | int | argc, |
char ** | argv | ||
) |
This function reads the restart file.
Definition at line 1437 of file io.c.
References addrRst, cellData::age, cancer, cells, cellsAllocate(), CHAR, csize, cellData::death, decompositionInit(), cellData::density, DOUBLE, endian, g1, g2, cellData::gid, h, h2, h3, h4, cellData::halo, INT, INT64_T, ioDefineRstGlobalParams(), lcnc, lg0nc, lg1nc, lg2nc, cellData::lifetime, lmnc, lnc, lnnc, localCellCount, localID, lsnc, m, maxCells, maxCellsPerProc, MPIrank, MPIsize, nc, nRst, nsteps, numberOfCounts, one, cellData::phase, cellData::phasetime, randomStreamInit(), REAL, rstFileName, s, cellData::scalarField, cellData::size, sizeRst, stopRun(), swap_Nbyte(), tlnc, totalCellCount, cellData::tumor, typeRst, v, x, cellData::y, cellData::young, and cellData::z.
void revertStdOut | ( | ) |
void saveRstFile | ( | ) |
This function saves a restart file of the simulation.
Definition at line 1358 of file io.c.
References addrRst, cells, CHAR, DOUBLE, INT, INT64_T, ioDefineRstGlobalParams(), lnc, MPIrank, nRst, outdir, REAL, sizeRst, step, tlnc, and typeRst.