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.
output_process.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: Philipp Bucher (https://github.com/philbucher)
11 //
12 
13 
14 #if !defined(KRATOS_OUTPUT_PROCESS_H_INCLUDED )
15 #define KRATOS_OUTPUT_PROCESS_H_INCLUDED
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
22 #include "processes/process.h"
23 
24 
25 namespace Kratos
26 {
29 
32 
40 class OutputProcess : public Process
41 {
42 public:
45 
48 
52 
55 
59 
61  OutputProcess& operator=(OutputProcess const& rOther) = delete;
62 
66 
67  virtual bool IsOutputStep()
68  {
69  return true;
70  }
71 
72  virtual void PrintOutput()
73  {
74  KRATOS_ERROR << "Calling the base OutputProcess class PrintOutput. Please implement the PrintOutput in your derived OutputProcess class." << std::endl;
75  }
76 
80 
82  std::string Info() const override
83  {
84  std::stringstream buffer;
85  buffer << "OutputProcess" ;
86  return buffer.str();
87  }
88 
90  void PrintInfo(std::ostream& rOStream) const override
91  {
92  rOStream << "OutputProcess";
93  }
94 
96  void PrintData(std::ostream& rOStream) const override {}
97 
99 private:
102 
103  KRATOS_REGISTRY_ADD_PROTOTYPE("Processes.KratosMultiphysics", Process, OutputProcess)
105 
106 
107 
108 }; // Class OutputProcess
109 
113 
115 inline std::ostream& operator << (std::ostream& rOStream,
116  const OutputProcess& rThis)
117 {
118  rThis.PrintInfo(rOStream);
119  rOStream << std::endl;
120  rThis.PrintData(rOStream);
121 
122  return rOStream;
123 }
125 
127 
128 } // namespace Kratos.
129 
130 #endif // KRATOS_OUTPUT_PROCESS_H_INCLUDED defined
The base class for output processes.
Definition: output_process.h:41
OutputProcess()
Default constructor.
Definition: output_process.h:54
OutputProcess & operator=(OutputProcess const &rOther)=delete
Assignment operator.
KRATOS_CLASS_POINTER_DEFINITION(OutputProcess)
Pointer definition of OutputProcess.
virtual bool IsOutputStep()
Definition: output_process.h:67
virtual void PrintOutput()
Definition: output_process.h:72
std::string Info() const override
Turn back information as a string.
Definition: output_process.h:82
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: output_process.h:90
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: output_process.h:96
The base class for all processes in Kratos.
Definition: process.h:49
#define KRATOS_REGISTRY_ADD_PROTOTYPE(NAME, X, Y)
Macro to register class prototypes This macro creates a static bool in the class (which value is not ...
Definition: define_registry.h:43
#define KRATOS_ERROR
Definition: exception.h:161
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432