rhoCentralFoam: Correct handling of single-cell meshes

Resolves bug-report http://openfoam.org/mantisbt/view.php?id=1548
This commit is contained in:
Henry
2015-03-13 09:51:33 +00:00
parent 43aec8425b
commit fd069939c1

View File

@ -27,15 +27,17 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
sf.rename(vf.name() + '_' + dir.name()); sf.rename(vf.name() + '_' + dir.name());
// Correct BCs of the positive (outgoing) fluxes // Correct BCs of the positive (outgoing) fluxes
if (dir[0] > 0) forAll(sf.boundaryField(), patchi)
{ {
forAll(sf.boundaryField(), patchi) if
(
!sf.boundaryField()[patchi].coupled()
&& sf.boundaryField()[patchi].size()
&& dir.boundaryField()[patchi][0] > 0
)
{ {
if (!sf.boundaryField()[patchi].coupled()) sf.boundaryField()[patchi] =
{ vf.boundaryField()[patchi].patchInternalField();
sf.boundaryField()[patchi] =
vf.boundaryField()[patchi].patchInternalField();
}
} }
} }