Go to the source code of this file.
|
| namespace | TorchFEM |
| | Small raw-ATen helpers for the batched finite-element assembly used by the Torch FEM kernels.
|
| |
|
| at::Tensor | TorchFEM::scatter (const at::Tensor &v, const at::Tensor &dof_map) |
| | Gather global solution values into element-local DOF values: out[e,a,...] = v[dof_map[e,a,...]].
|
| |
| at::Tensor | TorchFEM::interpolate (const at::Tensor &elem_dofs, const at::Tensor &basis) |
| | Interpolate element-local DOF values onto quadrature points by contracting over the per-element DOF axis (dim 1) against a basis: out[e,...] = sum_a elem_dofs[e,a] * basis[e,a,...].
|
| |
| at::Tensor | TorchFEM::assemble (const at::Tensor &scattered, const at::Tensor &dof_map, int64_t ndof) |
| | Scatter-add element-local contributions into a global vector: out[dof_map.flatten()[k]] += scattered.flatten()[k].
|
| |
| at::Tensor | TorchFEM::fullToMandel (const at::Tensor &full) |
| | Convert a full (symmetric) rank-2 tensor to its 6-component Mandel representation, matching NEML2's SR2 convention: components [00, 11, 22, sqrt(2)*12, sqrt(2)*02, sqrt(2)*01].
|
| |
| at::Tensor | TorchFEM::mandelToFull (const at::Tensor &mandel) |
| | Inverse of fullToMandel: expand a 6-component Mandel tensor to a full symmetric (..., 3, 3), matching neml2::R2(SR2) (off-diagonals divided by sqrt(2)).
|
| |