-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.h
150 lines (112 loc) · 3.71 KB
/
model.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#ifndef _MODEL_H_
#define _MODEL_H_
#define BUFFER 2
typedef struct derivatives
{
double** derivativesTissue;
double* derivativesLymphNode;
}derivatives;
typedef struct structParameters
{
double muMic;
double rM;
double chi;
double micDiffusion;
double cDcDiffusion;
double aDcDiffusion;
double tCytoDiffusion;
double antibodyDiffusion;
double lambAntMic;
double bD;
double rT;
double cMic;
double muCDc;
double gammaD;
double gammaAntibody;
double gammaT;
double avgT;
double avgDc;
double avgMic;
double avgOdc;
double cCDc;
double cADc;
double cDl;
double cF;
double alphaTHelper;
double alphaTCytotoxic;
double alphaB;
double alphaP;
double bTHelper;
double bTCytotoxic;
double bRho;
double bRhoB;
double bRhoP;
double rhoTHelper;
double rhoTCytotoxic;
double rhoB;
double rhoP;
double rhoAntibody;
double stableTHelper;
double stableTCytotoxic;
double stableB;
double stableP;
double V_PV;
double V_BV;
int V_LN;
}structParameters;
typedef struct structModel
{
double ht;
double hx;
int tFinal;
int xFinal;
int numStepsLN;
int intervalFigures;
int numPointsLN;
int numFigs;
int saveFigs;
int tSize;
int xSize;
double *thetaBV;
double *thetaPV;
double activatedDCTissueVessels;
double antibodyTissueVessels;
double tCytotoxicTissueVessels;
double **microglia;
double **oligodendrocyte;
double **conventionalDc;
double **activatedDc;
double **antibody;
double **tCytotoxic;
double *dendriticLymphNode;
double *tHelperLymphNode;
double *tCytotoxicLymphNode;
double *bCellLymphNode;
double *plasmaCellLymphNode;
double *antibodyLymphNode;
double *dendriticLymphNodeSavedPoints;
double *tHelperLymphNodeSavedPoints;
double *tCytotoxicLymphNodeSavedPoints;
double *bCellLymphNodeSavedPoints;
double *plasmaCellLymphNodeSavedPoints;
double *antibodyLymphNodeSavedPoints;
structParameters parametersModel;
}structModel;
int VerifyCFL(structParameters parametersModel, double ht, double hx);
double PreventionOverCrowdingTerm(double populationPoint, double avgValue);
double UpDownWind(double frontIPoint, double ijPoint, double avgValue);
double CalculateChemotaxis(structModel model, double ponto_posterior_j, double ponto_anterior_j, double ponto_posterior_i, double ponto_anterior_i, double ponto_atual,\
double valor_medio, double gradiente_odc_i, double gradiente_odc_j);
double CalculateDiffusion(structModel model, double ponto_posterior_j, double ponto_anterior_j, double ponto_posterior_i, double ponto_anterior_i, double ponto_atual);
double fFunc(double valuePopulation, double avgPopulation);
double* EquationsLymphNode(structModel* model, int stepPos);
double CalculateHt(structModel model, double stepKMinus);
void SolverLymphNode(structModel *model, int stepPos);
structModel ModelInitialize(structParameters params, double ht, double hx, double time, double space, int numFigs, int numPointsLN, int numStepsLN, int saveFigs);
void DefineBVPV(structModel *model);
void InitialConditionTissueMicroglia(structModel* model);
void InitialConditionLymphNode(structModel* model, double dendriticLN, double thelperLN, double tcytotoxicLN, double bcellLN, double plasmacellLN, double antibodyLN);
void RunModel(structModel *model);
void WritePopulation(structModel model, double *population, char* fileName, char* bufferTime);
void WriteFiles(structModel model, double *oligodendrocyte, double *microglia, double *tCytotoxic, double *antibody, double *conventionalDC, double *activatedDC, int time);
#endif