Skip to content
Snippets Groups Projects
Commit ec41a4cc authored by Henry's avatar Henry
Browse files

rhoCentralFoam: Correct handling of single-cell meshes

Resolves bug-report http://openfoam.org/mantisbt/view.php?id=1548
parent a8d59173
Branches
Tags
No related merge requests found
...@@ -27,15 +27,17 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate ...@@ -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();
}
} }
} }
......
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