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.
interval_utility.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: Riccardo Rossi
11 //
12 
13 #if !defined(KRATOS_INTERVAL_UTILITY_H_INCLUDED)
14 #define KRATOS_INTERVAL_UTILITY_H_INCLUDED
15 
16 #include <cmath>
17 #include "includes/define.h"
19 
20 namespace Kratos
21 {
22 
26 class KRATOS_API(KRATOS_CORE) IntervalUtility
27 {
28 public:
29 
31 
34  IntervalUtility(Parameters Settings);
35 
37  double GetIntervalBegin() const;
38 
40  double GetIntervalEnd() const;
41 
44  bool IsInInterval(double Time);
45 
47  std::string Info() const;
48 
50  void PrintInfo(std::ostream& rOStream) const;
51 
53  void PrintData(std::ostream& rOStream) const;
54 
55 private:
56  double mIntervalBegin;
57  double mIntervalEnd;
58 };
59 
60 
62 inline std::ostream& operator << (std::ostream& rOStream,
63  const IntervalUtility& rThis)
64 {
65  rThis.PrintInfo(rOStream);
66  rOStream << " : ";
67  rThis.PrintData(rOStream);
68  return rOStream;
69 }
70 
71 
72 }
73 
74 #endif // KRATOS_INTERVAL_UTILITY_H_INCLUDED
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
Definition: interval_utility.h:27
void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: interval_utility.cpp:67
KRATOS_CLASS_POINTER_DEFINITION(IntervalUtility)
void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: interval_utility.cpp:62
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
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