Flow123d  last_with_con_2.0.0-663-gd0e2296
armadillo_tools.hh
Go to the documentation of this file.
1 /*
2  * armadillo_setup.hh
3  *
4  * Created on: Jul 4, 2016
5  * Author: jb
6  */
7 
8 #ifndef SRC_SYSTEM_ARMADILLO_TOOLS_HH_
9 #define SRC_SYSTEM_ARMADILLO_TOOLS_HH_
10 
11 #include <string>
12 #include <armadillo>
13 
14 /**
15  * This method sets particular ostream to armadillo which catch
16  * errors reported by Armadillo and report Flow error message with full stacktrace.
17  * This allows better determination of the source of the error.
18  *
19  * The call to the function may appear in the main() or in particular unit tests.
20  */
21 void armadillo_setup();
22 
23 
24 /**
25  * Format field_value (i.e. matrix, vector scalar of double or int) into YAML string.
26  */
27 template<class T>
28 std::string field_value_to_yaml(const T &mat, unsigned int prec = 5);
29 
30 
31 #endif /* SRC_SYSTEM_ARMADILLO_TOOLS_HH_ */
void armadillo_setup()
std::string field_value_to_yaml(const T &mat, unsigned int prec=5)