Tatooine
Public Types | Public Member Functions | Public Attributes | Private Member Functions | List of all members
tatooine::flowexplorer::nodes::autonomous_particle Struct Reference

#include <autonomous_particle.h>

Inheritance diagram for tatooine::flowexplorer::nodes::autonomous_particle:
[legend]
Collaboration diagram for tatooine::flowexplorer::nodes::autonomous_particle:
[legend]

Public Types

using this_type = autonomous_particle
 
using parent_type = tatooine::autonomous_particle< real_type, 2 >
 
using gpu_vec3 = vec< GLfloat, 3 >
 
using vbo_t = gl::vertexbuffer< gpu_vec3 >
 
using vectorfield_t = polymorphic::vectorfield< real_type, 2 >
 
- Public Types inherited from tatooine::autonomous_particle< real_type, 2 >
using split_behaviors = detail::autonomous_particle::split_behaviors< Real, NumDimensions >
 
using this_type = autonomous_particle< Real, NumDimensions >
 
using simple_particle_type = particle< Real, NumDimensions >
 
using real_type = Real
 
using vec_type = vec< real_type, NumDimensions >
 
using mat_type = mat< real_type, NumDimensions, NumDimensions >
 
using pos_type = vec_type
 
using container_type = std::vector< this_type >
 
using simple_particle_container_type = std::vector< simple_particle_type >
 
using ellipse_type = geometry::hyper_ellipse< Real, NumDimensions >
 
using parent_type = ellipse_type
 
using sampler_type = detail::autonomous_particle::sampler< Real, NumDimensions >
 
using hierarchy_pair = detail::autonomous_particle::hierarchy_pair
 
- Public Types inherited from tatooine::geometry::hyper_ellipse< Real, NumDimensions >
using this_type = hyper_ellipse< Real, NumDimensions >
 
using vec_type = vec< Real, NumDimensions >
 
using pos_type = vec_type
 
using mat_type = mat< Real, NumDimensions, NumDimensions >
 
using real_type = Real
 
- Public Types inherited from tatooine::flowexplorer::renderable< autonomous_particle >
using serializer_t = ui::node_serializer< autonomous_particle >
 

Public Member Functions

 autonomous_particle (flowexplorer::scene &s)
 
void render (mat4f const &projection_matrix, mat4f const &view_matrix) final
 
auto draw_properties () -> bool final
 
auto is_transparent () const -> bool final
 
auto on_pin_connected (ui::input_pin &this_pin, ui::output_pin &other_pin) -> void final
 
auto update (std::chrono::duration< real_type > const &) -> void override
 
auto update_initial_circle () -> void
 
auto on_property_changed () -> void override
 
auto generate_points_in_initial_circle (size_t const n) -> void
 
auto advect_points_in_initial_circle () -> void
 
auto upload_advected_points_in_initial_circle () -> void
 
- Public Member Functions inherited from tatooine::autonomous_particle< real_type, 2 >
 autonomous_particle (autonomous_particle const &other)=default
 { More...
 
 autonomous_particle (autonomous_particle &&other) noexcept=default
 
 autonomous_particle (ellipse_type const &ell, real_type const t, std::uint64_t const id)
 
 autonomous_particle (ellipse_type const &ell, real_type const t, std::atomic_uint64_t &uuid_generator)
 
 autonomous_particle (ellipse_type const &ell, real_type const t, std::uint8_t max_split_depth, std::uint64_t const id)
 
 autonomous_particle (ellipse_type const &ell, real_type const t, std::uint8_t max_split_depth, std::atomic_uint64_t &uuid_generator)
 
 autonomous_particle (pos_type const &x, real_type const t, real_type const r, std::uint64_t const id)
 
 autonomous_particle (pos_type const &x, real_type const t, real_type const r, std::atomic_uint64_t &uuid_generator)
 
 autonomous_particle (pos_type const &x, real_type const t, real_type const r, std::uint8_t max_split_depth, std::uint64_t const id)
 
 autonomous_particle (pos_type const &x, real_type const t, real_type const r, std::uint8_t max_split_depth, std::atomic_uint64_t &uuid_generator)
 
 autonomous_particle (ellipse_type const &ell, real_type const t, pos_type const &x0, mat_type const &nabla_phi, std::uint8_t const split_depth, std::uint8_t const max_split_depth, std::uint64_t const id)
 
 autonomous_particle (ellipse_type const &ell, real_type const t, pos_type const &x0, mat_type const &nabla_phi, std::uint8_t const split_depth, std::uint8_t const max_split_depth, std::atomic_uint64_t &uuid_generator)
 
auto operator= (autonomous_particle const &other) -> autonomous_particle &=default
 
auto operator= (autonomous_particle &&other) noexcept -> autonomous_particle &=default
 
 ~autonomous_particle ()=default
 
auto x0 () -> auto &
 
auto x0 () const -> auto const &
 
auto x0 (std::size_t i) const
 
auto x () -> auto &
 
auto x () const -> auto const &
 
auto x (std::size_t const i) const
 
auto t () -> auto &
 
auto t () const
 
auto nabla_phi () const -> auto const &
 
auto S0 () const
 
auto initial_ellipse () const
 
auto split_depth () const
 
auto max_split_depth () const
 
auto id () const
 
auto advect (Flowmap &&phi, real_type const stepwidth, real_type const t_end, std::atomic_uint64_t &uuid_generator) const
 
auto advect_with_two_splits (Flowmap &&phi, real_type const stepwidth, real_type const t_end, std::atomic_uint64_t &uuid_generator) const
 Advects single particle. More...
 
auto advect_with_three_splits (Flowmap &&phi, real_type const stepwidth, real_type const t_end, std::atomic_uint64_t &uuid_generator) const
 Advects single particle. More...
 
auto advect_with_three_and_four_splits (Flowmap &&phi, real_type const stepwidth, real_type const t_end, std::atomic_uint64_t &uuid_generator) const
 Advects single particle. More...
 
auto advect_with_five_splits (Flowmap &&phi, real_type const stepwidth, real_type const t_end, std::atomic_uint64_t &uuid_generator) const
 Advects single particle. More...
 
auto advect_with_seven_splits (Flowmap &&phi, real_type const stepwidth, real_type const t_end, std::atomic_uint64_t &uuid_generator) const
 Advects single particle. More...
 
auto advect_until_split (Flowmap phi, real_type stepwidth, real_type const t_end, container_type &splitted_particles, container_type &finished_particles, simple_particle_container_type &simple_particles, std::vector< hierarchy_pair > &, std::mutex &, std::atomic_uint64_t &uuid_generator) const
 
auto sampler () const
 
auto discretize (std::size_t const n, forward_tag const) const
 
auto discretize (std::size_t const n, backward_tag const) const
 
auto discretize (std::size_t const num_vertices=32) const
 
auto discretize (std::size_t const num_subdivisions=2) const
 
auto center () const -> auto const &
 
auto center () -> auto &
 
auto center (std::size_t const i) const
 
auto center (std::size_t const i) -> auto &
 
auto S () const -> auto const &
 
auto S () -> auto &
 
- Public Member Functions inherited from tatooine::geometry::hyper_ellipse< Real, NumDimensions >
constexpr hyper_ellipse ()
 defaults to unit hypersphere More...
 
constexpr hyper_ellipse (hyper_ellipse const &)=default
 
constexpr hyper_ellipse (hyper_ellipse &&) noexcept=default
 
constexpr auto operator= (hyper_ellipse const &) -> hyper_ellipse &=default
 
constexpr auto operator= (hyper_ellipse &&) noexcept -> hyper_ellipse &=default
 
 ~hyper_ellipse ()=default
 
constexpr hyper_ellipse (Real const radius)
 Sets up a sphere with specified radius. More...
 
constexpr hyper_ellipse (Real const radius, vec_type const &center)
 Sets up a sphere with specified radius and origin point. More...
 
constexpr hyper_ellipse (vec_type const &center, Real const radius)
 Sets up a sphere with specified radius and origin point. More...
 
constexpr hyper_ellipse (fixed_size_vec< NumDimensions > auto const &center, fixed_size_quadratic_mat< NumDimensions > auto const &S)
 Sets up a sphere with specified radius and origin point. More...
 
constexpr hyper_ellipse (vec_type const &center, arithmetic auto const ... radii)
 Sets up a sphere with specified radii. More...
 
constexpr hyper_ellipse (arithmetic auto const ... radii)
 Sets up a sphere with specified radii. More...
 
constexpr hyper_ellipse (fixed_size_vec< NumDimensions > auto const &...points)
 Fits an ellipse through specified points. More...
 
constexpr hyper_ellipse (fixed_size_quadratic_mat< NumDimensions > auto const &H)
 Fits an ellipse through specified points. More...
 
auto S () const -> auto const &
 
auto S () -> auto &
 
auto center () const -> auto const &
 
auto center () -> auto &
 
auto center (std::size_t const i) const
 
auto center (std::size_t const i) -> auto &
 
auto local_coordinate (pos_type const &x) const
 
auto squared_euclidean_distance_to_center (pos_type const &x) const
 
auto euclidean_distance_to_center (pos_type const &x) const
 
auto squared_local_euclidean_distance_to_center (pos_type const &x) const
 
auto local_distance_to_center (pos_type const &x) const
 
constexpr auto distance_to_boundary (pos_type const &x) const
 Computes euclidean distance to nearest boundary point. More...
 
auto local_nearest_point_boundary (pos_type const &x) const
 
auto nearest_point_boundary (pos_type const &x) const
 
constexpr auto fit (fixed_size_vec< NumDimensions > auto const &...points)
 Fits an ellipse through specified points. More...
 
constexpr auto fit (fixed_size_quadratic_mat< NumDimensions > auto const &H)
 
template<typename V , typename VReal >
constexpr auto nearest_point_on_boundary (base_tensor< V, VReal, NumDimensions > const &x) const
 
constexpr auto is_inside (pos_type const &x) const
 
auto discretize (std::size_t const num_vertices=32) const
 
auto discretize (std::size_t const num_subdivisions=2) const
 
auto main_axes () const
 
auto radii () const
 Returns a the radii of the hyper ellipse as a vector. More...
 
auto base_coordinate_system () const
 Returns a the radii of the hyper ellipse as a vector. More...
 
- Public Member Functions inherited from tatooine::flowexplorer::renderable< autonomous_particle >
auto serialize () const -> toml::table override
 
auto deserialize (toml::table const &serialization) -> void override
 
auto draw_properties () -> bool override
 
auto type_name () const -> std::string_view override
 
- Public Member Functions inherited from tatooine::flowexplorer::base::renderable
 renderable (std::string const &title, flowexplorer::scene &s)
 
template<typename T >
 renderable (std::string const &title, flowexplorer::scene &s, T &ref)
 
 renderable (renderable const &w)=delete
 
 renderable (renderable &&w) noexcept=delete
 
auto operator= (renderable const &w) -> renderable &=delete
 
auto operator= (renderable &&w) noexcept -> renderable &=delete
 
virtual ~renderable ()=default
 
virtual auto render (mat4f const &projection_matrix, mat4f const &view_matrix) -> void=0
 
virtual auto is_transparent () const -> bool
 
virtual auto on_mouse_drag (int, int) -> bool
 
auto on_mouse_clicked () -> void
 
auto on_mouse_released () -> void
 
auto is_picked () -> bool
 
virtual auto check_intersection (ray< float, 3 > const &) const -> std::optional< intersection< double, 3 > >
 
- Public Member Functions inherited from tatooine::flowexplorer::ui::base::node
 node (flowexplorer::scene &s)
 
 node (std::string const &title, flowexplorer::scene &s)
 
template<typename T >
 node (flowexplorer::scene &s, T &ref)
 
template<typename T >
 node (std::string const &title, flowexplorer::scene &s, T &ref)
 
virtual ~node ()=default
 
template<typename... Ts>
auto insert_input_pin (std::string const &title, icon_type const t=icon_type::flow) -> auto &
 
template<typename Prop >
auto insert_input_pin_property_link (input_pin &pin, Prop &prop) -> auto &
 
template<typename T >
auto insert_output_pin (std::string const &title, T &ref, icon_type const t=icon_type::flow) -> auto &
 
auto title () const -> auto const &
 
auto title () -> auto &
 
auto scene () const -> auto const &
 
auto scene () -> auto &
 
auto set_title (std::string const &title)
 
auto has_self_pin () const -> bool
 
auto self_pin () const -> auto const &
 
auto self_pin () -> auto &
 
auto input_pins () const -> auto const &
 
auto input_pins () -> auto &
 
auto output_pins () const -> auto const &
 
auto output_pins () -> auto &
 
auto draw_node () -> void
 
auto node_position () const -> ImVec2
 
auto notify_property_changed (bool const notify_self=true) -> void
 
auto update_property_links () -> void
 
virtual auto draw_properties () -> bool=0
 
virtual auto on_property_changed () -> void
 
virtual auto on_title_changed (std::string const &) -> void
 
virtual auto on_pin_connected (input_pin &, output_pin &) -> void
 
virtual auto on_pin_connected (output_pin &, input_pin &) -> void
 
virtual auto on_pin_disconnected (input_pin &) -> void
 
virtual auto on_pin_disconnected (output_pin &) -> void
 
virtual auto type_name () const -> std::string_view=0
 
virtual auto update (std::chrono::duration< double > const &) -> void
 
virtual auto on_path_selected (std::string const &) -> void
 
- Public Member Functions inherited from tatooine::flowexplorer::uuid_holder< ax::NodeEditor::NodeId >
 uuid_holder (size_t const id)
 
 uuid_holder (ax::NodeEditor::NodeId const &id)
 
 uuid_holder ()
 
auto get_id () const -> const auto &
 
auto get_id () -> auto &
 
auto get_id_number () const
 
auto set_id (size_t const new_id)
 
constexpr auto operator== (uuid_holder< ax::NodeEditor::NodeId > const &other) const -> bool
 
constexpr auto operator== (ax::NodeEditor::NodeId const &id) const -> bool
 
constexpr auto operator== (size_t const id) const -> bool
 
constexpr auto equals ()
 
virtual auto serialize () const -> toml::table=0
 
virtual void deserialize (toml::table const &)=0
 
- Public Member Functions inherited from tatooine::flowexplorer::toggleable
constexpr toggleable (bool active=true)
 
constexpr toggleable (toggleable const &)=default
 
constexpr toggleable (toggleable &&)=default
 
constexpr auto operator= (toggleable const &) -> toggleable &=default
 
constexpr auto operator= (toggleable &&) -> toggleable &=default
 
 ~toggleable ()=default
 
virtual constexpr auto set_active (bool active=true) -> void
 
constexpr auto activate () -> void
 
constexpr auto deactivate () -> void
 
constexpr auto toggle () -> void
 
constexpr auto is_active () const -> bool const &
 
constexpr auto is_active () -> bool &
 
- Public Member Functions inherited from tatooine::flowexplorer::ui::node_serializer< T >
auto serialize (T const &t) const -> toml::table
 
auto deserialize (T &t, toml::table const &serialized_node) -> void
 
auto draw_properties (T &t) -> bool
 
constexpr auto type_name () const -> std::string_view
 

Public Attributes

real_type m_taustep = 0.1
 
real_type m_max_t = 0.0
 
real_type m_radius = 0.03
 
vec< real_type, 2 > * m_x0 = nullptr
 
real_type m_t0 = 0
 
vectorfield_tm_v
 
gl::indexeddata< gpu_vec3m_initial_circle
 
gl::indexeddata< gpu_vec3m_advected_ellipses
 
gl::indexeddata< gpu_vec3m_initial_ellipses_back_calculation
 
gl::indexeddata< gpu_vec3m_pathlines
 
std::array< GLfloat, 4 > m_ellipses_color {0.0f, 0.0f, 0.0f, 1.0f}
 
bool m_currently_advecting = false
 
bool m_needs_another_update = false
 
bool m_stop_thread = false
 
int m_num_splits = 3
 
std::vector< vec_t > m_points_on_initial_circle
 
std::vector< vec_t > m_advected_points_on_initial_circle
 
gl::indexeddata< gpu_vec3m_gpu_advected_points_on_initial_circle
 
- Public Attributes inherited from tatooine::flowexplorer::base::renderable
bool m_picked = false
 

Private Member Functions

void advect ()
 

Additional Inherited Members

- Static Public Member Functions inherited from tatooine::autonomous_particle< real_type, 2 >
static constexpr auto num_dimensions () -> std::size_t
 
static auto advect (Flowmap &&phi, real_type const stepwidth, real_type const t_end, container_type const &initial_particles, std::atomic_uint64_t &uuid_generator)
 
static auto advect (Flowmap &&phi, real_type const stepwidth, real_type const t0, real_type const t_end, uniform_rectilinear_grid< Real, NumDimensions > const &g)
 
static auto advect_with_two_splits (Flowmap &&phi, real_type const stepwidth, real_type const t_end, container_type const &initial_particles, std::atomic_uint64_t &uuid_generator)
 
static auto advect_with_two_splits (Flowmap &&phi, real_type const stepwidth, real_type const t0, real_type const t_end, uniform_rectilinear_grid< Real, NumDimensions > const &g)
 
static auto advect_with_three_splits (Flowmap &&phi, real_type const stepwidth, real_type const t_end, container_type const &initial_particles, std::atomic_uint64_t &uuid_generator)
 
static auto advect_with_three_splits (Flowmap &&phi, real_type const stepwidth, real_type const t0, real_type const t_end, uniform_rectilinear_grid< Real, NumDimensions > const &g)
 
static auto advect_with_three_and_four_splits (Flowmap &&phi, real_type const stepwidth, real_type const t_end, container_type const &initial_particles, std::atomic_uint64_t &uuid_generator)
 
static auto advect_with_three_and_four_splits (Flowmap &&phi, real_type const stepwidth, real_type const t0, real_type const t_end, uniform_rectilinear_grid< Real, NumDimensions > const &g)
 
static auto advect_with_five_splits (Flowmap &&phi, real_type const stepwidth, real_type const t_end, container_type const &initial_particles, std::atomic_uint64_t &uuid_generator)
 
static auto advect_with_five_splits (Flowmap &&phi, real_type const stepwidth, real_type const t0, real_type const t_end, uniform_rectilinear_grid< Real, NumDimensions > const &g)
 
static auto advect_with_seven_splits (Flowmap &&phi, real_type const stepwidth, real_type const t_end, container_type const &initial_particles, std::atomic_uint64_t &uuid_generator)
 
static auto advect_with_seven_splits (Flowmap &&phi, real_type const stepwidth, real_type const t0, real_type const t_end, uniform_rectilinear_grid< Real, NumDimensions > const &g)
 
static auto particles_from_grid (real_type const t0, uniform_rectilinear_grid< Real, NumDimensions > const &g, std::atomic_uint64_t &uuid_generator)
 
static auto particles_from_grid (real_type const t0, uniform_rectilinear_grid< Real, NumDimensions > const &g, std::uint8_t const max_split_depth, std::atomic_uint64_t &uuid_generator)
 
static auto particles_from_grid_small_filling_gaps (real_type const t0, uniform_rectilinear_grid< Real, NumDimensions > const &g, std::atomic_uint64_t &uuid_generator)
 
static auto particles_from_grid_small_filling_gaps (real_type const t0, uniform_rectilinear_grid< Real, NumDimensions > const &g, std::uint8_t const max_split_depth, std::atomic_uint64_t &uuid_generator)
 
static auto particles_from_grid_filling_gaps (real_type const t0, uniform_rectilinear_grid< Real, NumDimensions > const &g, std::atomic_uint64_t &uuid_generator)
 
static auto particles_from_grid_filling_gaps (real_type const t0, uniform_rectilinear_grid< Real, NumDimensions > const &g, std::uint8_t const max_split_depth, std::atomic_uint64_t &uuid_generator)
 
static auto particles_from_grid_filling_gaps (real_type const t0, uniform_rectilinear_grid< Real, NumDimensions > const &g, std::uint8_t const max_split_depth, std::atomic_uint64_t &uuid_generator, std::index_sequence< Is... >)
 
- Static Public Member Functions inherited from tatooine::geometry::hyper_ellipse< Real, NumDimensions >
static auto constexpr num_dimensions ()
 
- Static Public Attributes inherited from tatooine::autonomous_particle< real_type, 2 >
static constexpr auto half
 
static constexpr auto default_max_split_depth
 

Member Typedef Documentation

◆ gpu_vec3

◆ parent_type

◆ this_type

◆ vbo_t

◆ vectorfield_t

Constructor & Destructor Documentation

◆ autonomous_particle()

Member Function Documentation

◆ advect()

void tatooine::flowexplorer::nodes::autonomous_particle::advect ( )
private

◆ advect_points_in_initial_circle()

auto tatooine::flowexplorer::nodes::autonomous_particle::advect_points_in_initial_circle ( ) -> void

◆ draw_properties()

auto tatooine::flowexplorer::nodes::autonomous_particle::draw_properties ( ) -> bool
finalvirtual

◆ generate_points_in_initial_circle()

auto tatooine::flowexplorer::nodes::autonomous_particle::generate_points_in_initial_circle ( size_t const  n) -> void

◆ is_transparent()

auto tatooine::flowexplorer::nodes::autonomous_particle::is_transparent ( ) const -> bool
finalvirtual

◆ on_pin_connected()

auto tatooine::flowexplorer::nodes::autonomous_particle::on_pin_connected ( ui::input_pin this_pin,
ui::output_pin other_pin 
) -> void
finalvirtual

◆ on_property_changed()

auto tatooine::flowexplorer::nodes::autonomous_particle::on_property_changed ( ) -> void
overridevirtual

◆ render()

void tatooine::flowexplorer::nodes::autonomous_particle::render ( mat4f const &  projection_matrix,
mat4f const &  view_matrix 
)
finalvirtual

◆ update()

auto tatooine::flowexplorer::nodes::autonomous_particle::update ( std::chrono::duration< real_type > const &  ) -> void
inlineoverride

◆ update_initial_circle()

auto tatooine::flowexplorer::nodes::autonomous_particle::update_initial_circle ( ) -> void

◆ upload_advected_points_in_initial_circle()

auto tatooine::flowexplorer::nodes::autonomous_particle::upload_advected_points_in_initial_circle ( ) -> void

Member Data Documentation

◆ m_advected_ellipses

gl::indexeddata<gpu_vec3> tatooine::flowexplorer::nodes::autonomous_particle::m_advected_ellipses

◆ m_advected_points_on_initial_circle

std::vector<vec_t> tatooine::flowexplorer::nodes::autonomous_particle::m_advected_points_on_initial_circle

◆ m_currently_advecting

bool tatooine::flowexplorer::nodes::autonomous_particle::m_currently_advecting = false

◆ m_ellipses_color

std::array<GLfloat, 4> tatooine::flowexplorer::nodes::autonomous_particle::m_ellipses_color {0.0f, 0.0f, 0.0f, 1.0f}

◆ m_gpu_advected_points_on_initial_circle

gl::indexeddata<gpu_vec3> tatooine::flowexplorer::nodes::autonomous_particle::m_gpu_advected_points_on_initial_circle

◆ m_initial_circle

gl::indexeddata<gpu_vec3> tatooine::flowexplorer::nodes::autonomous_particle::m_initial_circle

◆ m_initial_ellipses_back_calculation

gl::indexeddata<gpu_vec3> tatooine::flowexplorer::nodes::autonomous_particle::m_initial_ellipses_back_calculation

◆ m_max_t

real_type tatooine::flowexplorer::nodes::autonomous_particle::m_max_t = 0.0

◆ m_needs_another_update

bool tatooine::flowexplorer::nodes::autonomous_particle::m_needs_another_update = false

◆ m_num_splits

int tatooine::flowexplorer::nodes::autonomous_particle::m_num_splits = 3

◆ m_pathlines

gl::indexeddata<gpu_vec3> tatooine::flowexplorer::nodes::autonomous_particle::m_pathlines

◆ m_points_on_initial_circle

std::vector<vec_t> tatooine::flowexplorer::nodes::autonomous_particle::m_points_on_initial_circle

◆ m_radius

real_type tatooine::flowexplorer::nodes::autonomous_particle::m_radius = 0.03

◆ m_stop_thread

bool tatooine::flowexplorer::nodes::autonomous_particle::m_stop_thread = false

◆ m_t0

real_type tatooine::flowexplorer::nodes::autonomous_particle::m_t0 = 0

◆ m_taustep

real_type tatooine::flowexplorer::nodes::autonomous_particle::m_taustep = 0.1

◆ m_v

vectorfield_t* tatooine::flowexplorer::nodes::autonomous_particle::m_v

◆ m_x0

vec<real_type, 2>* tatooine::flowexplorer::nodes::autonomous_particle::m_x0 = nullptr

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