subTriSurfaceMesh.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) 2015 OpenCFD Ltd.
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::subTriSurfaceMesh
26 
27 Description
28  On-the-fly subset of triSurfaceMesh (based on selected patches)
29 
30 Note
31 
32  Example usage:
33  \verbatim
34  spheres.stl
35  {
36  type subTriSurfaceMesh;
37 
38  // Surface to operate on. Avoid duplicate loading
39  surface spheres.stl;
40 
41  // Regions to operate on (regular expressions allowed)
42  patches (solid1);
43  }
44  \endverbatim
45 
46 
47 SourceFiles
48  subTriSurfaceMesh.C
49 
50 \*---------------------------------------------------------------------------*/
51 
52 #ifndef subTriSurfaceMesh_H
53 #define subTriSurfaceMesh_H
54 
55 #include "triSurfaceMesh.H"
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 namespace Foam
60 {
61 
62 /*---------------------------------------------------------------------------*\
63  Class subTriSurfaceMesh Declaration
64 \*---------------------------------------------------------------------------*/
65 
67 :
68  public triSurfaceMesh
69 {
70  // Private member functions
71 
72  //- Extract patch names of triSurface
73  static wordList patchNames(const triSurface& s);
74 
75  //- Select regions by name
77  (
78  const triSurface& s,
79  const wordReList& regionNames
80  );
81 
82  //- Subset triSurface based on regions
83  static triSurface subset(const IOobject&, const dictionary&);
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("subTriSurfaceMesh");
90 
91 
92  // Constructors
93 
94  //- Construct from IO and dictionary.
96  (
97  const IOobject& io,
98  const dictionary& dict
99  );
100 
101 
102  //- Destructor
103  virtual ~subTriSurfaceMesh();
104 };
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace Foam
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 #endif
114 
115 // ************************************************************************* //
Foam::IOobject
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
Foam::subTriSurfaceMesh::patchNames
static wordList patchNames(const triSurface &s)
Extract patch names of triSurface.
Definition: subTriSurfaceMesh.C:41
Foam::triSurfaceMesh
IOoject and searching on triSurface.
Definition: triSurfaceMesh.H:63
Foam::subTriSurfaceMesh::selectedRegions
static labelList selectedRegions(const triSurface &s, const wordReList &regionNames)
Select regions by name.
Definition: subTriSurfaceMesh.C:55
Foam::triSurface
Triangulated surface description with patch information.
Definition: triSurface.H:57
Foam::subTriSurfaceMesh::subTriSurfaceMesh
subTriSurfaceMesh(const IOobject &io, const dictionary &dict)
Construct from IO and dictionary.
Definition: subTriSurfaceMesh.C:131
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::subTriSurfaceMesh::~subTriSurfaceMesh
virtual ~subTriSurfaceMesh()
Destructor.
Definition: subTriSurfaceMesh.C:142
s
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Foam::subTriSurfaceMesh::subset
static triSurface subset(const IOobject &, const dictionary &)
Subset triSurface based on regions.
Definition: subTriSurfaceMesh.C:85
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
triSurfaceMesh.H
Foam::subTriSurfaceMesh::TypeName
TypeName("subTriSurfaceMesh")
Runtime type information.
Foam::subTriSurfaceMesh
On-the-fly subset of triSurfaceMesh (based on selected patches)
Definition: subTriSurfaceMesh.H:65