FEMTIC
OutputFiles.h
Go to the documentation of this file.
1 //-------------------------------------------------------------------------------------------------------
2 // The MIT License (MIT)
3 //
4 // Copyright (c) 2021 Yoshiya Usui
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to deal
8 // in the Software without restriction, including without limitation the rights
9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 // copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
13 // The above copyright notice and this permission notice shall be included in all
14 // copies or substantial portions of the Software.
15 //
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 // SOFTWARE.
23 //-------------------------------------------------------------------------------------------------------
24 #ifndef DBLDEF_OUTPUT_FILES
25 #define DBLDEF_OUTPUT_FILES
26 
27 #include <fstream>
28 #include <stdio.h>
29 #include <stdlib.h>
30 
31 // Class of output files
33 
34 public:
35  // Log file
36  static std::ofstream m_logFile;
37 
38  // VTK file
39  static std::ofstream m_vtkFile;
40 
41  // VTK file for ploting observed station
42  static std::ofstream m_vtkFileForObservedStation;
43 
44  // CSV file
45  //static std::ofstream m_csvFile;
46  static FILE* m_csvFile;
47 
48  // CSV file in which the results of 2D forward calculation is written
49  //static std::ofstream m_csvFileFor2DFwd;
50  static FILE* m_csvFileFor2DFwd;
51 
52  // CNV file
53  static std::ofstream m_cnvFile;
54 
55  // Return the the instance of the class
56  static OutputFiles* getInstance();
57 
58  // Close csv file in which the results of 3D forward calculation is written
59  void openVTKFile( const int iterNum );
60 
61  // Open VTK file for ploting observed station
63 
64  // Open csv file in which the results of 2D forward calculation is written
65  void openCsvFileFor2DFwd( const int iterNum );
66 
67  // Open csv file in which the results of 3D forward calculation is written
68  void openCsvFileFor3DFwd( const int iterNum );
69 
70  // Open cnv file
71  void openCnvFile();
72 
73  // Output case file
74  void outputCaseFile() const;
75 
76 private:
77  // Constructer
78  OutputFiles();
79 
80  // Destructer
81  ~OutputFiles();
82 
83  // Copy constructer
84  OutputFiles(const OutputFiles& rhs);
85 
86  // Assignment operator
87  OutputFiles& operator=(const OutputFiles& rhs);
88 
89 };
90 
91 #endif
Definition: OutputFiles.h:32
static std::ofstream m_vtkFileForObservedStation
Definition: OutputFiles.h:42
static std::ofstream m_cnvFile
Definition: OutputFiles.h:53
OutputFiles()
Definition: OutputFiles.cpp:323
void openCsvFileFor3DFwd(const int iterNum)
Definition: OutputFiles.cpp:138
static std::ofstream m_logFile
Definition: OutputFiles.h:36
void openCnvFile()
Definition: OutputFiles.cpp:166
~OutputFiles()
Definition: OutputFiles.cpp:363
void openVTKFileForObservedStation()
Definition: OutputFiles.cpp:82
static FILE * m_csvFileFor2DFwd
Definition: OutputFiles.h:50
void openVTKFile(const int iterNum)
Definition: OutputFiles.cpp:52
OutputFiles & operator=(const OutputFiles &rhs)
Definition: OutputFiles.cpp:388
static OutputFiles * getInstance()
Definition: OutputFiles.cpp:46
static std::ofstream m_vtkFile
Definition: OutputFiles.h:39
void openCsvFileFor2DFwd(const int iterNum)
Definition: OutputFiles.cpp:110
void outputCaseFile() const
Definition: OutputFiles.cpp:213
static FILE * m_csvFile
Definition: OutputFiles.h:46