85 doublereal f = 1.0, fctr;
87 std::string u =
units, tok, tsub;
88 std::string::size_type k;
95 k = u.find_first_of(
"/-");
101 tsize =
static_cast<int>(tok.size());
104 }
else if (tok[tsize - 1] ==
'2') {
105 tsub = tok.substr(0,tsize-1);
108 }
else if (tok[tsize - 1] ==
'3') {
109 tsub = tok.substr(0,tsize-1);
112 }
else if (tok[tsize - 1] ==
'4') {
113 tsub = tok.substr(0,tsize-1);
115 fctr *= fctr*fctr*fctr;
116 }
else if (tok[tsize - 1] ==
'5') {
117 tsub = tok.substr(0,tsize-1);
119 fctr *= fctr*fctr*fctr*fctr;
120 }
else if (tok[tsize - 1] ==
'6') {
121 tsub = tok.substr(0,tsize-1);
123 fctr *= fctr*fctr*fctr*fctr*fctr;
136 }
else if (action ==
'/') {
143 u = u.substr(k+1,u.size());
159 std::map<std::string, doublereal>
m_u;
185 m_u[
"micron"] = 1.0e-6;
188 m_u[
"Angstrom"] = 1.0e-10;
189 m_u[
"Angstroms"] = 1.0e-10;
195 m_u[
"kcal"] = 4184.0;
203 m_u[
"gmol"] = 1.0e-3;
204 m_u[
"mole"] = 1.0e-3;
220 m_u[
"atm"] = 1.01325e5;
234 m_u[
"coulomb"] = 1.0;
249 m_u[
"centipoise"] = 0.001;
255 m_u[
"liter"] = 0.001;