diff --git a/applications/utilities/postProcessing/wall/wallGradU/wallGradU.C b/applications/utilities/postProcessing/wall/wallGradU/wallGradU.C index 8ea4dadafc..6491f2b1f9 100644 --- a/applications/utilities/postProcessing/wall/wallGradU/wallGradU.C +++ b/applications/utilities/postProcessing/wall/wallGradU/wallGradU.C @@ -30,6 +30,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -37,9 +38,9 @@ int main(int argc, char *argv[]) { timeSelector::addOptions(); #include "setRootCase.H" -# include "createTime.H" + #include "createTime.H" instantList timeDirs = timeSelector::select0(runTime, args); -# include "createMesh.H" + #include "createMesh.H" forAll(timeDirs, timeI) { @@ -83,10 +84,17 @@ int main(int argc, char *argv[]) ) ); + const fvPatchList& patches = mesh.boundary(); + forAll(wallGradU.boundaryField(), patchi) { - wallGradU.boundaryField()[patchi] = - -U.boundaryField()[patchi].snGrad(); + const fvPatch& currPatch = patches[patchi]; + + if (isA(currPatch)) + { + wallGradU.boundaryField()[patchi] = + -U.boundaryField()[patchi].snGrad(); + } } wallGradU.write();