Tatooine
counterexample_sadlo.h
Go to the documentation of this file.
1#ifndef TATOOINE_ANALYTICAL_SYMBOLIC_COUNTEREXAMPLE_SADLO_H
2#define TATOOINE_ANALYTICAL_SYMBOLIC_COUNTEREXAMPLE_SADLO_H
3#include <tatooine/available_libraries.h>
4#if TATOOINE_GINAC_AVAILABLE
6//==============================================================================
8//==============================================================================
9template <typename Real>
10struct counterexample_sadlo : field<Real, 2, 2> {
13 using parent_type::t;
14 using parent_type::x;
15 using typename parent_type::pos_type;
16 using typename parent_type::symtensor_type;
17 using typename parent_type::tensor_type;
18
20 auto r =
21 -GiNaC::numeric{1, 80} *
22 GiNaC::power(GiNaC::power(x(0), 2) + GiNaC::power(x(1), 2), 2) +
23 GiNaC::numeric{81, 80};
24
25 this->set_expr(vec{r * (-GiNaC::numeric{1, 2} * x(0) +
26 GiNaC::numeric{1, 2} * cos(t()) - sin(t())),
27 r * (GiNaC::numeric{1, 2} * x(1) -
28 GiNaC::numeric{1, 2} * sin(t()) + cos(t()))});
29 }
30
31 constexpr bool in_domain(const pos_type& x, Real /*t*/) const {
32 return length(x) <= 3;
33 }
34};
35//==============================================================================
37//==============================================================================
38} // namespace tatooine::symbolic
39//==============================================================================
40#endif
41#endif
Definition: abcflow.h:8
static auto constexpr t
Definition: index.h:24
constexpr auto cos(arithmetic auto const x)
Definition: math.h:28
constexpr auto sin(arithmetic auto const x)
Definition: math.h:27
Definition: counterexample_sadlo.h:10
counterexample_sadlo()
Definition: counterexample_sadlo.h:19
constexpr bool in_domain(const pos_type &x, Real) const
Definition: counterexample_sadlo.h:31
Definition: field.h:134
vec< real_type, NumDimensions > pos_type
Definition: field.h:20
Tensor tensor_type
Definition: field.h:18
tensor< GiNaC::ex, TensorDims... > symtensor_type
Definition: symbolic_field.h:22
Definition: vec.h:12
auto constexpr x() const -> auto const &requires(N >=1)
Definition: vec.h:102