ENH: handle some miscellaneous mixed input types (#1378)

This commit is contained in:
Mark Olesen
2019-08-06 16:57:29 +02:00
committed by Andrew Heather
parent 39834d8f45
commit b86f9944d7
7 changed files with 77 additions and 3 deletions

View File

@ -231,6 +231,16 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, Foam::directionInfo& wDist)
{
is >> wDist.index_ >> wDist.n_;
}
else if (!is.checkLabelSize<>() || !is.checkScalarSize<>())
{
// Non-native label or scalar size
is.beginRawRead();
readRawLabel(is, &wDist.index_);
readRawScalar(is, wDist.n_.data(), vector::nComponents);
is.endRawRead();
}
else
{
is.read

View File

@ -59,6 +59,15 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, Foam::wallNormalInfo& wDist)
{
is >> wDist.normal_;
}
else if (!is.checkLabelSize<>() || !is.checkScalarSize<>())
{
// Non-native label or scalar size
is.beginRawRead();
readRawScalar(is, wDist.normal_.data(), vector::nComponents);
is.endRawRead();
}
else
{
is.read