deltaBoundary.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 
29 Class
30  Foam::deltaBoundary
31 
32 Description
33  Differentiation of the mesh data structure
34 
35 SourceFiles
36  deltaBoundary.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef deltaBoundary_H
41 #define deltaBoundary_H
42 
43 #include "fieldTypes.H"
44 #include "vectorField.H"
45 #include "tensorField.H"
46 #include "pointField.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 class fvMesh;
54 
55 /*---------------------------------------------------------------------------*\
56  Class deltaBoundary Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class deltaBoundary
60 {
61 protected:
62 
63  // Protected data
64 
65  //- Reference to the mesh
66  const fvMesh& mesh_;
67 
68 
69 private:
70 
71  // Private Member Functions
72 
73  //- No copy construct
74  deltaBoundary(const deltaBoundary&) = delete;
75 
76  //- No copy assignment
77  void operator=(const deltaBoundary&) = delete;
78 
79  //- Compute tensor-vector products
80  tensor tensorCrossVector(const tensor& T, const vector& v);
81 
82 
83 public:
84 
85  // Constructors
86 
87  //- Construct from components
88  deltaBoundary(const fvMesh& mesh);
89 
90 
91  //- Destructor
92  ~deltaBoundary() = default;
93 
94 
95  // Member Functions
96 
97  //- Given a face and the points to be moved in the normal direction,
98  //- find faceArea, faceCentre and unitVector changes
100  (
101  const pointField& p,
102  const pointField& p_d
103  );
104 
105  //- Given a face and the points to be moved in an arbitrary direction,
106  //- find faceArea, faceCentre and unitVector changes
108  (
109  const pointField& p,
110  const tensorField& p_d
111  );
112 
113  //- Compute cell center variation wrt
114  //- given face movement or derivative.
115  // pT (perturbation type) should be a vector in case
116  // of known face area and ctr movements
117  // or a tensor for gradients
118  template<class pT>
120  (
121  const vectorField& fAreas,
122  const vectorField& fCtrs,
123  const Field<pT>& fAreas_d,
124  const Field<pT>& fCtrs_d
125  );
126 
127  //- Compute the change of the cell centers of the pointCells
128  //- of pointI, for a unitary movement of pointI in all three directions
129  tmp<tensorField> cellCenters_d(const label pointI);
130 };
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #ifdef NoRepository
140 # include "deltaBoundaryTemplates.C"
141 #endif
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #endif
146 
147 // ************************************************************************* //
Foam::Tensor< scalar >
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::deltaBoundary
Differentiation of the mesh data structure.
Definition: deltaBoundary.H:58
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::deltaBoundary::mesh_
const fvMesh & mesh_
Reference to the mesh.
Definition: deltaBoundary.H:65
deltaBoundaryTemplates.C
Foam::Field< vector >
Foam::deltaBoundary::makeCellCentres_d
pT makeCellCentres_d(const vectorField &fAreas, const vectorField &fCtrs, const Field< pT > &fAreas_d, const Field< pT > &fCtrs_d)
Definition: deltaBoundaryTemplates.C:41
Foam::deltaBoundary::cellCenters_d
tmp< tensorField > cellCenters_d(const label pointI)
Definition: deltaBoundary.C:285
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::deltaBoundary::makeFaceCentresAndAreas_d
vectorField makeFaceCentresAndAreas_d(const pointField &p, const pointField &p_d)
Definition: deltaBoundary.C:72
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
tensorField.H
pointField.H
Foam::Vector< scalar >
vectorField.H
Foam::deltaBoundary::~deltaBoundary
~deltaBoundary()=default
Destructor.
fieldTypes.H
Header files for all the primitive types that Fields are instantiated for.