mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: fixed retrieving field from sub surface.
It now caters for - all surfaces having fields - no surfaces having fields but not a combination of those.
This commit is contained in:
@ -681,19 +681,22 @@ void Foam::searchableSurfaceCollection::getField
|
||||
List<List<label> > infoMap;
|
||||
sortHits(info, surfInfo, infoMap);
|
||||
|
||||
values.setSize(info.size());
|
||||
//?Misses do not get set? values = 0;
|
||||
|
||||
// Do surface tests
|
||||
forAll(surfInfo, surfI)
|
||||
{
|
||||
labelList surfValues;
|
||||
subGeom_[surfI].getField(surfInfo[surfI], surfValues);
|
||||
|
||||
const labelList& map = infoMap[surfI];
|
||||
forAll(map, i)
|
||||
if (surfValues.size())
|
||||
{
|
||||
values[map[i]] = surfValues[i];
|
||||
// Size values only when we have a surface that supports it.
|
||||
values.setSize(info.size());
|
||||
|
||||
const labelList& map = infoMap[surfI];
|
||||
forAll(map, i)
|
||||
{
|
||||
values[map[i]] = surfValues[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user