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
@ -79,6 +79,17 @@ Foam::findCellParticle::findCellParticle
|
||||
{
|
||||
is >> start_ >> end_ >> data_;
|
||||
}
|
||||
else if (!is.checkLabelSize<>() || !is.checkScalarSize<>())
|
||||
{
|
||||
// Non-native label or scalar size
|
||||
is.beginRawRead();
|
||||
|
||||
readRawScalar(is, start_.data(), vector::nComponents);
|
||||
readRawScalar(is, end_.data(), vector::nComponents);
|
||||
readRawLabel(is, &data_);
|
||||
|
||||
is.endRawRead();
|
||||
}
|
||||
else
|
||||
{
|
||||
is.read
|
||||
|
||||
@ -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 |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
@ -418,7 +418,6 @@ Foam::wallBoundedParticle::wallBoundedParticle
|
||||
const label diagEdge
|
||||
)
|
||||
:
|
||||
// particle(mesh, barycentric(1, 0, 0, 0), celli, tetFacei, tetPti),
|
||||
particle(mesh, position, celli, tetFacei, tetPti, false),
|
||||
localPosition_(position),
|
||||
meshEdgeStart_(meshEdgeStart),
|
||||
@ -442,6 +441,18 @@ Foam::wallBoundedParticle::wallBoundedParticle
|
||||
{
|
||||
is >> localPosition_ >> meshEdgeStart_ >> diagEdge_;
|
||||
}
|
||||
if (!is.checkLabelSize<>() || !is.checkScalarSize<>())
|
||||
{
|
||||
// Non-native label or scalar size
|
||||
|
||||
is.beginRawRead();
|
||||
|
||||
readRawScalar(is, localPosition_.data(), vector::nComponents);
|
||||
readRawLabel(is, &meshEdgeStart_);
|
||||
readRawLabel(is, &diagEdge_);
|
||||
|
||||
is.endRawRead();
|
||||
}
|
||||
else
|
||||
{
|
||||
is.read(reinterpret_cast<char*>(&localPosition_), sizeofFields_);
|
||||
|
||||
Reference in New Issue
Block a user