/*---------------------------------------------------------------------------*\
========= |
\\ / 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 .
Class
Foam::PrimitivePatch
Description
A list of faces which address into the list of points.
The class is templated on the face type (e.g. triangle, polygon etc.)
and on the list type of faces and points so that it can refer to
existing lists using UList and const pointField& or hold the storage
using List and pointField.
SourceFiles
PrimitivePatchAddressing.C
PrimitivePatchBdryPoints.C
PrimitivePatch.C
PrimitivePatchCheck.C
PrimitivePatchClear.C
PrimitivePatchEdgeLoops.C
PrimitivePatchLocalPointOrder.C
PrimitivePatchMeshData.C
PrimitivePatchMeshEdges.C
PrimitivePatchName.C
PrimitivePatchPointAddressing.C
PrimitivePatchProjectPoints.C
\*---------------------------------------------------------------------------*/
#ifndef PrimitivePatch_H
#define PrimitivePatch_H
#include "boolList.H"
#include "labelList.H"
#include "edgeList.H"
#include "point.H"
#include "intersection.H"
#include "HashSet.H"
#include "Map.H"
#include "objectHit.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class PrimitivePatchName Declaration
\*---------------------------------------------------------------------------*/
TemplateName(PrimitivePatch);
/*---------------------------------------------------------------------------*\
Class PrimitivePatch Declaration
\*---------------------------------------------------------------------------*/
template
class PrimitivePatch
:
public PrimitivePatchName,
public FaceList
{
public:
// Public Typedefs
typedef FaceList FaceListType;
typedef typename std::remove_reference::type::value_type
FaceType;
typedef PointField PointFieldType;
typedef typename std::remove_reference::type::value_type
PointType;
// Public data types
//- Enumeration defining the surface type. Used in check routines.
enum surfaceTopo
{
MANIFOLD,
OPEN,
ILLEGAL
};
private:
// Private Data
//- Reference to global list of points
PointField points_;
// Demand driven private data
//- Edges of the patch; address into local point list;
// sorted with internal edges first in upper-triangular order
// and external edges last.
mutable edgeList* edgesPtr_;
//- Which part of edgesPtr_ is internal edges.
mutable label nInternalEdges_;
//- Boundary point labels, addressing into local point list
mutable labelList* boundaryPointsPtr_;
//- Face-face addressing
mutable labelListList* faceFacesPtr_;
//- Edge-face addressing
mutable labelListList* edgeFacesPtr_;
//- Face-edge addressing
mutable labelListList* faceEdgesPtr_;
//- Point-edge addressing
mutable labelListList* pointEdgesPtr_;
//- Point-face addressing
mutable labelListList* pointFacesPtr_;
//- Faces addressing into local point list
mutable List* localFacesPtr_;
//- Labels of mesh points
mutable labelList* meshPointsPtr_;
//- Mesh point map. Given the global point index find its
// location in the patch
mutable Map