mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-07-18 03:17:04 +00:00
Merge pull request #238 from wanqing0421/main
fixed the error when insert particles from file with integer number
This commit is contained in:
@ -49,7 +49,14 @@ bool pFlow::positionFile::positionPointsFile()
|
|||||||
is >> tok;
|
is >> tok;
|
||||||
if(tok.good()&& tok.isNumber()&& !is.eof())
|
if(tok.good()&& tok.isNumber()&& !is.eof())
|
||||||
{
|
{
|
||||||
tempPoint.x() = tok.realToken();
|
if(tok.isReal())
|
||||||
|
{
|
||||||
|
tempPoint.x() = tok.realToken();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tempPoint.x() = static_cast<real>(tok.int64Token());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -71,7 +78,14 @@ bool pFlow::positionFile::positionPointsFile()
|
|||||||
is >> tok;
|
is >> tok;
|
||||||
if(tok.good()&& tok.isNumber()&& !is.eof())
|
if(tok.good()&& tok.isNumber()&& !is.eof())
|
||||||
{
|
{
|
||||||
tempPoint.y() = tok.realToken();
|
if(tok.isReal())
|
||||||
|
{
|
||||||
|
tempPoint.y() = tok.realToken();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tempPoint.y() = static_cast<real>(tok.int64Token());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -93,7 +107,14 @@ bool pFlow::positionFile::positionPointsFile()
|
|||||||
is >> tok;
|
is >> tok;
|
||||||
if(tok.good()&& tok.isNumber()&& !is.eof())
|
if(tok.good()&& tok.isNumber()&& !is.eof())
|
||||||
{
|
{
|
||||||
tempPoint.z() = tok.realToken();
|
if(tok.isReal())
|
||||||
|
{
|
||||||
|
tempPoint.z() = tok.realToken();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tempPoint.z() = static_cast<real>(tok.int64Token());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user