cellShapeControlMesh.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) 2012-2017 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::cellShapeControlMesh
28
29Description
30
31SourceFiles
32 cellShapeControlMeshI.H
33 cellShapeControlMesh.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef cellShapeControlMesh_H
38#define cellShapeControlMesh_H
39
40#include "Time.H"
41#include "scalar.H"
42#include "point.H"
43#include "tensor.H"
44#include "triad.H"
45#include "fileName.H"
46#include "searchableSurfaces.H"
51#include "boundBox.H"
52
53// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54
55namespace Foam
56{
57
58// Forward Declarations
59class cellSizeAndAlignmentControls;
60
61/*---------------------------------------------------------------------------*\
62 Class cellShapeControlMesh Declaration
63\*---------------------------------------------------------------------------*/
66:
67 public DistributedDelaunayMesh<CellSizeDelaunay>
68{
69public:
71 typedef CellSizeDelaunay::Cell_handle Cell_handle;
72 typedef CellSizeDelaunay::Vertex_handle Vertex_handle;
73 typedef CellSizeDelaunay::Point Point;
74
75
76private:
77
78 // Private Data
79
80 const Time& runTime_;
81
82 mutable Cell_handle oldCellHandle_;
83
85
86
87 // Private Member Functions
88
89 //- No copy construct
91
92 //- No copy assignment
93 void operator=(const cellShapeControlMesh&) = delete;
94
95
96public:
97
98 //- Runtime type information
99 ClassName("cellShapeControlMesh");
100
101 //- Return the mesh sub-directory name (usually "cellShapeControlMesh")
102 static word meshSubDir;
103
104
105 // Constructors
106
107 //- Construct from runTime
108 explicit cellShapeControlMesh(const Time& runTime);
109
110
111 //- Destructor
112 ~cellShapeControlMesh() = default;
113
114
115 // Member Functions
116
117 // Query
119 const Time& time() const
120 {
121 return runTime_;
122 }
123
124 //- Calculate and return the barycentric coordinates for
125 // interpolating quantities on the background mesh
127 (
128 const Foam::point& pt,
129 barycentric& bary,
130 Cell_handle& ch
131 ) const;
133 boundBox bounds() const;
134
135
136 // Edit
138 label removePoints();
139
140 //- Get the centres of all the tets
142
143 inline Vertex_handle insert
144 (
145 const Foam::point& pt,
146 const scalar& size,
147 const triad& alignment,
149 );
150
152 (
153 const Foam::point& pt
154 );
156 void distribute(const backgroundMeshDecomposition& decomposition);
160 void writeTriangulation();
162 void write() const;
165 (
166 const autoPtr<backgroundMeshDecomposition>& decomposition
167 ) const;
168};
169
170
171// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172
173} // End namespace Foam
174
175// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176
178
179// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180#endif
181
182// ************************************************************************* //
CGAL data structures used for 3D Delaunay meshing.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Store a background polyMesh to use for the decomposition of space and queries for parallel conformalV...
A bounding box defined in terms of min/max extrema points.
Definition: boundBox.H:64
boundBox bounds() const
tmp< pointField > cellCentres() const
Get the centres of all the tets.
static word meshSubDir
Return the mesh sub-directory name (usually "cellShapeControlMesh")
label estimateCellCount(const autoPtr< backgroundMeshDecomposition > &decomposition) const
CellSizeDelaunay::Cell_handle Cell_handle
void barycentricCoords(const Foam::point &pt, barycentric &bary, Cell_handle &ch) const
Calculate and return the barycentric coordinates for.
Vertex_handle insertFar(const Foam::point &pt)
CellSizeDelaunay::Vertex_handle Vertex_handle
Vertex_handle insert(const Foam::point &pt, const scalar &size, const triad &alignment, const Foam::indexedVertexEnum::vertexType type=Vb::vtInternal)
CellSizeDelaunay::Point Point
ClassName("cellShapeControlMesh")
Runtime type information.
tensorField dumpAlignments() const
~cellShapeControlMesh()=default
Destructor.
void distribute(const backgroundMeshDecomposition &decomposition)
cellShapeControlMesh(const Time &runTime)
Construct from runTime.
A class for managing temporary objects.
Definition: tmp.H:65
Representation of a 3D Cartesian coordinate system as a Vector of row vectors.
Definition: triad.H:67
A class for handling words, derived from Foam::string.
Definition: word.H:68
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition: className.H:67
engineTime & runTime
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598