Documentation ¶
Overview ¶
Package tsr implements Tensors using the smart approach by considering the Mandel's basis
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SecToManI converts i-j-indices of 3x3 2nd order (symmetric) tensor to I-index in Mandel's representation SecToManI = [][]int{ {0, 3, 5}, {3, 1, 4}, {5, 4, 2}, } // SecToVecI converts i-j-indices of 3x3 2nd order (symmetric) tensor to I-index in vector representation SecToVecI = [][]int{ {0, 3, 5}, {6, 1, 4}, {8, 7, 2}, } // FouToManI converts i-j-k-l-indices of 3x3x3x3 4th order (full-symmetric) tensor to I-index in Mandel's representation FouToManI = [][][][]int{ { {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, {{3, 3, 3}, {3, 3, 3}, {3, 3, 3}}, {{5, 5, 5}, {5, 5, 5}, {5, 5, 5}}, }, { {{3, 3, 3}, {3, 3, 3}, {3, 3, 3}}, {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}, {{4, 4, 4}, {4, 4, 4}, {4, 4, 4}}, }, { {{5, 5, 5}, {5, 5, 5}, {5, 5, 5}}, {{4, 4, 4}, {4, 4, 4}, {4, 4, 4}}, {{2, 2, 2}, {2, 2, 2}, {2, 2, 2}}, }, } // FouToManJ converts i-j-k-l-indices of 3x3x3x3 4th order (full-symmetric) tensor to J-index in Mandel's representation FouToManJ = [][][][]int{ { {{0, 3, 5}, {3, 1, 4}, {5, 4, 2}}, {{0, 3, 5}, {3, 1, 4}, {5, 4, 2}}, {{0, 3, 5}, {3, 1, 4}, {5, 4, 2}}, }, { {{0, 3, 5}, {3, 1, 4}, {5, 4, 2}}, {{0, 3, 5}, {3, 1, 4}, {5, 4, 2}}, {{0, 3, 5}, {3, 1, 4}, {5, 4, 2}}, }, { {{0, 3, 5}, {3, 1, 4}, {5, 4, 2}}, {{0, 3, 5}, {3, 1, 4}, {5, 4, 2}}, {{0, 3, 5}, {3, 1, 4}, {5, 4, 2}}, }, } // FouToVecI converts i-j-k-l-indices of 3x3x3x3 4th order tensor to I-index in Vector representation FouToVecI = [][][][]int{ { {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, {{3, 3, 3}, {3, 3, 3}, {3, 3, 3}}, {{5, 5, 5}, {5, 5, 5}, {5, 5, 5}}, }, { {{6, 6, 6}, {6, 6, 6}, {6, 6, 6}}, {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}, {{4, 4, 4}, {4, 4, 4}, {4, 4, 4}}, }, { {{8, 8, 8}, {8, 8, 8}, {8, 8, 8}}, {{7, 7, 7}, {7, 7, 7}, {7, 7, 7}}, {{2, 2, 2}, {2, 2, 2}, {2, 2, 2}}, }, } // FouToVecJ converts i-j-k-l-indices of 3x3x3x3 4th order tensor to J-index in Vector representation FouToVecJ = [][][][]int{ { {{0, 3, 5}, {6, 1, 4}, {8, 7, 2}}, {{0, 3, 5}, {6, 1, 4}, {8, 7, 2}}, {{0, 3, 5}, {6, 1, 4}, {8, 7, 2}}, }, { {{0, 3, 5}, {6, 1, 4}, {8, 7, 2}}, {{0, 3, 5}, {6, 1, 4}, {8, 7, 2}}, {{0, 3, 5}, {6, 1, 4}, {8, 7, 2}}, }, { {{0, 3, 5}, {6, 1, 4}, {8, 7, 2}}, {{0, 3, 5}, {6, 1, 4}, {8, 7, 2}}, {{0, 3, 5}, {6, 1, 4}, {8, 7, 2}}, }, } // ManToSecI converts I-index in Mandel's representation to i-index of 3x3 2nd order tensor ManToSecI = []int{0, 1, 2, 0, 1, 0} // ManToSecJ converts I-index in Mandel's representation to j-index of 3x3 2nd order tensor ManToSecJ = []int{0, 1, 2, 1, 2, 2} // SecIdenMan is the 3x3 2nd order identity tensor in Mandel's representation SecIdenMan = []float64{1, 1, 1, 0, 0, 0} // FouIdenMan is the 4th order identity tensor (symmetric) in Mandel's representation FouIdenMan = [][]float64{ {1, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 1}, } // FouPsdMan is the 4th order symmetric-deviatoric projector (3D) in Mandel's representation FouPsdMan = [][]float64{ {+ttrd, -otrd, -otrd, 0, 0, 0}, {-otrd, +ttrd, -otrd, 0, 0, 0}, {-otrd, -otrd, +ttrd, 0, 0, 0}, {0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 1}, } // FouPisoMan is the 4th order isotropic projector (3D) in Mandel's representation FouPisoMan = [][]float64{ {otrd, otrd, otrd, 0, 0, 0}, {otrd, otrd, otrd, 0, 0, 0}, {otrd, otrd, otrd, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, } // IdenMat9x9 is the identity matrix with rows up to 9 IdenMat9x9 = [][]float64{ {1, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 1}, } )
Functions ¶
This section is empty.
Types ¶
type Tensor2 ¶ added in v1.1.0
type Tensor2 struct {
// contains filtered or unexported fields
}
Tensor2 holds the (Orthonormal/Cartesian) components of a 2nd order tensor, symmetric or not
func NewTensor2 ¶ added in v1.1.0
NewTensor2 returns a new Tensor2 object NOTE: if !symmetric all components are used and twoD flag is ignored
type Tensor4 ¶ added in v1.1.0
type Tensor4 struct {
// contains filtered or unexported fields
}
Tensor4 holds the (Orthonormal/Cartesian) components of a 4th order tensor, full-symmetric or not. NOTE: "full-symmetric" hear means major and minor symmetry, where:
A[i][j][k][l] = A[j][i][k][l] = A[i][j][l][k] i.e. [i][j] and [k][l] can be swapped
func NewTensor4 ¶ added in v1.1.0
NewTensor4 returns a new Tensor4 object NOTE: if !symmetric all components are used and twoD flag is ignored
Click to show internal directories.
Click to hide internal directories.