ENH: setFields: single warn for internal faces; Updated setFieldsDict

This commit is contained in:
mattijs
2012-03-14 09:33:56 +00:00
parent 2fb7b6cfcc
commit 426c1b393d
2 changed files with 12 additions and 6 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) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -216,14 +216,20 @@ bool setFaceFieldType
} }
// Override // Override
bool hasWarned = false;
labelList nChanged(field.boundaryField().size(), 0); labelList nChanged(field.boundaryField().size(), 0);
forAll(selectedFaces, i) forAll(selectedFaces, i)
{ {
label facei = selectedFaces[i]; label facei = selectedFaces[i];
if (mesh.isInternalFace(facei)) if (mesh.isInternalFace(facei))
{ {
if (!hasWarned)
{
hasWarned = true;
WarningIn("setFaceFieldType(..)") WarningIn("setFaceFieldType(..)")
<< "Ignoring internal face " << facei << endl; << "Ignoring internal face " << facei
<< ". Suppressing further warnings." << endl;
}
} }
else else
{ {

View File

@ -16,7 +16,7 @@ FoamFile
defaultFieldValues defaultFieldValues
( (
volScalarFieldValue gamma 0 volScalarFieldValue alpha1 0
volVectorFieldValue U (0 0 0) volVectorFieldValue U (0 0 0)
); );
@ -30,7 +30,7 @@ regions
fieldValues fieldValues
( (
volScalarFieldValue gamma 1 volScalarFieldValue alpha1 1
); );
} }
@ -41,7 +41,7 @@ regions
fieldValues fieldValues
( (
volScalarFieldValue gamma 1 volScalarFieldValue alpha1 1
); );
} }
); );