Loading...
Searching...
No Matches
processorLduInterfaceField.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) 2011-2014 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::processorLduInterfaceField
29
30Description
31 Abstract base class for processor coupled interfaces.
32
33SourceFiles
34 processorLduInterfaceField.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef processorLduInterfaceField_H
39#define processorLduInterfaceField_H
40
41#include "primitiveFieldsFwd.H"
42#include "typeInfo.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
49/*---------------------------------------------------------------------------*\
50 Class processorLduInterfaceField Declaration
51\*---------------------------------------------------------------------------*/
52
54{
55public:
56
57 //- Runtime type information
58 TypeName("processorLduInterfaceField");
59
60
61 // Constructors
62
63 //- Default construct
65
66
67 //- Destructor
68 virtual ~processorLduInterfaceField() = default;
70
71 // Member Functions
72
73 // Access
74
75 //- Return communicator used for comms
76 virtual label comm() const = 0;
77
78 //- Return processor number
79 virtual int myProcNo() const = 0;
80
81 //- Return neighbour processor number
82 virtual int neighbProcNo() const = 0;
83
84 //- Is the transform required
85 virtual bool doTransform() const = 0;
86
87 //- Return face transformation tensor
88 virtual const tensorField& forwardT() const = 0;
90 //- Return rank of component for transform
91 virtual int rank() const = 0;
92
93
94 //- Transform given patch field
95 template<class Type>
97
98 //- Transform given patch component field
100 (
102 const direction cmpt
103 ) const;
105
106
107// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108
109} // End namespace Foam
110
111// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112
113#include "tensorField.H"
114
115template<class Type>
117(
118 Field<Type>& f
119) const
120{
121 if (doTransform())
122 {
123 if (forwardT().size() == 1)
124 {
125 transform(f, forwardT()[0], f);
126 }
127 else
128 {
129 transform(f, forwardT(), f);
130 }
131 }
132}
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137#endif
138
139// ************************************************************************* //
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Definition Field.H:172
virtual label comm() const =0
Return communicator used for comms.
virtual int neighbProcNo() const =0
Return neighbour processor number.
TypeName("processorLduInterfaceField")
Runtime type information.
processorLduInterfaceField()=default
Default construct.
virtual int myProcNo() const =0
Return processor number.
virtual int rank() const =0
Return rank of component for transform.
virtual const tensorField & forwardT() const =0
Return face transformation tensor.
virtual ~processorLduInterfaceField()=default
Destructor.
virtual bool doTransform() const =0
Is the transform required.
void transformCoupleField(Field< Type > &f) const
Transform given patch field.
Namespace for OpenFOAM.
refinementData transform(const tensor &, const refinementData val)
No-op rotational transform for base types.
Field< solveScalar > solveScalarField
uint8_t direction
Definition direction.H:49
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
labelList f(nPoints)
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68