lumpedPointTools.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) 2016-2020 OpenCFD Ltd.
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 Namespace
27  Foam::lumpedPointTools
28 
29 Description
30  A collection of utility functions for handling IO related to the
31  lumped-mass movement.
32 
33 SourceFiles
34  lumpedPointTools.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef lumpedPointTools_H
39 #define lumpedPointTools_H
40 
41 #include "labelList.H"
42 #include "fvMesh.H"
43 #include "pointMesh.H"
44 #include "pointFields.H"
45 #include "Tuple2.H"
46 #include "lumpedPointState.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 // Typedefs
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace lumpedPointTools
59 {
60 
61 //- Load a list of states from a dictionary
63 (
64  const dictionary& dict,
65  quaternion::eulerOrder rotOrder = quaternion::eulerOrder::ZXZ,
66  bool degrees = false
67 );
68 
69 //- Load a list of states from an Istream
71 (
72  Istream& is,
73  quaternion::eulerOrder rotOrder = quaternion::eulerOrder::ZXZ,
74  bool degrees = false
75 );
76 
77 //- Load a list of states from a file
79 (
80  const fileName& file,
81  quaternion::eulerOrder rotOrder = quaternion::eulerOrder::ZXZ,
82  bool degrees = false
83 );
84 
85 //- Return the 0 or constant points field
87 
88 //- Return the patch-ids associated with a "lumpedPointDisplacement" type
90 
91 //- Get the "pointDisplacement" at time 0 and use that to determine which
92 //- patches have a "lumpedPointDisplacement" type
94 
95 //- Return the patch-ids associated with a "lumpedPointDisplacement" type
96 label setPatchControls(const pointVectorField& pvf, const pointField& points0);
97 
98 //- Get the "pointDisplacement" at time 0 and use that to determine which
99 //- patches have a "lumpedPointDisplacement" type
100 label setPatchControls(const fvMesh& mesh, const pointField& points0);
101 
102 //- Get the "pointDisplacement" at time 0 and use that to determine which
103 //- patches have a "lumpedPointDisplacement" type
104 label setPatchControls(const fvMesh& mesh);
105 
106 
107 //- Return the patch-ids associated with a "lumpedPointDisplacement" type
108 label setInterpolators(const pointVectorField& pvf, const pointField& points0);
109 
110 //- Get the "pointDisplacement" at time 0 and use that to determine which
111 //- patches have a "lumpedPointDisplacement" type
112 label setInterpolators(const fvMesh& mesh, const pointField& points0);
113 
114 //- Get the "pointDisplacement" at time 0 and use that to determine which
115 //- patches have a "lumpedPointDisplacement" type
116 label setInterpolators(const fvMesh& mesh);
117 
118 } // End namespace lumpedPointTools
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
Foam::fileName
A class for handling file names.
Definition: fileName.H:71
Foam::IOField
A primitive field of type <T> with automated input and output.
Definition: foamVtkLagrangianWriter.H:57
Foam::lumpedPointTools::setPatchControls
label setPatchControls(const pointVectorField &pvf, const pointField &points0)
Definition: lumpedPointTools.C:172
Tuple2.H
lumpedPointState.H
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:73
labelList.H
Foam::Field
Generic templated field type.
Definition: Field.H:59
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:57
Foam::lumpedPointTools::lumpedPointStates
List< lumpedPointStateTuple > lumpedPointStates(const dictionary &dict, quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, bool degrees=false)
Definition: lumpedPointTools.C:68
Foam::quaternion::eulerOrder
eulerOrder
Definition: quaternion.H:98
Foam::lumpedPointTools::setInterpolators
label setInterpolators(const pointVectorField &pvf, const pointField &points0)
Definition: lumpedPointTools.C:225
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:119
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:81
fvMesh.H
Foam
Definition: atmBoundaryLayer.C:26
points0
pointField points0(pointIOField(IOobject("points", mesh.time().constant(), polyMesh::meshSubDir, mesh, IOobject::MUST_READ, IOobject::NO_WRITE, false)))
Foam::lumpedPointStateTuple
Tuple2< scalar, lumpedPointState > lumpedPointStateTuple
Definition: lumpedPointTools.H:50
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: BitOps.H:58
Foam::lumpedPointTools::points0Field
pointIOField points0Field(const polyMesh &mesh)
Definition: lumpedPointTools.C:131
Foam::Tuple2
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
Definition: stringOps.H:56
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:49
Foam::lumpedPointTools::lumpedPointPatchList
labelList lumpedPointPatchList(const pointVectorField &pvf)
Definition: lumpedPointTools.C:138
pointFields.H
pointMesh.H