GADGET-4
foftree.h
Go to the documentation of this file.
1/*******************************************************************************
2 * \copyright This file is part of the GADGET4 N-body/SPH code developed
3 * \copyright by Volker Springel. Copyright (C) 2014-2020 by Volker Springel
4 * \copyright (vspringel@mpa-garching.mpg.de) and all contributing authors.
5 *******************************************************************************/
6
12#ifndef FOFTREE_H
13#define FOFTREE_H
14
15#include "../data/simparticles.h"
16#include "../tree/tree.h"
17
19{
21 int no;
22};
23
25{
27 unsigned char Nextnode_shmrank;
28};
29
30struct fofnode : public basenode
31{
34};
35
36template <typename partset>
37class foftree : public tree<fofnode, partset, fofpoint_data, foreign_fofpoint_data>
38{
39 public:
42 using basetree::D;
43 using basetree::Father;
47 using basetree::get_Pp;
54 using basetree::Nodes;
61 using basetree::Tp; // This makes sure that we can access Tp from the base class without having to use "this"
69
70 int *FullyLinkedNodePIndex; // If a tree node is fully linked, this gives one particle of the encompassing group
71
72 void update_node_recursive(int no, int sib, int mode) override;
73 void exchange_topleafdata(void) override;
74 void fill_in_export_points(fofpoint_data *exp_point, int i, int no) override;
75 void report_log_message(void) override;
76
77 int treefind_fof_primary(MyIntPosType *searchcenter, MyNgbTreeFloat hsml, int target, int mode, thread_data *thread, int numnodes,
78 node_info *firstnode, int *ngblist, MyIDStorage target_MinID, int target_MinIDTask,
79 double target_DistanceOrigin);
81
83
85};
86
87#endif
int * FullyLinkedNodePIndex
Definition: foftree.h:70
void exchange_topleafdata(void) override
void fill_in_export_points(fofpoint_data *exp_point, int i, int no) override
void update_node_recursive(int no, int sib, int mode) override
void fof_link_particles_in_cell_recursive(int no, int q)
int treefind_fof_return_a_particle_in_cell_recursive(int no)
int treefind_fof_check_single_node_for_full_linking(int no)
int treefind_fof_primary(MyIntPosType *searchcenter, MyNgbTreeFloat hsml, int target, int mode, thread_data *thread, int numnodes, node_info *firstnode, int *ngblist, MyIDStorage target_MinID, int target_MinIDTask, double target_DistanceOrigin)
void report_log_message(void) override
tree< fofnode, partset, fofpoint_data, foreign_fofpoint_data > basetree
Definition: foftree.h:40
Definition: tree.h:91
void tree_export_node_threads(int no, int i, thread_data *thread, offset_tuple off=0)
Definition: tree.cc:1301
subfind_data * get_PSp(int n, unsigned char shmrank)
Definition: tree.h:280
pdata get_Pp(int n, unsigned char shmrank)
Definition: tree.h:287
void tree_export_node_threads_by_task_and_node(int task, int nodeindex, int i, thread_data *thread, offset_tuple off=0)
Definition: tree.cc:1311
uint32_t MyIntPosType
Definition: dtypes.h:35
float MyNgbTreeFloat
Definition: dtypes.h:88
Definition: tree.h:48
MyIntPosType range_max[3]
Definition: foftree.h:33
MyIntPosType range_min[3]
Definition: foftree.h:32
MyIntPosType IntPos[3]
Definition: foftree.h:20
unsigned char Nextnode_shmrank
Definition: foftree.h:27
Definition: tree.h:77