processorFaePatchField.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) 2016-2017 Wikki 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::processorFaePatchField
28 
29 Description
30 
31 Author
32  Zeljko Tukovic, FMENA
33  Hrvoje Jasak, Wikki Ltd.
34 
35 SourceFiles
36  processorFaePatchField.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef Foam_processorFaePatchField_H
41 #define Foam_processorFaePatchField_H
42 
43 #include "coupledFaePatchField.H"
44 #include "processorFaPatch.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class processorFaePatchField Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class Type>
57 :
58  public coupledFaePatchField<Type>
59 {
60  // Private Data
61 
62  //- Local reference cast into the processor patch
63  const processorFaPatch& procPatch_;
64 
65 
66 public:
67 
68  //- Runtime type information
69  TypeName(processorFaPatch::typeName_());
70 
71 
72  // Constructors
73 
74  //- Construct from patch and internal field
76  (
77  const faPatch&,
79  );
80 
81  //- Construct from patch and internal field and patch field
83  (
84  const faPatch&,
86  const Field<Type>&
87  );
88 
89  //- Construct from patch, internal field and dictionary
91  (
92  const faPatch&,
94  const dictionary&
95  );
96 
97  //- Construct by mapping given processorFaePatchField onto a new patch
99  (
101  const faPatch&,
103  const faPatchFieldMapper&
104  );
105 
106  //- Construct as copy
108 
109  //- Construct and return a clone
110  virtual tmp<faePatchField<Type>> clone() const
111  {
113  (
115  );
116  }
117 
118  //- Construct as copy setting internal field reference
120  (
123  );
124 
125  //- Construct and return a clone setting internal field reference
127  (
129  ) const
130  {
132  (
133  new processorFaePatchField<Type>(*this, iF)
134  );
135  }
136 
137 
138  //- Destructor
139  virtual ~processorFaePatchField() = default;
140 
141 
142  // Member Functions
143 
144  //- Return true if running parallel
145  virtual bool coupled() const
146  {
147  return Pstream::parRun();
148  }
149 };
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace Foam
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #ifdef NoRepository
159  #include "processorFaePatchField.C"
160 #endif
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #endif
165 
166 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
static bool & parRun() noexcept
Test if this a parallel run.
Definition: UPstream.H:1049
virtual bool coupled() const
Return true if running parallel.
TypeName(processorFaPatch::typeName_())
Runtime type information.
Generic templated field type.
Definition: Field.H:62
virtual ~processorFaePatchField()=default
Destructor.
virtual tmp< faePatchField< Type > > clone() const
Construct and return a clone.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:72
processorFaePatchField(const faPatch &, const DimensionedField< Type, edgeMesh > &)
Construct from patch and internal field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: areaFieldsFwd.H:42
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
A FieldMapper for finite-area patch fields.
Namespace for OpenFOAM.
Processor patch.