KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
file_logger_output.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Armin Geiser
11 //
12 //
13 
14 
15 #if !defined(KRATOS_FILE_LOGGER_OUTPUT_H_INCLUDED )
16 #define KRATOS_FILE_LOGGER_OUTPUT_H_INCLUDED
17 
18 
19 
20 // System includes
21 #include <fstream>
22 
23 // External includes
24 
25 // Project includes
27 
28 namespace Kratos
29 {
32 
35 
37 
39 class KRATOS_API(KRATOS_CORE) FileLoggerOutput : public LoggerOutput
40 {
41 public:
44 
45 
48 
52 
56 
57  explicit FileLoggerOutput(const std::string& rName);
58 
61 
65 
66  FileLoggerOutput& operator=(FileLoggerOutput const& Other) = delete;
67 
71 
75 
79 
83 
85  virtual std::string Info() const override;
86 
88 protected:
89 
90  void SetMessageColor(LoggerMessage::Severity MessageSeverity) override {};
91  void ResetMessageColor(LoggerMessage::Severity MessageSeverity) override {};
92 
93 private:
96 
100  std::ofstream mFileStream;
101 
103 }; // Class FileLoggerOutput
104 
106 
109 
113 
114 
116 
118 } // namespace Kratos.
119 
120 #endif // KRATOS_FILE_LOGGER_OUTPUT_H_INCLUDED defined
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
FileLoggerOutput is a class for all file logger outputs.
Definition: file_logger_output.h:40
void SetMessageColor(LoggerMessage::Severity MessageSeverity) override
Definition: file_logger_output.h:90
~FileLoggerOutput()
Destructor.
Definition: file_logger_output.h:60
FileLoggerOutput & operator=(FileLoggerOutput const &Other)=delete
KRATOS_CLASS_POINTER_DEFINITION(FileLoggerOutput)
Pointer definition of FileLoggerOutput.
void ResetMessageColor(LoggerMessage::Severity MessageSeverity) override
Definition: file_logger_output.h:91
Severity
Definition: logger_message.h:64
LoggerOutput is the base class for all logger outputs.
Definition: logger_output.h:48
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21