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 processorFaePatchField_H
41 #define 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();
140 
141 
142  // Member functions
143 
144  // Access
145 
146  //- Return true if running parallel
147  virtual bool coupled() const
148  {
149  if (Pstream::parRun())
150  {
151  return true;
152  }
153  else
154  {
155  return false;
156  }
157  }
158 };
159 
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 } // End namespace Foam
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 #ifdef NoRepository
168  #include "processorFaePatchField.C"
169 #endif
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 #endif
174 
175 // ************************************************************************* //
coupledFaePatchField.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::processorFaePatchField
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
Definition: processorFaePatchField.H:55
processorFaPatch.H
Foam::faPatchFieldMapper
Definition: faPatchFieldMapper.H:44
Foam::processorFaPatch
Processor patch.
Definition: processorFaPatch.H:56
Foam::Field
Generic templated field type.
Definition: Field.H:63
Foam::processorFaePatchField::TypeName
TypeName(processorFaPatch::typeName_())
Runtime type information.
Foam::processorFaePatchField::~processorFaePatchField
virtual ~processorFaePatchField()
Definition: processorFaePatchField.C:128
processorFaePatchField.C
Foam::processorFaePatchField::clone
virtual tmp< faePatchField< Type > > clone() const
Construct and return a clone.
Definition: processorFaePatchField.H:109
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::processorFaePatchField::coupled
virtual bool coupled() const
Return true if running parallel.
Definition: processorFaePatchField.H:146
Foam::processorFaePatchField::processorFaePatchField
processorFaePatchField(const faPatch &, const DimensionedField< Type, edgeMesh > &)
Construct from patch and internal field.
Definition: processorFaePatchField.C:34
Foam::UPstream::parRun
static bool & parRun() noexcept
Test if this a parallel run.
Definition: UPstream.H:433
Foam::faPatch
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:69
Foam::coupledFaePatchField
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
Definition: coupledFaePatchField.H:56
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54