-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunction.cpp
More file actions
35 lines (32 loc) · 843 Bytes
/
function.cpp
File metadata and controls
35 lines (32 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "function.h"
#include "tool.h"
#include <iostream>
#include "elements.h"
double FUNC:: read_density()
{
double density_gcm;
cout<<green("Input the density (g/cm^3):")<<endl;
cin>>density_gcm;
return density_gcm;
}
double FUNC:: read_temperature()
{
double temperature_eV;
cout<<green("Input the temperature (eV):")<<endl;
cin>>temperature_eV;
return temperature_eV;
}
double FUNC:: read_number_of_molecules()
{
double nmol;
cout<<green("Input the number of molecules:")<<endl;
cin>>nmol;
return nmol;
}
void FUNC::read_elemets(vector<double> &mlist, vector<double> &zlist, vector<double> &nlist, vector<double> &zionlist)
{
string name;
cout<<green("Input the name of molecule (e.g. Mg-O, C-O-2, H-2-O)")<<endl;
cin>>name;
readstring(name, mlist, zlist, nlist, zionlist);
}