roadrunner  2.6.0
Fast simulator for SBML models
LLVMModelData.h
1 /*
2  * LLVMModelData.h
3  *
4  * Created on: Aug 8, 2013
5  * Author: andy
6  */
7 
8 #ifndef RRLLVMMODELDATA_H_
9 #define RRLLVMMODELDATA_H_
10 
11 #include "rrSparse.h"
12 #include <string>
13 #include <ostream>
14 
15 namespace rrllvm
16 {
17 
18 #ifdef _MSC_VER
19 #pragma warning( push )
20 #pragma warning( disable : 4200 )
21 #endif
22 
47 {
52  unsigned size; // 0
53 
54  unsigned flags; // 1
55 
59  double time; // 2
60 
61  unsigned numIndCompartments; // 3
62 
71  unsigned numIndFloatingSpecies; // 4
72 
80  unsigned numIndBoundarySpecies; // 5
81 
85  unsigned numIndGlobalParameters; // 6
86 
87 
91  unsigned numRateRules; // 7
92 
98  unsigned numReactions; // 8
99 
100  unsigned numInitCompartments; // 9
101  unsigned numInitFloatingSpecies; // 10
102  unsigned numInitBoundarySpecies; // 11
103  unsigned numInitGlobalParameters; // 12
104 
108  rr::csr_matrix* stoichiometry; // 13
109 
114  class Random* random; // 14
115 
116 
117  //Event stuff
118  unsigned numEvents; // 15
119 
120  //Piecewise triggers that get treated like events for rootfinding purposes.
121  unsigned numPiecewiseTriggers; // 16
122 
127  unsigned stateVectorSize; // 17
128 
133  double* stateVector; // 18
134 
139  double* stateVectorRate; // 19
140 
150  double* rateRuleRates; // 20
151 
152 
153 
161 
162 
163 
176  double* compartmentVolumesAlias; // 22
177  double* initCompartmentVolumesAlias; // 23
178 
179 
189 
190 
191  double* boundarySpeciesAmountsAlias; // 25
192  double* initBoundarySpeciesAmountsAlias; // 26
193 
194  double* globalParametersAlias; // 27
195  double* initGlobalParametersAlias; // 28
196 
197  double* reactionRatesAlias; // 29
198 
213  double* rateRuleValuesAlias; // 30
214 
215 
216 
217 
225 
249  double data[0]; // not listed
250 };
251 void LLVMModelData_save(LLVMModelData*, std::ostream&);
252 LLVMModelData* LLVMModelData_from_save(std::istream&);
253 void LLVMModelData_free(LLVMModelData*);
254 
255 #ifdef _MSC_VER
256 #pragma warning( pop )
257 #endif
258 
259 
260 
261 std::ostream& operator <<(std::ostream& os, const LLVMModelData& data);
262 
263 }
264 
265 
266 
267 #endif /* RRLLVMMODELDATA_H_ */
Definition: rrRandom.h:14
A data structure that is that allows data to be exchanged with running SBML models.
Definition: LLVMModelData.h:47
unsigned numIndFloatingSpecies
The total ammounts of the independent floating species that don't have rules, i.e.
Definition: LLVMModelData.h:71
unsigned stateVectorSize
number of items in the state std::vector.
Definition: LLVMModelData.h:127
unsigned size
sizeof this struct, make sure we use the correct size in LLVM land.
Definition: LLVMModelData.h:52
double * stateVector
the state std::vector, this is usually a pointer to a block of data owned by the integrator.
Definition: LLVMModelData.h:133
unsigned numIndGlobalParameters
number of global parameters
Definition: LLVMModelData.h:85
double * initFloatingSpeciesAmountsAlias
conservation
Definition: LLVMModelData.h:188
double * floatingSpeciesAmountRates
amount rates of change for floating species.
Definition: LLVMModelData.h:160
rr::csr_matrix * stoichiometry
stoichiometry matrix
Definition: LLVMModelData.h:108
double * rateRuleRates
the rate of change of all elements who's dynamics are determined by rate rules.
Definition: LLVMModelData.h:150
unsigned numReactions
number of reactions, same as ratesSize.
Definition: LLVMModelData.h:98
double data[0]
binary data layout:
Definition: LLVMModelData.h:249
double time
current time.
Definition: LLVMModelData.h:59
double * compartmentVolumesAlias
******* Permanent data section *******
Definition: LLVMModelData.h:176
double * rateRuleValuesAlias
All of the elelments which have a rate rule are stored here, including the dependent floating species...
Definition: LLVMModelData.h:213
class Random * random
The rrllvm::Random class holds a RNG and caches random distributions used by the distrib package.
Definition: LLVMModelData.h:114
double * stateVectorRate
the rate of change of the state std::vector, this is usually a pointer to a block of data owned by th...
Definition: LLVMModelData.h:139
unsigned numRateRules
all rate rules are by definition dependent
Definition: LLVMModelData.h:91
unsigned numIndBoundarySpecies
number of boundary species and boundary species concentrations.
Definition: LLVMModelData.h:80
double * floatingSpeciesAmountsAlias
has length numIndFloatingSpecies
Definition: LLVMModelData.h:224