JDFTx  1.7.0
tensor3.h File Reference

Symmetric traceless tensor with CPU and GPU operators. More...

#include <core/matrix3.h>

Classes

class  tensor3< scalar >
 Symmetric traceless rank-2 tensor in 3D. More...
 

Macros

#define LOOP5(code)   { for(int k=0; k<5; k++) { code } }
 

Functions

template<typename scalar >
__hostanddev__ tensor3< scalar > operator* (scalar s, const tensor3< scalar > &a)
 
template<typename scalar >
__hostanddev__ tensor3< scalar > operator* (const tensor3< scalar > &a, scalar s)
 
template<typename scalar >
__hostanddev__ tensor3< scalar > loadTensor (const tensor3< const scalar * > &tArr, int i)
 Load tensor from a constant tensor field.
 
template<typename scalar >
__hostanddev__ tensor3< scalar > loadTensor (const tensor3< scalar * > &tArr, int i)
 Load tensor from a tensor field.
 
template<typename scalar >
__hostanddev__ void storeTensor (const tensor3< scalar > &t, tensor3< scalar * > &tArr, int i)
 Store tensor to a tensor field.
 
template<typename scalar >
__hostanddev__ void accumTensor (const tensor3< scalar > &t, tensor3< scalar * > &tArr, int i)
 Accumulate tensor onto a tensor field.
 

Detailed Description

Symmetric traceless tensor with CPU and GPU operators.