Tatooine
abcflow.h
Go to the documentation of this file.
1#ifndef TATOOINE_ANALYTICAL_SYMBOLIC_ABCFLOW_H
2#define TATOOINE_ANALYTICAL_SYMBOLIC_ABCFLOW_H
3//==============================================================================
4#include <tatooine/available_libraries.h>
5#if TATOOINE_GINAC_AVAILABLE
7//==============================================================================
9//==============================================================================
13template <typename real_type>
14struct abcflow : field<real_type, 3, 3> {
17 using typename parent_type::pos_type;
18 using typename parent_type::tensor_type;
19 using typename parent_type::symtensor_type;
20
21 //============================================================================
22 public:
23 explicit constexpr abcflow(const real_type a = 1, const real_type b = 1,
24 const real_type c = 1) {
25 this->set_expr(vec{a * sin(symbol::x(2)) + c * cos(symbol::x(1)),
26 b * sin(symbol::x(0)) + a * cos(symbol::x(2)),
27 c * sin(symbol::x(1)) + b * cos(symbol::x(0))});
28 }
29 constexpr abcflow(const abcflow& other) = default;
30 constexpr abcflow(abcflow&& other) = default;
31 constexpr abcflow& operator=(const abcflow& other) = default;
32 constexpr abcflow& operator=(abcflow&& other) = default;
33 ~abcflow() override = default;
34};
35
36abcflow()->abcflow<double>;
37//==============================================================================
38} // namespace tatooine::symbolic
39//==============================================================================
40#endif
41#endif
Definition: abcflow.h:8
constexpr auto cos(arithmetic auto const x)
Definition: math.h:28
constexpr auto sin(arithmetic auto const x)
Definition: math.h:27
The Arnold–Beltrami–Childress (ABC) flow is a three-dimensional incompressible velocity field which i...
Definition: abcflow.h:14
constexpr abcflow(const abcflow &other)=default
constexpr abcflow & operator=(abcflow &&other)=default
constexpr abcflow & operator=(const abcflow &other)=default
constexpr abcflow(abcflow &&other)=default
constexpr abcflow(const real_type a=1, const real_type b=1, const real_type c=1)
Definition: abcflow.h:23
Definition: field.h:134
3 real_type
Definition: field.h:17
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