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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2015-2018 OpenCFD Ltd.
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::subTriSurfaceMesh
28
29Description
30 On-the-fly subset of triSurfaceMesh (based on selected patches)
31
32Note
33
34 Example usage:
35 \verbatim
36 spheres_solid1
37 {
38 type subTriSurfaceMesh;
39
40 // Surface to operate on. Avoid duplicate loading
41 surface spheres.stl;
42
43 // Regions to operate on (regular expressions allowed)
44 patches (solid1);
45 }
46 \endverbatim
47
48 \heading Dictionary parameters
49 \table
50 Property | Description | Required | Default
51 type | subTriSurfaceMesh | selector |
52 surface | Name of the underlying surface | yes |
53 patches | List of surface region names or regexs | yes |
54 \endtable
55
56SourceFiles
57 subTriSurfaceMesh.C
58
59\*---------------------------------------------------------------------------*/
60
61#ifndef subTriSurfaceMesh_H
62#define subTriSurfaceMesh_H
63
64#include "triSurfaceMesh.H"
65
66// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67
68namespace Foam
69{
70
71/*---------------------------------------------------------------------------*\
72 Class subTriSurfaceMesh Declaration
73\*---------------------------------------------------------------------------*/
74
75class subTriSurfaceMesh
76:
77 public triSurfaceMesh
78{
79 // Private member functions
80
81 //- Extract patch names of triSurface
82 static wordList patchNames(const triSurface& s);
83
84 //- Select regions by name
85 static labelList selectedRegions
86 (
87 const triSurface& s,
88 const wordRes& regionNameMatcher
89 );
90
91 //- Subset triSurface based on regions
92 static triSurface subset(const IOobject&, const dictionary&);
93
95public:
96
97 //- Runtime type information
98 TypeName("subTriSurfaceMesh");
99
100
101 // Constructors
102
103 //- Construct from IO and dictionary.
105 (
106 const IOobject& io,
107 const dictionary& dict
108 );
109
110
111 //- Destructor
112 virtual ~subTriSurfaceMesh() = default;
113
114};
115
116
117// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118
119} // End namespace Foam
120
121// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122
123#endif
124
125// ************************************************************************* //
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
On-the-fly subset of triSurfaceMesh (based on selected patches)
virtual ~subTriSurfaceMesh()=default
Destructor.
TypeName("subTriSurfaceMesh")
Runtime type information.
IOoject and searching on triSurface.
Triangulated surface description with patch information.
Definition: triSurface.H:79
triSurface()
Default construct.
Definition: triSurface.C:432
A List of wordRe with additional matching capabilities.
Definition: wordRes.H:54
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.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))
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
Namespace for OpenFOAM.
List< word > wordList
A List of words.
Definition: fileName.H:63
List< label > labelList
A List of labels.
Definition: List.H:66
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73