25#include "neml2/tensors/WR2.h"
26#include "neml2/tensors/Scalar.h"
27#include "neml2/tensors/R2.h"
28#include "neml2/tensors/Rot.h"
29#include "neml2/tensors/SR2.h"
30#include "neml2/tensors/WSR4.h"
31#include "neml2/tensors/R4.h"
33#include "neml2/misc/math.h"
38 :
WR2(math::full_to_skew((T - T.transpose()) / 2.0))
70 (2.0 * torch::Tensor(
norm2) * torch::cos(
norm2 / 2)));
88 torch::tan(
norm2 / 2.0) * (torch::Tensor(
norm2) * torch::tan(
norm2 / 2.0) - 2.0) *
89 (1.0 / torch::cos(
norm2 / 2.0))) /
BatchTensor base_index(const TorchSlice &indices) const
Return an index sliced on the base dimensions.
Definition BatchTensorBase.cxx:193
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:52
static R2 identity(const torch::TensorOptions &options=default_tensor_options())
Identity.
Definition R2Base.cxx:170
A basic R2.
Definition R2.h:42
Rotation stored as modified Rodrigues parameters.
Definition Rot.h:49
The (logical) scalar.
Definition Scalar.h:38
R2 outer(const VecBase< Derived2 > &v) const
outer product
Definition VecBase.h:119
Scalar norm_sq() const
Norm squared.
Definition VecBase.cxx:64
A skew rank 2, represented as an axial vector.
Definition WR2.h:43
R2 dexp() const
Derivative of the exponential map.
Definition WR2.cxx:76
WR2(const R2 &T)
Skew-symmetrize a R2 then fill.
Definition WR2.cxx:37
Scalar operator()(TorchSize i, TorchSize j) const
Accessor.
Definition WR2.cxx:43
Rot exp() const
Exponential map to make this into a rotation (Rot)
Definition WR2.cxx:50
constexpr Real skew_factor[3][3]
Definition math.h:47
constexpr Real eps
Definition math.h:38
constexpr TorchSize skew_reverse_index[3][3]
Definition math.h:46
Definition CrossRef.cxx:32
int64_t TorchSize
Definition types.h:35