Loading...
Searching...
No Matches
symmTransformField.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) 2023 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
27Typedef
28 Foam::symmTransformField
29
30Description
31 Spatial transformation functions for primitive fields.
32
33SourceFiles
34 symmTransformField.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef Foam_symmTransformField_H
39#define Foam_symmTransformField_H
40
41#include "symmTransform.H"
42#include "symmTensorField.H"
43#include "sphericalTensor.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52// transform()
53
54template<class Type>
55void transform
56(
57 Field<Type>& result,
58 const symmTensor& rot,
59 const Field<Type>& fld
60);
61
62template<class Type>
63void transform
64(
65 Field<Type>& result,
66 const symmTensorField& rot,
67 const Field<Type>& fld
68);
69
70
71template<class Type>
73(
74 const symmTensorField& rot,
76);
77
78template<class Type>
80(
81 const symmTensorField& rot,
82 const tmp<Field<Type>>& tfld
83);
84
85template<class Type>
87(
88 const tmp<symmTensorField>& trot,
89 const Field<Type>& tfld
90);
91
92template<class Type>
94(
95 const tmp<symmTensorField>& trot,
96 const tmp<Field<Type>>& tfld
97);
98
99
100template<class Type>
102(
103 const symmTensor& rot,
105);
106
107template<class Type>
109(
110 const symmTensor& rot,
111 const tmp<Field<Type>>& tfld
112);
113
114
115// Specializations
116
117template<>
120
121template<>
124
125
126template<>
129
130template<>
133
134
135template<>
138
139template<>
142
143
144// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145
146} // End namespace Foam
147
148// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150#ifdef NoRepository
151 #include "symmTransformField.C"
152#endif
153
154// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155
156#endif
157
158// ************************************************************************* //
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
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
tmp< Field< sphericalTensor > > transformFieldMask< sphericalTensor >(const tensorField &tf)
refinementData transform(const tensor &, const refinementData val)
No-op rotational transform for base types.
tmp< Field< symmTensor > > transformFieldMask< symmTensor >(const tensorField &tf)
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
tmp< Field< tensor > > transformFieldMask< tensor >(const symmTensorField &)
Definition tensorField.C:78
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
Definition symmTensor.H:55
3D symmetric tensor transformation operations.