/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ #include "surfaceFieldValue.H" #include "processorFvPatch.H" #include "processorCyclicFvPatch.H" #include "sampledSurface.H" #include "mergePoints.H" #include "indirectPrimitivePatch.H" #include "PatchTools.H" #include "fvMeshStitcher.H" #include "polyTopoChangeMap.H" #include "polyMeshMap.H" #include "polyDistributionMap.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { namespace functionObjects { namespace fieldValues { defineTypeNameAndDebug(surfaceFieldValue, 0); addToRunTimeSelectionTable(fieldValue, surfaceFieldValue, dictionary); addToRunTimeSelectionTable(functionObject, surfaceFieldValue, dictionary); } } } template<> const char* Foam::NamedEnum < Foam::functionObjects::fieldValues::surfaceFieldValue::selectionTypes, 4 >::names[] = { "faceZone", "patch", "patches", "sampledSurface" }; template<> const char* Foam::NamedEnum < Foam::functionObjects::fieldValues::surfaceFieldValue::operationType, 14 >::names[] = { "none", "sum", "sumMag", "orientedSum", "average", "areaAverage", "areaIntegrate", "min", "max", "minMag", "maxMag", "CoV", "areaNormalAverage", "areaNormalIntegrate" }; const Foam::NamedEnum < Foam::functionObjects::fieldValues::surfaceFieldValue::selectionTypes, 4 > Foam::functionObjects::fieldValues::surfaceFieldValue::selectionTypeNames; const Foam::NamedEnum < Foam::functionObjects::fieldValues::surfaceFieldValue::operationType, 14 > Foam::functionObjects::fieldValues::surfaceFieldValue::operationTypeNames_; // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // void Foam::functionObjects::fieldValues::surfaceFieldValue::setFaceZoneFaces ( const word& zoneName ) { const label zoneId = mesh_.faceZones().findIndex(zoneName); if (zoneId < 0) { FatalErrorInFunction << type() << " " << name() << ": " << selectionTypeNames[selectionType_] << "(" << zoneName << "):" << nl << " Unknown face zone name: " << zoneName << ". Valid face zones are: " << mesh_.faceZones().toc() << nl << exit(FatalError); } selectionName_ = zoneName; // Ensure addressing is built on all processes mesh_.polyBFacePatches(); mesh_.polyBFacePatchFaces(); const faceZone& zone = mesh_.faceZones()[zoneId]; DynamicList