Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tensor]

The tag has no usage guidance.

0
votes
2answers
101 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
84 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
426 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
89 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)$, ...
6
votes
3answers
766 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
87 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
899 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
47 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
97 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
109 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
187 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
42 views

anisotrpic 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
308 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
172 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
369 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$ ...
16
votes
8answers
9k 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 ...