triSurfaceMeshPointSet.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 | Copyright (C) 2011-2012 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::triSurfaceMeshPointSet
26 
27 Description
28  sampleSet from all points of a triSurfaceMesh.
29 
30 SourceFiles
31  triSurfaceMeshPointSet.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef triSurfaceMeshPointSet_H
36 #define triSurfaceMeshPointSet_H
37 
38 #include "sampledSet.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 // Forward declaration of classes
46 
47 /*---------------------------------------------------------------------------*\
48  Class triSurfaceMeshPointSet Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public sampledSet
54 {
55  // Private data
56 
57  //- Name of triSurfaceMesh
58  const word surface_;
59 
60  //- Sampling points
62 
63 
64  // Private Member Functions
65 
66  //- Samples all points in sampleCoords.
67  void calcSamples
68  (
69  DynamicList<point>& samplingPts,
70  DynamicList<label>& samplingCells,
71  DynamicList<label>& samplingFaces,
72  DynamicList<label>& samplingSegments,
73  DynamicList<scalar>& samplingCurveDist
74  ) const;
75 
76  //- Uses calcSamples to obtain samples. Copies them into *this.
77  void genSamples();
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("triSurfaceMeshPointSet");
84 
85 
86  // Constructors
87 
88  //- Construct from dictionary
90  (
91  const word& name,
92  const polyMesh& mesh,
93  const meshSearch& searchEngine,
94  const dictionary& dict
95  );
96 
97 
98  //- Destructor
99  virtual ~triSurfaceMeshPointSet();
100 
101 
102  // Member Functions
103 
104  //- Get reference point
105  virtual point getRefPoint(const List<point>&) const;
106 };
107 
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace Foam
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #endif
116 
117 // ************************************************************************* //
Foam::sampledSet
Holds list of sampling points which is filled at construction time. Various implementations of this b...
Definition: sampledSet.H:64
Foam::coordSet::name
const word & name() const
Definition: coordSet.H:111
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::meshSearch
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search.
Definition: meshSearch.H:57
Foam::triSurfaceMeshPointSet::~triSurfaceMeshPointSet
virtual ~triSurfaceMeshPointSet()
Destructor.
Definition: triSurfaceMeshPointSet.C:156
Foam::triSurfaceMeshPointSet::calcSamples
void calcSamples(DynamicList< point > &samplingPts, DynamicList< label > &samplingCells, DynamicList< label > &samplingFaces, DynamicList< label > &samplingSegments, DynamicList< scalar > &samplingCurveDist) const
Samples all points in sampleCoords.
Definition: triSurfaceMeshPointSet.C:46
Foam::DynamicList
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:56
Foam::sampledSet::searchEngine
const meshSearch & searchEngine() const
Definition: sampledSet.H:253
Foam::triSurfaceMeshPointSet::triSurfaceMeshPointSet
triSurfaceMeshPointSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
Construct from dictionary.
Definition: triSurfaceMeshPointSet.C:108
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Foam::triSurfaceMeshPointSet::surface_
const word surface_
Name of triSurfaceMesh.
Definition: triSurfaceMeshPointSet.H:57
Foam::triSurfaceMeshPointSet::getRefPoint
virtual point getRefPoint(const List< point > &) const
Get reference point.
Definition: triSurfaceMeshPointSet.C:162
sampledSet.H
Foam::triSurfaceMeshPointSet::sampleCoords_
List< point > sampleCoords_
Sampling points.
Definition: triSurfaceMeshPointSet.H:60
Foam::triSurfaceMeshPointSet::TypeName
TypeName("triSurfaceMeshPointSet")
Runtime type information.
Foam::triSurfaceMeshPointSet::genSamples
void genSamples()
Uses calcSamples to obtain samples. Copies them into *this.
Definition: triSurfaceMeshPointSet.C:70
Foam::triSurfaceMeshPointSet
sampleSet from all points of a triSurfaceMesh.
Definition: triSurfaceMeshPointSet.H:50
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::sampledSet::mesh
const polyMesh & mesh() const
Definition: sampledSet.H:248
Foam::Vector< scalar >
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59