/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2020-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
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::polyMeshAdder
Description
Adds two meshes without using any polyMesh morphing.
Gets faces to couple as faceCoupleInfo which is list of faces on both
meshes. Returns map from last mesh addition.
SourceFiles
polyMeshAdder.C
\*---------------------------------------------------------------------------*/
#ifndef Foam_polyMeshAdder_H
#define Foam_polyMeshAdder_H
#include "autoPtr.H"
#include "polyMesh.H"
#include "mapAddedPolyMesh.H"
#include "faceCoupleInfo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Forward Declarations
class IOobject;
class polyTopoChange;
/*---------------------------------------------------------------------------*\
Class polyMeshAdder Declaration
\*---------------------------------------------------------------------------*/
class polyMeshAdder
{
// Private Member Functions
//- Index of patch in allPatches. Add if nonexisting.
static label patchIndex
(
const polyPatch&,
DynamicList& allPatchNames,
DynamicList& allPatchTypes
);
//- Index of zone in all zones
static label zoneIndex(const word&, DynamicList&);
static void mergePatchNames
(
const polyBoundaryMesh& patches0,
const polyBoundaryMesh& patches1,
DynamicList& allPatchNames,
DynamicList& allPatchTypes,
labelList& from1ToAllPatches,
labelList& fromAllTo1Patches
);
static List combinePatches
(
const polyMesh& mesh0,
const polyMesh& mesh1,
const polyBoundaryMesh& allBoundaryMesh,
const label nAllPatches,
const labelList& fromAllTo1Patches,
const label nInternalFaces,
const labelList& nFaces,
labelList& from0ToAllPatches,
labelList& from1ToAllPatches
);
//- Determine order for internalFaces to be upper-triangular.
// Does not change order of external faces.
static labelList getFaceOrder
(
const cellList& cells,
const label nInternalFaces,
const labelList& owner,
const labelList& neighbour
);
//- Extends face f with split points. cutEdgeToPoints gives for every
// edge the points introduced inbetween the endpoints.
static void insertVertices
(
const EdgeMap& cutEdgeToPoints,
const Map