Mathematical functions.  
More...
 | 
| template<typename U , typename V >  | 
| xt::xtensor< typename U::value_type, 2 >  | outer (const U &u, const V &v) | 
|   | 
| template<typename U , typename V >  | 
| xt::xtensor_fixed< typename U::value_type, xt::xshape< 3 > >  | cross (const U &u, const V &v) | 
|   | 
| std::pair< xt::xtensor< double, 1 >, xt::xtensor< double, 2, xt::layout_type::column_major > >  | eigh (const xt::xtensor< double, 2 > &A) | 
|   | 
| xt::xarray< double, xt::layout_type::column_major >  | solve (const xt::xtensor< double, 2 > &A, const xt::xarray< double > &B) | 
|   | 
| bool  | is_singular (const xt::xtensor< double, 2 > &A) | 
|   | 
| void  | dot (const xt::xtensor< double, 2 > &A, const xt::xtensor< double, 2 > &B, xt::xtensor< double, 2 > &C) | 
|   | 
| xt::xtensor< double, 2 >  | dot (const xt::xtensor< double, 2 > &A, const xt::xtensor< double, 2 > &B) | 
|   | 
Mathematical functions. 
- Note
 - The functions in this namespace are designed to be called multiple times at runtime, so their performance is critical. 
 
 
◆ cross()
template<typename U , typename V > 
      
        
          | xt::xtensor_fixed<typename U::value_type, xt::xshape<3> > basix::math::cross  | 
          ( | 
          const U &  | 
          u,  | 
        
        
           | 
           | 
          const V &  | 
          v  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Compute the cross product u x v 
- Parameters
 - 
  
    | u | The first vector. It must has size 3.  | 
    | v | The second vector. It must has size 3.  | 
  
   
- Returns
 - The cross product 
u x v. The type will be the same as u.  
 
 
◆ dot() [1/2]
      
        
          | xt::xtensor< double, 2 > basix::math::dot  | 
          ( | 
          const xt::xtensor< double, 2 > &  | 
          A,  | 
        
        
           | 
           | 
          const xt::xtensor< double, 2 > &  | 
          B  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Compute C = A * B 
- Parameters
 - 
  
    | [in] | A | Input matrix  | 
    | [in] | B | Input matrix return A * B  | 
  
   
 
 
◆ dot() [2/2]
      
        
          | void basix::math::dot  | 
          ( | 
          const xt::xtensor< double, 2 > &  | 
          A,  | 
        
        
           | 
           | 
          const xt::xtensor< double, 2 > &  | 
          B,  | 
        
        
           | 
           | 
          xt::xtensor< double, 2 > &  | 
          C  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Compute C = A * B 
- Parameters
 - 
  
    | [in] | A | Input matrix  | 
    | [in] | B | Input matrix  | 
    | [in,out] | C | The output matrix  | 
  
   
 
 
◆ eigh()
      
        
          | std::pair< xt::xtensor< double, 1 >, xt::xtensor< double, 2, xt::layout_type::column_major > > basix::math::eigh  | 
          ( | 
          const xt::xtensor< double, 2 > &  | 
          A | ) | 
           | 
        
      
 
Compute the eigenvalues and eigenvectors of a square Hermitian matrix A 
- Parameters
 - 
  
  
 
- Returns
 - Eigenvalues and eigenvectors 
 
 
 
◆ is_singular()
      
        
          | bool basix::math::is_singular  | 
          ( | 
          const xt::xtensor< double, 2 > &  | 
          A | ) | 
           | 
        
      
 
Check if A is a singular matrix 
- Parameters
 - 
  
  
 
- Returns
 - A bool indicating if the matrix is singular 
 
 
 
◆ outer()
template<typename U , typename V > 
      
        
          | xt::xtensor<typename U::value_type, 2> basix::math::outer  | 
          ( | 
          const U &  | 
          u,  | 
        
        
           | 
           | 
          const V &  | 
          v  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Compute the outer product of vectors u and v 
- Parameters
 - 
  
    | u | The first vector. It must has size 3.  | 
    | v | The second vector. It must has size 3.  | 
  
   
- Returns
 - The outer product. The type will be the same as 
u.  
 
 
◆ solve()
      
        
          | xt::xarray< double, xt::layout_type::column_major > basix::math::solve  | 
          ( | 
          const xt::xtensor< double, 2 > &  | 
          A,  | 
        
        
           | 
           | 
          const xt::xarray< double > &  | 
          B  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Solve A X = B 
- Parameters
 - 
  
    | [in] | A | The matrix  | 
    | [in] | B | Right-hand side matrix/vector  | 
  
   
- Returns
 - A^{-1} B