LvArray
Classes | Namespaces | Functions
fixedSizeSquareMatrixOpsImpl.hpp File Reference

Contains the implementation of the 2x2 and 3x3 matrix operations. More...

#include "genericTensorOps.hpp"
Include dependency graph for fixedSizeSquareMatrixOpsImpl.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  LvArray::tensorOps::internal::SquareMatrixOps< M >
 Performs operations on square matrices. More...
 
struct  LvArray::tensorOps::internal::SquareMatrixOps< 2 >
 Performs operations on 2x2 square matrices. More...
 
struct  LvArray::tensorOps::internal::SquareMatrixOps< 3 >
 Performs operations on 3x3 square matrices. More...
 

Namespaces

 LvArray
 The top level namespace.
 
 LvArray::tensorOps
 Contains operations for operating on compile time sized vectors and matrices.
 

Functions

template<std::ptrdiff_t M, typename FloatingPoint >
static LVARRAY_HOST_DEVICE void LvArray::tensorOps::internal::shiftAndScale (FloatingPoint(&matrix)[(M *(M+1))/2], FloatingPoint &shift, FloatingPoint &maxEntryAfterShift)
 Shift the and scale the MxM symmetric matrix matrix. More...
 

Detailed Description

Contains the implementation of the 2x2 and 3x3 matrix operations.

Function Documentation

◆ shiftAndScale()

template<std::ptrdiff_t M, typename FloatingPoint >
static LVARRAY_HOST_DEVICE void LvArray::tensorOps::internal::shiftAndScale ( FloatingPoint(&)  matrix[(M *(M+1))/2],
FloatingPoint &  shift,
FloatingPoint &  maxEntryAfterShift 
)
inlinestatic

Shift the and scale the MxM symmetric matrix matrix.

Template Parameters
MThe size of the matrix.
FloatingPointA floating point type.
Parameters
matrixThe matrix to shift and scale.
shiftThe amount the matrix is shifted.
maxEntryAfterShiftThe amount the matrix is scaled by after the shift.
Note
The resulting matrix is guaranteed to have a zero trace and its entries will be in [-2, 2].
The size of matrix is SYM_SIZE< M >, but the intel compiler complains so the calculation must be inlined.