ENH: Avoid possible warning for zero-sized patches when operating in parallel

This commit is contained in:
andy
2013-01-24 09:04:42 +00:00
parent 5ca3bf6b0d
commit bb7c0afb68
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -137,7 +137,7 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
// TODO: currently re-evaluating the entire gTan field to return this patch // TODO: currently re-evaluating the entire gTan field to return this patch
const scalarField gTan(film.gTan()().boundaryField()[patchI] & n); const scalarField gTan(film.gTan()().boundaryField()[patchI] & n);
if (max(mag(gTan)) < SMALL) if (patch().size() && (max(mag(gTan)) < SMALL))
{ {
WarningIn WarningIn
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -136,7 +136,7 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs()
// TODO: currently re-evaluating the entire gTan field to return this patch // TODO: currently re-evaluating the entire gTan field to return this patch
const scalarField gTan(film.gTan()().boundaryField()[patchI] & n); const scalarField gTan(film.gTan()().boundaryField()[patchI] & n);
if (max(mag(gTan)) < SMALL) if (patch().size() && (max(mag(gTan)) < SMALL))
{ {
WarningIn WarningIn
( (