#include <algorithm>
#include <cfenv>
#include <cmath>
#include <complex>
#include <limits>
#include <type_traits>
#include "b2csda.H"
#include "b2util.H"
Go to the source code of this file.
Namespaces | |
namespace | b2000 |
Contains the base classes for implementing Finite Elements. | |
Functions | |
template<typename T > | |
T | b2000::determinant_3x3 (const std::array< std::array< T, 3 >, 3 > &mat_a) |
template<typename T > | |
T | b2000::determinant_2x2 (const std::array< std::array< T, 2 >, 2 > &mat_a) |
template<typename T > | |
T | b2000::invert_3x3 (const std::array< std::array< T, 3 >, 3 > &mat_a, std::array< std::array< T, 3 >, 3 > &mat_b) |
template<typename T > | |
T | b2000::invert_2x2 (const std::array< std::array< T, 2 >, 2 > &mat_a, std::array< std::array< T, 2 >, 2 > &mat_b) |
template<typename T > | |
std::array< T, 2 > | b2000::eigenvalues_2 (const std::array< std::array< T, 2 >, 2 > &matrix) |
template<typename T > | |
void | b2000::eigenvector_2 (const std::array< std::array< T, 2 >, 2 > &matrix, std::array< T, 2 > &eigenvalues, std::array< std::array< T, 2 >, 2 > &eigenvector) |
template<typename T1 > | |
void | b2000::set_zero_3 (T1 a[3]) |
template<typename T1 > | |
void | b2000::set_zero_2 (T1 a[2]) |
template<typename T1 > | |
void | b2000::copy_3 (const T1 a[3], T1 b[3]) |
template<typename T1 , typename T2 > | |
void | b2000::copy_3 (const T1 a[3], T2 b[3]) |
template<typename T1 > | |
void | b2000::copy_2 (const T1 a[2], T1 b[2]) |
template<typename T1 , typename T2 > | |
void | b2000::copy_2 (const T1 a[2], T2 b[2]) |
template<typename T1 , typename T2 , typename T3 > | |
void | b2000::sub_3 (const T1 v1[3], const T2 v2[3], T3 dest[3]) |
template<typename T1 , typename T2 , typename T3 > | |
void | b2000::sub_2 (const T1 v1[2], const T2 v2[2], T3 dest[2]) |
template<typename T1 , typename T2 , typename T3 > | |
void | b2000::add_3 (const T1 v1[3], const T2 v2[3], T3 dest[3]) |
template<typename T1 , typename T2 , typename T3 > | |
void | b2000::add_2 (const T1 v1[2], const T2 v2[2], T3 dest[2]) |
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
void | b2000::add_scale_3 (const T1 s1, const T2 v1[3], const T3 s2, const T4 v2[3], T5 dest[3]) |
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
void | b2000::add_scale_2 (const T1 s1, const T2 v1[2], const T3 s2, const T4 v2[2], T5 dest[2]) |
template<typename T1 , typename T2 > | |
void | b2000::scale_3 (T1 v[3], const T2 s) |
template<typename T1 , typename T2 > | |
void | b2000::scale_2 (T1 v[2], const T2 s) |
template<typename T1 , typename T2 > | |
void | b2000::add_3 (T1 a[3], const T2 b[3]) |
template<typename T1 , typename T2 > | |
void | b2000::add_2 (T1 a[2], const T2 b[2]) |
template<typename T1 , typename T2 , typename T3 > | |
void | b2000::add_scale_3 (T1 a[3], const T2 s, const T3 b[3]) |
template<typename T1 , typename T2 , typename T3 > | |
void | b2000::add_scale_2 (T1 a[2], const T2 s, const T3 b[2]) |
template<typename T > | |
T | b2000::dot_3 (const T a[3], const T b[3]) |
template<typename T > | |
std::complex< T > | b2000::dot_3 (const std::complex< T > a[3], const std::complex< T > b[3]) |
template<typename T > | |
b2000::csda< T > | b2000::dot_3 (const b2000::csda< T > a[3], const b2000::csda< T > b[3]) |
template<typename T > | |
T | b2000::dot_2 (const T a[2], const T b[2]) |
template<typename T > | |
std::complex< T > | b2000::dot_2 (const std::complex< T > a[2], const std::complex< T > b[2]) |
template<typename T > | |
b2000::csda< T > | b2000::dot_2 (const b2000::csda< T > a[2], const b2000::csda< T > b[2]) |
template<typename T > | |
T | b2000::norm_3 (T a[3]) |
template<typename T > | |
T | b2000::norm_3 (std::complex< T > a[3]) |
template<typename T > | |
T | b2000::norm_2 (T a[2]) |
template<typename T > | |
T | b2000::norm_2 (std::complex< T > a[2]) |
template<typename T1 , typename T2 , typename T3 > | |
void | b2000::outer_product_3 (const T1 a[3], const T2 b[3], T3 c[3]) |
template<typename T1 , typename T2 , typename T3 > | |
void | b2000::outer_product_add_3 (const T1 a[3], const T2 b[3], T3 c[3]) |
template<typename T > | |
T | b2000::norm_outer_product_3 (const T a[3], const T b[3]) |
template<typename T > | |
T | b2000::normalise_3 (T a[3]) |
template<typename T > | |
T | b2000::normalise_3 (std::complex< T > a[3]) |
template<typename T > | |
b2000::csda< T > | b2000::normalise_3 (b2000::csda< T > a[3]) |
template<typename T > | |
T | b2000::normalise_2 (T a[2]) |
template<typename T > | |
T | b2000::normalise_2 (std::complex< T > a[2]) |
template<typename T > | |
b2000::csda< T > | b2000::normalise_2 (b2000::csda< T > a[2]) |
template<typename T1 > | |
void | b2000::set_zero_3_3 (T1 a[3][3]) |
template<typename T1 > | |
void | b2000::set_zero_2_2 (T1 a[2][2]) |
template<typename T1 > | |
void | b2000::set_identity_3_3 (T1 a[3][3]) |
template<typename T1 > | |
void | b2000::set_identity_2_2 (T1 a[2][2]) |
template<typename T1 > | |
void | b2000::copy_3_3 (const T1 a[3][3], T1 b[3][3]) |
template<typename T1 , typename T2 > | |
void | b2000::copy_3_3 (const T1 a[3][3], T2 b[3][3]) |
template<typename T1 > | |
void | b2000::copy_2_2 (const T1 a[2][2], T1 b[2][2]) |
template<typename T1 , typename T2 > | |
void | b2000::copy_2_2 (const T1 a[2][2], T2 b[2][2]) |
template<typename T > | |
void | b2000::scale_3_3 (const T a, const T b[3][3], T c[3][3]) |
template<typename T > | |
void | b2000::scale_2_2 (const T a, const T b[2][2], T c[2][2]) |
template<typename T1 , typename T2 > | |
void | b2000::add_3_3 (T1 a[3][3], const T2 b[3][3]) |
template<typename T1 , typename T2 > | |
void | b2000::add_2_2 (T1 a[2][2], const T2 b[2][2]) |
template<typename T > | |
void | b2000::add_scale_3_3 (const T a, const T b[3][3], T c[3][3]) |
template<typename T > | |
void | b2000::add_scale_2_2 (const T a, const T b[2][2], T c[2][2]) |
template<typename T1 > | |
void | b2000::transpose_3_3 (T1 a[3][3]) |
template<typename T1 > | |
void | b2000::transpose_2_2 (T1 a[2][2]) |
template<typename T1 > | |
void | b2000::transpose_3_3 (const T1 a[3][3], T1 b[3][3]) |
template<typename T1 > | |
void | b2000::transpose_2_2 (const T1 a[2][2], T1 b[2][2]) |
template<typename T1 > | |
T1 | b2000::norm_inf_3_3 (const T1 a[3][3]) |
template<typename T1 > | |
T1 | b2000::norm_inf_2_2 (const T1 a[3][3]) |
template<typename T > | |
T | b2000::determinant_3_3 (const T a[3][3]) |
template<typename T > | |
T | b2000::determinant_2_2 (const T a[2][2]) |
template<typename T > | |
T | b2000::invert_3_3 (const T a[3][3], T b[3][3]) |
template<typename T > | |
T | b2000::invert_2_2 (const T a[2][2], T b[2][2]) |
template<typename T > | |
T | b2000::invert_x_x (const T a[2][2], T b[2][2]) |
template<typename T > | |
T | b2000::invert_x_x (const T a[3][3], T b[3][3]) |
template<typename T > | |
T | b2000::transposed_invert_3_3 (const T a[3][3], T b[3][3]) |
template<typename T > | |
T | b2000::transposed_invert_2_2 (const T a[2][2], T b[2][2]) |
template<typename T > | |
void | b2000::inner_product_3_3_NN (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | b2000::inner_product_3_3_TN (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | b2000::inner_product_2_2_NN (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | b2000::inner_product_3_3_NT (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | b2000::inner_product_2_2_NT (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | b2000::inner_product_3_3_TT (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | b2000::inner_product_2_2_TT (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | b2000::inner_product_2_1_NN (const T a[2][2], const T b[2], T c[2]) |
template<typename T > | |
void | b2000::inner_product_2_1_TN (const T a[2][2], const T b[2], T c[2]) |
template<typename T > | |
void | b2000::inner_product_add_3_3_NN (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | b2000::inner_product_add_2_2_NN (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | b2000::inner_product_add_3_3_TN (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | b2000::inner_product_add_2_2_TN (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | b2000::inner_product_add_3_3_NT (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | b2000::inner_product_add_2_2_NT (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | b2000::inner_product_2_2_TN (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | b2000::inner_product_add_3_3_TT (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | b2000::inner_product_add_2_2_TT (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | b2000::inner_product_3_1_NN (const T a[3][3], const T b[3], T c[3]) |
template<typename T > | |
void | b2000::inner_product_3_1_TN (const T a[3][3], const T b[3], T c[3]) |
template<typename T > | |
void | b2000::inner_product_add_3_1_NN (const T a[3][3], const T b[3], T c[3]) |
template<typename T > | |
void | b2000::inner_product_add_3_1_TN (const T a[3][3], const T b[3], T c[3]) |
template<typename T > | |
bool | b2000::solve_2_2 (const T a[2][2], const T y[2], T x[2]) |
template<typename T > | |
void | b2000::eigenvector_2 (const T m[2][2], T value[2], T vector[2][2]=0) |
template<typename T > | |
void | b2000::stress_invariants (const T t[6], T &i1, T &i2, T &i3) |
template<typename T > | |
void | b2000::stress_principals (const T i1, const T i2, const T i3, T &s1, T &s2, T &s3) |
Calculate the stress principals from the stress invariants. | |
Fast linear algebra routines that can be used for tensor calculus (e.g. for Element or ElementProperty implementations).
Most of the functions defined below are still based on deprecated C-style arrays. Whenever possible, try to use the functions at the top of this file. These make use of the C++ std::array class (since C++11). If the function you are looking for is not yet implemented using std::array, please define a corresponding function afresh as a replacement for the C-style version. If you find yourself requiring one of the older C-style functions to fit your implementation, please take this as an opportunity and challenge your overall C++ coding style.