ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / postProcessing / functionObjects / field / fieldCoordinateSystemTransform / fieldCoordinateSystemTransform.H
blob138d2d09d5fbe65cc6b424de9aa5337b441ff6df
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by
13     the Free Software Foundation, either version 3 of the License, or
14     (at your option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::fieldCoordinateSystemTransform
27 Description
28     Transforms fields from global cartesian co-ordinates to local co-ordinate
29     system
31 SourceFiles
32     fieldCoordinateSystemTransform.C
33     IOfieldCoordinateSystemTransform.H
35 \*---------------------------------------------------------------------------*/
37 #ifndef fieldCoordinateSystemTransform_H
38 #define fieldCoordinateSystemTransform_H
40 #include "OFstream.H"
41 #include "pointFieldFwd.H"
42 #include "volFields.H"
43 #include "surfaceFields.H"
44 #include "coordinateSystem.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 namespace Foam
51 // Forward declaration of classes
52 class objectRegistry;
53 class dictionary;
54 class mapPolyMesh;
56 /*---------------------------------------------------------------------------*\
57                Class fieldCoordinateSystemTransform Declaration
58 \*---------------------------------------------------------------------------*/
60 class fieldCoordinateSystemTransform
62 protected:
64     // Protected data
66         //- Name
67         word name_;
69         const objectRegistry& obr_;
71         //- on/off switch
72         bool active_;
74         //- Fields to transform
75         wordList fieldSet_;
77         //- Co-ordinate system to transform to
78         coordinateSystem coordSys_;
81     // Protected Member Functions
83         //- Disallow default bitwise copy construct
84         fieldCoordinateSystemTransform(const fieldCoordinateSystemTransform&);
86         //- Disallow default bitwise assignment
87         void operator=(const fieldCoordinateSystemTransform&);
89         template<class Type>
90         void transform(const word& fieldName) const;
92         template<class Type>
93         void transformField(const Type& field) const;
96 public:
98     //- Runtime type information
99     TypeName("fieldCoordinateSystemTransform");
102     // Constructors
104         //- Construct for given objectRegistry and dictionary.
105         //  Allow the possibility to load fields from files
106         fieldCoordinateSystemTransform
107         (
108             const word& name,
109             const objectRegistry&,
110             const dictionary&,
111             const bool loadFromFiles = false
112         );
115     //- Destructor
116     virtual ~fieldCoordinateSystemTransform();
119     // Member Functions
121         //- Return name of the fieldCoordinateSystemTransform object
122         virtual const word& name() const
123         {
124             return name_;
125         }
127         //- Read the input data
128         virtual void read(const dictionary&);
130         //- Execute, currently does nothing
131         virtual void execute();
133         //- Execute at the final time-loop, currently does nothing
134         virtual void end();
136         //- Write
137         virtual void write();
139         //- Update for changes of mesh
140         virtual void updateMesh(const mapPolyMesh&)
141         {}
143         //- Update for changes of mesh
144         virtual void movePoints(const pointField&)
145         {}
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 } // End namespace Foam
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 #ifdef NoRepository
156 #   include "fieldCoordinateSystemTransformTemplates.C"
157 #endif
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 #endif
163 // ************************************************************************* //