Functions
Marmot::Testing Namespace Reference

Functions

bool checkIfEqual (const double a, const double b, const double tol=1e-15)
 
bool checkIfEqual (const autodiff::dual a, const autodiff::dual b, const double tol=1e-15)
 
bool checkIfEqual (const std::complex< double > a, const std::complex< double > b, const double tol=1e-15)
 
std::string getString (const double a)
 
std::string getString (const autodiff::dual a)
 
template<typename T >
bool checkIfEqual (const Eigen::Matrix< T, -1, -1 > &a, const Eigen::Matrix< T, -1, -1 > &b, const double tol=1e-15)
 
template<typename T , long int... Rest>
bool checkIfEqual (const Eigen::TensorFixedSize< T, Eigen::Sizes< Rest... > > &a, const Eigen::TensorFixedSize< T, Eigen::Sizes< Rest... > > &b, const double tol=1e-15)
 
template<typename T , size_t... Rest>
bool checkIfEqual (const Fastor::Tensor< T, Rest... > &a, const Fastor::Tensor< T, Rest... > &b, const double tol=1e-15)
 
void throwExceptionOnFailure (const bool condition, const std::string &message="")
 
void executeTestsAndCollectExceptions (const std::vector< std::function< void() > > &testFunctions)
 
template<int N>
Eigen::Matrix< double, N, 2 > fibonacciLatticeHemisphere ()
 
bool spinTurbokreisel (const std::unique_ptr< MarmotMaterialHypoElastic > &material, double *stress, double *dStress_dStrain, const double *dStrain, const double *timeOld, const double dT, double &pNewDT, const double stressTol=1e-15, const double stiffnessTol=1e-15)
 

Function Documentation

◆ checkIfEqual() [1/6]

bool Marmot::Testing::checkIfEqual ( const double  a,
const double  b,
const double  tol = 1e-15 
)

◆ checkIfEqual() [2/6]

bool Marmot::Testing::checkIfEqual ( const autodiff::dual  a,
const autodiff::dual  b,
const double  tol = 1e-15 
)

◆ checkIfEqual() [3/6]

bool Marmot::Testing::checkIfEqual ( const std::complex< double >  a,
const std::complex< double >  b,
const double  tol = 1e-15 
)

◆ getString() [1/2]

std::string Marmot::Testing::getString ( const double  a)

◆ getString() [2/2]

std::string Marmot::Testing::getString ( const autodiff::dual  a)

◆ checkIfEqual() [4/6]

template<typename T >
bool Marmot::Testing::checkIfEqual ( const Eigen::Matrix< T, -1, -1 > &  a,
const Eigen::Matrix< T, -1, -1 > &  b,
const double  tol = 1e-15 
)

◆ checkIfEqual() [5/6]

template<typename T , long int... Rest>
bool Marmot::Testing::checkIfEqual ( const Eigen::TensorFixedSize< T, Eigen::Sizes< Rest... > > &  a,
const Eigen::TensorFixedSize< T, Eigen::Sizes< Rest... > > &  b,
const double  tol = 1e-15 
)

◆ checkIfEqual() [6/6]

template<typename T , size_t... Rest>
bool Marmot::Testing::checkIfEqual ( const Fastor::Tensor< T, Rest... > &  a,
const Fastor::Tensor< T, Rest... > &  b,
const double  tol = 1e-15 
)

◆ throwExceptionOnFailure()

void Marmot::Testing::throwExceptionOnFailure ( const bool  condition,
const std::string &  message = "" 
)

◆ executeTestsAndCollectExceptions()

void Marmot::Testing::executeTestsAndCollectExceptions ( const std::vector< std::function< void() > > &  testFunctions)

◆ fibonacciLatticeHemisphere()

template<int N>
Eigen::Matrix< double, N, 2 > Marmot::Testing::fibonacciLatticeHemisphere ( )

◆ spinTurbokreisel()

bool Marmot::Testing::spinTurbokreisel ( const std::unique_ptr< MarmotMaterialHypoElastic > &  material,
double *  stress,
double *  dStress_dStrain,
const double *  dStrain,
const double *  timeOld,
const double  dT,
double &  pNewDT,
const double  stressTol = 1e-15,
const double  stiffnessTol = 1e-15 
)