ODT
Loading...
Searching...
No Matches
cvodeDriver.h
Go to the documentation of this file.
1
6#pragma once
7
8#include "dv.h"
9
10class domain;
11
12#include "cvode/cvode.h"
13#include "cvode/nvector_serial.h"
14#include "cvode/cvode_dense.h"
15#include "cvode/sundials_dense.h"
16#include "cvode/sundials_types.h"
17
18#include <map>
19#include <vector>
20#include <string>
21
22using namespace std;
23
25
34
35 public :
36
38
40 int neq;
41 N_Vector var;
42 map<int,dv*> tVarMap;
43 int iC;
44 double atol;
45 double rtol;
46
48
49 private :
50
51 void *cvode_mem;
52 bool Ldestruct;
53 vector<double> vard;
54 vector<double> Sd;
55
56
58
59 public :
60
61 void integrateCell(int p_iC, double tres);
62
63 private :
64
65 void testCVflag(int flag, string func);
66
67 public :
68
70
71 cvodeDriver(){Ldestruct = false;} // constructor
72 void init(domain *p_domn, const bool p_LincludeRhsMix); // initializer
73 ~cvodeDriver(); // destructor
74
75};
76
77
vector< double > Sd
variable source dummy
Definition cvodeDriver.h:54
bool LincludeRhsMix
if true, mixing term is included in integration
Definition cvodeDriver.h:47
void init(domain *p_domn, const bool p_LincludeRhsMix)
domain * domn
pointer to main domain object
Definition cvodeDriver.h:39
bool Ldestruct
true if we setup cvode and can therefore destruct
Definition cvodeDriver.h:52
double rtol
CVODE tol.
Definition cvodeDriver.h:45
void testCVflag(int flag, string func)
void * cvode_mem
CVode memory.
Definition cvodeDriver.h:51
vector< double > vard
variable array dummy
Definition cvodeDriver.h:53
map< int, dv * > tVarMap
map to transported variables. (Domain vars in any order, but here, solve transported).
Definition cvodeDriver.h:42
void integrateCell(int p_iC, double tres)
int iC
which cell are we integrating
Definition cvodeDriver.h:43
double atol
CVODE tol.
Definition cvodeDriver.h:44
int neq
number of eqns solved
Definition cvodeDriver.h:40
N_Vector var
vector of variables being solved for CVode
Definition cvodeDriver.h:41
Header file for class dv.