ODT
Loading...
Searching...
No Matches
dv_dvisc_const.cc
Go to the documentation of this file.
1
7#include "dv_dvisc_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->kvisc0 * domn->pram->rho0);
27
28 if(Lt){
29 *domn->io->ostrm << endl << "ERROR, you set dvisc to be transported. Resetting L_transported to false" << endl;
30 L_transported = false;
31 }
32
33}
34
36
49void dv_dvisc_const::merge2cells(const int imrg,
50 const double m1,
51 const double m2,
52 const bool LconstVolume) {
53
54 d.erase(d.begin() + imrg+1);
55
56}
57
59
63void dv_dvisc_const::setVar(const int ipt){
64 if(ipt != -1) {
65 cout << endl << "ERROR in setVar: ipt must be -1" << endl;
66 exit(0);
67 }
68 d.resize(domn->ngrd, domn->pram->kvisc0 * domn->pram->rho0);
69}
70
int ngrd
number of grid cells
Definition domain.h:42
inputoutput * io
pointer to input/output object
Definition domain.h:72
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
ostream * ostrm
Runtime: points to cout or to a file.
Definition inputoutput.h:33
double rho0
initial uniform density (kg/m^3)
Definition param.h:36
double kvisc0
initial uniform kinematic viscosity (m^2/s)
Definition param.h:37
Header file for class domain.
Header file for class dv_dvisc_const.