motionSmoother.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 -------------------------------------------------------------------------------
10 License
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 "motionSmoother.H"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34  defineTypeNameAndDebug(motionSmoother, 0);
35 }
36 
37 
38 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
39 
41 (
42  polyMesh& mesh,
43  pointMesh& pMesh,
45  const labelList& adaptPatchIDs,
46  const dictionary& paramDict,
47  const bool dryRun
48 )
49 :
50  motionSmootherData(pMesh),
52  (
53  mesh,
54  pMesh,
55  pp,
56  motionSmootherData::displacement_,
57  motionSmootherData::scale_,
58  motionSmootherData::oldPoints_,
59  adaptPatchIDs,
60  paramDict,
61  dryRun
62  )
63 {}
64 
65 
67 (
68  polyMesh& mesh,
70  const labelList& adaptPatchIDs,
71  const pointVectorField& displacement,
72  const dictionary& paramDict,
73  const bool dryRun
74 )
75 :
76  motionSmootherData(displacement),
78  (
79  mesh,
80  const_cast<pointMesh&>(displacement.mesh()),
81  pp,
82  motionSmootherData::displacement_,
83  motionSmootherData::scale_,
84  motionSmootherData::oldPoints_,
85  adaptPatchIDs,
86  paramDict,
87  dryRun
88  )
89 {}
90 
91 
92 // ************************************************************************* //
Foam::motionSmoother::motionSmoother
motionSmoother(polyMesh &mesh, pointMesh &pMesh, indirectPrimitivePatch &pp, const labelList &adaptPatchIDs, const dictionary &paramDict, const bool dryRun=false)
Construct from mesh, patches to work on and smoothing parameters.
Definition: motionSmoother.C:41
motionSmoother.H
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::motionSmootherData
Definition: motionSmootherData.H:49
Foam::motionSmootherAlgo
Given a displacement moves the mesh by scaling the displacement back until there are no more mesh err...
Definition: motionSmootherAlgo.H:100
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::pointMesh
Mesh representing a set of points created from polyMesh.
Definition: pointMesh.H:51
Foam::List< label >
Foam::GeometricField< vector, pointPatchField, pointMesh >
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition: PrimitivePatch.H:79