fvSolution solutionDict(runTime); bool coupled(solutionDict.getOrDefault("coupledEnergyField", false)); autoPtr> fvMatrixAssemblyPtr; forAll(fluidRegions, i) { const rhoThermo& thermo = refCast(thermoFluid[i]); const auto& bpsi = thermo.T().boundaryField(); forAll (bpsi, patchI) { if (bpsi[patchI].useImplicit()) { coupled = true; } } } forAll(solidRegions, i) { solidThermo& thermo = thermos[i]; const auto& bpsi = thermo.T().boundaryField(); forAll (bpsi, patchI) { if (bpsi[patchI].useImplicit()) { coupled = true; } } } forAll(fluidRegions, i) { const rhoThermo& thermo = refCast(thermoFluid[i]); if (coupled) { Info << "Create fvMatrixAssembly." << endl; fvMatrixAssemblyPtr.reset ( new fvMatrix ( thermo.he(), dimEnergy/dimTime ) ); break; } }