GEOSX
Namespaces | Variables
genericTensorOps.hpp File Reference

Contains the implementation of arbitrary sized vector and matrix operations. More...

#include "ArraySlice.hpp"
#include "math.hpp"

Go to the source code of this file.

Namespaces

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

Macros

Initialization and assignment macros.

Macros that aid in to initializng and assigning to common vector and matrix sizes.

Use these macros to initialize c-arrays from other c-arrays or Array objects and to assign to either c-arrays or Array objects. Usage:

int vectorA[ 3 ] = { 0, 1, 2 };
int const vectorACopy[ 3 ] = LVARRAY_TENSOROPS_INIT_LOCAL_3( vectorA );
LVARRAY_TENSOROPS_ASSIGN_2( vectorA, 5, 3 );
Array< double, 2, ... > arrayOfMatrices( JSIZE, 2, 2 );
double matrix[ 2 ][ 2 ] = LVARRAY_TENSOROPS_INIT_LOCAL_2x2( arrayOfMatrices[ 0 ] );
LVARRAY_TENSOROPS_ASSIGN_2x2( arrayOfMatrices[ 0 ], a00, a01, a10, a11 );

Note that since these are macros expressions and not just variables can be passed.

int vectorA[ 3 ] = { 0, 1, 2 };
int const vectorATimes2[ 3 ] = LVARRAY_TENSOROPS_INIT_LOCAL_3( 2 * vectorA );
Note
No bounds checking is done on the provided expression.
#define LVARRAY_TENSOROPS_INIT_LOCAL_2(EXP)   { EXP[ 0 ], EXP[ 1 ] }
 Create an initializer list of length 2 from EXP. More...
 
#define LVARRAY_TENSOROPS_ASSIGN_2(var, exp0, exp1)   var[ 0 ] = exp0; var[ 1 ] = exp1
 Assign to the length 2 vector var. More...
 
#define LVARRAY_TENSOROPS_INIT_LOCAL_3(EXP)   { EXP[ 0 ], EXP[ 1 ], EXP[ 2 ] }
 Create an initializer list of length 3 from EXP. More...
 
#define LVARRAY_TENSOROPS_ASSIGN_3(var, exp0, exp1, exp2)   var[ 0 ] = exp0; var[ 1 ] = exp1; var[ 2 ] = exp2
 Assign to the length 3 vector var. More...
 
#define LVARRAY_TENSOROPS_INIT_LOCAL_6(EXP)   { EXP[ 0 ], EXP[ 1 ], EXP[ 2 ], EXP[ 3 ], EXP[ 4 ], EXP[ 5 ] }
 Create an initializer list of length 6 from EXP. More...
 
#define LVARRAY_TENSOROPS_ASSIGN_6(var, exp0, exp1, exp2, exp3, exp4, exp5)   var[ 0 ] = exp0; var[ 1 ] = exp1; var[ 2 ] = exp2; var[ 3 ] = exp3; var[ 4 ] = exp4; var[ 5 ] = exp5
 Assign to the length 6 vector var. More...
 
#define LVARRAY_TENSOROPS_INIT_LOCAL_2x2(EXP)
 Create an 2x2 initializer list from EXP. More...
 
#define LVARRAY_TENSOROPS_ASSIGN_2x2(var, exp00, exp01, exp10, exp11)
 Assign to the 2x2 matrix var. More...
 
#define LVARRAY_TENSOROPS_INIT_LOCAL_3x3(EXP)
 Create an 3x3 initializer list from EXP. More...
 
#define LVARRAY_TENSOROPS_ASSIGN_3x3(var, exp00, exp01, exp02, exp10, exp11, exp12, exp20, exp21, exp22)
 Assign to the 3x3 matrix var. More...
 

Functions

Generic operations

Functions that are overloaded to operate on both vectors and matrices.

Note
Not all of the functions have been overloaded to operate on both vectors and matrices.
template<std::ptrdiff_t ISIZE, typename VECTOR >
constexpr auto LvArray::tensorOps::maxAbsoluteEntry (VECTOR &&vector)
 
template<std::ptrdiff_t ISIZE, typename VECTOR >
constexpr void LvArray::tensorOps::fill (VECTOR &&vector, std::remove_reference_t< decltype(vector[0]) > const value)
 Set the entries of vector to value. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename MATRIX >
constexpr void LvArray::tensorOps::fill (MATRIX &&matrix, std::remove_reference_t< decltype(matrix[0][0]) > const value)
 Set the entries of matrix to value. More...
 
template<std::ptrdiff_t ISIZE, typename DST_VECTOR , typename SRC_VECTOR >
constexpr void LvArray::tensorOps::copy (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, SRC_VECTOR const &LVARRAY_RESTRICT_REF srcVector)
 Copy srcVector into dstVector. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_MATRIX , typename SRC_MATRIX >
constexpr void LvArray::tensorOps::copy (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, SRC_MATRIX const &LVARRAY_RESTRICT_REF srcMatrix)
 Copy srcMatrix into dstMatrix. More...
 
template<std::ptrdiff_t ISIZE, typename VECTOR >
constexpr void LvArray::tensorOps::scale (VECTOR &&vector, std::remove_reference_t< decltype(vector[0]) > const scale)
 Multiply the entries of vector by scale. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename MATRIX >
constexpr void LvArray::tensorOps::scale (MATRIX &&matrix, std::remove_reference_t< decltype(matrix[0][0]) > const scale)
 Multiply the entries of matrix by scale. More...
 
template<std::ptrdiff_t ISIZE, typename DST_VECTOR , typename SRC_VECTOR >
constexpr void LvArray::tensorOps::scaledCopy (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, SRC_VECTOR const &LVARRAY_RESTRICT_REF srcVector, std::remove_reference_t< decltype(srcVector[0]) > const scale)
 Copy srcVector scaled by scale into dstVector. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_MATRIX , typename SRC_MATRIX >
constexpr void LvArray::tensorOps::scaledCopy (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, SRC_MATRIX const &LVARRAY_RESTRICT_REF srcMatrix, std::remove_reference_t< decltype(srcMatrix[0][0]) > const scale)
 Copy srcMatrix scaled by scale into dstMatrix. More...
 
template<std::ptrdiff_t M, typename DST_VECTOR >
constexpr void LvArray::tensorOps::addScalar (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, std::remove_reference_t< decltype(dstVector[0]) > const value)
 Add value to dstVector. More...
 
template<std::ptrdiff_t ISIZE, typename DST_VECTOR , typename SRC_VECTOR >
constexpr void LvArray::tensorOps::add (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, SRC_VECTOR const &LVARRAY_RESTRICT_REF srcVector)
 Add srcVector to dstVector. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_MATRIX , typename SRC_MATRIX >
constexpr void LvArray::tensorOps::add (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, SRC_MATRIX const &LVARRAY_RESTRICT_REF srcMatrix)
 Add srcMatrix to dstMatrix. More...
 
template<std::ptrdiff_t ISIZE, typename DST_VECTOR , typename SRC_VECTOR >
constexpr void LvArray::tensorOps::subtract (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, SRC_VECTOR const &LVARRAY_RESTRICT_REF srcVector)
 Subtract srcVector from dstVector. More...
 
template<std::ptrdiff_t ISIZE, typename DST_VECTOR , typename SRC_VECTOR >
constexpr void LvArray::tensorOps::scaledAdd (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, SRC_VECTOR const &LVARRAY_RESTRICT_REF srcVector, std::remove_reference_t< decltype(srcVector[0]) > const scale)
 Add srcVector scaled by scale to dstVector. More...
 
template<std::ptrdiff_t ISIZE, typename DST_VECTOR , typename VECTOR_A , typename VECTOR_B >
constexpr void LvArray::tensorOps::hadamardProduct (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, VECTOR_A const &LVARRAY_RESTRICT_REF vectorA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB)
 Multiply the elements of vectorA and vectorB putting the result into dstVector. More...
 
Vector operations

Functions that operate on vectors.

template<std::ptrdiff_t ISIZE, typename VECTOR >
constexpr auto LvArray::tensorOps::l2NormSquared (VECTOR const &vector)
 
template<std::ptrdiff_t ISIZE, typename VECTOR >
constexpr auto LvArray::tensorOps::l2Norm (VECTOR const &vector)
 
template<std::ptrdiff_t ISIZE, typename VECTOR >
constexpr auto LvArray::tensorOps::normalize (VECTOR &&vector)
 Scale vector to a unit vector. More...
 
template<std::ptrdiff_t JSIZE, typename VECTOR_A , typename VECTOR_B >
constexpr auto LvArray::tensorOps::AiBi (VECTOR_A const &LVARRAY_RESTRICT_REF vectorA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB)
 
template<typename DST_VECTOR , typename VECTOR_A , typename VECTOR_B >
constexpr void LvArray::tensorOps::crossProduct (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, VECTOR_A const &LVARRAY_RESTRICT_REF vectorA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB)
 Compute the cross product of vectorA and vectorB and put it in dstVector. More...
 
Matrix-vector operations

Functions that operate on matrices and vectors.

template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_MATRIX , typename VECTOR_A , typename VECTOR_B >
constexpr void LvArray::tensorOps::Rij_eq_AiBj (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, VECTOR_A const &LVARRAY_RESTRICT_REF vectorA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB)
 Perform the outer product of vectorA and vectorB writing the result to dstMatrix. More...
 
template<std::ptrdiff_t M, typename DST_MATRIX , typename VECTOR_A >
constexpr void LvArray::tensorOps::Rij_eq_AiAj (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, VECTOR_A const &LVARRAY_RESTRICT_REF vectorA)
 Perform the outer product of vectorA with itself writing the result to dstMatrix. More...
 
template<std::ptrdiff_t JSIZE, std::ptrdiff_t ISIZE, typename DST_MATRIX , typename VECTOR_A , typename VECTOR_B >
constexpr void LvArray::tensorOps::Rij_add_AiBj (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, VECTOR_A const &LVARRAY_RESTRICT_REF vectorA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB)
 Perform the outer product of vectorA and vectorB adding the result to dstMatrix. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_VECTOR , typename MATRIX_A , typename VECTOR_B >
constexpr void LvArray::tensorOps::Ri_eq_AijBj (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB)
 Perform the matrix vector multiplication of matrixA and vectorB writing the result to dstVector. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_VECTOR , typename MATRIX_A , typename VECTOR_B >
constexpr void LvArray::tensorOps::Ri_add_AijBj (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB)
 Perform the matrix vector multiplication of matrixA and vectorB adding the result to dstVector. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_VECTOR , typename MATRIX_A , typename VECTOR_B >
constexpr void LvArray::tensorOps::Ri_eq_AjiBj (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB)
 Perform the matrix vector multiplication of the transpose of matrixA and vectorB writing the result to dstVector. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_VECTOR , typename MATRIX_A , typename VECTOR_B >
constexpr void LvArray::tensorOps::Ri_add_AjiBj (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB)
 Perform the matrix vector multiplication of the transpose of matrixA and vectorB adding the result to dstVector. More...
 
Matrix operations

Functions that operate matrices of any shape.

template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_MATRIX , typename SRC_MATRIX >
constexpr void LvArray::tensorOps::transpose (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, SRC_MATRIX const &LVARRAY_RESTRICT_REF srcMatrix)
 Store the transpose of the NxM matrix srcMatrix in dstMatrix. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, std::ptrdiff_t KSIZE, typename DST_MATRIX , typename MATRIX_A , typename MATRIX_B >
constexpr void LvArray::tensorOps::Rij_eq_AikBkj (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, MATRIX_B const &LVARRAY_RESTRICT_REF matrixB)
 Multiply matrixA with matrixB and put the result into dstMatrix. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, std::ptrdiff_t KSIZE, typename DST_MATRIX , typename MATRIX_A , typename MATRIX_B >
constexpr void LvArray::tensorOps::Rij_add_AikBkj (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, MATRIX_B const &LVARRAY_RESTRICT_REF matrixB)
 Multiply matrixA with matrixB and add the result to dstMatrix. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, std::ptrdiff_t KSIZE, typename DST_MATRIX , typename MATRIX_A , typename MATRIX_B >
constexpr void LvArray::tensorOps::Rij_eq_AikBjk (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, MATRIX_B const &LVARRAY_RESTRICT_REF matrixB)
 Multiply matrixA with the transpose of matrixB and put the result into dstMatrix. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, std::ptrdiff_t KSIZE, typename DST_MATRIX , typename MATRIX_A , typename MATRIX_B >
constexpr void LvArray::tensorOps::Rij_add_AikBjk (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, MATRIX_B const &LVARRAY_RESTRICT_REF matrixB)
 Multiply matrixA with the transpose of matrixB and put the result into dstMatrix. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_MATRIX , typename MATRIX_A >
constexpr void LvArray::tensorOps::Rij_add_AikAjk (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA)
 Multiply matrixA with the transpose of itself and put the result into dstMatrix. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, std::ptrdiff_t KSIZE, typename DST_MATRIX , typename MATRIX_A , typename MATRIX_B >
constexpr void LvArray::tensorOps::Rij_eq_AkiBkj (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, MATRIX_B const &LVARRAY_RESTRICT_REF matrixB)
 Multiply the transpose of matrixA with matrixB and put the result into dstMatrix. More...
 
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, std::ptrdiff_t KSIZE, typename DST_MATRIX , typename MATRIX_A , typename MATRIX_B >
constexpr void LvArray::tensorOps::Rij_add_AkiBkj (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, MATRIX_B const &LVARRAY_RESTRICT_REF matrixB)
 Multiply the transpose of matrixA with matrixB and add the result into dstMatrix. More...
 
Square matrix operations

Functions that operate on square matrices of any size.

template<std::ptrdiff_t ISIZE, typename MATRIX >
constexpr void LvArray::tensorOps::transpose (MATRIX &&LVARRAY_RESTRICT_REF matrix)
 Transpose the MxM matrix matrix. More...
 
template<std::ptrdiff_t ISIZE, typename MATRIX >
constexpr void LvArray::tensorOps::addIdentity (MATRIX &&matrix, std::remove_reference_t< decltype(matrix[0][0]) > const scale)
 Add scale times the identity matrix to matrix. More...
 
template<std::ptrdiff_t ISIZE, typename MATRIX >
constexpr auto LvArray::tensorOps::trace (MATRIX const &matrix)
 
Symmetric matrix operations

Functions that operate on symmetric matrices of any size.

template<std::ptrdiff_t ISIZE, typename SYM_MATRIX >
constexpr void LvArray::tensorOps::symAddIdentity (SYM_MATRIX &&symMatrix, std::remove_reference_t< decltype(symMatrix[0]) > const scale)
 Add scale times the identity matrix to symMatrix. More...
 
template<std::ptrdiff_t ISIZE, typename SYM_MATRIX >
constexpr auto LvArray::tensorOps::symTrace (SYM_MATRIX const &symMatrix)
 

Variables

template<std::ptrdiff_t ISIZE>
constexpr std::ptrdiff_t LvArray::tensorOps::SYM_SIZE = ( ISIZE * ( ISIZE + 1 ) ) / 2
 The size of a symmetric MxM matrix in Voigt notation.
 

Detailed Description

Contains the implementation of arbitrary sized vector and matrix operations.

Definition in file genericTensorOps.hpp.

Macro Definition Documentation

◆ LVARRAY_TENSOROPS_ASSIGN_2

#define LVARRAY_TENSOROPS_ASSIGN_2 (   var,
  exp0,
  exp1 
)    var[ 0 ] = exp0; var[ 1 ] = exp1

Assign to the length 2 vector var.

Parameters
varThe vector of length 2 to assign to.
exp0The value to assign to var[ 0 ].
exp1The value to assign to var[ 1 ].

Definition at line 57 of file genericTensorOps.hpp.

◆ LVARRAY_TENSOROPS_ASSIGN_2x2

#define LVARRAY_TENSOROPS_ASSIGN_2x2 (   var,
  exp00,
  exp01,
  exp10,
  exp11 
)
Value:
var[ 0 ][ 0 ] = exp00; var[ 0 ][ 1 ] = exp01; \
var[ 1 ][ 0 ] = exp10; var[ 1 ][ 1 ] = exp11

Assign to the 2x2 matrix var.

Parameters
varThe 2x2 matrix to assign to.
exp00The value to assign to var[ 0 ][ 0 ].
exp01The value to assign to var[ 0 ][ 1 ].
exp10The value to assign to var[ 1 ][ 0 ].
exp11The value to assign to var[ 1 ][ 1 ].

Definition at line 111 of file genericTensorOps.hpp.

◆ LVARRAY_TENSOROPS_ASSIGN_3

#define LVARRAY_TENSOROPS_ASSIGN_3 (   var,
  exp0,
  exp1,
  exp2 
)    var[ 0 ] = exp0; var[ 1 ] = exp1; var[ 2 ] = exp2

Assign to the length 3 vector var.

Parameters
varThe vector of length 3 to assign to.
exp0The value to assign to var[ 0 ].
exp1The value to assign to var[ 1 ].
exp2The value to assign to var[ 2 ].

Definition at line 73 of file genericTensorOps.hpp.

◆ LVARRAY_TENSOROPS_ASSIGN_3x3

#define LVARRAY_TENSOROPS_ASSIGN_3x3 (   var,
  exp00,
  exp01,
  exp02,
  exp10,
  exp11,
  exp12,
  exp20,
  exp21,
  exp22 
)
Value:
var[ 0 ][ 0 ] = exp00; var[ 0 ][ 1 ] = exp01; var[ 0 ][ 2 ] = exp02; \
var[ 1 ][ 0 ] = exp10; var[ 1 ][ 1 ] = exp11; var[ 1 ][ 2 ] = exp12; \
var[ 2 ][ 0 ] = exp20; var[ 2 ][ 1 ] = exp21; var[ 2 ][ 2 ] = exp22

Assign to the 3x3 matrix var.

Parameters
varThe 3x3 matrix to assign to.
exp00The value to assign to var[ 0 ][ 0 ].
exp01The value to assign to var[ 0 ][ 1 ].
exp02The value to assign to var[ 0 ][ 2 ].
exp10The value to assign to var[ 1 ][ 0 ].
exp11The value to assign to var[ 1 ][ 1 ].
exp12The value to assign to var[ 1 ][ 2 ].
exp20The value to assign to var[ 2 ][ 0 ].
exp21The value to assign to var[ 2 ][ 1 ].
exp22The value to assign to var[ 2 ][ 2 ].

Definition at line 137 of file genericTensorOps.hpp.

◆ LVARRAY_TENSOROPS_ASSIGN_6

#define LVARRAY_TENSOROPS_ASSIGN_6 (   var,
  exp0,
  exp1,
  exp2,
  exp3,
  exp4,
  exp5 
)    var[ 0 ] = exp0; var[ 1 ] = exp1; var[ 2 ] = exp2; var[ 3 ] = exp3; var[ 4 ] = exp4; var[ 5 ] = exp5

Assign to the length 6 vector var.

Parameters
varThe vector of length 6 to assign to.
exp0The value to assign to var[ 0 ].
exp1The value to assign to var[ 1 ].
exp2The value to assign to var[ 2 ].
exp3The value to assign to var[ 3 ].
exp4The value to assign to var[ 4 ].
exp5The value to assign to var[ 5 ].

Definition at line 92 of file genericTensorOps.hpp.

◆ LVARRAY_TENSOROPS_INIT_LOCAL_2

#define LVARRAY_TENSOROPS_INIT_LOCAL_2 (   EXP)    { EXP[ 0 ], EXP[ 1 ] }

Create an initializer list of length 2 from EXP.

Parameters
EXPThe expression used to create the initialize list.

Definition at line 49 of file genericTensorOps.hpp.

◆ LVARRAY_TENSOROPS_INIT_LOCAL_2x2

#define LVARRAY_TENSOROPS_INIT_LOCAL_2x2 (   EXP)
Value:
{ { EXP[ 0 ][ 0 ], EXP[ 0 ][ 1 ] }, \
{ EXP[ 1 ][ 0 ], EXP[ 1 ][ 1 ] } }

Create an 2x2 initializer list from EXP.

Parameters
EXPThe expression used to create the initialize list.

Definition at line 99 of file genericTensorOps.hpp.

◆ LVARRAY_TENSOROPS_INIT_LOCAL_3

#define LVARRAY_TENSOROPS_INIT_LOCAL_3 (   EXP)    { EXP[ 0 ], EXP[ 1 ], EXP[ 2 ] }

Create an initializer list of length 3 from EXP.

Parameters
EXPThe expression used to create the initialize list.

Definition at line 64 of file genericTensorOps.hpp.

◆ LVARRAY_TENSOROPS_INIT_LOCAL_3x3

#define LVARRAY_TENSOROPS_INIT_LOCAL_3x3 (   EXP)
Value:
{ { EXP[ 0 ][ 0 ], EXP[ 0 ][ 1 ], EXP[ 0 ][ 2 ] }, \
{ EXP[ 1 ][ 0 ], EXP[ 1 ][ 1 ], EXP[ 1 ][ 2 ] }, \
{ EXP[ 2 ][ 0 ], EXP[ 2 ][ 1 ], EXP[ 2 ][ 2 ] } }

Create an 3x3 initializer list from EXP.

Parameters
EXPThe expression used to create the initialize list.

Definition at line 119 of file genericTensorOps.hpp.

◆ LVARRAY_TENSOROPS_INIT_LOCAL_6

#define LVARRAY_TENSOROPS_INIT_LOCAL_6 (   EXP)    { EXP[ 0 ], EXP[ 1 ], EXP[ 2 ], EXP[ 3 ], EXP[ 4 ], EXP[ 5 ] }

Create an initializer list of length 6 from EXP.

Parameters
EXPThe expression used to create the initialize list.

Definition at line 80 of file genericTensorOps.hpp.