Spatially resolved feedback
Modules and routines for efficiently tracing spatially resolved feedback
Bubble Tree
Description
This module containes routines for adding feedback of haloes to the tracing system and for testing whether a halo or a specific point in space is affected by the feedback
Quick access
- Variables
- Routines
add_bubble_to_tree()
,bubble_check()
,clean_bnode()
,clean_tree()
,copy_props_to_bubble()
,count_ion()
,dist_check()
,dist_check_allow_same()
,find_bnode()
,grid_check()
,ion_check()
,merge_into_bubble()
,mv_bubble()
,position_check()
,rm_bubble()
,start_btree()
Needed modules
metal_functions
: Helper functions for handling metals and computing abundances and metallicities
Variables
- bubble_tree/l_box_max [real]
- bubble_tree/mass_diff [real]
- bubble_tree/max_level [integer,parameter=20]
Subroutines and functions
- subroutine bubble_tree/start_btree()
initializes tree and sets up the head nodes
- Called from
- subroutine bubble_tree/add_bubble_to_tree(nodeadd, mmetal_add)
Adds ionized an enriched bubble of a node to the tree
- Parameters
nodeadd [treenode,inout]
mmetal_add (n_elements) [real,in] :: metal mass in this SN shell
- Called from
- Call to
- subroutine bubble_tree/find_bnode(jlevel, x, bnode, r[, ion_tree])
- Parameters
jlevel [integer,in]
x (3) [real,in]
bnode [bubble_node,out,pointer] :: associate parent node
r [real,in]
ion_tree [logical,in,]
- Called from
- Call to
- subroutine bubble_tree/rm_bubble(node, to_remove)
- Parameters
node [bubble_node,pointer]
to_remove [integer]
- Call to
- subroutine bubble_tree/mv_bubble(n_from, i_from, n_to, i_to)
moves the bubble to_move to the node move_to and fixes all the pointers afterwards
- Parameters
n_from [bubble_node,inout,pointer]
i_from [integer,in]
n_to [bubble_node,inout,pointer]
i_to [integer,in]
- Called from
- subroutine bubble_tree/copy_props_to_bubble(bnode, bubble, nodeadd, mmetal_add)
- Parameters
bnode [bubble_node,pointer]
bubble [integer,in] :: Index of Bubble
nodeadd [treenode,inout]
mmetal_add (*) [real,in] :: metal mass in this SN shell
- Called from
- subroutine bubble_tree/bubble_check(this_node)
routine to check whether This_Node is externally enricher and/or ionized
- Parameters
this_node [treenode,inout,target]
- Called from
- Call to
- subroutine bubble_tree/ion_check(this_node)
routine to check whether This_Node is ionized the treatment of haloes above the atomic cooling limit is based on Visbal et al. 2016 (MNRAS 460, L59-L63)
- Parameters
this_node [treenode,inout,target]
- Called from
- Call to
- subroutine bubble_tree/clean_tree(jlevel)
- Parameters
jlevel [integer,in]
- Called from
- Call to
- subroutine bubble_tree/clean_bnode(jlevel, bnode, n_merge)
- Parameters
jlevel [integer,in]
bnode [bubble_node,inout,pointer]
n_merge [integer,inout]
- Called from
- subroutine bubble_tree/merge_into_bubble(jlevel, x_in, v_in, l_in, x_out, v_ion_current, l_out, bnode, bubble_in)
- Parameters
jlevel [integer,in]
x_in (3) [real,in]
v_in [real,in]
l_in [real,in]
x_out (3) [real,out]
v_ion_current [real,out]
l_out [real,out]
bnode [bubble_node,pointer]
bubble_in [integer,in]
- subroutine bubble_tree/position_check(x, j_now, is_ion, is_enr)
routine to check whether This_Node is externally enricher and/or ionized
- Parameters
x (3) [real,in]
j_now [integer,in]
is_ion [logical,out]
is_enr [logical,out]
- Called from
- Call to
- function bubble_tree/count_ion(x, j_now, ion_tree)
routine to check whether This_Node is externally enricher and/or ionized
- Parameters
x (3) [real,in]
j_now [integer,in]
ion_tree [logical,in]
- Return
n_ion [integer]
- Call to
- subroutine bubble_tree/grid_check(ijk, bnode, x_in, caller)
- Parameters
ijk (3) [integer,in]
bnode [bubble_node,pointer]
x_in (3) [real,in]
caller [character,in]
- Called from
find_bnode()
,bubble_check()
,ion_check()
,position_check()
,count_ion()
- function bubble_tree/dist_check_allow_same(x_ref, x, r)
- Parameters
x_ref (3) [real,in]
x (3) [real,in]
r [real,in]
- Return
dist_check_allow_same [logical,pure]
- Called from
- function bubble_tree/dist_check(x_ref, x, r)
- Parameters
x_ref (3) [real,in]
x (3) [real,in]
r [real,in]
- Return
dist_check [logical,pure]
- Called from
Bubble tree types
Quick access
- Types
- Routines
Needed modules
utility
(realloc()
): General purpose utility functionsmetals
(n_elements()
): main module for handling metals
Types
- type bubble_tree_types/n_pointer
- Type fields
% p [bubble_node,pointer/optional/default=>null()]
- type bubble_tree_types/bubble_node
- Type fields
% l_box [real] :: size of the node
% l_ion (*) [real,allocatable] :: ionizing photon emission rate
% level [integer] :: tree-level where the node is located at
% m_out (*) [real,allocatable] :: metal mass
% mmetals_bub (*) [real,allocatable] :: metal mass
% n_bub [integer,optional/default=0]
% n_max [integer,optional/default=0]
% null [bubble_node,pointer]
% parent_node [bubble_node,pointer/optional/default=>]
% pop (*) [integer,allocatable] :: enriching population
% r_en (*) [real,allocatable] :: enriched radius
% r_ion (*) [real,allocatable] :: ionized radius
% sub_nodes (8) [n_pointer] :: pointers to the eight sub-nodes
% x (,) [real,allocatable] :: position
% x_node (3) [real] :: position of the corner of the node
% yields_bub (,) [real,allocatable]
Subroutines and functions
- subroutine bubble_tree_types/resize(this)
resizes bubble storage for one node within the bubble tree
- Parameters
this [real]
- subroutine bubble_tree_types/increase_size(this)
Makes room for one additional bubble in a node of the bubble-tree
- Parameters
this [real]
- Called from