MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
initMoments.C
1 #include <iostream>
2 #include <math.h>
3 #include <fstream>
4 using namespace std;
5 
6 extern "C" {void dsteqr_(char &, int *, double *, double *, double *, int *, double *, int *);}
7 
8 #include "PDA.H"
9 
10 int main(int argc, char *argv[])
11 {
12  ifstream file("initMoments.txt");
13  if(file.is_open())
14  {
15  int n;
16  file >> n;
17  n = n/2;
18  double m[2*n];
19  double we[n], xi[n];
20  for (int i = 0; i < 2*n; i++)
21  {
22  file >> m[i];
23  }
24  PDA(we, xi, m, n);
25  cout << "\n";
26 
27  for(int j=0;j<n;j++)
28  {
29  cout << "weight[" << j << "] = " << we[j] << endl;
30  }
31  for(int j=0;j<n;j++)
32  {
33  cout << "node[" << j << "] = " << xi[j] << endl;
34  }
35 
36  }
37  return 0;
38 }
int main(int argc, char *argv[])
Reads parameters. Creates struts and walls. Saves foam morphology to a file.
Definition: foams.cc:23
m
Bubble Growth Application Recipe.
Definition: bubbleGrowth.py:59
void PDA(double *, double *, double *, int &)
Definition: pda.h:13