ODT
Loading...
Searching...
No Matches
dv_rho_const.cc
Go to the documentation of this file.
1
7#include "dv_rho_const.h"
8#include "domain.h"
9
11
18 const string s,
19 const bool Lt,
20 const bool Lo) {
21
22 domn = line;
23 var_name = s;
24 L_transported = Lt;
25 L_output = Lo;
26 d = vector<double>(domn->ngrd, domn->pram->rho0);
27
28}
29
31
44void dv_rho_const::merge2cells(const int imrg,
45 const double m1,
46 const double m2,
47 const bool LconstVolume) {
48
49 d.erase(d.begin() + imrg+1);
50
51}
52
54
58void dv_rho_const::setVar(const int ipt){
59
60 if(ipt != -1) {
61 cout << endl << "ERROR in setVar: ipt must be -1" << endl;
62 exit(0);
63 }
64
65 d.resize(domn->ngrd, domn->pram->rho0);
66}
67
int ngrd
number of grid cells
Definition domain.h:42
param * pram
pointer to the parameters object
Definition domain.h:73
virtual void setVar(const int ipt=-1)
virtual void merge2cells(const int imrg, const double m2, const double m1, const bool LconstVolume=false)
vector< double > d
the data
Definition dv.h:30
bool L_transported
flag true if var is transported
Definition dv.h:31
string var_name
name of variable
Definition dv.h:29
bool L_output
flag true if included in output
Definition dv.h:32
domain * domn
pointer to domain object (parent)
Definition dv.h:35
double rho0
initial uniform density (kg/m^3)
Definition param.h:36
Header file for class domain.
Header file for class dv_rho_const.