MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
momentsConverter.h
Go to the documentation of this file.
1 
10 void momentsConverter(const state_type &y , const double t);
11 
12 void momentsConverter(const state_type &y , const double t)
13 {
14  double kappa = 1.0 - (y[8]/(1.0+y[8]));
15  double M[4] = {};
16  M[0] = kappa*y[7];
17  M[1] = kappa*y[8];
18  M[2] = kappa*y[9];
19  M[3] = kappa*y[10];
20 
21  ofstream MM[4];
22  MM[0].open("./M0.txt", std::ios::app);
23  MM[1].open("./M1.txt", std::ios::app);
24  MM[2].open("./M2.txt", std::ios::app);
25  MM[3].open("./M3.txt", std::ios::app);
26 
27  for (int i = 0; i < 4; i++)
28  {
29  MM[i] << t << '\t' << M[i] << '\n';
30  MM[i].close();
31  }
32 }
real(dp), dimension(:), allocatable y
state variables
Definition: globals.f90:106
void momentsConverter(const state_type &y, const double t)