Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
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\*---------------------------------------------------------------------------*/
28#include "motionSmoother.H"
29
30// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31
32namespace Foam
35}
36
37
38// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
39
41(
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_,
61 dryRun
62 )
63{}
64
65
67(
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// ************************************************************************* //
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Given a displacement moves the mesh by scaling the displacement back until there are no more mesh err...
const labelList & adaptPatchIDs() const
Patch labels that are being adapted.
const polyMesh & mesh() const
Reference to mesh.
const pointMesh & pMesh() const
Reference to pointMesh.
const dictionary & paramDict() const
pointVectorField & displacement()
Reference to displacement field.
motionSmootherData(const pointMesh &pMesh)
Construct read.
Given a displacement moves the mesh by scaling the displacement back until there are no more mesh err...
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.
Mesh representing a set of points created from polyMesh.
Definition pointMesh.H:49
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition className.H:142
dynamicFvMesh & mesh
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field.