controlPointsDefinition.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) 2020 PCOpt/NTUA
9  Copyright (C) 2020 FOSS GP
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::controlPointsDefinition
29 
30 Description
31  Abstract base for selecting how to construct the control points
32  of a volumetric B-Splines morpher
33 
34 SourceFiles
35  controlPointsDefinition.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef controlPointsDefinition_H
40 #define controlPointsDefinition_H
41 
42 #include "NURBS3DVolume.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class controlPointsDefinition Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55 protected:
56 
57  // Protected data
58 
59  //- The volumetric B-Splines box
61 
62  //- The volumetric B-Splines control points
64 
65 
66  // Protected Member Functions
67 
68  //- Compute control points
69  virtual void computeControlPoints() = 0;
70 
71  //- Transform control points using the equivalent position, rotation
72  //- and scale values from the Paraview clip filter
74  (
75  const vector& geometryMin,
76  const vector& geometryMax
77  );
78 
79 
80 private:
81 
82  // Private Member Functions
83 
84  //- No copy construct
86 
87  //- No copy assignment
88  void operator=(const controlPointsDefinition&) = delete;
89 
90 
91 public:
92 
93  //- Runtime type information
94  TypeName("controlPointsDefinition");
95 
96 
97  // Declare run-time constructor selection table
98 
100  (
101  autoPtr,
103  dictionary,
104  (
105  NURBS3DVolume& box
106  ),
107  (box)
108  );
109 
110 
111  // Constructors
112 
113  //- Construct from underlaying NURBS box
115 
116 
117  // Selectors
118 
119  //- Return a reference to the selected controlPointsDefinition model
121  (
122  NURBS3DVolume& box
123  );
124 
125 
126  //- Destructor
127  virtual ~controlPointsDefinition() = default;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
NURBS3DVolume morpher. Includes support functions for gradient computations Base class providing supp...
Definition: NURBS3DVolume.H:69
TypeName("controlPointsDefinition")
Runtime type information.
declareRunTimeSelectionTable(autoPtr, controlPointsDefinition, dictionary,(NURBS3DVolume &box),(box))
virtual ~controlPointsDefinition()=default
Destructor.
vectorField & cps_
The volumetric B-Splines control points.
void transformControlPoints(const vector &geometryMin, const vector &geometryMax)
Transform control points using the equivalent position, rotation and scale values from the Paraview c...
NURBS3DVolume & box_
The volumetric B-Splines box.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
virtual void computeControlPoints()=0
Compute control points.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Abstract base for selecting how to construct the control points of a volumetric B-Splines morpher...
static autoPtr< controlPointsDefinition > New(NURBS3DVolume &box)
Return a reference to the selected controlPointsDefinition model.
Namespace for OpenFOAM.