v0.13.2
Loading...
Searching...
No Matches
cross.hpp
Go to the documentation of this file.
1/* Cross product in 3 dimensions */
2
3#pragma once
4
5#include "Levi_Civita.hpp"
6
7namespace FTensor
8{
9 template <class A, class B, class T, class U, char i, char j, char k>
11 const Tensor1_Expr<B, U, 3, j> &b, const Index<k, 3> &)
12 {
13 return a * b * levi_civita(Index<i, 3>(), Index<j, 3>(), Index<k, 3>());
14 }
15}
constexpr double a
Tensors class implemented by Walter Landry.
Definition: FTensor.hpp:51
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
auto cross(const Tensor1_Expr< A, T, 3, i > &a, const Tensor1_Expr< B, U, 3, j > &b, const Index< k, 3 > &)
Definition: cross.hpp:10