BUG: scalarTransport: force early creation of transported field

Some bcs (e.g. humidity) use an external transported field so this needs
to be registered asap.
This commit is contained in:
mattijs
2015-11-30 12:16:05 +00:00
parent 7cb12e208d
commit aef2fd5ef4

View File

@ -191,9 +191,13 @@ Foam::scalarTransport::scalarTransport
{ {
read(dict); read(dict);
// Force creation of transported field so any bcs using it can look it
// up
volScalarField& T = transportedField();
if (resetOnStartUp_) if (resetOnStartUp_)
{ {
transportedField() == dimensionedScalar("zero", dimless, 0.0); T == dimensionedScalar("zero", dimless, 0.0);
} }
} }