OpenFOAM
7
The OpenFOAM Foundation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
writeMesh.C
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration | Website: https://openfoam.org
5
\\ / A nd | Copyright (C) 2011-2019 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
Description
25
Create intermediate mesh files from PROSTAR files
26
27
\*---------------------------------------------------------------------------*/
28
29
#include "starMesh.H"
30
#include "
Time.H
"
31
#include "
polyMesh.H
"
32
33
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34
35
void
Foam::starMesh::writeMesh
()
36
{
37
if
(isShapeMesh_)
38
{
39
Info
<<
"This is a shapeMesh."
<<
endl
;
40
41
Info
<<
"Default patch type set to empty"
<<
endl
;
42
43
clearExtraStorage();
44
45
polyMesh
pShapeMesh
46
(
47
IOobject
48
(
49
polyMesh::defaultRegion
,
50
runTime_.
constant
(),
51
runTime_
52
),
53
clone
(points_),
// we could probably re-use the data
54
cellShapes_,
55
boundary_,
56
patchNames_,
57
patchTypes_,
58
defaultFacesName_,
59
defaultFacesType_,
60
patchPhysicalTypes_
61
);
62
63
Info
<<
"Writing polyMesh"
<<
endl
;
64
pShapeMesh
.write();
65
}
66
else
67
{
68
// This is a polyMesh.
69
70
createPolyMeshData();
71
72
Info
<<
"This is a polyMesh"
<<
endl
;
73
74
clearExtraStorage();
75
76
polyMesh pMesh
77
(
78
IOobject
79
(
80
polyMesh::defaultRegion
,
81
runTime_.
constant
(),
82
runTime_
83
),
84
clone
(points_),
// we could probably re-use the data
85
clone
(meshFaces_),
86
clone
(cellPolys_)
87
);
88
89
// adding patches also checks the mesh
90
pMesh.addPatches(polyBoundaryPatches(pMesh));
91
92
Info
<<
"Writing polyMesh"
<<
endl
;
93
pMesh.
write
();
94
}
95
}
96
97
98
// ************************************************************************* //
Time.H
polyMesh.H
Foam::polyMesh::defaultRegion
static word defaultRegion
Return the default region name.
Definition:
polyMesh.H:309
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition:
Ostream.H:256
pShapeMesh
polyMesh pShapeMesh(IOobject(polyMesh::defaultRegion, runTime.constant(), runTime), move(points), cellShapes, boundary, patchNames, patchDicts, defaultFacesName, defaultFacesType)
Foam::clone
T clone(const T &t)
Definition:
List.H:54
Foam::starMesh::writeMesh
void writeMesh()
Write mesh.
Foam::TimePaths::constant
const word & constant() const
Return constant name.
Definition:
TimePaths.H:124
Foam::Info
messageStream Info
Foam::Ostream::write
virtual Ostream & write(const token &)=0
Write next token to stream.
applications
utilities
mesh
conversion
star3ToFoam
writeMesh.C
Generated by
1.8.13