Commit aa9be5b5 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: nearWallFields - updated construction of sampled field. Fixes #1620

parent 0eecec48
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2015-2018 OpenCFD Ltd.
Copyright (C) 2015-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -64,16 +64,20 @@ void Foam::functionObjects::nearWallFields::createFields
io.readOpt() = IOobject::NO_READ;
io.writeOpt() = IOobject::NO_WRITE;
// Override bc to be calculated
wordList fldTypes(fld.boundaryField().types());
for (const label patchi : patchSet_)
{
fldTypes[patchi] = calculatedFvPatchField<Type>::typeName;
}
io.rename(sampleFldName);
sflds.set(sz, new VolFieldType(io, fld, fldTypes));
// Override bc to be calculated
sflds.set
(
sz,
new VolFieldType
(
io,
fld,
patchSet_.toc(),
calculatedFvPatchField<Type>::typeName
)
);
Log << " created " << sflds[sz].name()
<< " to sample " << fld.name() << endl;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment