GADGET-4
gravtree< partset > Class Template Reference

#include <gravtree.h>

Inherits tree< gravnode, partset, gravpoint_data, foreign_gravpoint_data >.

Classes

struct  gfactors
 
struct  index_data
 
struct  mesh_factors
 
struct  resultsactiveimported_data
 

Public Types

typedef tree< gravnode, partset, gravpoint_data, foreign_gravpoint_databasetree
 
- Public Types inherited from tree< gravnode, partset, gravpoint_data, foreign_gravpoint_data >
enum  ftype
 
typedef decltype(Tp->P) pdata
 

Public Member Functions

void set_softenings (void)
 This function sets the (comoving) softening length of all particle types in the table All.SofteningTable[...]. More...
 
void gravity_exchange_forces (void)
 
template<typename T >
void get_gfactors_multipole (gfactors &res, const T r, const T h_max, const T rinv)
 
template<typename T >
void get_gfactors_monopole (gfactors &res, const T r, const T h_max, const T rinv)
 
template<typename T >
void get_gfactors_potential (gfactors &res, const T r, const T hmax, const T rinv)
 
- Public Member Functions inherited from tree< gravnode, partset, gravpoint_data, foreign_gravpoint_data >
void tree_add_to_fetch_stack (gravnode *nop, int nodetoopen, unsigned char shmrank)
 
void tree_add_to_work_stack (int target, int no, unsigned char shmrank, int mintopleafnode)
 
void prepare_shared_memory_access (void)
 
void cleanup_shared_memory_access (void)
 
void tree_fetch_foreign_nodes (enum ftype fetch_type)
 
void tree_initialize_leaf_node_access_info (void)
 
foreign_gravpoint_dataget_foreignpointsp (int n, unsigned char shmrank)
 
subfind_dataget_PSp (int n, unsigned char shmrank)
 
pdata get_Pp (int n, unsigned char shmrank)
 
sph_particle_dataget_SphPp (int n, unsigned char shmrank)
 
 tree ()
 
int treebuild (int ninsert, int *indexlist)
 
void treefree (void)
 
void treeallocate (int max_partindex, partset *Pptr, domain< partset > *Dptr)
 
void treeallocate_share_topnode_addresses (void)
 
void tree_export_node_threads (int no, int i, thread_data *thread, offset_tuple off=0)
 
void tree_export_node_threads_by_task_and_node (int task, int nodeindex, int i, thread_data *thread, offset_tuple off=0)
 
gravnodeget_nodep (int no)
 
gravnodeget_nodep (int no, unsigned char shmrank)
 
int * get_nextnodep (unsigned char shmrank)
 
gravpoint_dataget_pointsp (int no, unsigned char shmrank)
 
void tree_get_node_and_task (int i, int &no, int &task)
 

Public Attributes

mesh_factors mf [2]
 
char MeasureCostFlag
 
resultsactiveimported_dataResultsActiveImported
 
ewald_data PotTaylor
 
int num_layers = 0
 
char DoEwald
 
- Public Attributes inherited from tree< gravnode, partset, gravpoint_data, foreign_gravpoint_data >
domain< partset > * D
 
partset * Tp
 
int * Father
 
int * Nextnode
 
int * NodeSibling
 
int * NodeIndex
 
gravnodeTopNodes
 
gravnodeNodes
 
gravnodeForeign_Nodes
 
foreign_gravpoint_dataForeign_Points
 
ptrdiff_t * TreeNodes_offsets
 
ptrdiff_t * TreePoints_offsets
 
ptrdiff_t * TreeNextnode_offsets
 
ptrdiff_t * TreeForeign_Nodes_offsets
 
ptrdiff_t * TreeForeign_Points_offsets
 
ptrdiff_t * TreeP_offsets
 
ptrdiff_t * TreeSphP_offsets
 
ptrdiff_t * TreePS_offsets
 
void ** TreeSharedMemBaseAddr
 
unsigned char * NodeLevel
 
gravpoint_dataPoints
 
int * IndexList
 
int * ResultIndexList
 
int * Send_offset
 
int * Send_count
 
int * Recv_count
 
int * Recv_offset
 
int MaxPart
 
int MaxNodes
 
int NumNodes
 
int NumPartImported
 
int NumPartExported
 
int NumForeignNodes
 
int MaxForeignNodes
 
int NumForeignPoints
 
int MaxForeignPoints
 
long long sum_NumForeignNodes
 
long long sum_NumForeignPoints
 
int FirstNonTopLevelNode
 
int EndOfTreePoints
 
int EndOfForeignNodes
 
int ImportedNodeOffset
 
int Ninsert
 
int NextFreeNode
 
MPI_Comm TreeSharedMemComm
 
int TreeSharedMem_ThisTask
 
int TreeSharedMem_NTask
 
int TreeInfoHandle
 
double Buildtime
 
int NumOnFetchStack
 
int MaxOnFetchStack
 
fetch_data * StackToFetch
 
int NumOnWorkStack
 
int MaxOnWorkStack
 
int NewOnWorkStack
 
int AllocWorkStackBaseLow
 
int AllocWorkStackBaseHigh
 
workstack_data * WorkStack
 

Additional Inherited Members

- Static Public Member Functions inherited from tree< gravnode, partset, gravpoint_data, foreign_gravpoint_data >
static bool compare_ghostrank (const fetch_data &a, const fetch_data &b)
 
static bool compare_workstack (const workstack_data &a, const workstack_data &b)
 

Detailed Description

template<typename partset>
class gravtree< partset >

Definition at line 204 of file gravtree.h.

Member Typedef Documentation

◆ basetree

Definition at line 207 of file gravtree.h.

Member Function Documentation

◆ get_gfactors_monopole()

void get_gfactors_monopole ( gfactors res,
const T  r,
const T  h_max,
const T  rinv 
)
inline

Definition at line 525 of file gravtree.h.

◆ get_gfactors_multipole()

void get_gfactors_multipole ( gfactors res,
const T  r,
const T  h_max,
const T  rinv 
)
inline

Definition at line 405 of file gravtree.h.

◆ get_gfactors_potential()

void get_gfactors_potential ( gfactors res,
const T  r,
const T  hmax,
const T  rinv 
)
inline

Definition at line 567 of file gravtree.h.

◆ gravity_exchange_forces()

void gravity_exchange_forces ( void  )

This file contains the code for the gravitational force computation by means of the tree algorithm. To this end, a tree force is computed for all active local particles, and particles are exported to other processors if needed, where they can receive additional force contributions. If the TreePM algorithm is enabled, the force computed will only be the short-range part.

Definition at line 134 of file gravtree.cc.

◆ set_softenings()

void set_softenings ( void  )

This function sets the (comoving) softening length of all particle types in the table All.SofteningTable[...].

A check is performed that the physical softening length is bounded by the Softening-MaxPhys values.

Definition at line 584 of file gravtree_build.cc.

Member Data Documentation

◆ DoEwald

char DoEwald

public functions

Definition at line 361 of file gravtree.h.

◆ MeasureCostFlag

char MeasureCostFlag

Variables for gravitational tree

Definition at line 291 of file gravtree.h.

◆ mf

mesh_factors mf[2]

Definition at line 271 of file gravtree.h.

◆ num_layers

int num_layers = 0

Definition at line 296 of file gravtree.h.

◆ PotTaylor

ewald_data PotTaylor

Definition at line 295 of file gravtree.h.

◆ ResultsActiveImported

resultsactiveimported_data* ResultsActiveImported

Definition at line 293 of file gravtree.h.


The documentation for this class was generated from the following files: