diff --git a/etc/caseDicts/postProcessing/graphs/graphLayerAverage b/etc/caseDicts/postProcessing/graphs/graphLayerAverage index c114db9a79..23223ac58a 100644 --- a/etc/caseDicts/postProcessing/graphs/graphLayerAverage +++ b/etc/caseDicts/postProcessing/graphs/graphLayerAverage @@ -14,8 +14,10 @@ patches (); // Patches from which layers extrude zones (); // Zones from which layers extrude -axis ; // The independent variable of the graph. Can - // be "x", "y" or "z". +axis distance; // The independent variable of the graph. Can + // be "x", "y", "z", "xyz" (all coordinates + // written out), or "distance" (from the start + // point). symmetric false; // Are the layers symmetric about the centre? diff --git a/src/OpenFOAM/meshes/meshShapes/cell/oppositeCellFace.C b/src/OpenFOAM/meshes/meshShapes/cell/oppositeCellFace.C index 24f6a6a63b..72b42de90f 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/oppositeCellFace.C +++ b/src/OpenFOAM/meshes/meshShapes/cell/oppositeCellFace.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,11 +42,13 @@ Foam::label Foam::cell::opposingFaceLabel const faceUList& meshFaces ) const { - // Algorithm: // Go through all the faces of the cell and find the one which - // does not share a single vertex with the master face. If there - // are two or more such faces, return the first one and issue a - // warning; if there is no opposite face, return -1; + // does not share a single vertex with the master face + // + // If there are no such faces (e.g., a tetrahedron), return -1 + // + // If there are more than one such faces (e.g., a hex with split faces), + // return -2 const face& masterFace = meshFaces[masterFaceLabel]; @@ -96,12 +98,9 @@ Foam::label Foam::cell::opposingFaceLabel } else { - // There has already been an opposite face. - // Non-prismatic cell - Info<< "Multiple faces not sharing vertex: " - << oppositeFaceLabel << " and " - << curFaceLabels[facei] << endl; - return -1; + // There has already been a face with no shared points. + // This cell is not prismatic. + return -2; } } } diff --git a/src/functionObjects/field/layerAverage/layerAverage.C b/src/functionObjects/field/layerAverage/layerAverage.C index 51a98df1d9..e322ef4d87 100644 --- a/src/functionObjects/field/layerAverage/layerAverage.C +++ b/src/functionObjects/field/layerAverage/layerAverage.C @@ -24,6 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "layerAverage.H" +#include "FaceCellWave.H" +#include "layerInfo.H" #include "regionSplit.H" #include "syncTools.H" #include "volFields.H" @@ -39,204 +41,61 @@ namespace Foam defineTypeNameAndDebug(layerAverage, 0); addToRunTimeSelectionTable(functionObject, layerAverage, dictionary); } - - template<> - const char* - Foam::NamedEnum::names[] = - {"x", "y", "z"}; } -const Foam::NamedEnum - Foam::functionObjects::layerAverage::axisNames_; - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::functionObjects::layerAverage::walkOppositeFaces -( - const labelList& startFaces, - const boolList& startFaceIntoOwners, - boolList& blockedFace, - boolList& cellIsLayer -) -{ - // Initialise the front - DynamicList