specie class construction with dict w/o nCharges

This commit is contained in:
Yeongdo Park 2016-10-26 20:00:10 +03:00
parent 3cab74864c
commit 3eec143b5a

View file

@ -71,7 +71,7 @@ Foam::specie::specie(const dictionary& dict)
name_(dict.dictName()),
nMoles_(readScalar(dict.subDict("specie").lookup("nMoles"))),
molWeight_(readScalar(dict.subDict("specie").lookup("molWeight"))),
nCharges_(readScalar(dict.subDict("specie").lookup("nCharges")))
nCharges_(dict.subDict("specie").lookupOrDefault("nCharges", 0.0))
{}