motionSmootherData.C
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) 2013 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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\*---------------------------------------------------------------------------*/
27
28#include "motionSmootherData.H"
29
30// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
31
33(
34 const pointMesh& pMesh
35)
36:
37 displacement_
38 (
40 (
41 "displacement",
42 pMesh.time().timeName(),
43 pMesh(),
44 IOobject::MUST_READ,
45 IOobject::AUTO_WRITE
46 ),
47 pMesh
48 ),
49 scale_
50 (
52 (
53 "scale",
54 pMesh.time().timeName(),
55 pMesh(),
56 IOobject::NO_READ,
57 IOobject::AUTO_WRITE
58 ),
59 pMesh,
60 dimensionedScalar("scale", dimless, 1.0)
61 ),
62 oldPoints_(pMesh().points())
63{}
64
65
67(
68 const pointVectorField& displacement
69)
70:
71 displacement_
72 (
74 (
75 "displacement",
76 displacement.time().timeName(),
77 displacement.mesh()(),
78 IOobject::NO_READ,
79 IOobject::AUTO_WRITE
80 ),
81 displacement
82 ),
83 scale_
84 (
86 (
87 "scale",
88 displacement.time().timeName(),
89 displacement.mesh()(),
90 IOobject::NO_READ,
91 IOobject::AUTO_WRITE
92 ),
93 displacement.mesh(),
94 dimensionedScalar("scale", dimless, 1.0)
95 ),
96 oldPoints_(displacement.mesh()().points())
97{}
98
99
100// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
101
103{
104 return displacement_;
105}
106
107
109{
110 return displacement_;
111}
112
113
115{
116 return scale_;
117}
118
119
121{
122 return oldPoints_;
123}
124
125
126// ************************************************************************* //
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
pointVectorField & displacement()
Reference to displacement field.
const pointScalarField & scale() const
Reference to scale field.
const pointField & oldPoints() const
Starting mesh position.
Mesh representing a set of points created from polyMesh.
Definition: pointMesh.H:55
dynamicFvMesh & mesh
const pointField & points
word timeName
Definition: getTimeIndex.H:3
const dimensionSet dimless
Dimensionless.