14 #if !defined(KRATOS_MEMORY_INFO_H_INCLUDED)
15 #define KRATOS_MEMORY_INFO_H_INCLUDED
67 static std::size_t GetPeakMemoryUsage();
76 static std::size_t GetCurrentMemoryUsage();
78 static std::string HumanReadableSize(std::size_t InBytes);
85 virtual std::string
Info()
const {
return "MemoryInfo"; }
88 virtual void PrintInfo(std::ostream &rOStream)
const { rOStream <<
Info(); }
91 virtual void PrintData(std::ostream &rOStream)
const
93 rOStream <<
"Current Memory Usage : "
94 << HumanReadableSize(GetCurrentMemoryUsage()) << std::endl;
95 rOStream <<
"Peak Memory Usage : "
96 << HumanReadableSize(GetPeakMemoryUsage()) << std::endl;
131 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
MemoryInfo gives the OS information about the memory usage by Kratos.
Definition: memory_info.h:37
MemoryInfo()=default
Default constructor.
virtual ~MemoryInfo()=default
Destructor.
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: memory_info.h:88
virtual std::string Info() const
Turn back information as a string.
Definition: memory_info.h:85
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: memory_info.h:91
KRATOS_CLASS_POINTER_DEFINITION(MemoryInfo)
Pointer definition of MemoryInfo.
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432