Timothy  0.9
Tissue Modelling Framework
 All Data Structures Files Functions Variables Typedefs Macros
fields.h
Go to the documentation of this file.
1 /* **************************************************************************
2  * This file is part of Timothy
3  *
4  * Copyright (c) 2014/15 Maciej Cytowski
5  * Copyright (c) 2014/15 ICM, University of Warsaw, Poland
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  *
21  * *************************************************************************/
22 
27 #define NFIELDS 3 //5
28 #define NGLOB 2
29 #define NCHEM 1
30 #define SCALAR_FIELD 1
31 #define VECTOR_FIELD 2
32 
33 int gfields;
34 int oxygen;
35 int glucose;
38 
39 /* grid data */
40 int64_t gridI,gridJ,gridK;
44 #define grid(i,j,k) (gridBuffer[gridSize.y*gridSize.z*i+gridSize.z*j+k])
46 struct doubleVector3d lowerGridCorner,upperGridCorner;
48 double boxVolume;
49 
50 /* field data */
51 char fieldName[NFIELDS][128];
52 double *fieldAddr[NFIELDS];
54 
57 double fieldBC[NFIELDS]; /* boundary conditions - constant value for Dirichlet */
58 double fieldICMean[NFIELDS]; /* initial conditions - mean value */
59 double fieldICVar[NFIELDS]; /* initial conditions - variability */
60 double fieldDt[NFIELDS]; /* how many seconds per iteration */
61 
62 /* Consumption and production rates
63  Please use good units. When I say it, I mean it! */
64 double fieldConsumption[NFIELDS]; /* units - mol (cell s)^-1 */
65 double fieldProduction[NFIELDS]; /* units - mol (cell s)^-1 */
66 
67 int fieldNumberOfCriticalLevels[NFIELDS]; /* number of critical levels for each field */
68 
69 double fieldCriticalLevel1[NFIELDS]; /* critical level 1 - for cells in G1 phase */
70 double fieldCriticalLevel2[NFIELDS]; /* critical level 2 - for cells in S, G2, M phases */
71 
72 double fieldMin[NFIELDS];
73 double fieldMax[NFIELDS];
74 
75 double *densityField;
76 double *tempField;
77 double *chemField[NCHEM];
79 double **fieldsPatches;
80 
81 #define DENS 0
82 #define TEMP 1
83 #define OXYG 2
84 #define GLUC 3
85 #define HYDR 4
double * tempField
Definition: fields.h:76
struct int64Vector3d * gridEndIdx
Definition: fields.h:42
int64_t gridK
Definition: fields.h:40
#define NFIELDS
Definition: fields.h:27
struct doubleVector3d lowerGridCorner upperGridCorner
Definition: fields.h:46
double fieldMin[NFIELDS]
Definition: fields.h:72
double * chemField[NCHEM]
Definition: fields.h:77
double fieldDiffCoef[NFIELDS]
Definition: fields.h:55
double ** fieldsPatches
Definition: fields.h:79
struct doubleVector3d * gridBuffer
Definition: fields.h:43
double ** fieldsPatchesCommBuff
Definition: fields.h:78
double fieldDt[NFIELDS]
Definition: fields.h:60
char fieldName[NFIELDS][128]
Definition: fields.h:51
double fieldICVar[NFIELDS]
Definition: fields.h:59
double fieldMax[NFIELDS]
Definition: fields.h:73
int hydrogenIon
Definition: fields.h:36
double boxVolume
Definition: fields.h:48
struct int64Vector3d gridSize
Definition: fields.h:41
double fieldBC[NFIELDS]
Definition: fields.h:57
int glucose
Definition: fields.h:35
double fieldCriticalLevel2[NFIELDS]
Definition: fields.h:70
struct int64Vector3d * gridStartIdx
Definition: fields.h:42
double fieldCriticalLevel1[NFIELDS]
Definition: fields.h:69
double gridResolution
Definition: fields.h:45
double fieldICMean[NFIELDS]
Definition: fields.h:58
int temperature
Definition: fields.h:37
double fieldConsumption[NFIELDS]
Definition: fields.h:64
#define NCHEM
Definition: fields.h:29
int fieldNumberOfCriticalLevels[NFIELDS]
Definition: fields.h:67
double * fieldAddr[NFIELDS]
Definition: fields.h:52
double fieldProduction[NFIELDS]
Definition: fields.h:65
int fieldType[NFIELDS]
Definition: fields.h:53
double * densityField
Definition: fields.h:75
int oxygen
Definition: fields.h:34
double fieldLambda[NFIELDS]
Definition: fields.h:56
int64_t gridI
Definition: fields.h:40
struct doubleVector3d globalGridSize
Definition: fields.h:47
int64_t gridJ
Definition: fields.h:40
int gfields
Definition: fields.h:33