Loading [MathJax]/extensions/tex2jax.js
Tatooine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages Concepts
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | List of all members
tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel > Struct Template Reference

#include <numerical_flowmap.h>

Inheritance diagram for tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >:
[legend]
Collaboration diagram for tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >:
[legend]

Public Types

using this_type = numerical_flowmap< V, ODESolver, InterpolationKernel >
 
using raw_field_type = std::remove_pointer_t< std::decay_t< V > >
 
using real_type = typename raw_field_type::real_type
 
using vec_type = vec< real_type, num_dimensions()>
 
using pos_type = vec_type
 
using integral_curve_type = line< real_type, num_dimensions()>
 
using cache_type = tatooine::cache< std::pair< real_type, pos_type >, integral_curve_type >
 
using ode_solver_type = ODESolver< real_type, num_dimensions()>
 
using domain_border_flags_type = std::map< std::pair< pos_type, real_type >, std::pair< bool, bool > >
 

Public Member Functions

 numerical_flowmap (numerical_flowmap const &other)
 
 numerical_flowmap (numerical_flowmap &&other) noexcept
 
auto operator= (numerical_flowmap const &other) -> numerical_flowmap &
 
auto operator= (numerical_flowmap &&other) noexcept -> numerical_flowmap &
 
 ~numerical_flowmap ()=default
 
template<std::convertible_to< V > W, arithmetic WReal, std::size_t NumDimensions, typename V_ = V>
requires (!holds_field_pointer)
constexpr numerical_flowmap (vectorfield< W, WReal, NumDimensions > const &w, bool const use_caching=default_use_caching)
 
template<std::convertible_to< V > W, arithmetic WReal, std::size_t NumDimensions, typename V_ = V>
requires holds_field_pointer
constexpr numerical_flowmap (vectorfield< W, WReal, NumDimensions > const *w, bool const use_caching=default_use_caching)
 
template<arithmetic WReal, std::size_t NumDimensions, typename V_ = V>
requires holds_field_pointer
constexpr numerical_flowmap (polymorphic::vectorfield< WReal, NumDimensions > const *w, bool const use_caching=default_use_caching)
 
template<arithmetic WReal, std::size_t NumDimensions, typename V_ = V>
requires holds_field_pointer
constexpr numerical_flowmap (polymorphic::vectorfield< WReal, NumDimensions > *w, bool const use_caching=default_use_caching)
 
template<typename V_ = V>
requires holds_field_pointer
constexpr numerical_flowmap (bool const use_caching=default_use_caching)
 
template<typename W , typename WReal , std::size_t NumDimensions, typename V_ = V>
requires (!holds_field_pointer)
constexpr numerical_flowmap (vectorfield< W, WReal, NumDimensions > const &w, ode_solver_type const &ode_solver, bool const use_caching=default_use_caching)
 
constexpr auto evaluate (fixed_num_rows_mat< num_dimensions()> auto const &x0s, real_type const t0, real_type tau) const
 
constexpr auto evaluate_uncached (fixed_size_vec< num_dimensions()> auto const &x0, real_type const t0, real_type const tau) const -> pos_type
 
constexpr auto evaluate_uncached_with_arc_length (fixed_size_vec< num_dimensions()> auto const &x0, real_type const t0, real_type const tau) const
 
constexpr auto evaluate (fixed_size_vec< num_dimensions()> auto const &x0, real_type const t0, real_type const tau) const -> pos_type
 
constexpr auto operator() (fixed_num_rows_mat< num_dimensions()> auto const &x0s, real_type const t0, real_type const tau) const
 
constexpr auto operator() (fixed_size_vec< num_dimensions()> auto const &y0, real_type const t0, real_type const tau) const -> pos_type
 
auto integral_curve (pos_type const &y0, real_type const t0, real_type const tau) const
 
auto integral_curve (pos_type const &y0, real_type const t0, real_type const btau, real_type const ftau) const
 
auto continue_integration (integral_curve_type &integral_curve, real_type const tau) const -> bool
 
auto cached_curve (pos_type const &y0, real_type const t0) const -> auto const &
 
auto cached_curve (pos_type const &y0, real_type const t0, real_type const tau) const -> auto const &
 
auto cached_curve (pos_type const &y0, real_type const t0, real_type btau, real_type ftau) const -> auto const &
 
auto vectorfield () const -> auto const &
 
auto vectorfield () -> auto &
 
template<typename = void>
requires holds_field_pointer
auto set_vectorfield (polymorphic::vectorfield< real_type, num_dimensions()> *w)
 
auto ode_solver () const -> auto const &
 
auto ode_solver () -> auto &
 
auto use_caching (bool const b=true) -> void
 
auto is_using_caching () const
 
auto is_using_caching () -> auto &
 
auto invalidate_cache () const
 

Static Public Member Functions

static constexpr auto num_dimensions () -> std::size_t
 

Static Public Attributes

static constexpr auto holds_field_pointer = std::is_pointer_v<V>
 
static constexpr auto default_use_caching = false
 

Private Attributes

m_v
 
ode_solver_type m_ode_solver
 
cache_type m_cache
 
domain_border_flags_type m_on_domain_border
 
bool m_use_caching = default_use_caching
 

Member Typedef Documentation

◆ cache_type

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
using tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::cache_type = tatooine::cache<std::pair<real_type, pos_type>, integral_curve_type>

◆ domain_border_flags_type

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
using tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::domain_border_flags_type = std::map<std::pair<pos_type, real_type>, std::pair<bool, bool> >

◆ integral_curve_type

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
using tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::integral_curve_type = line<real_type, num_dimensions()>

◆ ode_solver_type

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
using tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::ode_solver_type = ODESolver<real_type, num_dimensions()>

◆ pos_type

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
using tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::pos_type = vec_type

◆ raw_field_type

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
using tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::raw_field_type = std::remove_pointer_t<std::decay_t<V> >

◆ real_type

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
using tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::real_type = typename raw_field_type::real_type

◆ this_type

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
using tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::this_type = numerical_flowmap<V, ODESolver, InterpolationKernel>

◆ vec_type

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
using tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::vec_type = vec<real_type, num_dimensions()>

Constructor & Destructor Documentation

◆ numerical_flowmap() [1/8]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::numerical_flowmap ( numerical_flowmap< V, ODESolver, InterpolationKernel > const &  other)
inline

◆ numerical_flowmap() [2/8]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::numerical_flowmap ( numerical_flowmap< V, ODESolver, InterpolationKernel > &&  other)
inlinenoexcept

◆ ~numerical_flowmap()

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::~numerical_flowmap ( )
default

◆ numerical_flowmap() [3/8]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
template<std::convertible_to< V > W, arithmetic WReal, std::size_t NumDimensions, typename V_ = V>
requires (!holds_field_pointer)
constexpr tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::numerical_flowmap ( vectorfield< W, WReal, NumDimensions > const &  w,
bool const  use_caching = default_use_caching 
)
inlineexplicitconstexpr

◆ numerical_flowmap() [4/8]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
template<std::convertible_to< V > W, arithmetic WReal, std::size_t NumDimensions, typename V_ = V>
requires holds_field_pointer
constexpr tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::numerical_flowmap ( vectorfield< W, WReal, NumDimensions > const *  w,
bool const  use_caching = default_use_caching 
)
inlineexplicitconstexpr

◆ numerical_flowmap() [5/8]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
template<arithmetic WReal, std::size_t NumDimensions, typename V_ = V>
requires holds_field_pointer
constexpr tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::numerical_flowmap ( polymorphic::vectorfield< WReal, NumDimensions > const *  w,
bool const  use_caching = default_use_caching 
)
inlineexplicitconstexpr

◆ numerical_flowmap() [6/8]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
template<arithmetic WReal, std::size_t NumDimensions, typename V_ = V>
requires holds_field_pointer
constexpr tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::numerical_flowmap ( polymorphic::vectorfield< WReal, NumDimensions > *  w,
bool const  use_caching = default_use_caching 
)
inlineexplicitconstexpr

◆ numerical_flowmap() [7/8]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
template<typename V_ = V>
requires holds_field_pointer
constexpr tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::numerical_flowmap ( bool const  use_caching = default_use_caching)
inlineexplicitconstexpr

◆ numerical_flowmap() [8/8]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
template<typename W , typename WReal , std::size_t NumDimensions, typename V_ = V>
requires (!holds_field_pointer)
constexpr tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::numerical_flowmap ( vectorfield< W, WReal, NumDimensions > const &  w,
ode_solver_type const &  ode_solver,
bool const  use_caching = default_use_caching 
)
inlineconstexpr

Member Function Documentation

◆ cached_curve() [1/3]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::cached_curve ( pos_type const &  y0,
real_type const  t0 
) const -> auto const&
inline

◆ cached_curve() [2/3]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::cached_curve ( pos_type const &  y0,
real_type const  t0,
real_type  btau,
real_type  ftau 
) const -> auto const&
inline

◆ cached_curve() [3/3]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::cached_curve ( pos_type const &  y0,
real_type const  t0,
real_type const  tau 
) const -> auto const&
inline

◆ continue_integration()

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::continue_integration ( integral_curve_type integral_curve,
real_type const  tau 
) const -> bool
inline

Continues integration if integral_curve. If tau > 0 it takes front of integral_curve as start position and time. If tau < 0 it takes back of integral_curve as start position and time.

Returns
true if could integrate all tau, false if hit domain border or something else went wrong.

◆ evaluate() [1/2]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
constexpr auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::evaluate ( fixed_num_rows_mat< num_dimensions()> auto const &  x0s,
real_type const  t0,
real_type  tau 
) const
inlineconstexpr

◆ evaluate() [2/2]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
constexpr auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::evaluate ( fixed_size_vec< num_dimensions()> auto const &  x0,
real_type const  t0,
real_type const  tau 
) const -> pos_type
inlineconstexpr

◆ evaluate_uncached()

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
constexpr auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::evaluate_uncached ( fixed_size_vec< num_dimensions()> auto const &  x0,
real_type const  t0,
real_type const  tau 
) const -> pos_type
inlineconstexpr

◆ evaluate_uncached_with_arc_length()

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
constexpr auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::evaluate_uncached_with_arc_length ( fixed_size_vec< num_dimensions()> auto const &  x0,
real_type const  t0,
real_type const  tau 
) const
inlineconstexpr

◆ integral_curve() [1/2]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::integral_curve ( pos_type const &  y0,
real_type const  t0,
real_type const  btau,
real_type const  ftau 
) const
inline

◆ integral_curve() [2/2]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::integral_curve ( pos_type const &  y0,
real_type const  t0,
real_type const  tau 
) const
inline

◆ invalidate_cache()

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::invalidate_cache ( ) const
inline

◆ is_using_caching() [1/2]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::is_using_caching ( ) -> auto&
inline

◆ is_using_caching() [2/2]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::is_using_caching ( ) const
inline

◆ num_dimensions()

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
static constexpr auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::num_dimensions ( ) -> std::size_t
inlinestaticconstexpr

◆ ode_solver() [1/2]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::ode_solver ( ) -> auto&
inline

◆ ode_solver() [2/2]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::ode_solver ( ) const -> auto const&
inline

◆ operator()() [1/2]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
constexpr auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::operator() ( fixed_num_rows_mat< num_dimensions()> auto const &  x0s,
real_type const  t0,
real_type const  tau 
) const
inlineconstexpr

◆ operator()() [2/2]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
constexpr auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::operator() ( fixed_size_vec< num_dimensions()> auto const &  y0,
real_type const  t0,
real_type const  tau 
) const -> pos_type
inlineconstexpr

◆ operator=() [1/2]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::operator= ( numerical_flowmap< V, ODESolver, InterpolationKernel > &&  other) -> numerical_flowmap&
inlinenoexcept

◆ operator=() [2/2]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::operator= ( numerical_flowmap< V, ODESolver, InterpolationKernel > const &  other) -> numerical_flowmap&
inline

◆ set_vectorfield()

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
template<typename = void>
requires holds_field_pointer
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::set_vectorfield ( polymorphic::vectorfield< real_type, num_dimensions()> *  w)
inline

◆ use_caching()

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::use_caching ( bool const  b = true) -> void
inline

◆ vectorfield() [1/2]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::vectorfield ( ) -> auto&
inline

◆ vectorfield() [2/2]

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::vectorfield ( ) const -> auto const&
inline

Member Data Documentation

◆ default_use_caching

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
constexpr auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::default_use_caching = false
staticconstexpr

◆ holds_field_pointer

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
constexpr auto tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::holds_field_pointer = std::is_pointer_v<V>
staticconstexpr

◆ m_cache

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
cache_type tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::m_cache
mutableprivate

◆ m_ode_solver

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
ode_solver_type tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::m_ode_solver
private

◆ m_on_domain_border

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
domain_border_flags_type tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::m_on_domain_border
mutableprivate

◆ m_use_caching

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
bool tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::m_use_caching = default_use_caching
private

◆ m_v

template<typename V , template< typename, std::size_t > typename ODESolver, template< typename > typename InterpolationKernel = interpolation::cubic>
V tatooine::numerical_flowmap< V, ODESolver, InterpolationKernel >::m_v
private

The documentation for this struct was generated from the following file: