1#ifndef TATOOINE_CURVATURE_FIELD_H
2#define TATOOINE_CURVATURE_FIELD_H
11template <
typename V,
size_t N>
16 :
public field<curvature_field<V>, typename V::real_type, 2> {
37 template <
typename Real>
45 const auto Jf =
diff(m_vf);
46 const auto J = Jf(x, t);
47 const auto v = m_vf(x, t);
49 const auto lv = length(v);
50 return (v(0) * a(1) - v(1) * a(0)) / (lv * lv * lv);
54 return m_vf.in_domain(x, t);
60 :
public field<curvature_field<V>, typename V::real_type, 3> {
81 template <
typename Real>
89 const auto Jf =
diff(m_vf);
90 const auto J = Jf(x, t);
91 const auto v = m_vf(x, t);
93 const auto lv = length(v);
94 return cross(v,a) / (lv * lv * lv);
98 return m_vf.in_domain(x, t);
102template <
typename V,
typename Real>
107template <
typename V,
typename Real>
curvature_field(const field< V, Real, 2, 2 > &v)
Definition: curvature_field.h:38
typename V::real_type real_type
Definition: curvature_field.h:22
constexpr bool in_domain(const pos_type &x, real_type t) const
Definition: curvature_field.h:53
constexpr tensor_type evaluate(const pos_type &x, real_type t) const
Definition: curvature_field.h:44
V m_vf
Definition: curvature_field.h:31
V m_vf
Definition: curvature_field.h:75
constexpr bool in_domain(const pos_type &x, real_type t) const
Definition: curvature_field.h:97
constexpr tensor_type evaluate(const pos_type &x, real_type t) const
Definition: curvature_field.h:88
curvature_field(const field< V, Real, 3, 3 > &v)
Definition: curvature_field.h:82
typename V::real_type real_type
Definition: curvature_field.h:66
Definition: curvature_field.h:12
Definition: algorithm.h:6
auto curvature(const field< V, Real, 2, 2 > &vf)
Definition: curvature_field.h:103
constexpr auto diff(polynomial< Real, Degree > const &f)
Definition: polynomial.h:179
constexpr auto cross(base_tensor< Tensor0, T0, 3 > const &lhs, base_tensor< Tensor1, T1, 3 > const &rhs)
Definition: cross.h:9
auto as_derived() -> auto &
Definition: field.h:161