Flow123d  JB-rel-int-test-ea53151
Classes | Macros | Functions
armadillo_tools.cc File Reference
#include "armadillo_tools.hh"
#include <type_traits>
#include "system/exc_common.hh"
#include "system/logger.hh"
#include <armadillo>

Go to the source code of this file.

Classes

class  ExcArmadillo
 
class  ArmaStreamBuf
 
struct  field_value_scalar_resolution< std::true_type >
 
struct  field_value_scalar_resolution< std::false_type >
 

Macros

#define FIELD_VALUE_TO_YAML_DIM(dim)
 

Functions

void armadillo_setup ()
 
template<class T >
string field_value_to_yaml_matrix (const T &mat, unsigned int prec)
 
template<class T >
string field_value_to_yaml_vector (const T &vec, unsigned int prec)
 
template<class T >
string field_value_to_yaml (const T &mat, unsigned int prec)
 
template string field_value_to_yaml (const arma::Col< double > &mat, unsigned int prec)
 
template string field_value_to_yaml (const arma::Col< unsigned int > &mat, unsigned int prec)
 
template string field_value_to_yaml (const double &mat, unsigned int prec)
 
template string field_value_to_yaml (const int &mat, unsigned int prec)
 
template string field_value_to_yaml (const unsigned int &mat, unsigned int prec)
 

Macro Definition Documentation

◆ FIELD_VALUE_TO_YAML_DIM

#define FIELD_VALUE_TO_YAML_DIM (   dim)
Value:
template string field_value_to_yaml(arma::Mat<double>::fixed<dim,dim> const &mat, unsigned int prec); \
template string field_value_to_yaml(const arma::Mat<int>::fixed<dim,dim> &mat, unsigned int prec); \
template string field_value_to_yaml(const arma::Mat<unsigned int>::fixed<dim,dim> &mat, unsigned int prec); \
template string field_value_to_yaml(const arma::Col<double>::fixed<dim> &mat, unsigned int prec); \
template string field_value_to_yaml(const arma::Col<int>::fixed<dim> &mat, unsigned int prec); \
template string field_value_to_yaml(const arma::Col<unsigned int>::fixed<dim> &mat, unsigned int prec);
string field_value_to_yaml(const T &mat, unsigned int prec)
ArmaMat< double, N, M > mat
Definition: armor.hh:936

Definition at line 144 of file armadillo_tools.cc.

Function Documentation

◆ armadillo_setup()

void armadillo_setup ( )

This method sets particular ostream to armadillo which catch errors reported by Armadillo and report Flow error message with full stacktrace. This allows better determination of the source of the error.

The call to the function may appear in the main() or in particular unit tests.

Definition at line 66 of file armadillo_tools.cc.

Here is the caller graph for this function:

◆ field_value_to_yaml() [1/6]

template string field_value_to_yaml ( const arma::Col< double > &  mat,
unsigned int  prec 
)

◆ field_value_to_yaml() [2/6]

template string field_value_to_yaml ( const arma::Col< unsigned int > &  mat,
unsigned int  prec 
)

◆ field_value_to_yaml() [3/6]

template string field_value_to_yaml ( const double &  mat,
unsigned int  prec 
)

◆ field_value_to_yaml() [4/6]

template string field_value_to_yaml ( const int &  mat,
unsigned int  prec 
)

◆ field_value_to_yaml() [5/6]

template<class T >
string field_value_to_yaml ( const T &  mat,
unsigned int  prec = 5 
)
inline

Format field_value (i.e. matrix, vector scalar of double or int) into YAML string.

Definition at line 138 of file armadillo_tools.cc.

Here is the caller graph for this function:

◆ field_value_to_yaml() [6/6]

template string field_value_to_yaml ( const unsigned int &  mat,
unsigned int  prec 
)

◆ field_value_to_yaml_matrix()

template<class T >
string field_value_to_yaml_matrix ( const T &  mat,
unsigned int  prec 
)

Definition at line 79 of file armadillo_tools.cc.

Here is the caller graph for this function:

◆ field_value_to_yaml_vector()

template<class T >
string field_value_to_yaml_vector ( const T &  vec,
unsigned int  prec 
)

Definition at line 98 of file armadillo_tools.cc.

Here is the caller graph for this function: