mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: handle some miscellaneous mixed input types (#1378)
This commit is contained in:
committed by
Andrew Heather
parent
39834d8f45
commit
b86f9944d7
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -61,6 +61,21 @@ Foam::DTRMParticle::DTRMParticle
|
||||
{
|
||||
is >> p0_ >> p1_ >> I0_ >> I_ >> dA_ >> transmissiveId_;
|
||||
}
|
||||
else if (!is.checkLabelSize<>() || !is.checkScalarSize<>())
|
||||
{
|
||||
// Non-native label or scalar size
|
||||
|
||||
is.beginRawRead();
|
||||
|
||||
readRawScalar(is, p0_.data(), vector::nComponents);
|
||||
readRawScalar(is, p1_.data(), vector::nComponents);
|
||||
readRawScalar(is, &I0_);
|
||||
readRawScalar(is, &I_);
|
||||
readRawScalar(is, &dA_);
|
||||
readRawLabel(is, &transmissiveId_);
|
||||
|
||||
is.endRawRead();
|
||||
}
|
||||
else
|
||||
{
|
||||
is.read(reinterpret_cast<char*>(&p0_), sizeofFields_);
|
||||
|
||||
Reference in New Issue
Block a user