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 // ************************************************************************* //
Foam::NURBS3DVolume
NURBS3DVolume morpher. Includes support functions for gradient computations Base class providing supp...
Definition: NURBS3DVolume.H:72
Foam::controlPointsDefinition::computeControlPoints
virtual void computeControlPoints()=0
Compute control points.
Foam::controlPointsDefinition::cps_
vectorField & cps_
The volumetric B-Splines control points.
Definition: controlPointsDefinition.H:62
Foam::controlPointsDefinition::TypeName
TypeName("controlPointsDefinition")
Runtime type information.
Foam::Field< vector >
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::controlPointsDefinition::New
static autoPtr< controlPointsDefinition > New(NURBS3DVolume &box)
Return a reference to the selected controlPointsDefinition model.
Definition: controlPointsDefinition.C:115
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::controlPointsDefinition::box_
NURBS3DVolume & box_
The volumetric B-Splines box.
Definition: controlPointsDefinition.H:59
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::controlPointsDefinition
Abstract base for selecting how to construct the control points of a volumetric B-Splines morpher.
Definition: controlPointsDefinition.H:52
Foam::Vector< scalar >
Foam::controlPointsDefinition::transformControlPoints
void transformControlPoints(const vector &geometryMin, const vector &geometryMax)
Definition: controlPointsDefinition.C:47
NURBS3DVolume.H
Foam::controlPointsDefinition::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, controlPointsDefinition, dictionary,(NURBS3DVolume &box),(box))
Foam::controlPointsDefinition::~controlPointsDefinition
virtual ~controlPointsDefinition()=default
Destructor.