boundaryPatch.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | cfMesh: A library for mesh generation
4  \\ / O peration |
5  \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6  \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of cfMesh.
10 
11  cfMesh is free software; you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by the
13  Free Software Foundation; either version 3 of the License, or (at your
14  option) any later version.
15 
16  cfMesh is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  boundaryPatch
26 
27 Description
28  Writes information for a given boundary patch
29 
30 SourceFiles
31  boundaryPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef boundaryPatch_H
36 #define boundaryPatch_H
37 
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 
40 #include "boundaryPatchBase.H"
41 #include "typeInfo.H"
42 
43 namespace Foam
44 {
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 class boundaryPatch
49 : public boundaryPatchBase
50 {
51 
52 public:
53 
54  //- Runtime type information
55  TypeName("patch");
56 
57  // Constructors
58 
60  (
61  const word&,
62  const word&,
63  const label,
64  const label
65  );
66 
67  boundaryPatch(const word& name, const dictionary&);
68 
69  // Return clone of the object
70  virtual autoPtr<boundaryPatchBase> clone() const
71  {
73  (
74  new boundaryPatch
75  (
76  patchName(),
77  patchType(),
78  patchSize(),
79  patchStart()
80  )
81  );
82  }
83 
84  virtual autoPtr<boundaryPatchBase> clone(const boundaryPatch& wp) const
85  {
87  (
88  new boundaryPatch
89  (
90  wp.patchName(),
91  wp.patchType(),
92  wp.patchSize(),
93  wp.patchStart()
94  )
95  );
96  }
97 
98  //- Return as dictionary of entries
99  dictionary dict() const;
100 
101  // Write
102  //- write to Ostream
103  void write(Ostream&) const;
104 
105  //- Write dictionary
106  void writeDict(Ostream&) const;
107 
108  // Member operators
109 
110  Ostream& operator<<(Ostream&) const;
111 
113 
114  void operator=(const boundaryPatch&);
115 
116  bool operator!=(const boundaryPatch&) const;
117 };
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 } // End namespace Foam
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 #endif
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
boundaryPatchBase
Writes information for a given boundary patch.
Foam::boundaryPatch::TypeName
TypeName("patch")
Runtime type information.
Foam::boundaryPatch::operator=
void operator=(const boundaryPatch &)
Definition: boundaryPatch.C:108
typeInfo.H
boundaryPatchBase.H
Foam::boundaryPatch::operator<<
friend Ostream & operator<<(Ostream &, const boundaryPatch &)
Foam::boundaryPatch::writeDict
void writeDict(Ostream &) const
Write dictionary.
Definition: boundaryPatch.C:80
Foam::boundaryPatch::dict
dictionary dict() const
Return as dictionary of entries.
Definition: boundaryPatch.C:63
Foam::boundaryPatch
Like polyPatch but without reference to mesh. patchIdentifier::index is not used. Used in boundaryMes...
Definition: boundaryPatch.H:50
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::boundaryPatch::clone
virtual autoPtr< boundaryPatchBase > clone() const
Definition: boundaryPatch.H:69
Foam::boundaryPatch::clone
autoPtr< boundaryPatch > clone() const
Clone.
Definition: boundaryPatch.C:76
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:57
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::boundaryPatch::boundaryPatch
boundaryPatch(const word &name, const label index, const label size, const label start, const word &physicalType=word::null)
Construct from components.
Definition: boundaryPatch.C:33
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::boundaryPatch::operator>>
Istream & operator>>(Istream &)
Definition: boundaryPatch.C:96
Foam::boundaryPatch::write
virtual void write(Ostream &) const
Write dictionary.
Definition: boundaryPatch.C:90
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::boundaryPatch::clone
virtual autoPtr< boundaryPatchBase > clone(const boundaryPatch &wp) const
Definition: boundaryPatch.H:83
Foam::patchIdentifier::name
const word & name() const
Return name.
Definition: patchIdentifier.H:109
boundaryPatch
Writes information for a given boundary patch.
Foam::boundaryPatch::operator!=
bool operator!=(const boundaryPatch &) const
Definition: boundaryPatch.C:116