triSurf.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | cfMesh: A library for mesh generation
4  \\ / O peration |
5  \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6  \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of cfMesh.
10 
11  cfMesh is free software; you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by the
13  Free Software Foundation; either version 3 of the License, or (at your
14  option) any later version.
15 
16  cfMesh 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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  triSurf
26 
27 Description
28  A class for triangulated surface used in the meshing process.
29  It is derived from points and facets with some additional subsets.
30  Subsets are vert useful for local mesh refinement.
31 
32 SourceFiles
33  triSurf.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef triSurf_H
38 #define triSurf_H
39 
40 #include "triSurfPoints.H"
41 #include "triSurfFacets.H"
42 #include "triSurfFeatureEdges.H"
43 #include "triSurfAddressing.H"
44 #include <map>
45 #include "DynList.H"
46 #include "labelLongList.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 // Froward declarations
54 class triSurfModifier;
55 
56 /*---------------------------------------------------------------------------*\
57  Class triSurf Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 class triSurf
61 :
62  public triSurfPoints,
63  public triSurfFacets,
64  public triSurfFeatureEdges,
65  public triSurfAddressing
66 {
67  // Private member functions
68  void readFromFTR(const fileName&);
69  void writeToFTR(const fileName&) const;
70 
71  void readFromFMS(const fileName&);
72  void writeToFMS(const fileName&) const;
73 
76 
77  void topologyCheck();
78 
79  //- Disallow default bitwise assignment
80  void operator=(const triSurf&);
81 
82 public:
83 
84  // Friend classes
85  friend class triSurfModifer;
86 
87  // Constructors
88 
89  //- Default construct
90  triSurf();
91 
92  //- Construct from parts
93  triSurf
94  (
95  const LongList<labelledTri>& triangles,
98  const pointField& points
99  );
100 
101  //- Read from file
102  triSurf(const fileName& fName);
103 
104  // Destructor
105 
106  ~triSurf();
107 
108 
109  // Member Functions
110  //- read and write the surface
111  void readSurface(const fileName&);
112  void writeSurface(const fileName&) const;
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #include "triSurfI.H"
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
Foam::triSurfFacets
Definition: triSurfFacets.H:52
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::triSurfFeatureEdges
Definition: triSurfFeatureEdges.H:48
triSurfModifier
A class allowing non-const access to the member of the surface mesh.
triSurfFeatureEdges.H
Foam::triSurf::accessToPatches
geometricSurfacePatchList & accessToPatches()
Definition: triSurfI.H:42
Foam::triSurfPoints::points
const pointField & points() const
access to points
Definition: triSurfPointsI.H:44
Foam::triSurf::readSurface
void readSurface(const fileName &)
read and write the surface
Definition: triSurf.C:401
Foam::triSurf::writeToFMS
void writeToFMS(const fileName &) const
Definition: triSurf.C:112
Foam::triSurf::readFromFTR
void readFromFTR(const fileName &)
Definition: triSurf.C:44
Foam::LongList
Definition: LongList.H:55
triSurfI.H
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::triSurf::operator=
void operator=(const triSurf &)
Disallow default bitwise assignment.
triSurfAddressing.H
Foam::triSurfFacets::patches
const geometricSurfacePatchList & patches() const
access to patches
Definition: triSurfFacetsI.H:49
triSurfPoints.H
Foam::triSurf::topologyCheck
void topologyCheck()
Definition: triSurf.C:168
Foam::triSurf::writeToFTR
void writeToFTR(const fileName &) const
Definition: triSurf.C:55
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::triSurfPoints
Definition: triSurfPoints.H:49
Foam::triSurf::~triSurf
~triSurf()
Definition: triSurf.C:396
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
Foam::triSurf::triSurf
triSurf()
Default construct.
Definition: triSurf.C:356
labelLongList.H
Foam::triSurf::accessToFacets
LongList< labelledTri > & accessToFacets()
Definition: triSurfI.H:37
triSurfFacets.H
Foam::triSurf::writeSurface
void writeSurface(const fileName &) const
Definition: triSurf.C:430
Foam::triSurf
Definition: triSurf.H:59
Foam::triSurf::readFromFMS
void readFromFMS(const fileName &)
Definition: triSurf.C:70
Foam::triSurf::triSurfModifer
friend class triSurfModifer
Definition: triSurf.H:84
Foam::triSurfAddressing
Definition: triSurfAddressing.H:52
Foam::triSurfFeatureEdges::featureEdges_
edgeLongList featureEdges_
list of feature edges
Definition: triSurfFeatureEdges.H:54
DynList.H