Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
12License
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
29Class
30 Foam::deltaBoundary
31
32Description
33 Differentiation of the mesh data structure
34
35SourceFiles
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
50namespace Foam
51{
52
53class fvMesh;
55/*---------------------------------------------------------------------------*\
56 Class deltaBoundary Declaration
57\*---------------------------------------------------------------------------*/
58
59class deltaBoundary
60{
61protected:
62
63 // Protected data
64
65 //- Reference to the mesh
66 const fvMesh& mesh_;
67
68
69private:
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
83public:
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// ************************************************************************* //
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Definition Field.H:172
pT makeCellCentres_d(const vectorField &fAreas, const vectorField &fCtrs, const Field< pT > &fAreas_d, const Field< pT > &fCtrs_d)
Compute cell center variation wrt given face movement or derivative.
~deltaBoundary()=default
Destructor.
const fvMesh & mesh_
Reference to the mesh.
tmp< tensorField > cellCenters_d(const label pointI)
Compute the change of the cell centers of the pointCells of pointI, for a unitary movement of pointI ...
vectorField makeFaceCentresAndAreas_d(const pointField &p, const pointField &p_d)
Given a face and the points to be moved in the normal direction, find faceArea, faceCentre and unitVe...
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
A class for managing temporary objects.
Definition tmp.H:75
volScalarField & p
dynamicFvMesh & mesh
Namespace for OpenFOAM.
Tensor< scalar > tensor
Definition symmTensor.H:57
Field< vector > vectorField
Specialisation of Field<T> for vector.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
vectorField pointField
pointField is a vectorField.
Vector< scalar > vector
Definition vector.H:57
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)