Loading...
Searching...
No Matches
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-2024 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 Foam_ABAQUSsurfaceFormat_H
44#define Foam_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) in ABAQUS format
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(const fileName& filename) override;
112
113 //- Write surface mesh to file (by proxy)
114 virtual void write
115 (
116 const fileName& name,
117 IOstreamOption streamOpt = IOstreamOption(),
118 const dictionary& options = dictionary::null
119 ) const override
120 {
121 write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
122 }
124 //- Write surface mesh to file (by proxy)
125 virtual void write
126 (
127 const fileName& name,
128 const word& fileType, /* ignored */
129 IOstreamOption streamOpt = IOstreamOption(),
130 const dictionary& options = dictionary::null
131 ) const override
132 {
133 write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
134 }
135};
137
138// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139
140} // End namespace fileFormats
141} // End namespace Foam
142
143// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144
145#ifdef NoRepository
146 #include "ABAQUSsurfaceFormat.C"
147#endif
148
149// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150
151#endif
152
153// ************************************************************************* //
A simple container for options an IOstream can normally have.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
friend class MeshedSurface
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
Definition dictionary.H:487
Internal class used by the ABAQUSsurfaceFormat.
ABAQUSsurfaceFormat()=default
Default construct.
virtual bool read(const fileName &filename) override
Read from file.
virtual void write(const fileName &name, const word &fileType, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const override
Write surface mesh to file (by proxy).
virtual ~ABAQUSsurfaceFormat()=default
Destructor.
virtual void write(const fileName &name, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const override
Write surface mesh to file (by proxy).
A class for handling file names.
Definition fileName.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
OBJstream os(runTime.globalPath()/outputName)
Namespace to isolate specifics for file formats, and some common utilities.
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
runTime write()
labelList f(nPoints)