Questions tagged [tensor]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
49 views

4th order tensor rotation - sources to refer

I am trying to model a linear elastic material in Abaqus using UMAT. For my application, I need to rotate the 6x6 compliance matrix for a given set of eigenvectors (or a rotation matrix). I came ...
0
votes
0answers
41 views

Gradient of dot product of two tensors

Through obtaining an alternative form for force balance equation in a fluid mechanics problem, I stopped at a point where I have to prove this identity where $A$ and $B$ are second-order matrices:$$\...
-1
votes
1answer
41 views

Numpys `tensordot` and what is happening mathematically

I've encountered a program where np.tensordot was used, so I tried looking it up but I can't really understand what this function is doing... I feel rather ...
3
votes
1answer
63 views

Compute distances from a vector to a matrix of vectors

Let $\vec{a} \in \mathbb{R}^\alpha$, and let $H$ be a rank 3 tensor with dimensions $M_{[i \in \mathbb{N}]} \times N_{[j \in \mathbb{N}]} \times \alpha_{[k \in \mathbb{N}]}$ (where the subscript are ...
1
vote
0answers
26 views

Second fundamental form - Maple

I would like to know the command/line in Maple 16 or similar to obtain the second fundamental form tensor for a given metric. I've managed to obtain Rienmann and Ricci tensor, even Weyl, but I can't ...
4
votes
1answer
306 views

Is there a library that allows einstein summation on dense, sparse, and LinearOperator type tensors

Numpy's einsum only works with dense tensors. Is there an alternative that also works with sparse tensors and linear operators? For example, I might have a ...
1
vote
0answers
66 views

How to get the derivatives of the determinant and inverse of 2nd-order tensor wrt itself in SymPy?

I have a second-order tensor for which I need to compute the derivatives of its determinant and inverse w.r.t. itself. The equations are as follows: $$\frac{\partial \, det(\mathbf{F})}{\partial F_{...
0
votes
1answer
130 views

Computing excited states using itensor (with DMRG)

I am trying to compute first few excited states of some Hamiltonian (I am using itensor and its DMRG algorithm). To do so, I am ...
0
votes
2answers
114 views

Second derivative in coordinate invariant form

To solve stationary, incompressible, inviscid and irrotational flow around a circular cylinder, I am using general coordinates. Since the flow is symmetrical, we only consider the upper half of the ...
1
vote
1answer
115 views

triple cross prouct of tensor

Im trying to compute a triple cross product of vectors a,b, and c in real space and integrate over the entire space. The result is a term in the hamiltonian for an electronic system so there are ...
1
vote
2answers
724 views

Derivative of the inverse of the Right Cauchy-Green Deformation Tensor wrt itself

In continuum mechanics, we define the Right-Cauchy-Green Deformation Tensor as $\boldsymbol{C}=\boldsymbol{F}^T\boldsymbol{F}$ I want to compute $\frac{\partial \boldsymbol{C}^{-1}}{\partial \...
1
vote
0answers
92 views

Efficient out-of-place arbitrary rank GPU transpose

Summary: Is there an efficient out-of-place GPU tensor transpose operation that scales as $O(n)$ for tensors with $n$ total elements, regardless of the rank $d$? The naive algorithm costs $O(dn)$, ...
5
votes
3answers
1k views

Efficiently computing the product of a multi-dimensional matrix (or tensor) and vectors

Update: Thank you very much for all of you who answered below. I'm studying each answer now. In the long term, I'm more interested in solutions that work for sparse tensors (sorry I should have ...
1
vote
1answer
100 views

Binary tensor operations in Nutils [closed]

How does one write general tensor contractions in the Python-based finite element package Nutils? For example, how does one write the contraction of a fourth-order elasticity tensor $\boldsymbol{C}$ ...
9
votes
3answers
1k views

Second order tensor field visualization software

Is there an overview available over tensor visualization software? My personal preference is: A software which is free, well documented, and offers visualization techniques for different physical ...
0
votes
2answers
166 views

Vector and index notation equivalence

Given 2 vectors $\mathbf{u}$ and $\mathbf{v}$ the following are equivalent: $\mathbf{u}\cdot\mathbf{v}$ $\mathbf{u}^T \mathbf{v}$ $u_i v_i$ $v_i u_i$ $\mathbf{v}\cdot\mathbf{u}$ $\mathbf{v}^T\...
1
vote
0answers
50 views

Optimization of nonlocal stencil-like operator on subset of regular grid

I am trying to optimize the execution time for this particular piece of fortran code. Details: i_gc is a (ngpts, 3) array of containing (i,j,k) indices for each grid point. This is a subset of the ...
0
votes
2answers
98 views

Explain this multivariate differential identity

$$ \frac{\partial|\nabla\phi|^2}{\partial\phi}=-2\nabla\cdot\nabla\phi$$ I would very appreciate that you help me . Please do it in detail, I am quite not good at such problems. There is something ...
1
vote
0answers
165 views

What is the relation between Kruskal tensor and CP decomposition?

In Matlab Tensor Toolbox there is a tensor type called "Kruskal tensors", I found its form is similar to the CP decomposition. Wikipedia mentioned: "As such, many of the methods have been ...
1
vote
0answers
200 views

4th order tensor [closed]

I'm new with FEniCS and Python and I'm stuck with this issue: is there a way to write a 4th order tensor in an easy way to implement? I have to compute the following stiffnes tensor: $A_{ijkl}= \...
1
vote
1answer
51 views

Anisotropic invariant expansion

I am trying to calculate the second and third invariants for a turbulent flow. I have the second order statistics (both transient and averaged). i.e $uu$, $vv$, $ww$, $uv$, $vw$ and $uw$. These are ...
1
vote
1answer
426 views

Any relation between the singular values of each flattening matrices and the core tensor out of Tucker decomposition?

Before I know how to do tucker decomposition, I mistakenly thought the core tensor is only from combining the singular value matrices of the flattening matrices. Yes I know it is not now. For the ...
3
votes
1answer
221 views

Is there a reference/source paper for the TUCKER_ALS() in Tensor Toolbox for MATLAB?

TUCKER_ALS computes the best rank-(R1,R2,..,Rn) approximation of tensor X, according to the specified dimensions. I am using MATLAB Tensor Toolbox Version 2.5. I am wondering if I write a paper, how ...
2
votes
0answers
394 views

finite volume for diffusion equation with anisotropic (tensor) coefficient

Consider the scalar PDE for $u$ with Dirichlet boundary conditions: $\mathrm{div}(\mathcal{K}\nabla u) = f\; \forall x\; \in \Omega \subset R^2$, $u = 0 \; \forall \; x\;\in \partial\Omega$ ...
22
votes
10answers
14k views

Fast, lightweight C++ tensor library for dimension-agnostic code

I am looking for a C++ tensor library that supports dimension-agnostic code. Specifically, I need to perform operations along each dimension (up to 3), e.g. calculating a weighted sum. The dimensions ...