tfel
Loading...
Searching...
No Matches
Utilities.hxx File Reference
#include <limits>
#include <cstdlib>
#include <type_traits>
#include "FSES/Utilities.ixx"

Typedefs

template<typename VectorType>
using fses::GetVectorNumericType_t
 a simple alias
template<typename MatrixType>
using fses::GetMatrixNumericType_t
 a simple alias

Enumerations

enum struct  fses::EigenValuesOrdering { ASCENDING , DESCENDING , UNSORTED }

Functions

template<typename T>
constexpr T fses::square (const T)
template<typename VectorType, typename IndexType>
GetVectorNumericType_t< VectorType > & fses::at (VectorType &, const IndexType &)
 get values of a vector
template<typename VectorType, typename IndexType>
const GetVectorNumericType_t< VectorType > & fses::at (const VectorType &, const IndexType &)
 get values of a vector
template<typename MatrixType, typename IndexType>
GetMatrixNumericType_t< MatrixType > & fses::at (MatrixType &, const IndexType &, const IndexType &)
 get values of a matrix
template<typename MatrixType, typename IndexType>
const GetMatrixNumericType_t< MatrixType > & fses::at (const MatrixType &, const IndexType &, const IndexType &)
 get values of a matrix
template<typename MatrixType, typename NumericType>
void fses::fill (MatrixType &, const NumericType &)
template<typename real>
bool fses::is_negligible (const real &, const real &)
template<typename MatrixType, typename VectorType>
void fses::sort (MatrixType &, VectorType &, const EigenValuesOrdering)
 sort the eigenvalues and the eigenvectors

Detailed Description

Author
Joachim Kopp/Thomas Helfer
Date
02/01/2017

This file has been introduced in TFEL with the courtesy of Joachim Kopp.

Original licence

Numerical diagonalization of 3x3 matrcies Copyright (C) 2006 Joachim Kopp

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Typedef Documentation

◆ GetMatrixNumericType_t

template<typename MatrixType>
using fses::GetMatrixNumericType_t
Initial value:
std::decay_t< decltype(std::declval< MatrixType >().operator()(0, 0))> type
the result
Definition Utilities.ixx:84

a simple alias

◆ GetVectorNumericType_t

template<typename VectorType>
using fses::GetVectorNumericType_t
Initial value:
std::decay_t< decltype(std::declval< VectorType >().operator()(0))> type
the result
Definition Utilities.ixx:56

a simple alias

Enumeration Type Documentation

◆ EigenValuesOrdering

enum struct fses::EigenValuesOrdering
strong

An enumeration of the various eigen values available

Enumerator
ASCENDING 

sort eigenvalues from the lowest to the greatest

DESCENDING 

sort eigenvalues from the greatest to the lowest

UNSORTED 

no ordering

Function Documentation

◆ fill()

template<typename MatrixType, typename NumericType>
void fses::fill ( MatrixType & m,
const NumericType & v )

fill the values of a 3x3 matrix

Parameters
[out]mmatrix
[in]vvalue

◆ sort()

template<typename MatrixType, typename VectorType>
void fses::sort ( MatrixType & m,
VectorType & v,
const EigenValuesOrdering o )
inline

sort the eigenvalues and the eigenvectors

Parameters
[in,out]meigenvectors, stored as column of a 3x3 matrix
[in,out]veigenvalues
[in]oordering

◆ square()

template<typename T>
T fses::square ( const T x)
inlineconstexpr
Returns
the square of the input
Parameters
[in]xvalue