ODT
Loading...
Searching...
No Matches
source
domainvariables
dv_dvisc_const.cc
Go to the documentation of this file.
1
7
#include "
dv_dvisc_const.h
"
8
#include "
domain.h
"
9
11
17
dv_dvisc_const::dv_dvisc_const
(
domain
*line,
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
49
void
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
63
void
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
domain
Definition
domain.h:34
domain::ngrd
int ngrd
number of grid cells
Definition
domain.h:42
domain::io
inputoutput * io
pointer to input/output object
Definition
domain.h:72
domain::pram
param * pram
pointer to the parameters object
Definition
domain.h:73
dv_dvisc_const::dv_dvisc_const
dv_dvisc_const()
Definition
dv_dvisc_const.h:47
dv_dvisc_const::setVar
virtual void setVar(const int ipt=-1)
Definition
dv_dvisc_const.cc:63
dv_dvisc_const::merge2cells
virtual void merge2cells(const int imrg, const double m2, const double m1, const bool LconstVolume=false)
Definition
dv_dvisc_const.cc:49
dv::d
vector< double > d
the data
Definition
dv.h:30
dv::L_transported
bool L_transported
flag true if var is transported
Definition
dv.h:31
dv::var_name
string var_name
name of variable
Definition
dv.h:29
dv::L_output
bool L_output
flag true if included in output
Definition
dv.h:32
dv::domn
domain * domn
pointer to domain object (parent)
Definition
dv.h:35
inputoutput::ostrm
ostream * ostrm
Runtime: points to cout or to a file.
Definition
inputoutput.h:33
param::rho0
double rho0
initial uniform density (kg/m^3)
Definition
param.h:36
param::kvisc0
double kvisc0
initial uniform kinematic viscosity (m^2/s)
Definition
param.h:37
domain.h
Header file for class domain.
dv_dvisc_const.h
Header file for class dv_dvisc_const.
Generated by
1.10.0