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:

head_nodes, head_nodes_ion, l_box_max, mass_diff, max_level

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

Variables

Subroutines and functions

subroutine  bubble_tree/start_btree()

initializes tree and sets up the head nodes

Called from:

asloth

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:

add_parent_to_tree()

Call to:

find_bnode(), increase_size(), copy_props_to_bubble()

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:

add_bubble_to_tree()

Call to:

grid_check()

subroutine  bubble_tree/rm_bubble(node, to_remove)
Parameters:
Call to:

mv_bubble()

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:
Called from:

rm_bubble()

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:

add_bubble_to_tree()

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:

node_feedback()

Call to:

dist_check_allow_same(), grid_check()

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. 2017 (MNRAS 469, 1456-1465)

Parameters:

this_node [treenode,inout,target]

Called from:

node_feedback()

Call to:

dist_check(), grid_check()

subroutine  bubble_tree/clean_tree(jlevel)
Parameters:

jlevel [integer,in]

Called from:

asloth

Call to:

clean_bnode()

subroutine  bubble_tree/clean_bnode(jlevel, bnode, n_merge)
Parameters:
  • jlevel [integer,in]

  • bnode [bubble_node,inout,pointer]

  • n_merge [integer,inout]

Called from:

clean_tree()

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:

get_fracs()

Call to:

grid_check()

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:

grid_check()

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:

bubble_check()

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:

ion_check()

Bubble tree types

Quick access

Types:

bubble_node, n_pointer

Routines:

increase_size(), resize()

Needed modules

Types

  • type  bubble_tree_types/n_pointer
    Type fields:
  • 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] :: outflow 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:

add_bubble_to_tree()