optMeshMovementVolumetricBSplinesExternalMotionSolver.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) 2007-2019 PCOpt/NTUA
9  Copyright (C) 2013-2019 FOSS GP
10  Copyright (C) 2019 OpenCFD Ltd.
11 -------------------------------------------------------------------------------
12 License
13  This file is part of OpenFOAM.
14 
15  OpenFOAM is free software: you can redistribute it and/or modify it
16  under the terms of the GNU General Public License as published by
17  the Free Software Foundation, either version 3 of the License, or
18  (at your option) any later version.
19 
20  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
21  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23  for more details.
24 
25  You should have received a copy of the GNU General Public License
26  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
27 
28 Class
29  Foam::optMeshMovementVolumetricBSplinesExternalMotionSolver
30 
31 Description
32  Converts NURBS volume control points update to actual mesh movement.
33  Internal points are moved based on a motionSolver other than
34  volumetricBSplinesExternalMotionSolver.
35 
36 SourceFiles
37  optMeshMovementVolumetricBSplinesExternalMotionSolver.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef optMeshMovementVolumetricBSplinesExternalMotionSolver_H
42 #define optMeshMovementVolumetricBSplinesExternalMotionSolver_H
43 
44 #include "optMeshMovement.H"
45 #include "volBSplinesBase.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class optMeshMovementVolumetricBSplinesExternalMotionSolver Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 :
58  public optMeshMovement
59 {
60 protected:
61 
62  // Protected data
63 
64  //- Reference to underlaying volumetric B-Splines morpher
66 
67  //- Boundary movement due to change of NURBS control points
69 
70  //- Movement of control points
72 
73 
74  // Protected Member Functions
75 
77 
78 
79 private:
80 
81  // Private Member Functions
82 
83  //- No copy construct
85  (
87  ) = delete;
88 
89  //- No copy assignment
90  void operator=
91  (
93  ) = delete;
94 
95 
96 public:
97 
98  //- Runtime type information
99  TypeName("volumetricBSplinesExternalMotionSolver");
100 
101 
102  // Constructors
103 
104  //- Construct from components
106  (
107  fvMesh& mesh,
108  const dictionary& dict,
109  const labelList& patchIDs
110  );
111 
112 
113  //- Destructor
115 
116 
117  // Member Functions
118 
119  //- Calculates surface mesh movement
120  void moveMesh();
121 
122  //- Compute eta value based on max displacement
123  virtual scalar computeEta(const scalarField& correction);
124 
125  //- Return active design variables
126  virtual labelList getActiveDesignVariables() const;
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
Foam::volBSplinesBase
Class constructing a number of volumetric B-Splines boxes, read from dynamicMeshDict....
Definition: volBSplinesBase.H:59
Foam::correction
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Foam::optMeshMovementVolumetricBSplinesExternalMotionSolver
Converts NURBS volume control points update to actual mesh movement. Internal points are moved based ...
Definition: optMeshMovementVolumetricBSplinesExternalMotionSolver.H:55
Foam::optMeshMovementVolumetricBSplinesExternalMotionSolver::TypeName
TypeName("volumetricBSplinesExternalMotionSolver")
Runtime type information.
Foam::optMeshMovementVolumetricBSplinesExternalMotionSolver::cpMovement_
vectorField cpMovement_
Movement of control points.
Definition: optMeshMovementVolumetricBSplinesExternalMotionSolver.H:70
Foam::optMeshMovementVolumetricBSplinesExternalMotionSolver::computeEta
virtual scalar computeEta(const scalarField &correction)
Compute eta value based on max displacement.
Definition: optMeshMovementVolumetricBSplinesExternalMotionSolver.C:163
Foam::optMeshMovementVolumetricBSplinesExternalMotionSolver::getActiveDesignVariables
virtual labelList getActiveDesignVariables() const
Return active design variables.
Definition: optMeshMovementVolumetricBSplinesExternalMotionSolver.C:183
Foam::Field< vector >
Foam::optMeshMovementVolumetricBSplinesExternalMotionSolver::~optMeshMovementVolumetricBSplinesExternalMotionSolver
virtual ~optMeshMovementVolumetricBSplinesExternalMotionSolver()=default
Destructor.
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:123
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::optMeshMovementVolumetricBSplinesExternalMotionSolver::volBSplinesBase_
volBSplinesBase & volBSplinesBase_
Reference to underlaying volumetric B-Splines morpher.
Definition: optMeshMovementVolumetricBSplinesExternalMotionSolver.H:64
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
volBSplinesBase.H
Foam::optMeshMovementVolumetricBSplinesExternalMotionSolver::moveMesh
void moveMesh()
Calculates surface mesh movement.
Definition: optMeshMovementVolumetricBSplinesExternalMotionSolver.C:140
Foam::optMeshMovementVolumetricBSplinesExternalMotionSolver::dx_
pointVectorField dx_
Boundary movement due to change of NURBS control points.
Definition: optMeshMovementVolumetricBSplinesExternalMotionSolver.H:67
Foam::optMeshMovementVolumetricBSplinesExternalMotionSolver::computeBoundaryMovement
void computeBoundaryMovement(const scalarField &correction)
Definition: optMeshMovementVolumetricBSplinesExternalMotionSolver.C:56
Foam::List< label >
Foam::GeometricField< vector, pointPatchField, pointMesh >
Foam::optMeshMovement
Abstract base class for translating an update of the design variables into mesh movement.
Definition: optMeshMovement.H:54
optMeshMovement.H