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.
Macros
debug_helpers.h File Reference
#include <sstream>
#include <iomanip>
Include dependency graph for debug_helpers.h:

Go to the source code of this file.

Macros

#define KRATOS_WATCH_VECTOR_WITH_PRECISION(variable, precision)
 
#define KRATOS_WATCH_MATRIX_WITH_PRECISION(variable, precision)
 
#define KRATOS_WATCH_LINE(...)   std::cout << __VA_ARGS__ << KRATOS_CODE_LOCATION << std::endl
 

Macro Definition Documentation

◆ KRATOS_WATCH_LINE

#define KRATOS_WATCH_LINE (   ...)    std::cout << __VA_ARGS__ << KRATOS_CODE_LOCATION << std::endl

◆ KRATOS_WATCH_MATRIX_WITH_PRECISION

#define KRATOS_WATCH_MATRIX_WITH_PRECISION (   variable,
  precision 
)
Value:
{ \
std::stringstream values; \
values << std::scientific << std::setprecision(precision); \
for (std::size_t i = 0; i < variable.size1(); i++) \
{ \
for (std::size_t j = 0; j < variable.size2(); j++) \
{ \
values << #variable << "(" << i << ", " << j \
<< ") = " << variable(i, j) << ";" << std::endl; \
} \
} \
std::cout << #variable << " : " << std::endl \
<< values.str() << std::endl; \
}
list values
Definition: bombardelli_test.py:42
int j
Definition: quadrature.py:648
integer i
Definition: TensorModule.f:17

◆ KRATOS_WATCH_VECTOR_WITH_PRECISION

#define KRATOS_WATCH_VECTOR_WITH_PRECISION (   variable,
  precision 
)
Value:
{ \
std::stringstream values; \
values << std::scientific << std::setprecision(precision); \
for (std::size_t i = 0; i < variable.size(); i++) \
{ \
values << #variable << "[" << i << "] = " << variable[i] << ";" << std::endl; \
} \
std::cout << #variable << " : " << std::endl \
<< values.str() << std::endl; \
}