Loading...
Searching...
No Matches
dummyTransform.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-2016 OpenFOAM Foundation
9 Copyright (C) 2020-2025 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
27InClass
28 Foam::dummyTransform
29
30Description
31 Dummy transform to be used with syncTools.
32
33\*---------------------------------------------------------------------------*/
34
35#ifndef Foam_dummyTransform_H
36#define Foam_dummyTransform_H
37
38// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39
40namespace Foam
42
43/*---------------------------------------------------------------------------*\
44 Class dummyTransform Declaration
45\*---------------------------------------------------------------------------*/
48{
49public:
50
51 template<class T>
52 void operator()
53 (
54 const vectorTensorTransform& vt,
55 const bool forward,
57 ) const
58 {}
59
60 template<class Type>
61 void operator()
62 (
63 const vectorTensorTransform& vt,
64 const bool forward,
65 List<List<Type>>& flds
66 ) const
67 {}
69 template<class T>
70 void operator()(const coupledPolyPatch& cpp, UList<T>& fld) const
71 {}
72
73 template<class T, template<class> class Container>
74 void operator()(const coupledPolyPatch& cpp, Container<T>& map) const
75 {}
76};
77
78
79template<class T>
80class pTraits<List<T>>
82 public List<T>
83{
84public:
85 typedef label cmptType;
86
87 explicit pTraits(Istream& is)
88 :
89 List<T>(is)
90 {}
91};
92
93template<class T>
94class pTraits<UList<T>>
96 public UList<T>
97{
98public:
99 typedef label cmptType;
100
101 explicit pTraits(Istream& is)
103 UList<T>(is)
104 {}
105};
106
107template<class T>
108class pTraits<Field<T>>
110 public Field<T>
111{
112public:
113 typedef label cmptType;
114
115 explicit pTraits(Istream& is)
117 Field<T>(is)
118 {}
119};
120
121template<>
122class pTraits<face>
124 public face
125{
126public:
127 typedef label cmptType;
128
129 explicit pTraits(Istream& is)
130 :
131 face(is)
132 {}
133};
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137} // End namespace Foam
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141#endif
142
143// ************************************************************************* //
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Definition Field.H:172
tmp< Field< T > > T() const
constexpr Field() noexcept
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition UList.H:89
UList(const UList< T > &) noexcept=default
Copy construct, shallow copy.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
void operator()(const coupledPolyPatch &cpp, Container< T > &map) const
void operator()(const vectorTensorTransform &vt, const bool forward, UList< T > &fld) const
void operator()(const coupledPolyPatch &cpp, UList< T > &fld) const
constexpr face() noexcept=default
Default construct.
pTraits(const Base &obj)
Copy construct from base class.
Definition pTraits.H:72
Vector-tensor class used to perform translations and rotations in 3D space.
Namespace for OpenFOAM.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)