| 3 | | Type ZoneLayout |
| 4 | | |
| 5 | | integer :: ZoneLayout(3,2,nZones) |
| 6 | | integer :: ZoneMembers(nZones, MaxProcsPerZone) |
| 7 | | |
| 8 | | Type PatchBoundaryDataPerZonePerDirection(nMyZones, nRays) |
| 9 | | integer :: mGlobal !originating patch boundaries - used for sorting |
| 10 | | integer :: Rays(2,2) ! given indexing based on direction and level |
| 11 | | REAL :: Depth (:,:) |
| 12 | | LOGICAL :: Integrated ! stores whether each ray is an integrated value - or a local value |
| 13 | | REAL :: zvals(:,:) ! stores exit value for 'z' data. used to determine which rays should be accumulated. |
| 14 | | end type |
| 15 | | |
| 16 | | Patch->Zones->RayBoundaries -> Communication to Upwind Zones |
| 17 | | |
| 18 | | Each processor orders Patch Boundaries within a zone and integrates the depth. At this point every patch boundary should be integrated and is suitable for updating physical zones. So now - loop over patches and find boundaries and update optical depth to all of the cells. |
| 19 | | |
| 20 | | SUBROUTINE Calculate_Patch_Boundary_Data_For_Local_Zones(Info, direction) |
| 21 | | ! Calculates optical depth from grid edge to each cell and creates a Patch_Boundary_Data_Per_Zone_Per_Direction object(s) |
| | 4 | 1. !PatchDef - This stores information about patches needed to do the ray tracing |
| | 5 | 1. !RayGroupDef - This stores information about a particular group of parallel rays |
| 28 | | END |
| | 13 | == Collect Patches == |
| | 14 | For each patch, build a list of shadow-patches and send/receive the optical depth across each shadow patch. |
| | 15 | |
| | 16 | == Add Shadows == |
| | 17 | For each patch, sort the shadow patches by their earliest 'z-value' |
| | 18 | Then accumulate shadows for each patch |
| | 19 | |
| | 20 | |
| | 21 | Currently the code just calculates the optical depth to each zone. |
| | 22 | |
| | 23 | The Krumholz et al scheme, calculates ionization rates as well as optical depths when it traverses the tree. |
| | 24 | |
| | 25 | 1.) Modify tree traversal scheme to also calculate the ionization rate in addition to the optical depth |
| | 26 | 2.) Add routines to take ionization rate and calculate heating/cooling rates and calculate CFL |
| | 27 | 3.) Add routine to update energy and ionization values |
| | 28 | 4.) Add sub-cycling |
| | 29 | 5.) Will need to store ionization & heating/cooling rates in addition to optical depths at patch boundaries for AMR to work with sub-cycling so we can update ghost zones |
| | 30 | 6.) Implement healpix tree traversal scheme. |
| | 31 | |