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
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -216,14 +216,20 @@ bool setFaceFieldType
}
// Override
bool hasWarned = false;
labelList nChanged(field.boundaryField().size(), 0);
forAll(selectedFaces, i)
{
label facei = selectedFaces[i];
if (mesh.isInternalFace(facei))
{
WarningIn("setFaceFieldType(..)")
<< "Ignoring internal face " << facei << endl;
if (!hasWarned)
{
hasWarned = true;
WarningIn("setFaceFieldType(..)")
<< "Ignoring internal face " << facei
<< ". Suppressing further warnings." << endl;
}
}
else
{

View File

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