cellShapeControlMeshI.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-2015 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
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 
26 \*---------------------------------------------------------------------------*/
27 
28 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
29 
31 (
32  const Foam::point& pt,
33  const scalar& size,
34  const triad& alignment,
36 )
37 {
39  (
40  Point(pt.x(), pt.y(), pt.z())
41  );
42  v->type() = type;
43  v->index() = getNewVertexIndex();
44  v->procIndex() = Pstream::myProcNo();
45  v->targetCellSize() = size;
46  v->alignment() = tensor(alignment.x(), alignment.y(), alignment.z());
47 
48  return v;
49 }
50 
51 
53 (
54  const Foam::point& pt
55 )
56 {
57  Vertex_handle v = CellSizeDelaunay::insert
58  (
59  Point(pt.x(), pt.y(), pt.z())
60  );
61  v->type() = Vb::vtFar;
62 // v->type() = Vb::vtExternalFeaturePoint;
63  v->index() = getNewVertexIndex();
64  v->procIndex() = Pstream::myProcNo();
65 
66  return v;
67 }
68 
69 
70 // ************************************************************************* //
Vertex_handle insertFar(const Foam::point &pt)
type
Types of root.
Definition: Roots.H:52
srcOptions insert("case", fileName(rootDirSource/caseDirSource))
Tensor< scalar > tensor
Definition: symmTensor.H:57
Vertex_handle insert(const Foam::point &pt, const scalar &size, const triad &alignment, const Foam::indexedVertexEnum::vertexType type=Vb::vtInternal)
CellSizeDelaunay::Point Point
label getNewVertexIndex() const
Create a new unique vertex index and return.
Definition: DelaunayMeshI.H:73
const Cmpt & y() const noexcept
Access to the vector y component.
Definition: Vector.H:140
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Can be negative if the process i...
Definition: UPstream.H:1074
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: POSIX.C:799
CellSizeDelaunay::Vertex_handle Vertex_handle
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const Cmpt & x() const noexcept
Access to the vector x component.
Definition: Vector.H:135
CGAL::Point_3< K > Point
Representation of a 3D Cartesian coordinate system as a Vector of row vectors.
Definition: triad.H:60
const Cmpt & z() const noexcept
Access to the vector z component.
Definition: Vector.H:145