Skip to content

Tensor Storage Format #2207

Answered by jab0707
jab0707 asked this question in Q&A
Dec 7, 2020 · 4 comments · 4 replies
Discussion options

You must be logged in to vote

Ok So I dove into the code and figured it out. Using the tensor() function in the SCIRun API we can create a scirun tensor. There are various inputs but lets say we are using the tensor(vector, vector, scalar, scalar) input.
T = tesnor(V1,V2,S1,S2)
In this case V1 and V2 are column vectors describing the primary and secondary directions of the tensor, while S1 and S2 are the conductivities/scales for those directions. The match that SCIRun does is equivalent to the following:

  1. create a third vector V3 such that V3 = cross(V1,V2)
  2. create a matrix V = [V1,V2,V3]
  3. create a matrix S = [S1, 0, 0; 0, S2, 0; 0, 0, S3] where S3 = S2
  4. compute the tensor T as T = M@S@M^T where @ is matrix multiplicati…

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@jab0707
Comment options

@dcwhite
Comment options

@jab0707
Comment options

Comment options

You must be logged in to vote
1 reply
@tarkpate
Comment options

Answer selected by jab0707
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants