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-------------------------------------------------------------------------------
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
26\*---------------------------------------------------------------------------*/
27
28// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
29
31(
32 const Foam::point& pt,
33 const scalar& size,
34 const triad& alignment,
36)
37{
38 Vertex_handle v = CellSizeDelaunay::insert
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// ************************************************************************* //
CGAL::Point_3< K > Point
label getNewVertexIndex() const
Create a new unique vertex index and return.
Definition: DelaunayMeshI.H:80
const Cmpt & z() const
Access to the vector z component.
Definition: VectorI.H:85
const Cmpt & y() const
Access to the vector y component.
Definition: VectorI.H:79
const Cmpt & x() const
Access to the vector x component.
Definition: VectorI.H:73
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
int myProcNo() const noexcept
Return processor number.
Representation of a 3D Cartesian coordinate system as a Vector of row vectors.
Definition: triad.H:67
Tensor< scalar > tensor
Definition: symmTensor.H:61
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