/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 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 .
Class
Foam::polyDualMesh
Description
Creates dual of polyMesh.
Every polyMesh point becomes a cell on the dual mesh
Every polyMesh cell and patchFace becomes a point on the dual mesh.
SourceFiles
polyDualMesh.C
\*---------------------------------------------------------------------------*/
#ifndef polyDualMesh_H
#define polyDualMesh_H
#include "polyMesh.H"
#include "labelIOList.H"
#include "typeInfo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class polyDualMesh Declaration
\*---------------------------------------------------------------------------*/
class polyDualMesh
:
public polyMesh
{
// Private Data
//- From polyMesh cell to my point
labelIOList cellPoint_;
//- From polyMesh boundary face (face-mesh.nInternalFaces()) to my point
labelIOList boundaryFacePoint_;
// Private Member Functions
static labelList getFaceOrder
(
const labelList& faceOwner,
const labelList& faceNeighbour,
const cellList& cells,
label& nInternalFaces
);
static void getPointEdges
(
const primitivePatch& patch,
const label facei,
const label pointi,
label& e0,
label& e1
);
static labelList collectPatchSideFace
(
const polyPatch& patch,
const label patchToDualOffset,
const labelList& edgeToDualPoint,
const labelList& pointToDualPoint,
const label pointi,
label& edgeI
);
static void collectPatchInternalFace
(
const polyPatch& patch,
const label patchToDualOffset,
const labelList& edgeToDualPoint,
const label pointi,
const label startEdgeI,
labelList& dualFace2,
labelList& featEdgeIndices2
);
static void splitFace
(
const polyPatch& patch,
const labelList& pointToDualPoint,
const label pointi,
const labelList& dualFace,
const labelList& featEdgeIndices,
DynamicList& dualFaces,
DynamicList