v0.14.0
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 
7 namespace 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 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::cross
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
FTensor::levi_civita
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
Definition: Levi_Civita.hpp:617
FTensor::Tensor1_Expr
Definition: Tensor1_Expr.hpp:27
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::Index
Definition: Index.hpp:23
Levi_Civita.hpp