ignoreFaPatch.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2023 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::ignoreFaPatch
28 
29 Description
30  A patch which will not exist in the faMesh. Typical example is a front and
31  back plane of a 2-D geometry
32 
33 SourceFiles
34  ignoreFaPatch.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef Foam_ignoreFaPatch_H
39 #define Foam_ignoreFaPatch_H
40 
41 #include "faPatch.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class ignoreFaPatch Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class ignoreFaPatch
53 :
54  public faPatch
55 {
56 public:
57 
58  //- Runtime type information
59  TypeName("ignore");
60 
61 
62  // Constructors
63 
64  //- Minimal construct from components
66  (
67  const word& name,
68  const label index,
69  const faBoundaryMesh& bm,
70  const label nbrPolyPatchi = -1,
71  const word& patchType = typeName
72  );
73 
74  //- Construct from components
76  (
77  const word& name,
78  const labelUList& edgeLabels,
79  const label index,
80  const faBoundaryMesh& bm,
81  const label nbrPolyPatchi = -1,
82  const word& patchType = typeName
83  );
84 
85  //- Construct from dictionary
87  (
88  const word& name,
89  const dictionary& dict,
90  const label index,
91  const faBoundaryMesh& bm,
92  const word& patchType
93  );
94 
95  //- Copy construct, resetting the boundary mesh
96  ignoreFaPatch(const ignoreFaPatch& p, const faBoundaryMesh& bm);
97 
98  //- Copy construct, resetting boundary mesh and addressing
100  (
101  const ignoreFaPatch& p,
102  const faBoundaryMesh& bm,
103  const label index,
104  const labelUList& edgeLabels,
105  const label nbrPolyPatchi = -1
106  );
107 
108 
109  //- Construct and return a clone, resetting the boundary mesh
110  virtual autoPtr<faPatch> clone(const faBoundaryMesh& bm) const
111  {
112  return autoPtr<faPatch>(new ignoreFaPatch(*this, bm));
113  }
114 
115  //- Construct and return a clone, resetting the edge list
116  // and boundary mesh
117  virtual autoPtr<faPatch> clone
118  (
119  const faBoundaryMesh& bm,
120  const labelUList& edgeLabels,
121  const label index,
122  const label nbrPolyPatchi = -1
123  ) const
124  {
125  return autoPtr<faPatch>
126  (
127  new ignoreFaPatch(*this, bm, index, edgeLabels, nbrPolyPatchi)
128  );
129  }
131 
132  // Member Functions
133 };
134 
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 } // End namespace Foam
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #endif
143 
144 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
const labelList & edgeLabels() const noexcept
Return the list of edges.
Definition: faPatch.H:335
TypeName("ignore")
Runtime type information.
ignoreFaPatch(const word &name, const label index, const faBoundaryMesh &bm, const label nbrPolyPatchi=-1, const word &patchType=typeName)
Minimal construct from components.
Definition: ignoreFaPatch.C:41
A patch which will not exist in the faMesh. Typical example is a front and back plane of a 2-D geomet...
Definition: ignoreFaPatch.H:47
A class for handling words, derived from Foam::string.
Definition: word.H:63
const word & name() const noexcept
The patch name.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:72
Finite area boundary mesh.
autoPtr< List< label > > clone() const
Clone.
Definition: ListI.H:121
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
label index() const noexcept
The index of this patch in the boundaryMesh.
volScalarField & p
Namespace for OpenFOAM.