ABAQUSsurfaceFormat.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) 2020 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::fileFormats::ABAQUSsurfaceFormat
28
29Description
30 Abaqus surface reader.
31
32 Output stream options:
33 - ASCII only
34 - compression on/off
35
36 Output dictionary options: ignored
37
38SourceFiles
39 ABAQUSsurfaceFormat.C
40
41\*---------------------------------------------------------------------------*/
42
43#ifndef ABAQUSsurfaceFormat_H
44#define ABAQUSsurfaceFormat_H
45
46#include "MeshedSurface.H"
47#include "MeshedSurfaceProxy.H"
50
51// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53namespace Foam
54{
55namespace fileFormats
56{
57
58/*---------------------------------------------------------------------------*\
59 Class fileFormats::ABAQUSsurfaceFormat Declaration
60\*---------------------------------------------------------------------------*/
61
62template<class Face>
64:
65 public MeshedSurface<Face>,
67{
68 // Private Member Functions
69
70 //- Output S3 or S4
71 inline static label writeShell
72 (
73 Ostream& os,
74 const Face& f,
75 label elemId,
76 const std::string& elsetName,
77 bool header = true
78 );
79
80
81public:
82
83 // Constructors
84
85 //- Default construct
86 ABAQUSsurfaceFormat() = default;
87
88 //- Read construct from file name
89 explicit ABAQUSsurfaceFormat(const fileName& filename);
90
91
92 //- Destructor
93 virtual ~ABAQUSsurfaceFormat() = default;
94
95
96 // Static Member Functions
97
98 //- Write surface mesh components by proxy
99 static void write
100 (
101 const fileName& filename,
102 const MeshedSurfaceProxy<Face>& surf,
103 IOstreamOption streamOpt = IOstreamOption(),
104 const dictionary& /*unused*/ = dictionary::null
105 );
106
107
108 // Member Functions
109
110 //- Read from file
111 virtual bool read
112 (
113 const fileName& filename
114 );
115
116 //- Write surface mesh to file
117 virtual void write
118 (
119 const fileName& name,
120 IOstreamOption streamOpt = IOstreamOption(),
121 const dictionary& options = dictionary::null
122 ) const
123 {
124 write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
125 }
126};
127
128
129// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130
131} // End namespace fileFormats
132} // End namespace Foam
133
134// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135
136#ifdef NoRepository
137 #include "ABAQUSsurfaceFormat.C"
138#endif
139
140// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141
142#endif
143
144// ************************************************************************* //
The IOstreamOption is a simple container for options an IOstream can normally have.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
Definition: MeshedSurface.H:99
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Internal class used by the ABAQUSsurfaceFormat.
virtual void write(const fileName &name, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const
Write surface mesh to file.
ABAQUSsurfaceFormat()=default
Default construct.
virtual bool read(const fileName &filename)
Read from file.
virtual ~ABAQUSsurfaceFormat()=default
Destructor.
A class for handling file names.
Definition: fileName.H:76
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
runTime write()
labelList f(nPoints)