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 as copy setting internal field reference
111  (
114  );
115 
116  //- Return clone
117  virtual tmp<faePatchField<Type>> clone() const
118  {
119  return faePatchField<Type>::Clone(*this);
120  }
121 
122  //- Clone with an internal field reference
124  (
126  ) const
127  {
128  return faePatchField<Type>::Clone(*this, iF);
129  }
131 
132  //- Destructor
133  virtual ~processorFaePatchField() = default;
134 
135 
136  // Member Functions
137 
138  //- Return true if running parallel
139  virtual bool coupled() const
140  {
141  return UPstream::parRun();
142  }
143 };
144 
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 } // End namespace Foam
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #ifdef NoRepository
153  #include "processorFaePatchField.C"
154 #endif
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #endif
159 
160 // ************************************************************************* //
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:1061
virtual bool coupled() const
Return true if running parallel.
TypeName(processorFaPatch::typeName_())
Runtime type information.
static tmp< faePatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Generic templated field type.
Definition: Field.H:62
virtual ~processorFaePatchField()=default
Destructor.
virtual tmp< faePatchField< Type > > clone() const
Return 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...
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.