Package evaluation of Mera on Julia 1.13.0-DEV.791 (d5209bd37d*) started at 2025-07-04T17:11:15.713 ################################################################################ # Set-up # Installing PkgEval dependencies (TestEnv)... Set-up completed after 8.19s ################################################################################ # Installation # Installing Mera... Resolving package versions... Installed Mera ─ v1.7.0 Updating `~/.julia/environments/v1.13/Project.toml` [02f895e8] + Mera v1.7.0 Updating `~/.julia/environments/v1.13/Manifest.toml` [1520ce14] + AbstractTrees v0.4.5 ⌅ [79e6a3ab] + Adapt v2.4.0 [66dad0bd] + AliasTables v1.1.3 [13072b0f] + AxisAlgorithms v1.1.0 [d360d2e6] + ChainRulesCore v1.25.2 [523fee87] + CodecBzip2 v0.8.5 [5ba52731] + CodecLz4 v0.4.6 [944b1d66] + CodecZlib v0.7.8 [3da002f7] + ColorTypes v0.12.1 [c3611d14] + ColorVectorSpace v0.11.0 [5ae59095] + Colors v0.13.1 [34da2185] + Compat v4.17.0 [150eb455] + CoordinateTransformations v0.6.4 [9a962f9c] + DataAPI v1.16.0 [864edb3b] + DataStructures v0.18.22 [e2d170a0] + DataValueInterfaces v1.0.0 [e7dc6d0d] + DataValues v0.4.13 [31c24e10] + Distributions v0.25.120 [ffbed154] + DocStringExtensions v0.9.5 [fdbdab4c] + ElasticArrays v1.2.12 [e2ba6199] + ExprTools v0.1.10 [5789e2e9] + FileIO v1.17.0 [1a297f60] + FillArrays v1.13.0 [53c48c17] + FixedPointNumbers v0.8.5 ⌅ [c58ffaec] + FortranFiles v0.6.0 [34004b35] + HypergeometricFunctions v0.3.28 [c817782e] + ImageBase v0.1.7 [a09fc81d] + ImageCore v0.10.5 [02fcd773] + ImageTransformations v0.10.2 [6deec6e2] + IndexedTables v1.0.1 [842dd82b] + InlineStrings v1.4.4 [a98d9a8b] + Interpolations v0.16.1 [41ab1584] + InvertedIndices v1.3.1 [92d709cd] + IrrationalConstants v0.2.4 [82899510] + IteratorInterfaceExtensions v1.0.0 ⌅ [033835bb] + JLD2 v0.5.13 [692b3bcd] + JLLWrappers v1.7.0 [9c8b4983] + LightXML v0.9.2 [2ab3a3ac] + LogExpFunctions v0.3.29 [1914dd2f] + MacroTools v0.5.16 [dbb5928d] + MappedArrays v0.4.2 [02f895e8] + Mera v1.7.0 [e1d29d7a] + Missings v1.2.0 [e94cdb99] + MosaicViews v0.3.4 [6fe1bfb0] + OffsetArrays v1.17.0 [a15396b6] + OnlineStats v1.7.1 [925886fa] + OnlineStatsBase v1.7.1 [bac558e1] + OrderedCollections v1.8.1 [90014a1f] + PDMats v0.11.35 [5432bcbf] + PaddedViews v0.5.12 [69de0a69] + Parsers v2.8.3 [2dfb63ee] + PooledArrays v1.4.3 [aea7be01] + PrecompileTools v1.3.2 [21216c6a] + Preferences v1.4.3 [92933f4c] + ProgressMeter v1.10.4 [43287f4e] + PtrArrays v1.3.0 [1fd47b50] + QuadGK v2.11.2 [94ee1d12] + Quaternions v0.7.6 [c84ed2f1] + Ratios v0.4.5 [c1ae055f] + RealDot v0.1.0 [3cdcf5f2] + RecipesBase v1.3.4 [189a3867] + Reexport v1.2.2 [ae029012] + Requires v1.3.1 [79098fc4] + Rmath v0.8.0 [6038ab10] + Rotations v1.7.1 [a2af1166] + SortingAlgorithms v1.2.1 [276daf66] + SpecialFunctions v2.5.1 [cae243ae] + StackViews v0.1.2 [90137ffa] + StaticArrays v1.9.13 [1e83bf80] + StaticArraysCore v1.4.3 [10745b16] + Statistics v1.11.1 [82ae8749] + StatsAPI v1.7.1 [2913bbd2] + StatsBase v0.34.5 [4c63d2b9] + StatsFuns v1.5.0 ⌅ [09ab397b] + StructArrays v0.4.4 [3783bdb8] + TableTraits v1.0.1 [382cd787] + TableTraitsUtils v1.0.2 [bd369af6] + Tables v1.12.1 [62fd8b95] + TensorCore v0.1.1 [a759f4b9] + TimerOutputs v0.5.29 [3bb67fe8] + TranscodingStreams v0.11.3 [4004b06d] + VTKBase v1.0.1 [8149f6b0] + WAV v1.2.0 [ea10d353] + WeakRefStrings v1.4.2 [efce3f68] + WoodburyMatrices v1.0.0 [64499a7a] + WriteVTK v1.21.2 [6e34b625] + Bzip2_jll v1.0.9+0 [94ce4f54] + Libiconv_jll v1.18.0+0 [5ced341a] + Lz4_jll v1.10.1+0 [efe28fd5] + OpenSpecFun_jll v0.5.6+0 [f50d1b31] + Rmath_jll v0.5.1+0 [02c8fc9c] + XML2_jll v2.14.1+0 [0dad84c5] + ArgTools v1.1.2 [56f22d72] + Artifacts v1.11.0 [2a0f44e3] + Base64 v1.11.0 [ade2ca70] + Dates v1.11.0 [8ba89e20] + Distributed v1.11.0 [f43a241f] + Downloads v1.7.0 [7b1f6079] + FileWatching v1.11.0 [9fa8497b] + Future v1.11.0 [b77e0a4c] + InteractiveUtils v1.11.0 [ac6e5ff7] + JuliaSyntaxHighlighting v1.12.0 [b27032c2] + LibCURL v0.6.4 [76f85450] + LibGit2 v1.11.0 [8f399da3] + Libdl v1.11.0 [37e2e46d] + LinearAlgebra v1.12.0 [56ddb016] + Logging v1.11.0 [d6f4376e] + Markdown v1.11.0 [a63ad114] + Mmap v1.11.0 [ca575930] + NetworkOptions v1.3.0 [44cfe95a] + Pkg v1.13.0 [de0858da] + Printf v1.11.0 [9a3f8284] + Random v1.11.0 [ea8e919c] + SHA v0.7.0 [9e88b42a] + Serialization v1.11.0 [1a1011a3] + SharedArrays v1.11.0 [6462fe0b] + Sockets v1.11.0 [2f01184e] + SparseArrays v1.12.0 [f489334b] + StyledStrings v1.11.0 [4607b0f0] + SuiteSparse [fa267f1f] + TOML v1.0.3 [a4e569a6] + Tar v1.10.0 [cf7118a7] + UUIDs v1.11.0 [4ec0a83e] + Unicode v1.11.0 [e66e0078] + CompilerSupportLibraries_jll v1.3.0+1 [deac9b47] + LibCURL_jll v8.14.1+1 [e37daf67] + LibGit2_jll v1.9.1+0 [29816b5a] + LibSSH2_jll v1.11.3+1 [14a3606d] + MozillaCACerts_jll v2025.5.20 [4536629a] + OpenBLAS_jll v0.3.29+0 [05823500] + OpenLibm_jll v0.8.5+0 [458c3c95] + OpenSSL_jll v3.5.0+0 [efcefdf7] + PCRE2_jll v10.45.0+0 [bea87d4a] + SuiteSparse_jll v7.10.1+0 [83775a58] + Zlib_jll v1.3.1+2 [8e850b90] + libblastrampoline_jll v5.13.1+0 [8e850ede] + nghttp2_jll v1.65.0+0 [3f19e933] + p7zip_jll v17.5.0+2 Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m` Installation completed after 5.65s ################################################################################ # Precompilation # Precompiling PkgEval dependencies... Precompiling package dependencies... Precompilation completed after 211.6s ################################################################################ # Testing # Testing Mera Status `/tmp/jl_K6EGtr/Project.toml` [02f895e8] Mera v1.7.0 [f43a241f] Downloads v1.7.0 [a4e569a6] Tar v1.10.0 [8dfed614] Test v1.11.0 Status `/tmp/jl_K6EGtr/Manifest.toml` [1520ce14] AbstractTrees v0.4.5 ⌅ [79e6a3ab] Adapt v2.4.0 [66dad0bd] AliasTables v1.1.3 [13072b0f] AxisAlgorithms v1.1.0 [d360d2e6] ChainRulesCore v1.25.2 [523fee87] CodecBzip2 v0.8.5 [5ba52731] CodecLz4 v0.4.6 [944b1d66] CodecZlib v0.7.8 [3da002f7] ColorTypes v0.12.1 [c3611d14] ColorVectorSpace v0.11.0 [5ae59095] Colors v0.13.1 [34da2185] Compat v4.17.0 [150eb455] CoordinateTransformations v0.6.4 [9a962f9c] DataAPI v1.16.0 [864edb3b] DataStructures v0.18.22 [e2d170a0] DataValueInterfaces v1.0.0 [e7dc6d0d] DataValues v0.4.13 [31c24e10] Distributions v0.25.120 [ffbed154] DocStringExtensions v0.9.5 [fdbdab4c] ElasticArrays v1.2.12 [e2ba6199] ExprTools v0.1.10 [5789e2e9] FileIO v1.17.0 [1a297f60] FillArrays v1.13.0 [53c48c17] FixedPointNumbers v0.8.5 ⌅ [c58ffaec] FortranFiles v0.6.0 [34004b35] HypergeometricFunctions v0.3.28 [c817782e] ImageBase v0.1.7 [a09fc81d] ImageCore v0.10.5 [02fcd773] ImageTransformations v0.10.2 [6deec6e2] IndexedTables v1.0.1 [842dd82b] InlineStrings v1.4.4 [a98d9a8b] Interpolations v0.16.1 [41ab1584] InvertedIndices v1.3.1 [92d709cd] IrrationalConstants v0.2.4 [82899510] IteratorInterfaceExtensions v1.0.0 ⌅ [033835bb] JLD2 v0.5.13 [692b3bcd] JLLWrappers v1.7.0 [9c8b4983] LightXML v0.9.2 [2ab3a3ac] LogExpFunctions v0.3.29 [1914dd2f] MacroTools v0.5.16 [dbb5928d] MappedArrays v0.4.2 [02f895e8] Mera v1.7.0 [e1d29d7a] Missings v1.2.0 [e94cdb99] MosaicViews v0.3.4 [6fe1bfb0] OffsetArrays v1.17.0 [a15396b6] OnlineStats v1.7.1 [925886fa] OnlineStatsBase v1.7.1 [bac558e1] OrderedCollections v1.8.1 [90014a1f] PDMats v0.11.35 [5432bcbf] PaddedViews v0.5.12 [69de0a69] Parsers v2.8.3 [2dfb63ee] PooledArrays v1.4.3 [aea7be01] PrecompileTools v1.3.2 [21216c6a] Preferences v1.4.3 [92933f4c] ProgressMeter v1.10.4 [43287f4e] PtrArrays v1.3.0 [1fd47b50] QuadGK v2.11.2 [94ee1d12] Quaternions v0.7.6 [c84ed2f1] Ratios v0.4.5 [c1ae055f] RealDot v0.1.0 [3cdcf5f2] RecipesBase v1.3.4 [189a3867] Reexport v1.2.2 [ae029012] Requires v1.3.1 [79098fc4] Rmath v0.8.0 [6038ab10] Rotations v1.7.1 [a2af1166] SortingAlgorithms v1.2.1 [276daf66] SpecialFunctions v2.5.1 [cae243ae] StackViews v0.1.2 [90137ffa] StaticArrays v1.9.13 [1e83bf80] StaticArraysCore v1.4.3 [10745b16] Statistics v1.11.1 [82ae8749] StatsAPI v1.7.1 [2913bbd2] StatsBase v0.34.5 [4c63d2b9] StatsFuns v1.5.0 ⌅ [09ab397b] StructArrays v0.4.4 [3783bdb8] TableTraits v1.0.1 [382cd787] TableTraitsUtils v1.0.2 [bd369af6] Tables v1.12.1 [62fd8b95] TensorCore v0.1.1 [a759f4b9] TimerOutputs v0.5.29 [3bb67fe8] TranscodingStreams v0.11.3 [4004b06d] VTKBase v1.0.1 [8149f6b0] WAV v1.2.0 [ea10d353] WeakRefStrings v1.4.2 [efce3f68] WoodburyMatrices v1.0.0 [64499a7a] WriteVTK v1.21.2 [6e34b625] Bzip2_jll v1.0.9+0 [94ce4f54] Libiconv_jll v1.18.0+0 [5ced341a] Lz4_jll v1.10.1+0 [efe28fd5] OpenSpecFun_jll v0.5.6+0 [f50d1b31] Rmath_jll v0.5.1+0 [02c8fc9c] XML2_jll v2.14.1+0 [0dad84c5] ArgTools v1.1.2 [56f22d72] Artifacts v1.11.0 [2a0f44e3] Base64 v1.11.0 [ade2ca70] Dates v1.11.0 [8ba89e20] Distributed v1.11.0 [f43a241f] Downloads v1.7.0 [7b1f6079] FileWatching v1.11.0 [9fa8497b] Future v1.11.0 [b77e0a4c] InteractiveUtils v1.11.0 [ac6e5ff7] JuliaSyntaxHighlighting v1.12.0 [b27032c2] LibCURL v0.6.4 [76f85450] LibGit2 v1.11.0 [8f399da3] Libdl v1.11.0 [37e2e46d] LinearAlgebra v1.12.0 [56ddb016] Logging v1.11.0 [d6f4376e] Markdown v1.11.0 [a63ad114] Mmap v1.11.0 [ca575930] NetworkOptions v1.3.0 [44cfe95a] Pkg v1.13.0 [de0858da] Printf v1.11.0 [9a3f8284] Random v1.11.0 [ea8e919c] SHA v0.7.0 [9e88b42a] Serialization v1.11.0 [1a1011a3] SharedArrays v1.11.0 [6462fe0b] Sockets v1.11.0 [2f01184e] SparseArrays v1.12.0 [f489334b] StyledStrings v1.11.0 [4607b0f0] SuiteSparse [fa267f1f] TOML v1.0.3 [a4e569a6] Tar v1.10.0 [8dfed614] Test v1.11.0 [cf7118a7] UUIDs v1.11.0 [4ec0a83e] Unicode v1.11.0 [e66e0078] CompilerSupportLibraries_jll v1.3.0+1 [deac9b47] LibCURL_jll v8.14.1+1 [e37daf67] LibGit2_jll v1.9.1+0 [29816b5a] LibSSH2_jll v1.11.3+1 [14a3606d] MozillaCACerts_jll v2025.5.20 [4536629a] OpenBLAS_jll v0.3.29+0 [05823500] OpenLibm_jll v0.8.5+0 [458c3c95] OpenSSL_jll v3.5.0+0 [efcefdf7] PCRE2_jll v10.45.0+0 [bea87d4a] SuiteSparse_jll v7.10.1+0 [83775a58] Zlib_jll v1.3.1+2 [8e850b90] libblastrampoline_jll v5.13.1+0 [8e850ede] nghttp2_jll v1.65.0+0 [3f19e933] p7zip_jll v17.5.0+2 Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. Testing Running tests... Precompiling packages... 9096.1 ms ✓ Distributions → DistributionsTestExt 1 dependency successfully precompiled in 10 seconds. 49 already precompiled. -------------------------------------- [ Info: file/folder-names: -------------------------------------- -------------------------------------- [ Info: general tests: -------------------------------------- verbose_mode: true verbose_mode: false verbose_mode: nothing showprogress_mode: true showprogress_mode: false showprogress_mode: nothing [Mera]: Fields to use as arguments in functions ======================================================================= pxsize = missing res = missing lmax = missing xrange = missing yrange = missing zrange = missing radius = missing height = missing direction = missing plane = missing plane_ranges = missing thickness = missing position = missing center = missing range_unit = missing data_center = missing data_center_unit = missing verbose = missing show_progress = missing [Mera]: 2025-07-04T17:16:16.745 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Namelist file content ================================= &UNITS_PARAMS units_length = 0.308567758128200E+22 ! kpc units_density = 0.677025430198932E-22 ! 1e9 Msol/kpc^3 units_time = 0.470430312423675E+15 ! G &HYDRO_PARAMS slope_type =3 gamma =1.6667 riemann ='hllc' courant_factor =0.8 smallr =1e-11 &DICE_PARAMS ic_u_name ='U ' ! Name of the internal energy datablock (Gadget2 format only) amr_struct =.false. ! Reproduce the AMR structure of the Gadget2 file resulting from a ramses to gadget conversion ic_metal_name ='Z ' ! Name of the metallicity datablock (Gadget2 format only) gadget_scale_l =3.085677581282D21 ! Gadget file length unit ic_mag_center_y =0.0 ! y-coordinate of the magnetic field symmetry center ic_vel_name ='VEL ' ! Name of the velocity vector datablock (Gadget2 format only) ic_mag_axis_x =0.0 ! Magnetic field normal vector x-component ic_scale_vel =1.0 ! Scaling factor for the velocity vector ic_head_name ='HEAD' ! Name of the Header datablock (Gadget2 format only) ic_skip_type = -1 ! Skip specific particle type ic_mag_center_z =0.0 ! z-coordinate of the magnetic field symmetry center ic_scale_metal =1.0 ! Scaling factor for the metallicity ic_format ='Gadget2' ! Format of the initial conditions. 'Gadget1' or 'Gadget2' ic_scale_u =1.0 ! Scaling factor for the internal energy ic_center =0.0,0.0,0.0 ! Shift center parameter. ICs are automatically shifted with boxlen/2 ic_mass_name ='MASS' ! Name of the mass datablock (Gadget2 format only) ic_age_name ='AGE ' ! Name of the particle age datablock (Gadget2 format only) gadget_scale_v =1.0D5 ! Gadget file velocity unit ic_mag_axis_z =1.0 ! Magnetic field normal vector z-component ic_nfile =1 ! If greater than one, look for files with name matching ic_file//'.n' IG_rho =1.0D-6 ! Intergalactic gas density ic_mag_scale_B =0.0 ! Foreground toroidal magnetic field value ic_mag_const =0.0,0.0,0.0 ! Background magnetic field value for x,y,z component IG_T2 =1.0D6 ! Intergalactic gas temperature ic_mag_axis_y =0.0 ! Magnetic field normal vector y-component gadget_scale_t =3.15360e+13 ! Gadget file time unit ic_id_name ='ID ' ! Name of the particle identifier datablock (Gadget2 format only) cosmo_add_gas_index = -1 ! Gas particle type index for cosmo runs ic_scale_age =1.0 ! Scaling factor for the particles age ic_file ='mera_spiral.g2' ! Name of the initial conditions file ic_mag_scale_R =1.0 ! Toroidal magnetic field scalelength IG_metal =1.0D-4 ! Intergalactic gas metallicity ic_scale_pos =1.0 ! Scaling factor for the position vector ic_mag_scale_H =1.0 ! Toroidal magnetic field scaleheight ic_scale_mass =1.0 ! Scaling factor for the mass ic_pos_name ='POS ' ! Name of the position vector datablock (Gadget2 format only) gadget_scale_m =1.9891D43 ! Gadget file mass unit ic_ifout =1 ! Change ramses output index for restarts ic_mag_center_x =0.0 ! x-coordinate of the magnetic field symmetry center &INIT_PARAMS initfile(1) ='./' !initfile(1) ='./' filetype ='dice' &REFINE_PARAMS interpol_var =1 !primitive interpol_type =2 !0 m_refine =20,20,20,20,20,20,20,20,20,20 mass_sph = 1.000276597482903e-6 ! 1e3 Msol !interpol_var =0 !conservatives &BOUNDARY_PARAMS jbound_min = 0, 0,-1,+1,-1,-1 ibound_max =-1,+1,+1,+1,+1,+1 jbound_max = 0, 0,-1,+1,+1,+1 kbound_max = 0, 0, 0, 0,-1,+1 ibound_min =-1,+1,-1,-1,-1,-1 bound_type = 2, 2, 2, 2, 2, 2 !2 kbound_min = 0, 0, 0, 0,-1,+1 no_inflow =.true. nboundary = 6 &AMR_PARAMS npartmax = 500000 levelmin =3 nexpand =1 boxlen =100. !kpc levelmax =7 ngridmax = 100000 &FEEDBACK_PARAMS f_ek =0. !t_diss = 1. !Myr eta_sn =0.2 t_sne =10. !10. !Myr !delayed_cooling =.true. &OUTPUT_PARAMS tend =10 !Final time of the simulation delta_tout =0.1 !Time increment between outputs &POISSON_PARAMS gravity_type =-3 &SF_PARAMS T2_star = 1e4 n_star = 1 m_star = 1. ! in units mass_sph eps_star = 0.02 !2% &COOLING_PARAMS metal =.true. cooling =.true. z_ave =1. &RUN_PARAMS pic =.true. poisson =.true. nremap =5 !10 ncontrol =1 !frequency of screen output verbose =.false. nrestart =0 hydro =.true. nsubcycle =20*2 [Mera]: 2025-07-04T17:16:25.211 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Patch-file content ================================= /data1/mabe/MeraTest/Ramses/patch_2019_10version//add_list.f90 !################################################################ !################################################################ !################################################################ !################################################################ subroutine add_list(ind_part,list2,ok,np) use amr_commons use pm_commons implicit none integer::np integer,dimension(1:nvector)::ind_part,list2 logical,dimension(1:nvector)::ok ! ! Add particles to their new linked lists ! integer::j do j=1,np if(ok(j))then if(numbp(list2(j))>0)then ! Add particle at the tail of its linked list nextp(tailp(list2(j)))=ind_part(j) prevp(ind_part(j))=tailp(list2(j)) nextp(ind_part(j))=0 tailp(list2(j))=ind_part(j) numbp(list2(j))=numbp(list2(j))+1 else ! Initialise linked list headp(list2(j))=ind_part(j) tailp(list2(j))=ind_part(j) prevp(ind_part(j))=0 nextp(ind_part(j))=0 numbp(list2(j))=1 end if end if end do end subroutine add_list !################################################################ !################################################################ !################################################################ !################################################################ subroutine add_free(ind_part,np) use amr_commons use pm_commons use dice_commons implicit none integer::np integer,dimension(1:nvector)::ind_part ! ! Add particles to the free memory linked list ! and reset all particle variables ! integer::j,idim do idim=1,ndim do j=1,np xp(ind_part(j),idim)=0.0 vp(ind_part(j),idim)=0.0 end do end do do j=1,np mp(ind_part(j))=0.0 idp(ind_part(j))=0 levelp(ind_part(j))=0 typep(ind_part(j))%family=FAM_UNDEF typep(ind_part(j))%tag=0 end do if(star.or.sink)then do j=1,np tp(ind_part(j))=0.0 end do if(metal)then do j=1,np zp(ind_part(j))=0.0 end do end if end if ! DICE patch if(dice_init) then do j=1,np up(ind_part(j))=0.0 end do endif do j=1,np if(numbp_free>0)then ! Add particle at the tail of its linked list nextp(tailp_free)=ind_part(j) prevp(ind_part(j))=tailp_free nextp(ind_part(j))=0 tailp_free=ind_part(j) numbp_free=numbp_free+1 else ! Initialise linked list headp_free=ind_part(j) tailp_free=ind_part(j) prevp(ind_part(j))=0 nextp(ind_part(j))=0 numbp_free=1 end if end do npart=npartmax-numbp_free end subroutine add_free !################################################################ !################################################################ !################################################################ !################################################################ subroutine add_free_cond(ind_part,ok,np) use amr_commons use pm_commons use dice_commons implicit none integer::np integer,dimension(1:nvector)::ind_part logical,dimension(1:nvector)::ok ! ! Add particles to the free memory linked list ! and reset all particle variables ! integer::j,idim do idim=1,ndim do j=1,np if(ok(j))then xp(ind_part(j),idim)=0.0 vp(ind_part(j),idim)=0.0 endif end do end do do j=1,np if(ok(j))then mp(ind_part(j))=0.0 idp(ind_part(j))=0 levelp(ind_part(j))=0 typep(ind_part(j))%family = FAM_UNDEF typep(ind_part(j))%tag = 0 endif end do if(star.or.sink)then do j=1,np if(ok(j))then tp(ind_part(j))=0.0 endif end do if(metal)then do j=1,np if(ok(j))then zp(ind_part(j))=0.0 endif end do end if end if ! DICE patch if(dice_init) then do j=1,np if(ok(j))then up(ind_part(j))=0.0 endif end do endif do j=1,np if(ok(j))then if(numbp_free>0)then ! Add particle at the tail of its linked list nextp(tailp_free)=ind_part(j) prevp(ind_part(j))=tailp_free nextp(ind_part(j))=0 tailp_free=ind_part(j) numbp_free=numbp_free+1 else ! Initialise linked list headp_free=ind_part(j) tailp_free=ind_part(j) prevp(ind_part(j))=0 nextp(ind_part(j))=0 numbp_free=1 end if endif end do npart=npartmax-numbp_free end subroutine add_free_cond /data1/mabe/MeraTest/Ramses/patch_2019_10version//gadgetreadfile.f90 MODULE gadgetreadfilemod ! ! Routines to read L-Gadget2 particle data files in Fortran ! Adapted from http://astro.dur.ac.uk/~jch/password_pages/index.html ! ! CHARACTER(LEN=*) :: basefile - the base snapshot name. It may get a file id added ! ! ! ! ! Data type corresponding to gadget file header TYPE gadgetheadertype INTEGER*4, DIMENSION(6) :: npart REAL*8, DIMENSION(6) :: mass REAL*8 :: time REAL*8 :: redshift INTEGER*4 :: flag_sfr INTEGER*4 :: flag_feedback INTEGER*4, DIMENSION(6) :: nparttotal INTEGER*4 :: flag_cooling INTEGER*4 :: numfiles REAL*8 :: boxsize REAL*8 :: omega0 REAL*8 :: omegalambda REAL*8 :: hubbleparam INTEGER*4 :: flag_stellarage INTEGER*4 :: flag_metals INTEGER*4, DIMENSION(6) :: totalhighword INTEGER*4 :: flag_entropy_instead_u INTEGER*4 :: flag_doubleprecision INTEGER*4 :: flag_ic_info REAL*4 :: lpt_scalingfactor CHARACTER, DIMENSION(48) :: unused END TYPE gadgetheadertype CONTAINS ! --------------------------------------------------------------------------- SUBROUTINE gadgetreadheader(basename,ifile, header, ok) ! ! Read and return the gadget file header for the specified file ! IMPLICIT NONE ! Input parameters CHARACTER(LEN=*), INTENT(IN) :: basename INTEGER, INTENT(IN):: ifile ! Header to return TYPE (gadgetheadertype), INTENT(OUT) :: header logical, INTENT(OUT)::ok ! Internal variables CHARACTER(LEN=256) :: filename CHARACTER(LEN=6) :: fileno integer::dummy_int,blck_size,head_blck character(LEN=4)::blck_name filename = TRIM(basename) INQUIRE(file=filename, exist=ok) if (.not.ok) then ! Generate the number to go on the end of the filename IF(ifile.LT.10)THEN WRITE(fileno,'('.',1i1.1)')ifile ELSE IF (ifile.LT.100)THEN WRITE(fileno,'('.',1i2.2)')ifile ELSE IF (ifile.LT.1000)THEN WRITE(fileno,'('.',1i3.3)')ifile ELSE IF (ifile.LT.10000)THEN WRITE(fileno,'('.',1i4.4)')ifile ELSE WRITE(fileno,'('.',1i5.5)')ifile END IF filename = TRIM(basename) // fileno INQUIRE(file=filename, exist=ok) if(.not.ok) then write(*,*) 'No file '//basename//' or '//filename RETURN end if end if !OPEN(unit=1,file=filename,status='old',action='read',form='unformatted') OPEN(unit=1,file=filename,status='old',action='read',form='unformatted',access='stream') read(1,POS=1) dummy_int read(1,POS=1+sizeof(dummy_int)) blck_name read(1,POS=1+sizeof(dummy_int)+sizeof(blck_name)) dummy_int read(1,POS=1+2*sizeof(dummy_int)+sizeof(blck_name)) dummy_int read(1,POS=1+3*sizeof(dummy_int)+sizeof(blck_name)) blck_size head_blck = 1+sizeof(blck_name)+4*sizeof(dummy_int) ! Byte swapping doesn't work if you just do READ(1)header !READ(1)header%npart,header%mass,header%time,header%redshift, & ! header%flag_sfr,header%flag_feedback,header%nparttotal, & ! header%flag_cooling,header%numfiles,header%boxsize, & ! header%omega0,header%omegalambda,header%hubbleparam, & ! header%flag_stellarage,header%flag_metals,header%totalhighword, & ! header%flag_entropy_instead_u, header%flag_doubleprecision, & ! header%flag_ic_info, header%lpt_scalingfactor READ(1,POS=head_blck) header%npart,header%mass,header%time,header%redshift, & header%flag_sfr,header%flag_feedback,header%nparttotal, & header%flag_cooling,header%numfiles,header%boxsize, & header%omega0,header%omegalambda,header%hubbleparam, & header%flag_stellarage,header%flag_metals,header%totalhighword, & header%flag_entropy_instead_u, header%flag_doubleprecision, & header%flag_ic_info, header%lpt_scalingfactor CLOSE(1) END SUBROUTINE gadgetreadheader ! --------------------------------------------------------------------------- SUBROUTINE gadgetreadfile(basename,ifile,header,pos,vel,id) ! ! Read and return all data from the specified file. Output arrays must ! already be allocated. Use readheader to get particle numbers to do this. ! IMPLICIT NONE ! Input parameters CHARACTER(LEN=*), INTENT(IN) :: basename INTEGER, INTENT(IN) :: ifile ! Header and hash table to return TYPE (gadgetheadertype) :: header ! Particle data REAL, DIMENSION(3,*) :: pos,vel #ifndef LONGINT INTEGER*4, DIMENSION(*) :: id #else INTEGER*8, DIMENSION(*) :: id #endif ! Internal variables CHARACTER(LEN=256) :: filename CHARACTER(LEN=6) :: fileno INTEGER :: np logical::ok ! Generate the number to go on the end of the filename IF(ifile.LT.10)THEN WRITE(fileno,'('.',1i1.1)')ifile ELSE IF (ifile.LT.100)THEN WRITE(fileno,'('.',1i2.2)')ifile ELSE IF (ifile.LT.1000)THEN WRITE(fileno,'('.',1i3.3)')ifile ELSE IF (ifile.LT.10000)THEN WRITE(fileno,'('.',1i4.4)')ifile ELSE WRITE(fileno,'('.',1i5.5)')ifile END IF filename = TRIM(basename) // fileno INQUIRE(file=filename, exist=ok) if(.not.ok) then write(*,*) 'No file '//filename RETURN end if OPEN(unit=1,file=filename,status='old',action='read',form='unformatted') ! Byte swapping doesn't appear to work if you just do READ(1)header READ(1)header%npart,header%mass,header%time,header%redshift, & header%flag_sfr,header%flag_feedback,header%nparttotal, & header%flag_cooling,header%numfiles,header%boxsize, & header%omega0,header%omegalambda,header%hubbleparam, & header%flag_stellarage,header%flag_metals,header%totalhighword, & header%flag_entropy_instead_u, header%flag_doubleprecision, & header%flag_ic_info, header%lpt_scalingfactor np=header%npart(2) READ(1)pos(1:3,1:np) READ(1)vel(1:3,1:np) READ(1)id(1:np) CLOSE(1) END SUBROUTINE gadgetreadfile ! --------------------------------------------------------------------------- SUBROUTINE gadgetwritefile(basename,ifile,header,pos,vel,id) ! ! Read and return all data from the specified file. Output arrays must ! already be allocated. Use readheader to get particle numbers to do this. ! IMPLICIT NONE ! Input parameters CHARACTER(LEN=*), INTENT(IN) :: basename INTEGER, INTENT(IN) :: ifile ! Header and hash table to return TYPE (gadgetheadertype) :: header ! Particle data REAL, DIMENSION(3,*) :: pos,vel #ifndef LONGINT INTEGER*4, DIMENSION(*) :: id #else INTEGER*8, DIMENSION(*) :: id #endif ! Internal variables CHARACTER(LEN=256) :: filename CHARACTER(LEN=6) :: fileno INTEGER :: np logical::ok ! Generate the number to go on the end of the filename IF(ifile.LT.10)THEN WRITE(fileno,'('.',1i1.1)')ifile ELSE IF (ifile.LT.100)THEN WRITE(fileno,'('.',1i2.2)')ifile ELSE IF (ifile.LT.1000)THEN WRITE(fileno,'('.',1i3.3)')ifile ELSE IF (ifile.LT.10000)THEN WRITE(fileno,'('.',1i4.4)')ifile ELSE WRITE(fileno,'('.',1i5.5)')ifile END IF filename = TRIM(basename) // fileno OPEN(unit=1,file=filename,status='unknown',action='write',form='unformatted') WRITE(1)header%npart,header%mass,header%time,header%redshift, & header%flag_sfr,header%flag_feedback,header%nparttotal, & header%flag_cooling,header%numfiles,header%boxsize, & header%omega0,header%omegalambda,header%hubbleparam, & header%flag_stellarage,header%flag_metals,header%totalhighword, & header%flag_entropy_instead_u, header%flag_doubleprecision, & header%flag_ic_info, header%lpt_scalingfactor, header%unused np=header%npart(2) WRITE(1)pos(1:3,1:np) WRITE(1)vel(1:3,1:np) WRITE(1)id(1:np) CLOSE(1) END SUBROUTINE gadgetwritefile END MODULE gadgetreadfilemod /data1/mabe/MeraTest/Ramses/patch_2019_10version//init_flow_fine.f90 !################################################################ !################################################################ !################################################################ !################################################################ subroutine init_flow use amr_commons use hydro_commons, ONLY: nvar, uold use dice_commons implicit none integer::ilevel,ivar #ifdef SOLVERmhd integer::i #endif if(verbose)write(*,*)'Entering init_flow' do ilevel=nlevelmax,1,-1 if(ilevel>=levelmin)call init_flow_fine(ilevel) call upload_fine(ilevel) do ivar=1,nvar call make_virtual_fine_dp(uold(1,ivar),ilevel) end do if(simple_boundary)call make_boundary_hydro(ilevel) end do if(verbose)write(*,*)'Complete init_flow' #ifdef SOLVERmhd ! magnetic field parameters if(myid==1) write(*,'(A50)')'__________________________________________________' if(myid==1) write(*,*) 'Background magnetic field' if(myid==1) write(*,'(A50)')'__________________________________________________' if(myid==1) write(*,'(A,E15.7)') 'Bx:',ic_mag_const(1) if(myid==1) write(*,'(A,E15.7)') 'By:',ic_mag_const(2) if(myid==1) write(*,'(A,E15.7)') 'Bz:',ic_mag_const(3) do i=1,MAXGAL if (ic_mag_scale_B(i) .EQ. 0.0) cycle if(myid==1) write(*,'(A50)')'__________________________________________________' if(myid==1) write(*,'(A,I3)') ' Foreground magnetic field',i if(myid==1) write(*,'(A50)')'__________________________________________________' if(myid==1) write(*,'(A,E15.7)') 'pos x:', ic_mag_center_x(i) if(myid==1) write(*,'(A,E15.7)') 'pos y:', ic_mag_center_y(i) if(myid==1) write(*,'(A,E15.7)') 'pos z:', ic_mag_center_z(i) enddo if(myid==1) write(*,'(A50)')'__________________________________________________' #endif end subroutine init_flow !################################################################ !################################################################ !################################################################ !################################################################ subroutine init_flow_fine(ilevel) use amr_commons use hydro_commons use cooling_module use mpi_mod use dice_commons implicit none #ifndef WITHOUTMPI integer::info,info2,dummy_io #endif integer::ilevel integer::i,icell,igrid,ncache,iskip,ngrid,ilun integer::ind,ivar,ix,iy,iz,nx_loc integer::i1,i2,i3,i1_min,i1_max,i2_min,i2_max,i3_min,i3_max integer::buf_count integer ,dimension(1:nvector),save::ind_grid,ind_cell real(dp)::scale_nH,scale_T2,scale_l,scale_d,scale_t,scale_v real(dp)::dx,rr,vx,vy,vz,ek,ei,pp,xx1,xx2,xx3,dx_loc,scale,xval real(dp),dimension(1:3)::skip_loc real(dp),dimension(1:twotondim,1:3)::xc real(dp),dimension(1:nvector) ,save::vv real(dp)::axlen real(dp),allocatable,dimension(:,:,:)::init_array real(kind=4),allocatable,dimension(:,:) ::init_plane logical::error,ok_file1,ok_file2,ok_file3,ok_file character(LEN=80)::filename character(LEN=5)::nchar,ncharvar integer,parameter::tag=1107 if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Conversion factor from user units to cgs units call units(scale_l,scale_t,scale_d,scale_v,scale_nH,scale_T2) ! Mesh size at level ilevel in coarse cell units dx=0.5D0**ilevel ! Set position of cell centers relative to grid center do ind=1,twotondim iz=(ind-1)/4 iy=(ind-1-4*iz)/2 ix=(ind-1-2*iy-4*iz) if(ndim>0)xc(ind,1)=(dble(ix)-0.5D0)*dx if(ndim>1)xc(ind,2)=(dble(iy)-0.5D0)*dx if(ndim>2)xc(ind,3)=(dble(iz)-0.5D0)*dx end do ! Local constants nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale ncache=active(ilevel)%ngrid !-------------------------------------- ! Compute initial conditions from files !-------------------------------------- filename=TRIM(initfile(ilevel))//'/ic_d' INQUIRE(file=filename,exist=ok_file1) if(multiple)then filename=TRIM(initfile(ilevel))//'/dir_deltab/ic_deltab.00001' INQUIRE(file=filename,exist=ok_file2) else filename=TRIM(initfile(ilevel))//'/ic_deltab' INQUIRE(file=filename,exist=ok_file2) endif ok_file = ok_file1 .or. ok_file2 if(ok_file)then !------------------------------------------------------------------------- ! First step: compute level boundaries in terms of initial condition array !------------------------------------------------------------------------- if(ncache>0)then i1_min=n1(ilevel)+1; i1_max=0 i2_min=n2(ilevel)+1; i2_max=0 i3_min=n3(ilevel)+1; i3_max=0 do ind=1,twotondim do i=1,ncache igrid=active(ilevel)%igrid(i) xx1=xg(igrid,1)+xc(ind,1)-skip_loc(1) xx1=(xx1*(dxini(ilevel)/dx)-xoff1(ilevel))/dxini(ilevel) xx2=xg(igrid,2)+xc(ind,2)-skip_loc(2) xx2=(xx2*(dxini(ilevel)/dx)-xoff2(ilevel))/dxini(ilevel) xx3=xg(igrid,3)+xc(ind,3)-skip_loc(3) xx3=(xx3*(dxini(ilevel)/dx)-xoff3(ilevel))/dxini(ilevel) i1_min=MIN(i1_min,int(xx1)+1) i1_max=MAX(i1_max,int(xx1)+1) i2_min=MIN(i2_min,int(xx2)+1) i2_max=MAX(i2_max,int(xx2)+1) i3_min=MIN(i3_min,int(xx3)+1) i3_max=MAX(i3_max,int(xx3)+1) end do end do error=.false. if(i1_min<1.or.i1_max>n1(ilevel))error=.true. if(i2_min<1.or.i2_max>n2(ilevel))error=.true. if(i3_min<1.or.i3_max>n3(ilevel))error=.true. if(error) then write(*,*)'Some grid are outside initial conditions sub-volume' write(*,*)'for ilevel=',ilevel write(*,*)i1_min,i1_max write(*,*)i2_min,i2_max write(*,*)i3_min,i3_max write(*,*)n1(ilevel),n2(ilevel),n3(ilevel) call clean_stop end if endif !----------------------------------------- ! Second step: read initial condition file !----------------------------------------- ! Allocate initial conditions array if(ncache>0)allocate(init_array(i1_min:i1_max,i2_min:i2_max,i3_min:i3_max)) allocate(init_plane(1:n1(ilevel),1:n2(ilevel))) ! Loop over input variables do ivar=1,nvar if(cosmo)then ! Read baryons initial overdensity and displacement at a=aexp if(multiple)then call title(myid,nchar) if(ivar==1)filename=TRIM(initfile(ilevel))//'/dir_deltab/ic_deltab.'//TRIM(nchar) if(ivar==2)filename=TRIM(initfile(ilevel))//'/dir_velcx/ic_velcx.'//TRIM(nchar) if(ivar==3)filename=TRIM(initfile(ilevel))//'/dir_velcy/ic_velcy.'//TRIM(nchar) if(ivar==4)filename=TRIM(initfile(ilevel))//'/dir_velcz/ic_velcz.'//TRIM(nchar) if(ivar==5)filename=TRIM(initfile(ilevel))//'/dir_tempb/ic_tempb.'//TRIM(nchar) else if(ivar==1)filename=TRIM(initfile(ilevel))//'/ic_deltab' if(ivar==2)filename=TRIM(initfile(ilevel))//'/ic_velcx' if(ivar==3)filename=TRIM(initfile(ilevel))//'/ic_velcy' if(ivar==4)filename=TRIM(initfile(ilevel))//'/ic_velcz' if(ivar==5)filename=TRIM(initfile(ilevel))//'/ic_tempb' endif else ! Read primitive variables if(ivar==1)filename=TRIM(initfile(ilevel))//'/ic_d' if(ivar==2)filename=TRIM(initfile(ilevel))//'/ic_u' if(ivar==3)filename=TRIM(initfile(ilevel))//'/ic_v' if(ivar==4)filename=TRIM(initfile(ilevel))//'/ic_w' if(ivar==5)filename=TRIM(initfile(ilevel))//'/ic_p' endif call title(ivar,ncharvar) if(ivar>5)then call title(ivar-5,ncharvar) filename=TRIM(initfile(ilevel))//'/ic_pvar_'//TRIM(ncharvar) endif INQUIRE(file=filename,exist=ok_file3) if(ok_file3)then ! Reading the existing file if(myid==1)write(*,*)'Reading file '//TRIM(filename) if(multiple)then ilun=ncpu+myid+103 ! Wait for the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if (mod(myid-1,IOGROUPSIZE)/=0) then call MPI_RECV(dummy_io,1,MPI_INTEGER,myid-1-1,tag,& & MPI_COMM_WORLD,MPI_STATUS_IGNORE,info2) end if endif #endif open(ilun,file=filename,form='unformatted') rewind ilun read(ilun) ! skip first line do i3=1,n3(ilevel) read(ilun) ((init_plane(i1,i2),i1=1,n1(ilevel)),i2=1,n2(ilevel)) if(ncache>0)then if(i3.ge.i3_min.and.i3.le.i3_max)then init_array(i1_min:i1_max,i2_min:i2_max,i3) = & & init_plane(i1_min:i1_max,i2_min:i2_max) end if endif end do close(ilun) ! Send the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if(mod(myid,IOGROUPSIZE)/=0 .and.(myid.lt.ncpu))then dummy_io=1 call MPI_SEND(dummy_io,1,MPI_INTEGER,myid-1+1,tag, & & MPI_COMM_WORLD,info2) end if endif #endif else if(myid==1)then open(10,file=filename,form='unformatted') rewind 10 read(10) ! skip first line endif do i3=1,n3(ilevel) if(myid==1)then read(10) ((init_plane(i1,i2),i1=1,n1(ilevel)),i2=1,n2(ilevel)) else init_plane=0.0 endif buf_count=n1(ilevel)*n2(ilevel) #ifndef WITHOUTMPI call MPI_BCAST(init_plane,buf_count,MPI_REAL,0,MPI_COMM_WORLD,info) #endif if(ncache>0)then if(i3.ge.i3_min.and.i3.le.i3_max)then init_array(i1_min:i1_max,i2_min:i2_max,i3) = & & init_plane(i1_min:i1_max,i2_min:i2_max) end if endif end do if(myid==1)close(10) endif else ! If file doesn't exist, initialize variable to default value ! In most cases, this is zero (you can change that if necessary) if(myid==1)write(*,*)'File '//TRIM(filename)//' not found' if(myid==1)write(*,*)'Initialize corresponding variable to default value' if(ncache>0)then init_array=0d0 ! Default value for metals if(cosmo.and.ivar==imetal.and.metal)init_array=z_ave*0.02 ! from solar units ! Default value for ionization fraction if(cosmo)xval=sqrt(omega_m)/(h0/100.*omega_b) ! From the book of Peebles p. 173 if(cosmo.and.ivar==ixion.and.aton)init_array=1.2d-5*xval endif endif if(ncache>0)then ! For cosmo runs, rescale initial conditions to code units if(cosmo)then ! Compute approximate average temperature in K if(.not. cooling)T2_start=1.356d-2/aexp**2 if(ivar==1)init_array=(1.0+dfact(ilevel)*init_array)*omega_b/omega_m if(ivar==2)init_array=dfact(ilevel)*vfact(1)*dx_loc/dxini(ilevel)*init_array/vfact(ilevel) if(ivar==3)init_array=dfact(ilevel)*vfact(1)*dx_loc/dxini(ilevel)*init_array/vfact(ilevel) if(ivar==4)init_array=dfact(ilevel)*vfact(1)*dx_loc/dxini(ilevel)*init_array/vfact(ilevel) if(ivar==ndim+2)init_array=(1.0+init_array)*T2_start/scale_T2 endif ! Loop over cells do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,ncache igrid=active(ilevel)%igrid(i) icell=igrid+iskip xx1=xg(igrid,1)+xc(ind,1)-skip_loc(1) xx1=(xx1*(dxini(ilevel)/dx)-xoff1(ilevel))/dxini(ilevel) xx2=xg(igrid,2)+xc(ind,2)-skip_loc(2) xx2=(xx2*(dxini(ilevel)/dx)-xoff2(ilevel))/dxini(ilevel) xx3=xg(igrid,3)+xc(ind,3)-skip_loc(3) xx3=(xx3*(dxini(ilevel)/dx)-xoff3(ilevel))/dxini(ilevel) i1=int(xx1)+1 i1=int(xx1)+1 i2=int(xx2)+1 i2=int(xx2)+1 i3=int(xx3)+1 i3=int(xx3)+1 ! Scatter to corresponding primitive variable uold(icell,ivar)=init_array(i1,i2,i3) end do end do ! End loop over cells endif end do ! End loop over input variables ! Deallocate initial conditions array if(ncache>0)deallocate(init_array) deallocate(init_plane) !---------------------------------------------------------------- ! For cosmology runs: compute pressure, prevent negative density !---------------------------------------------------------------- if(cosmo)then ! Loop over grids by vector sweeps do igrid=1,ncache,nvector ngrid=MIN(nvector,ncache-igrid+1) do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do ! Loop over cells do ind=1,twotondim ! Gather cell indices iskip=ncoarse+(ind-1)*ngridmax do i=1,ngrid ind_cell(i)=iskip+ind_grid(i) end do ! Prevent negative density do i=1,ngrid rr=max(uold(ind_cell(i),1),0.1*omega_b/omega_m) uold(ind_cell(i),1)=rr end do ! Compute pressure from temperature and density do i=1,ngrid uold(ind_cell(i),ndim+2)=uold(ind_cell(i),1)*uold(ind_cell(i),ndim+2) end do end do ! End loop over cells end do ! End loop over grids end if !--------------------------------------------------- ! Third step: compute initial conservative variables !--------------------------------------------------- ! Loop over grids by vector sweeps do igrid=1,ncache,nvector ngrid=MIN(nvector,ncache-igrid+1) do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do vy=0.0 vz=0.0 ! Loop over cells do ind=1,twotondim ! Gather cell indices iskip=ncoarse+(ind-1)*ngridmax do i=1,ngrid ind_cell(i)=iskip+ind_grid(i) end do ! Compute total energy density do i=1,ngrid rr=uold(ind_cell(i),1) vx=uold(ind_cell(i),2) #if NDIM>1 vy=uold(ind_cell(i),3) #endif #if NDIM>2 vz=uold(ind_cell(i),4) #endif pp=uold(ind_cell(i),ndim+2) ek=0.5d0*(vx**2+vy**2+vz**2) ei=pp/(gamma-1.0) vv(i)=ei+rr*ek end do ! Scatter to corresponding conservative variable do i=1,ngrid uold(ind_cell(i),ndim+2)=vv(i) end do ! Compute momentum density do ivar=1,ndim do i=1,ngrid rr=uold(ind_cell(i),1) vx=uold(ind_cell(i),ivar+1) vv(i)=rr*vx end do ! Scatter to corresponding conservative variable do i=1,ngrid uold(ind_cell(i),ivar+1)=vv(i) end do end do #if NVAR > NDIM + 2 ! Compute passive variable density do ivar=ndim+3,nvar do i=1,ngrid rr=uold(ind_cell(i),1) uold(ind_cell(i),ivar)=rr*uold(ind_cell(i),ivar) end do enddo #endif end do ! End loop over cells end do ! End loop over grids !------------------------------------------------------- ! Compute initial conditions from subroutine condinit !------------------------------------------------------- else do i=1,MAXGAL if (ic_mag_scale_B(i) .EQ. 0.0) cycle ! renormalise axes axlen = SQRT(ic_mag_axis_x(i)**2 + ic_mag_axis_y(i)**2 + ic_mag_axis_z(i)**2) ic_mag_axis_x(i) = ic_mag_axis_x(i) / axlen ic_mag_axis_y(i) = ic_mag_axis_y(i) / axlen ic_mag_axis_z(i) = ic_mag_axis_z(i) / axlen enddo ! Initialise uold with values from the DICE_PARAMS namelist call reset_uold(ilevel) ! Update the grid using the gas particles read from the Gadget1 file ! NGP scheme is used call condinit_loc(ilevel) ! Reverse update boundaries do ivar=1,nvar call make_virtual_reverse_dp(uold(1,ivar),ilevel) end do call init_uold(ilevel) do ivar=1,nvar call make_virtual_fine_dp(uold(1,ivar),ilevel) end do end if 111 format(' Entering init_flow_fine for level ',I2) end subroutine init_flow_fine !################################################################ !################################################################ !################################################################ !################################################################ subroutine region_condinit(x,q,dx,nn) use amr_parameters use hydro_parameters implicit none integer ::nn real(dp)::dx real(dp),dimension(1:nvector,1:nvar)::q real(dp),dimension(1:nvector,1:ndim)::x integer::i,k real(dp)::vol,r,xn,yn,zn,en #if NVAR > NDIM + 2 || NENER > 0 integer::ivar #endif ! Set some (tiny) default values in case n_region=0 q(1:nn,1)=smallr q(1:nn,2)=0.0d0 #if NDIM>1 q(1:nn,3)=0.0d0 #endif #if NDIM>2 q(1:nn,4)=0.0d0 #endif q(1:nn,ndim+2)=smallr*smallc**2/gamma #if NVAR > NDIM + 2 do ivar=ndim+3,nvar q(1:nn,ivar)=0.0d0 end do #endif ! Loop over initial conditions regions do k=1,nregion ! For 'square' regions only: if(region_type(k) .eq. 'square')then ! Exponent of choosen norm en=exp_region(k) do i=1,nn ! Compute position in normalized coordinates xn=0.0d0; yn=0.0d0; zn=0.0d0 xn=2.0d0*abs(x(i,1)-x_center(k))/length_x(k) #if NDIM>1 yn=2.0d0*abs(x(i,2)-y_center(k))/length_y(k) #endif #if NDIM>2 zn=2.0d0*abs(x(i,3)-z_center(k))/length_z(k) #endif ! Compute cell 'radius' relative to region center if(exp_region(k)<10)then r=(xn**en+yn**en+zn**en)**(1.0/en) else r=max(xn,yn,zn) end if ! If cell lies within region, ! REPLACE primitive variables by region values if(r<1.0)then q(i,1)=d_region(k) q(i,2)=u_region(k) #if NDIM>1 q(i,3)=v_region(k) #endif #if NDIM>2 q(i,4)=w_region(k) #endif q(i,ndim+2)=p_region(k) #if NENER>0 do ivar=1,nener q(i,ndim+2+ivar)=prad_region(k,ivar) enddo #endif #if NVAR>NDIM+2+NENER do ivar=ndim+3+nener,nvar q(i,ivar)=var_region(k,ivar-ndim-2-nener) end do #endif end if end do end if ! For 'point' regions only: if(region_type(k) .eq. 'point')then ! Volume elements vol=dx**ndim ! Compute CIC weights relative to region center do i=1,nn xn=1.0; yn=1.0; zn=1.0 xn=max(1.0-abs(x(i,1)-x_center(k))/dx,0.0_dp) #if NDIM>1 yn=max(1.0-abs(x(i,2)-y_center(k))/dx,0.0_dp) #endif #if NDIM>2 zn=max(1.0-abs(x(i,3)-z_center(k))/dx,0.0_dp) #endif r=xn*yn*zn ! If cell lies within CIC cloud, ! ADD to primitive variables the region values q(i,1)=q(i,1)+d_region(k)*r/vol q(i,2)=q(i,2)+u_region(k)*r #if NDIM>1 q(i,3)=q(i,3)+v_region(k)*r #endif #if NDIM>2 q(i,4)=q(i,4)+w_region(k)*r #endif q(i,ndim+2)=q(i,ndim+2)+p_region(k)*r/vol #if NENER>0 do ivar=1,nener q(i,ndim+2+ivar)=q(i,ndim+2+ivar)+prad_region(k,ivar)*r/vol enddo #endif #if NVAR>NDIM+2+NENER do ivar=ndim+3+nener,nvar q(i,ivar)=var_region(k,ivar-ndim-2-nener) end do #endif end do end if end do return end subroutine region_condinit subroutine reset_uold(ilevel) use amr_commons use hydro_commons use dice_commons implicit none integer::ilevel !-------------------------------------------------------------------------- ! This routine sets array uold to zero before calling ! the hydro scheme. uold is set to zero in virtual boundaries as well. !-------------------------------------------------------------------------- integer::i,ivar,ind,icpu,iskip if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Set uold to uold for myid cells do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do ivar=1,nvar do i=1,active(ilevel)%ngrid uold(active(ilevel)%igrid(i)+iskip,ivar)=0D0 end do end do end do ! Set uold to 0 for virtual boundary cells do icpu=1,ncpu do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do ivar=1,nvar do i=1,reception(icpu,ilevel)%ngrid uold(reception(icpu,ilevel)%igrid(i)+iskip,ivar)=0D0 end do end do end do end do 111 format(' Entering init_uold for level ',i2) end subroutine reset_uold subroutine init_uold(ilevel) use amr_commons use hydro_commons use dice_commons implicit none integer::ilevel !-------------------------------------------------------------------------- ! This routine sets array unew to its initial value uold before calling ! the hydro scheme. unew is set to zero in virtual boundaries. !-------------------------------------------------------------------------- integer::i,ivar,ind,icpu,iskip,idim real(dp)::u,e real(dp)::scale_l,scale_t,scale_d,scale_v,scale_nH,scale_T2 call units(scale_l,scale_t,scale_d,scale_v,scale_nH,scale_T2) if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Set uold to namelist values for myid cells do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do ivar=nvar,1,-1 do i=1,active(ilevel)%ngrid if(uold(active(ilevel)%igrid(i)+iskip,1).lt.IG_rho/scale_nH) then uold(active(ilevel)%igrid(i)+iskip,ivar) = 0D0 if(ivar.eq.1) uold(active(ilevel)%igrid(i)+iskip,ivar) = max(IG_rho/scale_nH,smallr) if(ivar.eq.ndim+2)then uold(active(ilevel)%igrid(i)+iskip,ivar) = IG_T2/scale_T2/(gamma-1)*max(IG_rho/scale_nH,smallr) endif if(metal) then if(ivar.eq.imetal) uold(active(ilevel)%igrid(i)+iskip,ivar) = max(IG_rho/scale_nH,smallr)*IG_metal endif endif end do end do end do ! Set cell averaged kinetic energy do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid ! Initialisation of the refinement mask if((ic_mask_ivar.gt.0).and.(ivar_refine.gt.0).and.(ic_mask_ivar.le.nvar).and.(ivar_refine.le.nvar))then ! Switch to K/mu for ic_mask_ivar=ndim+2 case if(ic_mask_ivar.eq.ndim+2) then u = uold(active(ilevel)%igrid(i)+iskip,ic_mask_ivar)*scale_T2*(gamma-1) else u = uold(active(ilevel)%igrid(i)+iskip,ic_mask_ivar) endif if(ic_mask_ivar.gt.1)then u = u/uold(active(ilevel)%igrid(i)+iskip,1) endif if((u.ge.ic_mask_min).and.(u.le.ic_mask_max))then uold(active(ilevel)%igrid(i)+iskip,ivar_refine) = 1.0*uold(active(ilevel)%igrid(i)+iskip,1) endif endif e = 0d0 do idim=1,ndim e = e+0.5*uold(active(ilevel)%igrid(i)+iskip,idim+1)**2/uold(active(ilevel)%igrid(i)+iskip,1) enddo uold(active(ilevel)%igrid(i)+iskip,ndim+2) = uold(active(ilevel)%igrid(i)+iskip,ndim+2)+e end do end do #ifdef SOLVERmhd ! set constant magnetic field CALL mag_constant(ilevel) ! toroidal field CALL mag_compute(ilevel) #endif ! Set uold to 0 for virtual boundary cells do icpu=1,ncpu do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do ivar=1,nvar do i=1,reception(icpu,ilevel)%ngrid uold(reception(icpu,ilevel)%igrid(i)+iskip,ivar)=0.0 end do end do end do end do 111 format(' Entering init_uold for level ',i2) end subroutine init_uold subroutine condinit_loc(ilevel) use amr_commons use pm_commons use hydro_commons use poisson_commons use dice_commons implicit none integer::ilevel !------------------------------------------------------------------ ! This routine computes the initial density field at level ilevel using ! the CIC scheme from particles that are not entirely in ! level ilevel (boundary particles). ! Arrays flag1 and flag2 are used as temporary work space. !------------------------------------------------------------------ integer::igrid,jgrid,ipart,jpart,idim,icpu,next_part integer::i,ig,ip,npart1,npart2 real(dp)::dx integer,dimension(1:nvector),save::ind_grid,ind_cell integer,dimension(1:nvector),save::ind_part,ind_grid_part real(dp),dimension(1:nvector,1:ndim),save::x0 if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Mesh spacing in that level dx=0.5D0**ilevel ! Loop over cpus do icpu=1,ncpu ! Loop over grids igrid=headl(icpu,ilevel) ig=0 ip=0 do jgrid=1,numbl(icpu,ilevel) npart1=numbp(igrid) ! Number of particles in the grid npart2=0 ! Count gas particles if(npart1>0)then ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) if(ic_mask_ptype.eq.-1)then if(idp(ipart).eq.1)then npart2=npart2+1 endif else npart2=npart2+1 endif ipart=next_part ! Go to next particle end do endif ! Gather gas particles if(npart2>0)then ig=ig+1 ind_grid(ig)=igrid ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) if(ic_mask_ptype.eq.-1)then if(idp(ipart).eq.1)then if(ig==0)then ig=1 ind_grid(ig)=igrid end if ip=ip+1 ind_part(ip)=ipart ind_grid_part(ip)=ig endif else if(ig==0)then ig=1 ind_grid(ig)=igrid end if ip=ip+1 ind_part(ip)=ipart ind_grid_part(ip)=ig endif if(ip==nvector)then ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do i=1,ig x0(i,idim)=xg(ind_grid(i),idim)-3.0D0*dx end do end do do i=1,ig ind_cell(i)=father(ind_grid(i)) end do if(amr_struct) then call init_gas_ngp(ind_grid,ind_part,ind_grid_part,ig,ip,ilevel) else call init_gas_cic(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) endif ip=0 ig=0 end if ipart=next_part ! Go to next particle end do ! End loop over particles end if igrid=next(igrid) ! Go to next grid end do ! End loop over grids if(ip>0)then ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do i=1,ig x0(i,idim)=xg(ind_grid(i),idim)-3.0D0*dx end do end do do i=1,ig ind_cell(i)=father(ind_grid(i)) end do if(amr_struct) then call init_gas_ngp(ind_grid,ind_part,ind_grid_part,ig,ip,ilevel) else call init_gas_cic(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) endif end if end do 111 format(' Entering condinit_loc for level ',I2) end subroutine condinit_loc !================================================================================== !================================================================================== !================================================================================== subroutine init_gas_cic(ind_cell,ind_part,ind_grid_part,x0,ng,np,ilevel) use amr_commons use pm_commons use hydro_commons use dice_commons use cooling_module implicit none integer::ng,np,ilevel integer ,dimension(1:nvector)::ind_cell,ind_grid_part,ind_part real(dp),dimension(1:nvector,1:ndim)::x0 !------------------------------------------------------------------ ! This routine computes the initial density field at level ilevel using ! the CIC scheme. Only cells that are in level ilevel ! are updated by the input particle list. !------------------------------------------------------------------ logical::error integer::j,ind,idim,nx_loc real(dp)::dx,dx_loc,scale ! Grid-based arrays integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids ! Particle-based arrays logical ,dimension(1:nvector),save::ok real(dp),dimension(1:nvector,1:ndim),save::xx,dd,dg integer ,dimension(1:nvector,1:ndim),save::ig,id,igg,igd,icg,icd real(dp),dimension(1:nvector,1:twotondim),save::vol integer ,dimension(1:nvector,1:twotondim),save::igrid,icell,indp,kg real(dp),dimension(1:3)::skip_loc real(dp),dimension(1:nvector),save::ethermal real(dp),dimension(1:nvector),save::vol_loc real(dp)::scale_nH,scale_T2,scale_l,scale_d,scale_t,scale_v call units(scale_l,scale_t,scale_d,scale_v,scale_nH,scale_T2) ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc(1:nvector)=dx_loc**ndim ! Gather neighboring father cells (should be present anytime !) call get3cubefather(ind_cell,nbors_father_cells,nbors_father_grids,ng,ilevel) ! Rescale particle position at level ilevel do idim=1,ndim do j=1,np xx(j,idim)=xp(ind_part(j),idim)/scale+skip_loc(idim) end do end do do idim=1,ndim do j=1,np xx(j,idim)=xx(j,idim)-x0(ind_grid_part(j),idim) end do end do do idim=1,ndim do j=1,np xx(j,idim)=xx(j,idim)/dx end do end do ! Check for illegal moves error=.false. do idim=1,ndim do j=1,np if(xx(j,idim)<0.5D0.or.xx(j,idim)>5.5D0)error=.true. end do end do if(error)then write(*,*)'problem in cic' do idim=1,ndim do j=1,np if(xx(j,idim)<0.5D0.or.xx(j,idim)>5.5D0)then write(*,*)xx(j,1:ndim) endif end do end do stop end if ! CIC at level ilevel (dd: right cloud boundary; dg: left cloud boundary) do idim=1,ndim do j=1,np dd(j,idim)=xx(j,idim)+0.5D0 id(j,idim)=dd(j,idim) dd(j,idim)=dd(j,idim)-id(j,idim) dg(j,idim)=1.0D0-dd(j,idim) ig(j,idim)=id(j,idim)-1 end do end do ! Compute cloud volumes #if NDIM==1 do j=1,np vol(j,1)=dg(j,1) vol(j,2)=dd(j,1) end do #endif #if NDIM==2 do j=1,np vol(j,1)=dg(j,1)*dg(j,2) vol(j,2)=dd(j,1)*dg(j,2) vol(j,3)=dg(j,1)*dd(j,2) vol(j,4)=dd(j,1)*dd(j,2) end do #endif #if NDIM==3 do j=1,np vol(j,1)=dg(j,1)*dg(j,2)*dg(j,3) vol(j,2)=dd(j,1)*dg(j,2)*dg(j,3) vol(j,3)=dg(j,1)*dd(j,2)*dg(j,3) vol(j,4)=dd(j,1)*dd(j,2)*dg(j,3) vol(j,5)=dg(j,1)*dg(j,2)*dd(j,3) vol(j,6)=dd(j,1)*dg(j,2)*dd(j,3) vol(j,7)=dg(j,1)*dd(j,2)*dd(j,3) vol(j,8)=dd(j,1)*dd(j,2)*dd(j,3) end do #endif ! Compute parent grids do idim=1,ndim do j=1,np igg(j,idim)=ig(j,idim)/2 igd(j,idim)=id(j,idim)/2 end do end do #if NDIM==1 do j=1,np kg(j,1)=1+igg(j,1) kg(j,2)=1+igd(j,1) end do #endif #if NDIM==2 do j=1,np kg(j,1)=1+igg(j,1)+3*igg(j,2) kg(j,2)=1+igd(j,1)+3*igg(j,2) kg(j,3)=1+igg(j,1)+3*igd(j,2) kg(j,4)=1+igd(j,1)+3*igd(j,2) end do #endif #if NDIM==3 do j=1,np kg(j,1)=1+igg(j,1)+3*igg(j,2)+9*igg(j,3) kg(j,2)=1+igd(j,1)+3*igg(j,2)+9*igg(j,3) kg(j,3)=1+igg(j,1)+3*igd(j,2)+9*igg(j,3) kg(j,4)=1+igd(j,1)+3*igd(j,2)+9*igg(j,3) kg(j,5)=1+igg(j,1)+3*igg(j,2)+9*igd(j,3) kg(j,6)=1+igd(j,1)+3*igg(j,2)+9*igd(j,3) kg(j,7)=1+igg(j,1)+3*igd(j,2)+9*igd(j,3) kg(j,8)=1+igd(j,1)+3*igd(j,2)+9*igd(j,3) end do #endif do ind=1,twotondim do j=1,np if(nbors_father_cells(ind_grid_part(j),kg(j,ind)).gt.0) then igrid(j,ind)=son(nbors_father_cells(ind_grid_part(j),kg(j,ind))) else igrid(j,ind)=0 endif end do end do ! Compute parent cell position do idim=1,ndim do j=1,np icg(j,idim)=ig(j,idim)-2*igg(j,idim) icd(j,idim)=id(j,idim)-2*igd(j,idim) end do end do #if NDIM==1 do j=1,np icell(j,1)=1+icg(j,1) icell(j,2)=1+icd(j,1) end do #endif #if NDIM==2 do j=1,np icell(j,1)=1+icg(j,1)+2*icg(j,2) icell(j,2)=1+icd(j,1)+2*icg(j,2) icell(j,3)=1+icg(j,1)+2*icd(j,2) icell(j,4)=1+icd(j,1)+2*icd(j,2) end do #endif #if NDIM==3 do j=1,np icell(j,1)=1+icg(j,1)+2*icg(j,2)+4*icg(j,3) icell(j,2)=1+icd(j,1)+2*icg(j,2)+4*icg(j,3) icell(j,3)=1+icg(j,1)+2*icd(j,2)+4*icg(j,3) icell(j,4)=1+icd(j,1)+2*icd(j,2)+4*icg(j,3) icell(j,5)=1+icg(j,1)+2*icg(j,2)+4*icd(j,3) icell(j,6)=1+icd(j,1)+2*icg(j,2)+4*icd(j,3) icell(j,7)=1+icg(j,1)+2*icd(j,2)+4*icd(j,3) icell(j,8)=1+icd(j,1)+2*icd(j,2)+4*icd(j,3) end do #endif ! Update mass density and number density fields do ind=1,twotondim ! Check if particles are entirely in level ilevel do j=1,np ok(j)=igrid(j,ind)>0 end do ! Compute parent cell adress do j=1,np if(ok(j))then indp(j,ind)=ncoarse+(icell(j,ind)-1)*ngridmax+igrid(j,ind) end if end do do j=1,np ok(j)=ok(j).and.(idp(ind_part(j)).eq.1) end do ! Update hydro variables do j=1,np if(ok(j)) then ! Specific kinetic energy of the gas particle ethermal(j)=up(ind_part(j)) ! Update hydro variable in CIC cells uold(indp(j,ind),1)=uold(indp(j,ind),1)+mp(ind_part(j))*vol(j,ind)/vol_loc(j) do idim=1,ndim uold(indp(j,ind),idim+1)=uold(indp(j,ind),idim+1)+mp(ind_part(j))*vol(j,ind)/vol_loc(j)*vp(ind_part(j),idim) end do uold(indp(j,ind),ndim+2)=uold(indp(j,ind),ndim+2)+mp(ind_part(j))*vol(j,ind)/vol_loc(j)*ethermal(j) if(metal) then uold(indp(j,ind),imetal)=uold(indp(j,ind),imetal)+mp(ind_part(j))*vol(j,ind)/vol_loc(j)*zp(ind_part(j)) endif endif ! Update passive scalar mask if(ic_mask_ptype.gt.-1) then uold(indp(j,ind),ivar_refine)=uold(indp(j,ind),ivar_refine)+mp(ind_part(j))*vol(j,ind)/vol_loc(j)*maskp(ind_part(j)) endif end do end do end subroutine init_gas_cic subroutine init_gas_ngp(ind_grid,ind_part,ind_grid_part,ng,np,ilevel) use amr_commons use pm_commons use hydro_commons use random use dice_commons implicit none integer::ng,np,ilevel integer,dimension(1:nvector)::ind_grid integer,dimension(1:nvector)::ind_grid_part,ind_part !------------------------------------------------------------------ ! This routine computes the initial density field at level ilevel using ! the NGP scheme. Only cells that are in level ilevel ! are updated by the input particle list. !------------------------------------------------------------------ integer::i,j,idim,nx_loc real(dp)::dx,dx_loc,scale ! Grid based arrays real(dp),dimension(1:nvector,1:ndim),save::x0 integer ,dimension(1:nvector),save::ind_cell integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids real(dp),dimension(1:nvector),save::ethermal ! Particle based arrays logical ,dimension(1:nvector),save::ok real(dp),dimension(1:nvector),save::vol_loc real(dp),dimension(1:nvector,1:ndim),save::x integer ,dimension(1:nvector,1:ndim),save::id,igd,icd integer ,dimension(1:nvector),save::igrid,icell,indp,kg real(dp),dimension(1:3)::skip_loc ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc(1:nvector)=dx_loc**ndim ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do i=1,ng x0(i,idim)=xg(ind_grid(i),idim)-3.0D0*dx end do end do ! Gather 27 neighboring father cells (should be present anytime !) do i=1,ng ind_cell(i)=father(ind_grid(i)) end do call get3cubefather(ind_cell,nbors_father_cells,nbors_father_grids,ng,ilevel) ! Rescale position at level ilevel do idim=1,ndim do j=1,np x(j,idim)=xp(ind_part(j),idim)/scale+skip_loc(idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)-x0(ind_grid_part(j),idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/dx end do end do ! NGP at level ilevel do idim=1,ndim do j=1,np id(j,idim)=x(j,idim) end do end do ! Compute parent grids do idim=1,ndim do j=1,np igd(j,idim)=id(j,idim)/2 end do end do do j=1,np kg(j)=1+igd(j,1)+3*igd(j,2)+9*igd(j,3) end do do j=1,np if(nbors_father_cells(ind_grid_part(j),kg(j)).gt.0) then igrid(j)=son(nbors_father_cells(ind_grid_part(j),kg(j))) else igrid(j)=0 endif end do ! Compute parent cell position do idim=1,ndim do j=1,np icd(j,idim)=id(j,idim)-2*igd(j,idim) end do end do do j=1,np icell(j)=1+icd(j,1)+2*icd(j,2)+4*icd(j,3) end do ! Check if particles are entirely in level ilevel do j=1,np ok(j)=igrid(j)>0 end do ! Compute parent cell adresses do j=1,np if(ok(j))then indp(j)=ncoarse+(icell(j)-1)*ngridmax+igrid(j) endif end do do j=1,np ok(j)=ok(j).and.(idp(ind_part(j)).eq.1) end do ! Update hydro variables do j=1,np if(ok(j))then ethermal(j)=up(ind_part(j)) ! Update density in NGP cell uold(indp(j),1)=uold(indp(j),1)+mp(ind_part(j))/vol_loc(j) ! Update velocity in NGP cell do idim=1,ndim uold(indp(j),idim+1)=uold(indp(j),idim+1)+mp(ind_part(j))/vol_loc(j)*vp(ind_part(j),idim) end do ! Update temperature in NGP cell uold(indp(j),ndim+2)=uold(indp(j),ndim+2)+mp(ind_part(j))/vol_loc(j)*ethermal(j) ! Update passive hydro variables in NGP cell if(metal) then uold(indp(j),imetal)=uold(indp(j),imetal)+mp(ind_part(j))/vol_loc(j)*zp(ind_part(j)) endif endif ! Update passive scalar mask if(ic_mask_ptype.gt.-1) then uold(indp(j),ivar_refine)=uold(indp(j),ivar_refine)+mp(ind_part(j))/vol_loc(j)*maskp(ind_part(j)) endif end do end subroutine init_gas_ngp #ifdef SOLVERmhd subroutine mag_constant(ilevel) ! constant background magnetic field use amr_commons use hydro_commons use dice_commons implicit none integer::i,ind,iskip,ilevel do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid uold(active(ilevel)%igrid(i)+iskip,6:8) = ic_mag_const uold(active(ilevel)%igrid(i)+iskip,nvar+1:nvar+3) = ic_mag_const enddo enddo end subroutine mag_constant subroutine mag_compute(ilevel) use amr_commons !use pm_commons use hydro_commons use dice_commons !use random implicit none integer::i,j,ilevel,icell logical::nogal real(dp)::Axdl,Axdr,Axul,Axur real(dp)::Aydl,Aydr,Ayul,Ayur real(dp)::Azdl,Azdr,Azul,Azur real(dp)::Bxl,Bxr,Byl,Byr,Bzl,Bzr real(dp),dimension(1:3)::pos,cell_center real(dp)::dx,dxhalf,dxmin,dxminhalf,scale,dx_loc,vol_loc integer::nx_loc,ind,ix,iy,iz,iskip,nfine real(dp),dimension(1:3)::skip_loc real(dp),dimension(1:twotondim,1:3)::xc nogal=.true. do i=1,MAXGAL ! check if galaxy has a magnetic field if (ic_mag_scale_B(i) .NE. 0.0) nogal=.false. enddo if (nogal) return ! Mesh spacing in that level dx=0.5D0**ilevel dxhalf = 0.5D0*dx dxmin = 0.5D0**nlevelmax dxminhalf = 0.5D0*dxmin nfine = 2**(nlevelmax-ilevel) nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc=dx_loc**ndim do ind=1,twotondim iz=(ind-1)/4 iy=(ind-1-4*iz)/2 ix=(ind-1-2*iy-4*iz) if(ndim>0)xc(ind,1)=(dble(ix)-0.5D0)*dx if(ndim>1)xc(ind,2)=(dble(iy)-0.5D0)*dx if(ndim>2)xc(ind,3)=(dble(iz)-0.5D0)*dx end do ! compute field do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do j=1,active(ilevel)%ngrid icell=active(ilevel)%igrid(j) cell_center = xg(icell,:)+xc(ind,:)-skip_loc(:) ! edge coordinates ! Ax pos = cell_center pos(1) = pos(1) - dxhalf + dxminhalf pos(2) = pos(2) - dxhalf pos(3) = pos(3) - dxhalf Axdl=0.0;Axdr=0.0;Axul=0.0;Axur=0.0 do i=1,nfine CALL mag_toroidal(pos,1,Axdl) pos(1) = pos(1) + dxmin enddo pos(2) = pos(2) + dx do i=1,nfine pos(1) = pos(1) - dxmin CALL mag_toroidal(pos,1,Axdr) enddo pos(3) = pos(3) + dx do i=1,nfine CALL mag_toroidal(pos,1,Axur) pos(1) = pos(1) + dxmin enddo pos(2) = pos(2) - dx do i=1,nfine pos(1) = pos(1) - dxmin CALL mag_toroidal(pos,1,Axul) enddo ! Ay pos = cell_center pos(1) = pos(1) - dxhalf pos(2) = pos(2) - dxhalf + dxminhalf pos(3) = pos(3) - dxhalf Aydl=0.0;Aydr=0.0;Ayul=0.0;Ayur=0.0 do i=1,nfine CALL mag_toroidal(pos,2,Aydl) pos(2) = pos(2) + dxmin enddo pos(1) = pos(1) + dx do i=1,nfine pos(2) = pos(2) - dxmin CALL mag_toroidal(pos,2,Aydr) enddo pos(3) = pos(3) + dx do i=1,nfine CALL mag_toroidal(pos,2,Ayur) pos(2) = pos(2) + dxmin enddo pos(1) = pos(1) - dx do i=1,nfine pos(2) = pos(2) - dxmin CALL mag_toroidal(pos,2,Ayul) enddo ! Az pos = cell_center pos(1) = pos(1) - dxhalf pos(2) = pos(2) - dxhalf pos(3) = pos(3) - dxhalf + dxminhalf Azdl=0.0;Azdr=0.0;Azul=0.0;Azur=0.0 do i=1,nfine CALL mag_toroidal(pos,3,Azdl) pos(3) = pos(3) + dxmin enddo pos(1) = pos(1) + dx do i=1,nfine pos(3) = pos(3) - dxmin CALL mag_toroidal(pos,3,Azdr) enddo pos(2) = pos(2) + dx do i=1,nfine CALL mag_toroidal(pos,3,Azur) pos(3) = pos(3) + dxmin enddo pos(1) = pos(1) - dx do i=1,nfine pos(3) = pos(3) - dxmin CALL mag_toroidal(pos,3,Azul) enddo ! Bx left Bxl = ((Azul - Azdl) - (Ayul - Aydl))/dx / nfine uold(icell+iskip,6) = uold(icell+iskip,6) + Bxl ! By left Byl = ((Axul - Axdl) - (Azdr - Azdl))/dx / nfine uold(icell+iskip,7) = uold(icell+iskip,7) + Byl ! Bz left Bzl = ((Aydr - Aydl) - (Axdr - Axdl))/dx / nfine uold(icell+iskip,8) = uold(icell+iskip,8) + Bzl ! Bx right Bxr = ((Azur - Azdr) - (Ayur - Aydr))/dx / nfine uold(icell+iskip,nvar+1) = uold(icell+iskip,nvar+1) + Bxr ! By right Byr = ((Axur - Axdr) - (Azur - Azul))/dx / nfine uold(icell+iskip,nvar+2) = uold(icell+iskip,nvar+2) + Byr ! Bz right Bzr = ((Ayur - Ayul) - (Axur - Axul))/dx / nfine uold(icell+iskip,nvar+3) = uold(icell+iskip,nvar+3) + Bzr end do end do end subroutine mag_compute subroutine mag_toroidal(pos,dir,A) use dice_commons use amr_parameters, ONLY: boxlen implicit none real(dp)::r,h real(dp)::Ah,A integer::i,dir real(dp),dimension(1:3)::pos,gcenter,gaxis,xrel,grad real(dp)::sB,sR,sH do i=1,MAXGAL ! check if galaxy has a magnetic field if (ic_mag_scale_B(i) .EQ. 0.0) cycle gcenter(1) = 0.5d0 + ic_mag_center_x(i)/boxlen gcenter(2) = 0.5d0 + ic_mag_center_y(i)/boxlen gcenter(3) = 0.5d0 + ic_mag_center_z(i)/boxlen gaxis(1) = ic_mag_axis_x(i) gaxis(2) = ic_mag_axis_y(i) gaxis(3) = ic_mag_axis_z(i) sR = ic_mag_scale_R(i) / boxlen sH = ic_mag_scale_H(i) / boxlen sB = ic_mag_scale_B(i) ! coordinates in galaxy frame xrel = pos - gcenter h = DOT_PRODUCT(xrel,gaxis) grad = xrel - h*gaxis r = NORM2(grad) Ah = sB * sR * exp(-r/sR) * exp(-ABS(h)/sH) ! vector in cartesian frame A = A + Ah*gaxis(dir) end do end subroutine #endif /data1/mabe/MeraTest/Ramses/patch_2019_10version//init_part.f90 subroutine init_part use amr_commons use pm_commons use clfind_commons ! DICE patch use dice_commons use cooling_module use gadgetreadfilemod ! DICE patch #ifdef RT use rt_parameters,only: convert_birth_times #endif use mpi_mod implicit none !------------------------------------------------------------ ! Allocate particle-based arrays. ! Read particles positions and velocities from grafic files !------------------------------------------------------------ integer::npart2,ndim2,ncpu2 integer::ipart,jpart,ipart_old,ilevel,idim integer::i,igrid,ncache,ngrid,iskip integer::ind,ix,iy,iz,ilun,icpu integer::i1,i2,i3 integer::i1_min=0,i1_max=0,i2_min=0,i2_max=0,i3_min=0,i3_max=0 integer::buf_count,indglob real(dp)::dx,xx1,xx2,xx3,vv1,vv2,vv3,mm1 real(dp)::min_mdm_cpu,min_mdm_all real(dp),dimension(1:twotondim,1:3)::xc integer ,dimension(1:nvector)::ind_grid,ind_cell,ii integer,dimension(1:nvector)::pp integer(i8b),dimension(1:ncpu)::npart_cpu,npart_all real(dp),allocatable,dimension(:)::xdp integer,allocatable,dimension(:)::isp integer(i8b),allocatable,dimension(:)::isp8 integer(1),allocatable,dimension(:)::ii1 real(kind=4),allocatable,dimension(:,:)::init_plane,init_plane_x integer(i8b),allocatable,dimension(:,:)::init_plane_id real(dp),allocatable,dimension(:,:,:)::init_array,init_array_x integer(i8b),allocatable,dimension(:,:,:)::init_array_id real(kind=8),dimension(1:nvector,1:3)::xx,vv real(kind=8),dimension(1:nvector)::mm type(part_t)::tmppart real(kind=8)::dispmax=0.0 #ifndef WITHOUTMPI real(dp),dimension(1:nvector,1:3)::xx_dp integer,dimension(1:nvector)::cc integer,dimension(MPI_STATUS_SIZE,2*ncpu)::statuses integer,dimension(2*ncpu)::reqsend,reqrecv integer,dimension(ncpu)::sendbuf,recvbuf integer::dummy_io,info,info2,npart_new integer::countsend,countrecv integer::ibuf,tagu=102 integer,parameter::tagg=1109,tagg2=1110,tagg3=1111 #endif logical::error,keep_part,eof,read_pos=.false.,ok,read_ids=.false. character(LEN=80)::filename,filename_x, filename_id character(LEN=80)::fileloc character(LEN=20)::filetype_loc character(LEN=5)::nchar,ncharcpu ! DICE patch integer::j,type_index integer::dummy_int,blck_size,jump_blck,blck_cnt,stat,ifile integer::head_blck,pos_blck,vel_blck,id_blck,mass_blck,u_blck,metal_blck,age_blck integer::head_size,pos_size,vel_size,id_size,mass_size,u_size,metal_size,age_size integer::kpart,lpart,mpart,opart,gpart,ngas,nhalo !integer, dimension(nvector)::ids real(dp)::scale_nH,scale_T2,scale_l,scale_d,scale_t,scale_v,scale_m real(dp),dimension(1:nvector)::tt,zz,uu real,dimension(1:nvector,1:3)::xx_sp,vv_sp real,dimension(1:nvector)::mm_sp,tt_sp,zz_sp,uu_sp real(dp)::mgas_tot real::dummy_real,ipbar character(LEN=12)::ifile_str character(LEN=4)::blck_name logical::eob,file_exists,skip TYPE(gadgetheadertype)::header ! DICE patch if(verbose)write(*,*)'Entering init_part' if(myid.eq.1)write(*,*)'WARNING: NEVER USE FAMILY CODES / TAGS > 127.' if(myid.eq.1)write(*,*)'See https://bitbucket.org/rteyssie/ramses/wiki/Particle%20Families' if(allocated(xp))then if(verbose)write(*,*)'Initial conditions already set' return end if ! Allocate particle variables allocate(xp (npartmax,ndim)) allocate(vp (npartmax,ndim)) allocate(mp (npartmax)) allocate(nextp (npartmax)) allocate(prevp (npartmax)) allocate(levelp(npartmax)) allocate(idp (npartmax)) allocate(typep (npartmax)) #ifdef OUTPUT_PARTICLE_POTENTIAL allocate(ptcl_phi(npartmax)) #endif ! DICE patch allocate(up(npartmax)) if(ic_mask_ptype.gt.-1)then allocate(maskp(npartmax)) endif ! DICE patch xp=0.0; vp=0.0; mp=0.0; levelp=0; idp=0 typep(1:npartmax)%family=FAM_UNDEF; typep(1:npartmax)%tag=0 if(star.or.sink)then allocate(tp(npartmax)) tp=0.0 if(metal)then allocate(zp(npartmax)) zp=0.0 end if end if !-------------------- ! Read part.tmp file !-------------------- if(nrestart>0)then ilun=2*ncpu+myid+103 call title(nrestart,nchar) if(IOGROUPSIZEREP>0)then call title(((myid-1)/IOGROUPSIZEREP)+1,ncharcpu) fileloc='output_'//TRIM(nchar)//'/group_'//TRIM(ncharcpu)//'/part_'//TRIM(nchar)//'.out' else fileloc='output_'//TRIM(nchar)//'/part_'//TRIM(nchar)//'.out' endif call title(myid,nchar) fileloc=TRIM(fileloc)//TRIM(nchar) ! Wait for the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if (mod(myid-1,IOGROUPSIZE)/=0) then call MPI_RECV(dummy_io,1,MPI_INTEGER,myid-1-1,tagg,& & MPI_COMM_WORLD,MPI_STATUS_IGNORE,info2) end if endif #endif open(unit=ilun,file=fileloc,form='unformatted') rewind(ilun) read(ilun)ncpu2 read(ilun)ndim2 read(ilun)npart2 read(ilun)localseed read(ilun)nstar_tot read(ilun)mstar_tot read(ilun)mstar_lost read(ilun)nsink if(ncpu2.ne.ncpu.or.ndim2.ne.ndim.or.npart2.gt.npartmax)then write(*,*)'File part.tmp not compatible' write(*,*)'Found =',ncpu2,ndim2,npart2 write(*,*)'Expected=',ncpu,ndim,npartmax call clean_stop end if ! Read position allocate(xdp(1:npart2)) do idim=1,ndim read(ilun)xdp xp(1:npart2,idim)=xdp end do ! Read velocity do idim=1,ndim read(ilun)xdp vp(1:npart2,idim)=xdp end do ! Read mass read(ilun)xdp mp(1:npart2)=xdp deallocate(xdp) ! Read identity allocate(isp8(1:npart2)) read(ilun)isp8 idp(1:npart2)=isp8 deallocate(isp8) ! Read level allocate(isp(1:npart2)) read(ilun)isp levelp(1:npart2)=isp deallocate(isp) ! Read family allocate(ii1(1:npart2)) read(ilun)ii1 typep(1:npart2)%family = ii1 ! Read tag read(ilun)ii1 typep(1:npart2)%tag = ii1 deallocate(ii1) #ifdef OUTPUT_PARTICLE_POTENTIAL ! We don't need the potential, but read it anyway (to get the records correctly for tp/zp) read(ilun) #endif if(star.or.sink)then ! Read birth epoch allocate(xdp(1:npart2)) read(ilun)xdp tp(1:npart2)=xdp if(convert_birth_times) then do i = 1, npart2 ! Convert birth time to proper for RT postpr. call getProperTime(tp(i),tp(i)) enddo endif if(metal)then ! Read metallicity read(ilun)xdp zp(1:npart2)=xdp end if deallocate(xdp) end if close(ilun) ! Send the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if(mod(myid,IOGROUPSIZE)/=0 .and.(myid.lt.ncpu))then dummy_io=1 call MPI_SEND(dummy_io,1,MPI_INTEGER,myid-1+1,tagg, & & MPI_COMM_WORLD,info2) end if endif #endif ! Get nlevelmax_part from cosmological inital conditions if(cosmo)then min_mdm_cpu = 1.0 do ipart=1,npart2 ! Get dark matter only if (is_DM(typep(ipart))) then ! note: using two nested if so that the second one is only evaluated for DM particles if (mp(ipart) .lt. min_mdm_cpu) min_mdm_cpu = mp(ipart) end if end do #ifndef WITHOUTMPI call MPI_ALLREDUCE(min_mdm_cpu,min_mdm_all,1,MPI_DOUBLE_PRECISION,MPI_MIN,MPI_COMM_WORLD,info) #else min_mdm_all = min_mdm_cpu #endif ilevel = 1 do while(.true.) mm1 = 0.5d0**(3*ilevel)*(1.0d0-omega_b/omega_m) if((mm1.GT.0.90*min_mdm_all).AND.(mm1.LT.1.10*min_mdm_all))then nlevelmax_part = ilevel exit endif ilevel = ilevel+1 enddo if(myid==1) write(*,*) 'nlevelmax_part=',nlevelmax_part endif if(debug)write(*,*)'part.tmp read for processor ',myid npart=npart2 else filetype_loc=filetype !if(.not. cosmo)filetype_loc='ascii' select case (filetype_loc) case ('grafic') call load_grafic case ('ascii') call load_ascii case ('gadget') call load_gadget case ('dice') call load_dice case DEFAULT write(*,*) 'Unsupported format file ' // filetype call clean_stop end select end if if(sink)call init_sink contains subroutine load_grafic ! Read data in the grafic format. The particle type is derived ! following conversion rules (see pm_commons:props2type) ! Grafic format for Ramses assumes the following unit for particles: ! - Header lengths (boxszie, pixel size...) in comoving Mpc ! - Velocities in proper km s**-1 (file ic_velc*) ! - Displacements from cell centers in comoving Mpc/h ! (file ic_posc* if present, if not generated through Zeldovich approximation) ! - Ids in int or long int ! (file ic_particle_ids if present, if not generated internally) !---------------------------------------------------- ! Reading initial conditions GRAFIC2 multigrid arrays !---------------------------------------------------- ipart=0 ! Loop over initial condition levels do ilevel=levelmin,nlevelmax if(initfile(ilevel)==' ')cycle ! Mesh size at level ilevel in coarse cell units dx=0.5D0**ilevel ! Set position of cell centers relative to grid center do ind=1,twotondim iz=(ind-1)/4 iy=(ind-1-4*iz)/2 ix=(ind-1-2*iy-4*iz) if(ndim>0)xc(ind,1)=(dble(ix)-0.5D0)*dx if(ndim>1)xc(ind,2)=(dble(iy)-0.5D0)*dx if(ndim>2)xc(ind,3)=(dble(iz)-0.5D0)*dx end do !-------------------------------------------------------------- ! First step: compute level boundaries and particle positions !-------------------------------------------------------------- i1_min=n1(ilevel)+1; i1_max=0 i2_min=n2(ilevel)+1; i2_max=0 i3_min=n3(ilevel)+1; i3_max=0 ipart_old=ipart ! Loop over grids by vector sweeps ncache=active(ilevel)%ngrid do igrid=1,ncache,nvector ngrid=MIN(nvector,ncache-igrid+1) do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do ! Loop over cells do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,ngrid ind_cell(i)=iskip+ind_grid(i) end do do i=1,ngrid xx1=xg(ind_grid(i),1)+xc(ind,1) xx1=(xx1*(dxini(ilevel)/dx)-xoff1(ilevel))/dxini(ilevel) xx2=xg(ind_grid(i),2)+xc(ind,2) xx2=(xx2*(dxini(ilevel)/dx)-xoff2(ilevel))/dxini(ilevel) xx3=xg(ind_grid(i),3)+xc(ind,3) xx3=(xx3*(dxini(ilevel)/dx)-xoff3(ilevel))/dxini(ilevel) i1_min=MIN(i1_min,int(xx1)+1) i1_max=MAX(i1_max,int(xx1)+1) i2_min=MIN(i2_min,int(xx2)+1) i2_max=MAX(i2_max,int(xx2)+1) i3_min=MIN(i3_min,int(xx3)+1) i3_max=MAX(i3_max,int(xx3)+1) keep_part=son(ind_cell(i))==0 if(keep_part)then ipart=ipart+1 if(ipart>npartmax)then write(*,*)'Maximum number of particles incorrect' write(*,*)'npartmax should be greater than',ipart call clean_stop endif if(ndim>0)xp(ipart,1)=xg(ind_grid(i),1)+xc(ind,1) if(ndim>1)xp(ipart,2)=xg(ind_grid(i),2)+xc(ind,2) if(ndim>2)xp(ipart,3)=xg(ind_grid(i),3)+xc(ind,3) mp(ipart)=0.5d0**(3*ilevel)*(1.0d0-omega_b/omega_m) end if end do end do ! End loop over cells end do ! End loop over grids ! Check that all grids are within initial condition region error=.false. if(active(ilevel)%ngrid>0)then if(i1_min<1.or.i1_max>n1(ilevel))error=.true. if(i2_min<1.or.i2_max>n2(ilevel))error=.true. if(i3_min<1.or.i3_max>n3(ilevel))error=.true. end if if(error) then write(*,*)'Some grid are outside initial conditions sub-volume' write(*,*)'for ilevel=',ilevel write(*,*)i1_min,i1_max write(*,*)i2_min,i2_max write(*,*)i3_min,i3_max write(*,*)n1(ilevel),n2(ilevel),n3(ilevel) call clean_stop end if if(debug)then write(*,*)myid,i1_min,i1_max,i2_min,i2_max,i3_min,i3_max endif !--------------------------------------------------------------------- ! Second step: read initial condition file and set particle velocities !--------------------------------------------------------------------- ! Allocate initial conditions array if(active(ilevel)%ngrid>0)then allocate(init_array(i1_min:i1_max,i2_min:i2_max,i3_min:i3_max)) allocate(init_array_x(i1_min:i1_max,i2_min:i2_max,i3_min:i3_max)) init_array=0d0 init_array_x=0d0 end if allocate(init_plane(1:n1(ilevel),1:n2(ilevel))) allocate(init_plane_x(1:n1(ilevel),1:n2(ilevel))) filename_id=TRIM(initfile(ilevel))//'/ic_particle_ids' INQUIRE(file=filename_id,exist=read_ids) if(read_ids) then if(myid==1)write(*,*)'Reading particle ids from file '//TRIM(filename_id) allocate(init_plane_id(1:n1(ilevel),1:n2(ilevel))) allocate(init_array_id(i1_min:i1_max,i2_min:i2_max,i3_min:i3_max)) end if ! Loop over input variables do idim=1,ndim ! Read dark matter initial displacement field if(multiple)then call title(myid,nchar) if(idim==1)filename=TRIM(initfile(ilevel))//'/dir_velcx/ic_velcx.'//TRIM(nchar) if(idim==2)filename=TRIM(initfile(ilevel))//'/dir_velcy/ic_velcy.'//TRIM(nchar) if(idim==3)filename=TRIM(initfile(ilevel))//'/dir_velcz/ic_velcz.'//TRIM(nchar) else if(idim==1)filename=TRIM(initfile(ilevel))//'/ic_velcx' if(idim==2)filename=TRIM(initfile(ilevel))//'/ic_velcy' if(idim==3)filename=TRIM(initfile(ilevel))//'/ic_velcz' if(idim==1)filename_x=TRIM(initfile(ilevel))//'/ic_poscx' if(idim==2)filename_x=TRIM(initfile(ilevel))//'/ic_poscy' if(idim==3)filename_x=TRIM(initfile(ilevel))//'/ic_poscz' INQUIRE(file=filename_x,exist=ok) if(.not.ok)then read_pos = .false. else read_pos = .true. if(myid==1)write(*,*)'Reading file '//TRIM(filename_x) end if endif if(myid==1)write(*,*)'Reading file '//TRIM(filename) if(multiple)then ilun=myid+103 ! Wait for the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if (mod(myid-1,IOGROUPSIZE)/=0) then call MPI_RECV(dummy_io,1,MPI_INTEGER,myid-1-1,tagg2,& & MPI_COMM_WORLD,MPI_STATUS_IGNORE,info2) end if endif #endif open(ilun,file=filename,form='unformatted') rewind ilun read(ilun) ! skip first line do i3=1,n3(ilevel) read(ilun)((init_plane(i1,i2),i1=1,n1(ilevel)),i2=1,n2(ilevel)) if(active(ilevel)%ngrid>0)then if(i3.ge.i3_min.and.i3.le.i3_max)then init_array(i1_min:i1_max,i2_min:i2_max,i3) = & & init_plane(i1_min:i1_max,i2_min:i2_max) end if endif end do close(ilun) ! Send the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if(mod(myid,IOGROUPSIZE)/=0 .and.(myid.lt.ncpu))then dummy_io=1 call MPI_SEND(dummy_io,1,MPI_INTEGER,myid-1+1,tagg2, & & MPI_COMM_WORLD,info2) end if endif #endif else if(myid==1)then open(10,file=filename,form='unformatted') rewind 10 read(10) ! skip first line end if do i3=1,n3(ilevel) if(myid==1)then if(debug.and.mod(i3,10)==0)write(*,*)'Reading plane ',i3 read(10)((init_plane(i1,i2),i1=1,n1(ilevel)),i2=1,n2(ilevel)) else init_plane=0.0 endif buf_count=n1(ilevel)*n2(ilevel) #ifndef WITHOUTMPI call MPI_BCAST(init_plane,buf_count,MPI_REAL,0,MPI_COMM_WORLD,info) #endif if(active(ilevel)%ngrid>0)then if(i3.ge.i3_min.and.i3.le.i3_max)then init_array(i1_min:i1_max,i2_min:i2_max,i3) = & & init_plane(i1_min:i1_max,i2_min:i2_max) end if endif end do if(myid==1)close(10) if(read_pos) then if(myid==1)then open(10,file=filename_x,form='unformatted') rewind 10 read(10) ! skip first line end if do i3=1,n3(ilevel) if(myid==1)then if(debug.and.mod(i3,10)==0)write(*,*)'Reading plane ',i3 read(10)((init_plane_x(i1,i2),i1=1,n1(ilevel)),i2=1,n2(ilevel)) else init_plane_x=0.0 endif buf_count=n1(ilevel)*n2(ilevel) #ifndef WITHOUTMPI call MPI_BCAST(init_plane_x,buf_count,MPI_REAL,0,MPI_COMM_WORLD,info) #endif if(active(ilevel)%ngrid>0)then if(i3.ge.i3_min.and.i3.le.i3_max)then init_array_x(i1_min:i1_max,i2_min:i2_max,i3) = & & init_plane_x(i1_min:i1_max,i2_min:i2_max) end if endif end do if(myid==1)close(10) end if if(read_ids) then if(myid==1)then open(10,file=filename_id,form='unformatted') rewind 10 read(10) ! skip first line end if do i3=1,n3(ilevel) if(myid==1)then if(debug.and.mod(i3,10)==0)write(*,*)'Reading plane ',i3 read(10)((init_plane_id(i1,i2),i1=1,n1(ilevel)),i2=1,n2(ilevel)) else init_plane_id=0.0 endif buf_count=n1(ilevel)*n2(ilevel) #ifndef WITHOUTMPI #ifndef LONGINT call MPI_BCAST(init_plane_id,buf_count,MPI_INTEGER,0,MPI_COMM_WORLD,info) #else call MPI_BCAST(init_plane_id,buf_count,MPI_INTEGER8,0,MPI_COMM_WORLD,info) #endif #endif if(active(ilevel)%ngrid>0)then if(i3.ge.i3_min.and.i3.le.i3_max)then init_array_id(i1_min:i1_max,i2_min:i2_max,i3) = & & init_plane_id(i1_min:i1_max,i2_min:i2_max) end if endif end do if(myid==1)close(10) end if endif if(active(ilevel)%ngrid>0)then ! Rescale initial displacement field to code units init_array=dfact(ilevel)*dx/dxini(ilevel)*init_array/vfact(ilevel) if(read_pos)then init_array_x = init_array_x/boxlen_ini endif ! Loop over grids by vector sweeps ipart=ipart_old ncache=active(ilevel)%ngrid do igrid=1,ncache,nvector ngrid=MIN(nvector,ncache-igrid+1) do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do ! Loop over cells do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,ngrid ind_cell(i)=iskip+ind_grid(i) end do do i=1,ngrid xx1=xg(ind_grid(i),1)+xc(ind,1) xx1=(xx1*(dxini(ilevel)/dx)-xoff1(ilevel))/dxini(ilevel) xx2=xg(ind_grid(i),2)+xc(ind,2) xx2=(xx2*(dxini(ilevel)/dx)-xoff2(ilevel))/dxini(ilevel) xx3=xg(ind_grid(i),3)+xc(ind,3) xx3=(xx3*(dxini(ilevel)/dx)-xoff3(ilevel))/dxini(ilevel) i1=int(xx1)+1 i1=int(xx1)+1 i2=int(xx2)+1 i2=int(xx2)+1 i3=int(xx3)+1 i3=int(xx3)+1 keep_part=son(ind_cell(i))==0 if(keep_part)then ipart=ipart+1 vp(ipart,idim)=init_array(i1,i2,i3) if(.not. read_pos)then dispmax=max(dispmax,abs(init_array(i1,i2,i3)/dx)) else xp(ipart,idim)=xg(ind_grid(i),idim)+xc(ind,idim)+init_array_x(i1,i2,i3) dispmax=max(dispmax,abs(init_array_x(i1,i2,i3)/dx)) if (read_ids) then idp(ipart) = init_array_id(i1,i2,i3) end if endif end if end do end do ! End loop over cells end do ! End loop over grids endif end do ! End loop over input variables ! Deallocate initial conditions array if(active(ilevel)%ngrid>0)then deallocate(init_array,init_array_x) end if deallocate(init_plane,init_plane_x) if(read_ids) then deallocate(init_plane_id) deallocate(init_array_id) end if if(debug)write(*,*)'npart=',ipart,'/',npartmax,' for PE=',myid end do ! End loop over levels ! Initial particle number npart=ipart ! Move particle according to Zeldovich approximation if(.not. read_pos)then xp(1:npart,1:ndim)=xp(1:npart,1:ndim)+vp(1:npart,1:ndim) endif ! Scale displacement to velocity vp(1:npart,1:ndim)=vfact(1)*vp(1:npart,1:ndim) ! Periodic box do ipart=1,npart #if NDIM>0 if(xp(ipart,1)< 0.0d0 )xp(ipart,1)=xp(ipart,1)+dble(nx) if(xp(ipart,1)>=dble(nx))xp(ipart,1)=xp(ipart,1)-dble(nx) #endif #if NDIM>1 if(xp(ipart,2)< 0.0d0 )xp(ipart,2)=xp(ipart,2)+dble(ny) if(xp(ipart,2)>=dble(ny))xp(ipart,2)=xp(ipart,2)-dble(ny) #endif #if NDIM>2 if(xp(ipart,3)< 0.0d0 )xp(ipart,3)=xp(ipart,3)+dble(nz) if(xp(ipart,3)>=dble(nz))xp(ipart,3)=xp(ipart,3)-dble(nz) #endif end do #ifndef WITHOUTMPI ! Compute particle Hilbert ordering sendbuf=0 do ipart=1,npart xx(1,1:3)=xp(ipart,1:3) xx_dp(1,1:3)=xx(1,1:3) call cmp_cpumap(xx_dp,cc,1) if(cc(1).ne.myid)sendbuf(cc(1))=sendbuf(cc(1))+1 end do ! Allocate communication buffer in emission do icpu=1,ncpu ncache=sendbuf(icpu) if(ncache>0)then allocate(emission(icpu,1)%up(1:ncache,1:twondim+1)) allocate(emission(icpu,1)%fp(1:ncache,1:2)) end if end do ! Fill communicators jpart=0 sendbuf=0 do ipart=1,npart xx(1,1:3)=xp(ipart,1:3) xx_dp(1,1:3)=xx(1,1:3) call cmp_cpumap(xx_dp,cc,1) if(cc(1).ne.myid)then icpu=cc(1) sendbuf(icpu)=sendbuf(icpu)+1 ibuf=sendbuf(icpu) emission(icpu,1)%up(ibuf,1)=xp(ipart,1) emission(icpu,1)%up(ibuf,2)=xp(ipart,2) emission(icpu,1)%up(ibuf,3)=xp(ipart,3) emission(icpu,1)%up(ibuf,4)=vp(ipart,1) emission(icpu,1)%up(ibuf,5)=vp(ipart,2) emission(icpu,1)%up(ibuf,6)=vp(ipart,3) emission(icpu,1)%up(ibuf,7)=mp(ipart) emission(icpu,1)%fp(ibuf,1)=part2int(typep(ipart)) emission(icpu,1)%fp(ibuf,2)=idp(ipart) else jpart=jpart+1 xp(jpart,1:3)=xp(ipart,1:3) vp(jpart,1:3)=vp(ipart,1:3) mp(jpart) =mp(ipart) idp(jpart) =idp(ipart) endif end do ! Communicate virtual particle number to parent cpu call MPI_ALLTOALL(sendbuf,1,MPI_INTEGER,recvbuf,1,MPI_INTEGER,MPI_COMM_WORLD,info) ! Compute total number of newly created particles npart_new=0 do icpu=1,ncpu npart_new=npart_new+recvbuf(icpu) end do if(jpart+npart_new.gt.npartmax)then write(*,*)'No more free memory for particles' write(*,*)'Increase npartmax' write(*,*)myid write(*,*)jpart,npart_new write(*,*)bound_key call MPI_ABORT(MPI_COMM_WORLD,1,info) end if ! Allocate communication buffer in reception do icpu=1,ncpu ncache=recvbuf(icpu) if(ncache>0)then allocate(reception(icpu,1)%up(1:ncache,1:twondim+1)) allocate(reception(icpu,1)%fp(1:ncache,1:2)) end if end do ! Taking care of real values ! Receive particles countrecv=0 do icpu=1,ncpu ncache=recvbuf(icpu) if(ncache>0)then buf_count=ncache*(twondim+1) countrecv=countrecv+1 call MPI_IRECV(reception(icpu,1)%up,buf_count, & & MPI_DOUBLE_PRECISION,icpu-1,& & tagu,MPI_COMM_WORLD,reqrecv(countrecv),info) end if end do ! Send particles countsend=0 do icpu=1,ncpu ncache=sendbuf(icpu) if(ncache>0)then buf_count=ncache*(twondim+1) countsend=countsend+1 call MPI_ISEND(emission(icpu,1)%up,buf_count, & & MPI_DOUBLE_PRECISION,icpu-1,& & tagu,MPI_COMM_WORLD,reqsend(countsend),info) end if end do ! Wait for full completion of receives call MPI_WAITALL(countrecv,reqrecv,statuses,info) ! Wait for full completion of sends call MPI_WAITALL(countsend,reqsend,statuses,info) ! Taking care of int values ! Receive particles countrecv=0 do icpu=1,ncpu ncache=recvbuf(icpu) if(ncache>0)then buf_count=ncache * 2 countrecv=countrecv+1 #ifndef LONGINT call MPI_IRECV(reception(icpu,1)%fp,buf_count, & & MPI_INTEGER,icpu-1,& & tagu,MPI_COMM_WORLD,reqrecv(countrecv),info) #else call MPI_IRECV(reception(icpu,1)%fp,buf_count, & & MPI_INTEGER8,icpu-1,& & tagu,MPI_COMM_WORLD,reqrecv(countrecv),info) #endif end if end do ! Send particles countsend=0 do icpu=1,ncpu ncache=sendbuf(icpu) if(ncache>0)then buf_count=ncache * 2 countsend=countsend+1 #ifndef LONGINT call MPI_ISEND(emission(icpu,1)%fp,buf_count, & & MPI_INTEGER,icpu-1,& & tagu,MPI_COMM_WORLD,reqsend(countsend),info) #else call MPI_ISEND(emission(icpu,1)%fp,buf_count, & & MPI_INTEGER8,icpu-1,& & tagu,MPI_COMM_WORLD,reqsend(countsend),info) #endif end if end do ! Wait for full completion of receives call MPI_WAITALL(countrecv,reqrecv,statuses,info) ! Wait for full completion of sends call MPI_WAITALL(countsend,reqsend,statuses,info) ! Create new particles do icpu=1,ncpu do ibuf=1,recvbuf(icpu) jpart=jpart+1 xp(jpart,1)=reception(icpu,1)%up(ibuf,1) xp(jpart,2)=reception(icpu,1)%up(ibuf,2) xp(jpart,3)=reception(icpu,1)%up(ibuf,3) vp(jpart,1)=reception(icpu,1)%up(ibuf,4) vp(jpart,2)=reception(icpu,1)%up(ibuf,5) vp(jpart,3)=reception(icpu,1)%up(ibuf,6) mp(jpart) =reception(icpu,1)%up(ibuf,7) idp(jpart) =reception(icpu,1)%fp(ibuf,2) end do end do ! Erase old particles do ipart=jpart+1,npart xp(ipart,1)=0d0 xp(ipart,2)=0d0 xp(ipart,3)=0d0 vp(ipart,1)=0d0 vp(ipart,2)=0d0 vp(ipart,3)=0d0 mp(ipart)=0d0 idp(ipart)=0 end do npart=jpart ! Deallocate communicators do icpu=1,ncpu if(sendbuf(icpu)>0) then deallocate(emission(icpu,1)%up) deallocate(emission(icpu,1)%fp) end if if(recvbuf(icpu)>0)then deallocate(reception(icpu,1)%up) deallocate(reception(icpu,1)%fp) end if end do write(*,*)'npart=',ipart,'/',npartmax,' for PE=',myid #endif ! Compute particle initial level do ipart=1,npart levelp(ipart)=levelmin end do ! Setup DM for all particles do ipart=1, npart typep(ipart)%family = FAM_DM typep(ipart)%tag = 0 end do ! Compute particle initial age and metallicity if(star.or.sink)then do ipart=1,npart tp(ipart)=0d0 if(metal)then zp(ipart)=0d0 end if end do end if ! Compute particle initial identity if(.not.read_ids) then npart_cpu=0; npart_all=0 npart_cpu(myid)=npart #ifndef WITHOUTMPI #ifndef LONGINT call MPI_ALLREDUCE(npart_cpu,npart_all,ncpu,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,info) #else call MPI_ALLREDUCE(npart_cpu,npart_all,ncpu,MPI_INTEGER8,MPI_SUM,MPI_COMM_WORLD,info) #endif npart_cpu(1)=npart_all(1) #endif do icpu=2,ncpu npart_cpu(icpu)=npart_cpu(icpu-1)+npart_all(icpu) end do if(myid==1)then do ipart=1,npart idp(ipart)=ipart end do else do ipart=1,npart idp(ipart)=npart_cpu(myid-1)+ipart end do end if end if end subroutine load_grafic subroutine load_ascii ! This function load from ASCII file. As is, you can only load dark matter particles ! Local particle count ipart=0 if(TRIM(initfile(levelmin)).NE.' ')then filename=TRIM(initfile(levelmin))//'/ic_part' if(myid==1)then open(10,file=filename,form='formatted') indglob=0 end if eof=.false. do while (.not.eof) xx=0.0 if(myid==1)then jpart=0 do i=1,nvector read(10,*,end=111)xx1,xx2,xx3,vv1,vv2,vv3,mm1 jpart=jpart+1 indglob=indglob+1 xx(i,1)=xx1+boxlen/2.0 xx(i,2)=xx2+boxlen/2.0 xx(i,3)=xx3+boxlen/2.0 vv(i,1)=vv1 vv(i,2)=vv2 vv(i,3)=vv3 mm(i )=mm1 ii(i )=indglob tmppart%family = FAM_DM tmppart%tag = 0 pp(i )=part2int(tmppart) end do 111 continue if(jpartnpartmax)then write(*,*)'Maximum number of particles incorrect' write(*,*)'npartmax should be greater than',ipart call clean_stop endif xp(ipart,1:3)= xx(i,1:3) vp(ipart,1:3)= vv(i,1:3) mp(ipart) = mm(i) levelp(ipart)= levelmin idp(ipart) = ii(i) ! Get back the particle type from the communicated ! shortened integer typep(ipart) = int2part(pp(i)) #ifndef WITHOUTMPI endif #endif enddo end do if(myid==1)close(10) end if npart=ipart ! Compute total number of particle npart_cpu=0; npart_all=0 npart_cpu(myid)=npart #ifndef WITHOUTMPI #ifndef LONGINT call MPI_ALLREDUCE(npart_cpu,npart_all,ncpu,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,info) #else call MPI_ALLREDUCE(npart_cpu,npart_all,ncpu,MPI_INTEGER8,MPI_SUM,MPI_COMM_WORLD,info) #endif npart_cpu(1)=npart_all(1) #endif do icpu=2,ncpu npart_cpu(icpu)=npart_cpu(icpu-1)+npart_all(icpu) end do if(debug)write(*,*)'npart=',npart,'/',npart_cpu(ncpu) end subroutine load_ascii subroutine load_dice !!! DICE dice_init=.true. ! Conversion factor from user units to cgs units call units(scale_l,scale_t,scale_d,scale_v,scale_nH,scale_T2) scale_m = scale_d*scale_l**3 ! Reading header of the Gadget file error=.false. ipart = 0 do ifile=1,ic_nfile write(ifile_str,*) ifile if(ic_nfile.eq.1) then filename=TRIM(initfile(levelmin))//'/'//TRIM(ic_file) else filename=TRIM(initfile(levelmin))//'/'//TRIM(ic_file)//'.'//ADJUSTL(ifile_str) endif INQUIRE(FILE=filename,EXIST=file_exists) if(.not.file_exists) then if(myid==1) write(*,*) TRIM(filename),' not found' call clean_stop endif if(myid==1)then write(*,'(A12,A)') ' Opening -> ',filename if((ic_format.ne.'Gadget1').and.(ic_format.ne.'Gadget2')) then if(myid==1) write(*,*) 'Specify a valid IC file format [ic_format=Gadget1/Gadget2]' error=.true. endif OPEN(unit=1,file=filename,status='old',action='read',form='unformatted',access='stream') ! Init block address head_blck = -1 pos_blck = -1 vel_blck = -1 id_blck = -1 u_blck = -1 mass_blck = -1 metal_blck = -1 age_blck = -1 if(ic_format .eq. 'Gadget1') then ! Init block counter jump_blck = 1 blck_cnt = 1 do while(.true.) ! Reading data block header read(1,POS=jump_blck,iostat=stat) blck_size if(stat /= 0) exit ! Saving data block positions if(blck_cnt .eq. 1) then head_blck = jump_blck+sizeof(blck_size) head_size = blck_size write(*,*)blck_cnt,blck_size endif if(blck_cnt .eq. 2) then pos_blck = jump_blck+sizeof(blck_size) pos_size = blck_size/(3*sizeof(dummy_real)) write(*,*)blck_cnt,blck_size endif if(blck_cnt .eq. 3) then vel_blck = jump_blck+sizeof(blck_size) vel_size = blck_size/(3*sizeof(dummy_real)) write(*,*)blck_cnt,blck_size endif if(blck_cnt .eq. 4) then id_blck = jump_blck+sizeof(blck_size) id_size = blck_size/sizeof(dummy_int) write(*,*)blck_cnt,blck_size endif if(blck_cnt .eq. 5) then u_blck = jump_blck+sizeof(blck_size) u_size = blck_size/sizeof(dummy_real) write(*,*)blck_cnt,blck_size endif if(blck_cnt .eq. 6) then mass_blck = jump_blck+sizeof(blck_size) mass_size = blck_size/sizeof(dummy_real) write(*,*)blck_cnt,blck_size endif if(blck_cnt .eq. 7) then metal_blck = jump_blck+sizeof(blck_size) metal_size = blck_size/sizeof(dummy_real) write(*,*)blck_cnt,blck_size endif if(blck_cnt .eq. 8) then age_blck = jump_blck+sizeof(blck_size) age_size = blck_size/sizeof(dummy_real) write(*,*)blck_cnt,blck_size endif jump_blck = jump_blck+blck_size+2*sizeof(dummy_int) blck_cnt = blck_cnt+1 enddo endif if(ic_format .eq. 'Gadget2') then ! Init block counter jump_blck = 1 write(*,'(A50)')'__________________________________________________' do while(.true.) ! Reading data block header read(1,POS=jump_blck,iostat=stat) dummy_int if(stat /= 0) exit read(1,POS=jump_blck+sizeof(dummy_int),iostat=stat) blck_name if(stat /= 0) exit read(1,POS=jump_blck+sizeof(dummy_int)+sizeof(blck_name),iostat=stat) dummy_int if(stat /= 0) exit read(1,POS=jump_blck+2*sizeof(dummy_int)+sizeof(blck_name),iostat=stat) dummy_int if(stat /= 0) exit read(1,POS=jump_blck+3*sizeof(dummy_int)+sizeof(blck_name),iostat=stat) blck_size if(stat /= 0) exit ! Saving data block positions if(blck_name .eq. ic_head_name) then head_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) head_size = blck_size write(*,*) '-> Found ',blck_name,' block' endif if(blck_name .eq. ic_pos_name) then pos_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) pos_size = blck_size/(3*sizeof(dummy_real)) write(*,*) '-> Found ',blck_name,' block' endif if(blck_name .eq. ic_vel_name) then vel_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) vel_size = blck_size/(3*sizeof(dummy_real)) write(*,*) '-> Found ',blck_name,' block' endif if(blck_name .eq. ic_id_name) then id_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) id_size = blck_size/sizeof(dummy_int) write(*,*) '-> Found ',blck_name,' block' endif if(blck_name .eq. ic_mass_name) then mass_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) mass_size = blck_size/sizeof(dummy_real) write(*,*) '-> Found ',blck_name,' block' endif if(blck_name .eq. ic_u_name) then u_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) u_size = blck_size/sizeof(dummy_real) write(*,*) '-> Found ',blck_name,' block' endif if(blck_name .eq. ic_metal_name) then metal_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) metal_size = blck_size/sizeof(dummy_real) write(*,*) '-> Found ',blck_name,' block' endif if(blck_name .eq. ic_age_name) then age_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) age_size = blck_size/sizeof(dummy_real) write(*,*) '-> Found ',blck_name,' block' endif jump_blck = jump_blck+blck_size+sizeof(blck_name)+5*sizeof(dummy_int) enddo endif if((head_blck.eq.-1).or.(pos_blck.eq.-1).or.(vel_blck.eq.-1)) then write(*,*) 'Gadget file does not contain handful data' error=.true. endif if(head_size.ne.256) then write(*,*) 'Gadget header is not 256 bytes' error=.true. endif ! Byte swapping doesn't appear to work if you just do READ(1)header READ(1,POS=head_blck) header%npart,header%mass,header%time,header%redshift, & header%flag_sfr,header%flag_feedback,header%nparttotal, & header%flag_cooling,header%numfiles,header%boxsize, & header%omega0,header%omegalambda,header%hubbleparam, & header%flag_stellarage,header%flag_metals,header%totalhighword, & header%flag_entropy_instead_u, header%flag_doubleprecision, & header%flag_ic_info, header%lpt_scalingfactor nstar_tot = sum(header%npart(3:5)) npart = sum(header%npart) ngas = header%npart(1) nhalo = header%npart(2) if(cosmo) T2_start = 1.356d-2/aexp**2 write(*,'(A50)')'__________________________________________________' write(*,*)'Found ',npart,' particles' skip=.false. do j=1,6 if(ic_skip_type(j).eq.0) skip=.true. enddo if(.not.skip) write(*,*)'----> ',header%npart(1),' type 0 particles with header mass ',header%mass(1) skip=.false. do j=1,6 if(ic_skip_type(j).eq.1) skip=.true. enddo if(.not.skip) write(*,*)'----> ',header%npart(2),' type 1 particles with header mass ',header%mass(2) skip=.false. do j=1,6 if(ic_skip_type(j).eq.2) skip=.true. enddo if(.not.skip) write(*,*)'----> ',header%npart(3),' type 2 particles with header mass ',header%mass(3) skip=.false. do j=1,6 if(ic_skip_type(j).eq.3) skip=.true. enddo if(.not.skip) write(*,*)'----> ',header%npart(4),' type 3 particles with header mass ',header%mass(4) skip=.false. do j=1,6 if(ic_skip_type(j).eq.4) skip=.true. enddo if(.not.skip) write(*,*)'----> ',header%npart(5),' type 4 particles with header mass ',header%mass(5) skip=.false. do j=1,6 if(ic_skip_type(j).eq.5) skip=.true. enddo if(.not.skip) write(*,*)'----> ',header%npart(6),' type 5 particles with header mass ',header%mass(6) write(*,'(A50)')'_____________________progress_____________________' if((pos_size.ne.npart).or.(vel_size.ne.npart)) then write(*,*) 'POS =',pos_size write(*,*) 'VEL =',vel_size write(*,*) 'Number of particles does not correspond to block sizes' error=.true. endif endif if(error) call clean_stop #ifndef WITHOUTMPI call MPI_BCAST(nstar_tot,1,MPI_INTEGER,0,MPI_COMM_WORLD,info) #endif eob = .false. kpart = 0 lpart = 0 mpart = 0 gpart = 0 opart = 0 mgas_tot = 0. ipbar = 0. do while(.not.eob) xx=0. vv=0. ii=0 mm=0. tt=0. zz=0. uu=0. if(myid==1)then jpart=0 do i=1,nvector jpart=jpart+1 ! All particles counter kpart=kpart+1 if(kpart.le.header%npart(1)) type_index = 1 do j=1,5 if(kpart.gt.sum(header%npart(1:j)).and.kpart.le.sum(header%npart(1:j+1))) type_index = j+1 enddo if((sum(header%npart(3:5)).gt.0).and.(kpart.gt.(header%npart(1)+header%npart(2)))) mpart=mpart+1 if(type_index.ne.2) gpart=gpart+1 ! Reading Gadget1 or Gadget2 file line-by-line ! Mandatory data read(1,POS=pos_blck+3*sizeof(dummy_real)*(kpart-1)) xx_sp(i,1:3) read(1,POS=vel_blck+3*sizeof(dummy_real)*(kpart-1)) vv_sp(i,1:3) if(header%mass(type_index).gt.0) then mm_sp(i) = header%mass(type_index) else opart=opart+1 read(1,POS=mass_blck+sizeof(dummy_real)*(opart-1)) mm_sp(i) endif ! Optional data if(id_blck.ne.-1) then read(1,POS=id_blck+sizeof(dummy_int)*(kpart-1)) ii(i) else ii(i) = kpart endif if(kpart.le.header%npart(1)) then if((u_blck.ne.-1).and.(u_size.eq.header%npart(1))) then read(1,POS=u_blck+sizeof(dummy_real)*(kpart-1)) uu_sp(i) endif endif if(metal) then if((metal_blck.ne.-1).and.(metal_size.eq.npart)) then read(1,POS=metal_blck+sizeof(dummy_real)*(kpart-1)) zz_sp(i) endif if((metal_blck.ne.-1).and.(metal_size.eq.ngas+nstar_tot)) then read(1,POS=metal_blck+sizeof(dummy_real)*(gpart-1)) zz_sp(i) endif endif if(star) then if((age_blck.ne.-1).and.(age_size.eq.sum(header%npart(3:5)))) then if((sum(header%npart(3:5)).gt.0).and.(kpart.gt.(header%npart(1)+header%npart(2)))) then read(1,POS=age_blck+sizeof(dummy_real)*(mpart-1)) tt_sp(i) endif endif endif ! Scaling to ramses code units if(cosmo) then gadget_scale_l = scale_l/header%boxsize gadget_scale_v = 1e3*SQRT(aexp)/header%boxsize*aexp/100. endif xx(i,:) = xx_sp(i,:)*(gadget_scale_l/scale_l)*ic_scale_pos vv(i,:) = vv_sp(i,:)*(gadget_scale_v/scale_v)*ic_scale_vel mm(i) = mm_sp(i)*(gadget_scale_m/scale_m)*ic_scale_mass if(cosmo) then if(type_index .eq. 1) mass_sph = mm(i) if(xx(i,1)< 0.0d0 )xx(i,1)=xx(i,1)+dble(nx) if(xx(i,1)>=dble(nx))xx(i,1)=xx(i,1)-dble(nx) if(xx(i,2)< 0.0d0 )xx(i,2)=xx(i,2)+dble(ny) if(xx(i,2)>=dble(ny))xx(i,2)=xx(i,2)-dble(ny) if(xx(i,3)< 0.0d0 )xx(i,3)=xx(i,3)+dble(nz) if(xx(i,3)>=dble(nz))xx(i,3)=xx(i,3)-dble(nz) endif if(metal) then if(metal_blck.ne.-1) then zz(i) = zz_sp(i)*ic_scale_metal else zz(i) = 0.02*z_ave endif endif if(kpart.gt.header%npart(1)+header%npart(2)) then if(age_blck.ne.-1) then if(cosmo) then tt(i) = tt_sp(i) else tt(i) = tt_sp(i)*(gadget_scale_t/(scale_t/aexp**2))*ic_scale_age endif else tt(i) = -13.8*1d9*3.15360d7/scale_t ! Age of the universe endif endif if(kpart.le.header%npart(1)) then if(cosmo) then uu(i) = T2_start/scale_T2 else ! Temperature stored in units of K/mu uu(i) = uu_sp(i)*mu_mol*(gadget_scale_v/scale_v)**2*ic_scale_u endif endif if(kpart.le.header%npart(1)) mgas_tot = mgas_tot+mm(i) ! Check the End Of Block if(kpart.ge.ipbar*(npart/49.0))then write(*,'(A1)',advance='no') '_' ipbar = ipbar+1.0 endif if(kpart.ge.npart) then write(*,'(A1)') ' ' write(*,'(A,A7,A)') ' ',TRIM(ic_format),' file successfully loaded' write(*,'(A50)')'__________________________________________________' eob=.true. exit endif enddo endif #ifndef WITHOUTMPI call MPI_BCAST(eob,1 ,MPI_LOGICAL ,0,MPI_COMM_WORLD,info) call MPI_BCAST(xx,nvector*3 ,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,info) call MPI_BCAST(vv,nvector*3 ,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,info) call MPI_BCAST(ii,nvector ,MPI_INTEGER ,0,MPI_COMM_WORLD,info) call MPI_BCAST(mm,nvector ,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,info) call MPI_BCAST(zz,nvector ,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,info) call MPI_BCAST(tt,nvector ,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,info) call MPI_BCAST(uu,nvector ,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,info) call MPI_BCAST(jpart,1 ,MPI_INTEGER ,0,MPI_COMM_WORLD,info) call MPI_BCAST(header%npart,6,MPI_INTEGER ,0,MPI_COMM_WORLD,info) call cmp_cpumap(xx,cc,jpart) #endif do i=1,jpart #ifndef WITHOUTMPI ! Check the CPU map if(cc(i)==myid)then #endif ! Determine current particle type if((lpart+i).le.header%npart(1)) type_index = 1 do j=1,5 if((lpart+i).gt.sum(header%npart(1:j)).and.(lpart+i).le.sum(header%npart(1:j+1))) type_index = j+1 enddo skip = .false. do j=1,6 if(ic_skip_type(j).eq.type_index-1) skip=.true. enddo if(.not.skip) then if(abs(xx(i,1)-ic_center(1)).ge.boxlen/2d0) cycle if(abs(xx(i,2)-ic_center(2)).ge.boxlen/2d0) cycle if(abs(xx(i,3)-ic_center(3)).ge.boxlen/2d0) cycle ipart = ipart+1 if(ipart.gt.npartmax) then write(*,*) 'Increase npartmax' #ifndef WITHOUTMPI call MPI_ABORT(MPI_COMM_WORLD,1,info) #else stop #endif endif xp(ipart,1:3) = xx(i,1:3)+boxlen/2.0D0-ic_center(1:3) vp(ipart,1:3) = vv(i,1:3) ! Flag gas particles with idp=1 if(type_index.gt.1)then idp(ipart) = ii(i)+1 else idp(ipart) = 1 endif mp(ipart) = mm(i) levelp(ipart) = levelmin if(star) then tp(ipart) = tt(i) ! Particle metallicity if(metal) then zp(ipart) = zz(i) endif endif if(type_index.gt.2)then if(star)then typep(ipart)%family = FAM_STAR typep(ipart)%tag = 0 end if else if(type_index.eq.2)then typep(ipart)%family = FAM_DM typep(ipart)%tag = 0 end if up(ipart) = uu(i) if(ic_mask_ptype.gt.-1)then if(ic_mask_ptype.eq.type_index-1)then maskp(ipart) = 1.0 else maskp(ipart) = 0.0 endif endif ! Add a gas particle outside the zoom region if(cosmo) then do j=1,6 if(type_index.eq.cosmo_add_gas_index(j)) then ! Add a gas particle xp(ipart+1,1:3) = xp(ipart,1:3) vp(ipart+1,1:3) = vp(ipart,1:3) idp(ipart+1) = -1 mp(ipart+1) = mp(ipart)*(omega_b/omega_m) levelp(ipart+1) = levelmin up(ipart+1) = T2_start/scale_T2 if(metal) then zp(ipart+1) = z_ave*0.02 endif ! Remove mass from the DM particle mp(ipart) = mp(ipart)-mp(ipart+1) ! Update index ipart = ipart+1 endif end do endif endif #ifndef WITHOUTMPI endif #endif enddo lpart = lpart+jpart enddo if(myid==1)then write(*,'(A,E10.3,A)') ' Gas mass in AMR grid -> ',mgas_tot,' unit_m' write(*,'(A50)')'__________________________________________________' close(1) endif enddo npart = ipart ! Compute total number of particle npart_cpu = 0 npart_all = 0 npart_cpu(myid) = npart #ifndef WITHOUTMPI call MPI_ALLREDUCE(npart_cpu,npart_all,ncpu,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,info) npart_cpu(1) = npart_all(1) #else npart_all = npart #endif if(myid==1)then write(*,*) ' npart_tot -> ',sum(npart_all) write(*,'(A50)')'__________________________________________________' close(1) endif do icpu=2,ncpu npart_cpu(icpu)=npart_cpu(icpu-1)+npart_all(icpu) end do if(debug)write(*,*)'npart=',npart,'/',npart_cpu(ncpu) ifout = ic_ifout t = ic_t_restart ! DICE patch end subroutine load_dice end subroutine init_part #define TIME_START(cs) call SYSTEM_CLOCK(COUNT=cs) #define TIME_END(ce) call SYSTEM_CLOCK(COUNT=ce) #define TIME_SPENT(cs,ce,cr) REAL((ce-cs)/cr) subroutine load_gadget ! This routine only creates DM particles use amr_commons use pm_commons use gadgetreadfilemod use mpi_mod implicit none #ifndef WITHOUTMPI integer::info integer,dimension(1:nvector)::cc #endif logical::ok TYPE(gadgetheadertype)::gadgetheader integer::numfiles integer::ifile real,dimension(:,:),allocatable:: pos, vel real(dp)::massparticles integer(kind=8)::allparticles integer(i8b),dimension(:),allocatable:: ids integer::nparticles integer::i,icpu,ipart,start integer(i8b),dimension(1:ncpu)::npart_cpu,npart_all character(LEN=256)::filename real(dp),dimension(1:nvector,1:3)::xx_dp integer::clock_start,clock_end,clock_rate real(dp)::gadgetvfact ! Local particle count ipart=0 call SYSTEM_CLOCK(COUNT_RATE=clock_rate) if(TRIM(initfile(levelmin)).NE.' ')then filename=TRIM(initfile(levelmin)) ! read first header to get information call gadgetreadheader(filename, 0, gadgetheader, ok) if(.not.ok) call clean_stop numfiles = gadgetheader%numfiles gadgetvfact = SQRT(aexp) / gadgetheader%boxsize * aexp / 100. #ifndef LONGINT allparticles=int(gadgetheader%nparttotal(2),kind=8) #else allparticles=int(gadgetheader%nparttotal(2),kind=8) & & +int(gadgetheader%totalhighword(2),kind=8)*4294967296_i8b !2^32 #endif massparticles=1d0/dble(allparticles) do ifile=0,numfiles-1 call gadgetreadheader(filename, ifile, gadgetheader, ok) nparticles = gadgetheader%npart(2) allocate(pos(3,nparticles)) allocate(vel(3,nparticles)) allocate(ids(nparticles)) TIME_START(clock_start) call gadgetreadfile(filename,ifile,gadgetheader, pos, vel, ids) TIME_END(clock_end) if(debug) write(*,*) myid, ':Read ', nparticles, ' from gadget file ', ifile, ' in ', & TIME_SPENT(clock_start, clock_end, clock_rate) start = 1 TIME_START(clock_start) do i=1,nparticles xx_dp(1,1) = pos(1,i)/gadgetheader%boxsize xx_dp(1,2) = pos(2,i)/gadgetheader%boxsize xx_dp(1,3) = pos(3,i)/gadgetheader%boxsize #ifndef WITHOUTMPI call cmp_cpumap(xx_dp,cc,1) if(cc(1)==myid)then #endif ipart=ipart+1 #ifndef WITHOUTMPI if (ipart .ge. size(mp)) then write(*,*) 'For ', myid, ipart, ' exceeds ', size(mp) call clean_stop end if #endif xp(ipart,1:3)=xx_dp(1,1:3) vp(ipart,1) =vel(1, i) * gadgetvfact vp(ipart,2) =vel(2, i) * gadgetvfact vp(ipart,3) =vel(3, i) * gadgetvfact mp(ipart) = massparticles levelp(ipart)=levelmin idp(ipart) =ids(i) ! Get the particle type typep(ipart)%family = FAM_DM typep(ipart)%tag = 0 #ifndef WITHOUTMPI endif #endif enddo #ifndef WITHOUTMPI TIME_END(clock_end) if(debug) write(*,*) myid, ':Processed ', nparticles, ' in ',& & TIME_SPENT(clock_start, clock_end, clock_rate), ' ipart now ', ipart #endif deallocate(pos,vel,ids) end do end if npart=ipart ! Compute total number of particleclock_rate npart_cpu=0; npart_all=0 npart_cpu(myid)=npart #ifndef WITHOUTMPI #ifndef LONGINT call MPI_ALLREDUCE(npart_cpu,npart_all,ncpu,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,info) #else call MPI_ALLREDUCE(npart_cpu,npart_all,ncpu,MPI_INTEGER8,MPI_SUM,MPI_COMM_WORLD,info) #endif npart_cpu(1)=npart_all(1) #endif do icpu=2,ncpu npart_cpu(icpu)=npart_cpu(icpu-1)+npart_all(icpu) end do write(*,*)'npart=',npart,'/',npartmax end subroutine load_gadget /data1/mabe/MeraTest/Ramses/patch_2019_10version//init_refine.f90 !################################################################ !################################################################ !################################################################ !################################################################ subroutine init_refine use amr_commons use pm_commons use dice_commons implicit none !------------------------------------------- ! This routine builds the initial AMR grid !------------------------------------------- integer::ilevel if(myid==1)write(*,*)'Building initial AMR grid' init=.true. ! Base refinement do ilevel=1,levelmin call flag call refine end do ! Further refinements if necessary do ilevel=levelmin+1,nlevelmax if(initfile(levelmin).ne.' '.and.initfile(ilevel).eq.' ')exit if(hydro)call init_flow #ifdef RT if(rt)call rt_init_flow #endif if(ivar_refine==0)call init_refmap call flag call refine if(nremap>0)call load_balance if(numbtot(1,ilevel)==0)exit end do ! Final pass to initialize the flow init=.false. if(hydro)call init_flow #ifdef RT if(rt)call rt_init_flow #endif end subroutine init_refine !################################################################ !################################################################ !################################################################ !################################################################ subroutine init_refine_2 !-------------------------------------------------------------- ! This routine builds additional refinements to the ! the initial AMR grid for filetype ne 'grafic' ! DICE patch: It is ensured that all the particles are ! transfered down to level 1 before initialising the grid !-------------------------------------------------------------- use amr_commons use hydro_commons #ifdef RT use rt_hydro_commons #endif use pm_commons use poisson_commons use dice_commons implicit none integer::ilevel,i,ivar real(dp)::scale_l,scale_t,scale_d,scale_v,scale_nH,scale_T2 real(dp)::eps_star2 call units(scale_l,scale_t,scale_d,scale_v,scale_nH,scale_T2) if(filetype.eq.'grafic')return if(myid==1.and.amr_struct) then write(*,*) 'Initial conditions with AMR data structure' write(*,'(A50)')'__________________________________________________' end if do i=levelmin,nlevelmax+1 ! DICE------ do ilevel=levelmin-1,1,-1 if(pic)call merge_tree_fine(ilevel) enddo ! ---------- call refine_coarse do ilevel=1,nlevelmax call build_comm(ilevel) call make_virtual_fine_int(cpu_map(1),ilevel) call refine_fine(ilevel) ! DICE------ if(pic)call make_tree_fine(ilevel) ! ---------- if(hydro)call init_flow_fine(ilevel) ! DICE------ if(pic)then call kill_tree_fine(ilevel) call virtual_tree_fine(ilevel) endif ! ---------- #ifdef RT if(rt)call rt_init_flow_fine(ilevel) #endif end do ! DICE------ do ilevel=nlevelmax-1,levelmin,-1 if(pic)call merge_tree_fine(ilevel) enddo ! ---------- if(nremap>0)call load_balance do ilevel=levelmin,nlevelmax if(pic)call make_tree_fine(ilevel) if(poisson)call rho_fine(ilevel,2) if(hydro)call init_flow_fine(ilevel) if(pic)then call kill_tree_fine(ilevel) call virtual_tree_fine(ilevel) endif end do do ilevel=nlevelmax,levelmin,-1 if(pic)call merge_tree_fine(ilevel) if(hydro)then call upload_fine(ilevel) #ifdef SOLVERmhd do ivar=1,nvar+3 #else do ivar=1,nvar #endif call make_virtual_fine_dp(uold(1,ivar),ilevel) #ifdef SOLVERmhd end do #else end do #endif if(simple_boundary)call make_boundary_hydro(ilevel) endif #ifdef RT if(rt)then call rt_upload_fine(ilevel) do ivar=1,nrtvar call make_virtual_fine_dp(rtuold(1,ivar),ilevel) end do if(simple_boundary)call rt_make_boundary_hydro(ilevel) end if #endif end do do ilevel=nlevelmax,1,-1 call flag_fine(ilevel,2) end do call flag_coarse end do ! DICE------ do ilevel=levelmin-1,1,-1 if(pic)call merge_tree_fine(ilevel) enddo call kill_gas_part(1) do ilevel=1,nlevelmax if(pic)then call make_tree_fine(ilevel) call kill_tree_fine(ilevel) call virtual_tree_fine(ilevel) endif end do do ilevel=nlevelmax,levelmin,-1 call merge_tree_fine(ilevel) end do deallocate(up) if(sf_virial)then eps_star2=eps_star eps_star=0d0 do ilevel=nlevelmax,levelmin,-1 call star_formation(ilevel) enddo eps_star=eps_star2 endif dice_init=.false. ! ---------- #ifdef RT if(rt_is_init_xion) then if(myid==1) write(*,*) 'Initializing ionization states from T profile' do ilevel=nlevelmax,1,-1 call rt_init_xion(ilevel) call upload_fine(ilevel) end do endif #endif end subroutine init_refine_2 !################################################################ !################################################################ !################################################################ !################################################################ subroutine kill_gas_part(ilevel) use pm_commons use amr_commons implicit none integer::ilevel #ifndef WITHOUTMPI include 'mpif.h' #endif !-------------------------------------------------------- ! This subroutine removes the gas particles ! initially present in the gadget1 DICE output !-------------------------------------------------------- integer::igrid,jgrid,ipart,jpart,next_part integer::ig,ip,npart1,npart2,icpu,info integer,dimension(1:nvector)::ind_grid,ind_part,ind_grid_part logical,dimension(1:nvector)::ok=.true. integer::npart_all integer,dimension(1:ncpu)::npart_cpu,npart_cpu_all npart_cpu = 0 npart_all = 0 if(numbtot(1,ilevel)==0)return ! Gather gas particles. ! Loop over cpus do icpu=1,ncpu igrid=headl(icpu,ilevel) ig=0 ip=0 ! Loop over grids do jgrid=1,numbl(icpu,ilevel) npart1=numbp(igrid) ! Number of particles in the grid npart2=0 ! Count gas particles if(npart1>0)then ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) if(idp(ipart).eq.1)then npart2=npart2+1 endif ipart=next_part ! Go to next particle end do npart_cpu(myid)=npart_cpu(myid)+npart2 endif ! Gather gas particles if(npart2>0)then ig=ig+1 ind_grid(ig)=igrid ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) ! Select only gas particles if(idp(ipart).eq.1)then if(ig==0)then ig=1 ind_grid(ig)=igrid end if ip=ip+1 ind_part(ip)=ipart ind_grid_part(ip)=ig endif if(ip==nvector)then call remove_list(ind_part,ind_grid_part,ok,ip) call add_free_cond(ind_part,ok,ip) ip=0 ig=0 end if ipart=next_part ! Go to next particle end do ! End loop over particles end if igrid=next(igrid) ! Go to next grid end do ! End loop over grids if(ip>0)then call remove_list(ind_part,ind_grid_part,ok,ip) call add_free_cond(ind_part,ok,ip) end if end do #ifndef WITHOUTMPI ! Give an array of number of gas on each cpu available to all cpus call MPI_ALLREDUCE(npart_cpu,npart_cpu_all,ncpu,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,info) #endif npart_all=sum(npart_cpu_all(1:ncpu)) if(npart_all>0) then if(myid==1) then write(*,'(A50)')'__________________________________________________' write(*,'(A,I15)')' Gas particles deleted ->',npart_all write(*,'(A50)')'__________________________________________________' endif endif npart_cpu(myid)=npart #ifndef WITHOUTMPI ! Give an array of number of gas on each cpu available to all cpus call MPI_ALLREDUCE(npart_cpu,npart_cpu_all,ncpu,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,info) #endif npart_all=sum(npart_cpu_all(1:ncpu)) if(npart_all>0) then if(myid==1) then write(*,'(A50)')'__________________________________________________' write(*,'(A,I15)')' Remaining particles ->',npart_all write(*,'(A50)')'__________________________________________________' endif endif do icpu=1,ncpu igrid=headl(icpu,ilevel) ig=0 ip=0 ! Loop over grids do jgrid=1,numbl(icpu,ilevel) npart1=numbp(igrid) ! Number of particles in the grid npart2=0 ! Count gas particles if(npart1>0)then ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) if(idp(ipart).gt.0) idp(ipart)=idp(ipart)-1 ipart=next_part ! Go to next particle end do npart_cpu(myid)=npart_cpu(myid)+npart2 endif end do end do 111 format(' Entering kill_gas_part for level ',I2) !--------------------------------------------- end subroutine /data1/mabe/MeraTest/Ramses/patch_2019_10version//init_time.f90 subroutine init_time use amr_commons use hydro_commons use pm_commons use cooling_module #ifdef grackle use grackle_parameters #endif #ifdef RT use rt_cooling_module #endif use mpi_mod implicit none integer::i,Nmodel real(kind=8)::T2_sim #ifdef grackle real(dp)::scale_nH,scale_T2,scale_l,scale_d,scale_t,scale_v logical::file_exists #ifndef WITHOUTMPI integer::info #endif #endif if(nrestart==0)then if(cosmo)then ! Get cosmological parameters from input files call init_cosmo else ! Get parameters from input files if(initfile(levelmin).ne.' '.and.filetype.eq.'grafic')then call init_file endif t=0.0 aexp=1.0 end if end if if(cosmo)then ! Allocate look-up tables n_frw=1000 allocate(aexp_frw(0:n_frw),hexp_frw(0:n_frw)) allocate(tau_frw(0:n_frw),t_frw(0:n_frw)) ! Compute Friedman model look up table if(myid==1)write(*,*)'Computing Friedman model' call friedman(dble(omega_m),dble(omega_l),dble(omega_k), & & 1d-6,dble(aexp_ini), & & aexp_frw,hexp_frw,tau_frw,t_frw,n_frw) ! Compute initial conformal time ! Find neighboring expansion factors i=1 do while(aexp_frw(i)>aexp.and.i0) then if (mod(myid-1,IOGROUPSIZE)/=0) then call MPI_RECV(dummy_io,1,MPI_INTEGER,myid-1-1,tag,& & MPI_COMM_WORLD,MPI_STATUS_IGNORE,info2) end if endif #endif INQUIRE(file=filename,exist=ok) if(.not.ok)then if(myid==1)then write(*,*)'File '//TRIM(filename)//' does not exist' end if call clean_stop end if open(10,file=filename,form='unformatted') if(myid==1)write(*,*)'Reading file '//TRIM(filename) rewind 10 read(10)n1(ilevel),n2(ilevel),n3(ilevel),dxini0 & & ,xoff10,xoff20,xoff30 & & ,astart0,omega_m0,omega_l0,h00 close(10) ! Send the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if(mod(myid,IOGROUPSIZE)/=0 .and.(myid.lt.ncpu))then dummy_io=1 call MPI_SEND(dummy_io,1,MPI_INTEGER,myid-1+1,tag, & & MPI_COMM_WORLD,info2) end if endif #endif dxini(ilevel)=dxini0 xoff1(ilevel)=xoff10 xoff2(ilevel)=xoff20 xoff3(ilevel)=xoff30 nlevelmax_part=nlevelmax_part+1 endif end do ! Check compatibility with run parameters nx_loc=icoarse_max-icoarse_min+1 ny_loc=jcoarse_max-jcoarse_min+1 nz_loc=kcoarse_max-kcoarse_min+1 if( nx_loc.ne.n1(levelmin)/2**levelmin & & .or. ny_loc.ne.n2(levelmin)/2**levelmin & & .or. nz_loc.ne.n3(levelmin)/2**levelmin) then write(*,*)'coarser grid is not compatible with initial conditions file' write(*,*)'Found n1=',n1(levelmin),& & ' n2=',n2(levelmin),& & ' n3=',n3(levelmin) write(*,*)'Expected n1=',nx_loc*2**levelmin & & ,' n2=',ny_loc*2**levelmin & & ,' n3=',nz_loc*2**levelmin call clean_stop end if ! Write initial conditions parameters if(myid==1)then do ilevel=levelmin,nlevelmax_part write(*,'(' Initial conditions for level =',I4)')ilevel write(*,'(' n1=',I4,' n2=',I4,' n3=',I4)') & & n1(ilevel),& & n2(ilevel),& & n3(ilevel) write(*,'(' dx=',1pe10.3)')dxini(ilevel) write(*,'(' xoff=',1pe10.3,' yoff=',1pe10.3,' zoff=',& & 1pe10.3)') & & xoff1(ilevel),& & xoff2(ilevel),& & xoff3(ilevel) end do end if end subroutine init_file subroutine init_cosmo use amr_commons use hydro_commons use pm_commons use gadgetreadfilemod use mpi_mod use dice_commons implicit none !------------------------------------------------------ ! Read cosmological and geometrical parameters ! in the initial condition files. ! Initial conditions are supposed to be made by ! Bertschinger's grafic version 2.0 code. !------------------------------------------------------ integer:: ilevel real(sp)::dxini0,xoff10,xoff20,xoff30,astart0,omega_m0,omega_l0,h00 character(LEN=80)::filename character(LEN=5)::nchar logical::ok TYPE(gadgetheadertype) :: gadgetheader integer::i integer,parameter::tag=1117 #ifndef WITHOUTMPI integer::dummy_io,info2 #endif if(verbose)write(*,*)'Entering init_cosmo' if(initfile(levelmin)==' ')then write(*,*)'You need to specifiy at least one level of initial condition' call clean_stop end if SELECT CASE (filetype) case ('grafic', 'ascii') ! Reading initial conditions parameters only aexp=2.0 nlevelmax_part=levelmin-1 do ilevel=levelmin,nlevelmax if(initfile(ilevel).ne.' ')then if(multiple)then call title(myid,nchar) filename=TRIM(initfile(ilevel))//'/dir_deltab/ic_deltab.'//TRIM(nchar) else filename=TRIM(initfile(ilevel))//'/ic_deltab' endif ! Wait for the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if (mod(myid-1,IOGROUPSIZE)/=0) then call MPI_RECV(dummy_io,1,MPI_INTEGER,myid-1-1,tag,& & MPI_COMM_WORLD,MPI_STATUS_IGNORE,info2) end if endif #endif INQUIRE(file=filename,exist=ok) if(.not.ok)then if(myid==1)then write(*,*)'File '//TRIM(filename)//' does not exist' end if call clean_stop end if open(10,file=filename,form='unformatted') if(myid==1)write(*,*)'Reading file '//TRIM(filename) rewind 10 read(10)n1(ilevel),n2(ilevel),n3(ilevel),dxini0 & & ,xoff10,xoff20,xoff30 & & ,astart0,omega_m0,omega_l0,h00 close(10) ! Send the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if(mod(myid,IOGROUPSIZE)/=0 .and.(myid.lt.ncpu))then dummy_io=1 call MPI_SEND(dummy_io,1,MPI_INTEGER,myid-1+1,tag, & & MPI_COMM_WORLD,info2) end if endif #endif dxini(ilevel)=dxini0 xoff1(ilevel)=xoff10 xoff2(ilevel)=xoff20 xoff3(ilevel)=xoff30 astart(ilevel)=astart0 omega_m=omega_m0 omega_l=omega_l0 h0=h00 aexp=MIN(aexp,astart(ilevel)) nlevelmax_part=nlevelmax_part+1 ! Compute SPH equivalent mass (initial gas mass resolution) mass_sph=omega_b/omega_m*0.5d0**(ndim*ilevel) endif end do ! Compute initial expansion factor if(aexp_ini.lt.1.0)then aexp=aexp_ini else aexp_ini=aexp endif ! Check compatibility with run parameters if(.not. multiple) then if( nx.ne.n1(levelmin)/2**levelmin & & .or. ny.ne.n2(levelmin)/2**levelmin & & .or. nz.ne.n3(levelmin)/2**levelmin) then write(*,*)'coarser grid is not compatible with initial conditions file' write(*,*)'Found n1=',n1(levelmin),& & ' n2=',n2(levelmin),& & ' n3=',n3(levelmin) write(*,*)'Expected n1=',nx*2**levelmin & & ,' n2=',ny*2**levelmin & & ,' n3=',nz*2**levelmin call clean_stop endif end if ! Compute box length in the initial conditions in units of h-1 Mpc boxlen_ini=dble(nx)*2**levelmin*dxini(levelmin)*(h0/100.) CASE ('gadget') if (verbose) write(*,*)'Reading in gadget format from '//TRIM(initfile(levelmin)) call gadgetreadheader(TRIM(initfile(levelmin)), 0, gadgetheader, ok) if(.not.ok) call clean_stop do i=1,6 if (i .ne. 2) then if (gadgetheader%nparttotal(i) .ne. 0) then write(*,*) 'Non DM particles present in bin ', i call clean_stop endif endif enddo if (gadgetheader%mass(2) == 0) then write(*,*) 'Particles have different masses, not supported' call clean_stop endif omega_m = gadgetheader%omega0 omega_l = gadgetheader%omegalambda h0 = gadgetheader%hubbleparam * 100d0 boxlen_ini = gadgetheader%boxsize aexp = gadgetheader%time aexp_ini = aexp ! Compute SPH equivalent mass (initial gas mass resolution) mass_sph=omega_b/omega_m*0.5d0**(ndim*levelmin) nlevelmax_part = levelmin astart(levelmin) = aexp xoff1(levelmin)=0 xoff2(levelmin)=0 xoff3(levelmin)=0 dxini(levelmin) = boxlen_ini/(nx*2**levelmin*(h0/100.0)) CASE ('dice') if (verbose) write(*,*)'Reading in gadget format from'//TRIM(initfile(levelmin))//'/'//TRIM(ic_file) call gadgetreadheader(TRIM(initfile(levelmin))//'/'//TRIM(ic_file), 0,gadgetheader, ok) if(.not.ok) call clean_stop omega_m = gadgetheader%omega0 omega_l = gadgetheader%omegalambda h0 = gadgetheader%hubbleparam * 100d0 if(gadgetheader%boxsize>0d0) then boxlen_ini = gadgetheader%boxsize/1e3 else boxlen_ini = boxlen endif aexp = gadgetheader%time aexp_ini = aexp ! Compute SPH equivalent mass (initial gas mass resolution) mass_sph=omega_b/omega_m*0.5d0**(ndim*levelmin) nlevelmax_part = levelmin astart(levelmin) = aexp xoff1(levelmin)=0 xoff2(levelmin)=0 xoff3(levelmin)=0 dxini(levelmin) = boxlen_ini/(nx*2**levelmin*(h0/100.0)) CASE DEFAULT write(*,*) 'Unsupported input format '//filetype call clean_stop END SELECT ! Write cosmological parameters if(myid==1)then write(*,'(' Cosmological parameters:')') write(*,'(' aexp=',1pe10.3,' H0=',1pe10.3,' km s-1 Mpc-1')')aexp,h0 write(*,'(' omega_m=',F7.3,' omega_l=',F7.3,' omega_b=',F7.3)')omega_m,omega_l,omega_b write(*,'(' box size=',1pe10.3,' h-1 Mpc')')boxlen_ini end if omega_k=1d0-omega_l-omega_m ! Compute linear scaling factor between aexp and astart(ilevel) do ilevel=levelmin,nlevelmax_part dfact(ilevel)=d1a(aexp)/d1a(astart(ilevel)) vfact(ilevel)=astart(ilevel)*fpeebl(astart(ilevel)) & ! Same scale factor as in grafic1 & *sqrt(omega_m/astart(ilevel)+omega_l*astart(ilevel)*astart(ilevel)+omega_k) & & /astart(ilevel)*h0 end do ! Write initial conditions parameters do ilevel=levelmin,nlevelmax_part if(myid==1)then write(*,'(' Initial conditions for level =',I4)')ilevel write(*,'(' dx=',1pe10.3,' h-1 Mpc')')dxini(ilevel)*h0/100. endif if(.not.multiple)then if(myid==1)then write(*,'(' n1=',I4,' n2=',I4,' n3=',I4)') & & n1(ilevel),& & n2(ilevel),& & n3(ilevel) write(*,'(' xoff=',1pe10.3,' yoff=',1pe10.3,' zoff=',& & 1pe10.3,' h-1 Mpc')') & & xoff1(ilevel)*h0/100.,& & xoff2(ilevel)*h0/100.,& & xoff3(ilevel)*h0/100. endif else write(*,'(' myid=',I4,' n1=',I4,' n2=',I4,' n3=',I4)') & & myid,n1(ilevel),n2(ilevel),n3(ilevel) write(*,'(' myid=',I4,' xoff=',1pe10.3,' yoff=',1pe10.3,' zoff=',& & 1pe10.3,' h-1 Mpc')') & & myid,xoff1(ilevel)*h0/100.,& & xoff2(ilevel)*h0/100.,& & xoff3(ilevel)*h0/100. endif end do ! Scale displacement in Mpc to code velocity (v=dx/dtau) ! in coarse cell units per conformal time vfact(1)=aexp*fpeebl(aexp)*sqrt(omega_m/aexp+omega_l*aexp*aexp+omega_k) ! This scale factor is different from vfact in grafic by h0/aexp contains !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc function fy(a) implicit none ! Computes the integrand real(dp)::fy real(dp)::y,a y=omega_m*(1d0/a-1d0) + omega_l*(a*a-1d0) + 1d0 fy=1d0/y**1.5d0 return end function fy !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc function d1a(a) implicit none real(dp)::d1a ! Computes the linear growing mode D1 in a Friedmann-Robertson-Walker ! universe. See Peebles LSSU sections 11 and 14. real(dp)::a,y12,y,eps eps=1.0d-6 if(a .le. 0.0d0)then write(*,*)'a=',a call clean_stop end if y=omega_m*(1d0/a-1d0) + omega_l*(a*a-1d0) + 1d0 if(y .lt. 0.0D0)then write(*,*)'y=',y call clean_stop end if y12=y**0.5d0 d1a=y12/a*rombint(eps,a,eps) return end function d1a !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc !! function ad1(d1) !! implicit none !! real(dp)::ad1 !! real(dp)::a,d1,da !! integer::niter !! ! Inverts the relation d1(a) given by function d1a(a) using !! ! Newton-Raphson. !! if (d1.eq.0.0) stop 'ad1 undefined for d1=0!' !! ! Initial guess for Newton-Raphson iteration, good for Omega near 1. !! a=1.e-7 !! niter=0 !! 10 niter=niter+1 !! da=(d1/d1a(a)-1d0)/fpeebl(a)*a !! a=a+da !! if (abs(da).gt.1.0e-8.and.niter.lt.10) go to 10 !! ad1=a !! return !! end function ad1 !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc function fpeebl(a) implicit none real(dp) :: fpeebl,a ! Computes the growth factor f=d\log D1/d\log a. real(dp) :: fact,y,eps eps=1.0d-6 y=omega_m*(1d0/a-1d0) + omega_l*(a*a-1d0) + 1d0 fact=rombint(eps,a,eps) fpeebl=(omega_l*a*a-0.5d0*omega_m/a)/y - 1d0 + a*fy(a)/fact return end function fpeebl !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc function rombint(a,b,tol) implicit none real(dp)::rombint ! ! Rombint returns the integral from a to b of f(x)dx using Romberg ! integration. The method converges provided that f(x) is continuous ! in (a,b). The function f must be double precision and must be ! declared external in the calling routine. ! tol indicates the desired relative accuracy in the integral. ! integer::maxiter=16,maxj=5 real(dp),dimension(100):: g real(dp)::a,b,tol,fourj real(dp)::h,error,gmax,g0,g1 integer::nint,i,j,k,jmax h=0.5d0*(b-a) gmax=h*(fy(a)+fy(b)) g(1)=gmax nint=1 error=1.0d20 i=0 10 i=i+1 if(.not. (i>maxiter.or.(i>5.and.abs(error)maxiter.and.abs(error)>tol) & & write(*,*) 'Rombint failed to converge; integral, error=', & & rombint,error return end function rombint end subroutine init_cosmo subroutine friedman(O_mat_0,O_vac_0,O_k_0,alpha,axp_min, & & axp_out,hexp_out,tau_out,t_out,ntable) use amr_parameters implicit none integer::ntable real(kind=8)::O_mat_0, O_vac_0, O_k_0 real(kind=8)::alpha,axp_min real(dp),dimension(0:ntable)::axp_out,hexp_out,tau_out,t_out ! ######################################################! ! This subroutine assumes that axp = 1 at z = 0 (today) ! ! and that t and tau = 0 at z = 0 (today). ! ! axp is the expansion factor, hexp the Hubble constant ! ! defined as hexp=1/axp*daxp/dtau, tau the conformal ! ! time, and t the look-back time, both in unit of 1/H0. ! ! alpha is the required accuracy and axp_min is the ! ! starting expansion factor of the look-up table. ! ! ntable is the required size of the look-up table. ! ! ######################################################! real(kind=8)::axp_tau, axp_t real(kind=8)::axp_tau_pre, axp_t_pre real(kind=8)::dadtau, dadt real(kind=8)::dtau,dt real(kind=8)::tau,t integer::nstep,nout,nskip if( (O_mat_0+O_vac_0+O_k_0) .ne. 1.0D0 )then write(*,*)'Error: non-physical cosmological constants' write(*,*)'O_mat_0,O_vac_0,O_k_0=',O_mat_0,O_vac_0,O_k_0 write(*,*)'The sum must be equal to 1.0, but ' write(*,*)'O_mat_0+O_vac_0+O_k_0=',O_mat_0+O_vac_0+O_k_0 call clean_stop end if axp_tau = 1.0D0 axp_t = 1.0D0 tau = 0.0D0 t = 0.0D0 nstep = 0 do while ( (axp_tau .ge. axp_min) .or. (axp_t .ge. axp_min) ) nstep = nstep + 1 dtau = alpha * axp_tau / dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0) axp_tau_pre = axp_tau - dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0)*dtau/2d0 axp_tau = axp_tau - dadtau(axp_tau_pre,O_mat_0,O_vac_0,O_k_0)*dtau tau = tau - dtau dt = alpha * axp_t / dadt(axp_t,O_mat_0,O_vac_0,O_k_0) axp_t_pre = axp_t - dadt(axp_t,O_mat_0,O_vac_0,O_k_0)*dt/2d0 axp_t = axp_t - dadt(axp_t_pre,O_mat_0,O_vac_0,O_k_0)*dt t = t - dt end do if(debug)then write(*,666)-t end if 666 format(' Age of the Universe (in unit of 1/H0)=',1pe10.3) nskip=nstep/ntable axp_t = 1d0 t = 0d0 axp_tau = 1d0 tau = 0d0 nstep = 0 nout=0 t_out(nout)=t tau_out(nout)=tau axp_out(nout)=axp_tau hexp_out(nout)=dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0)/axp_tau do while ( (axp_tau .ge. axp_min) .or. (axp_t .ge. axp_min) ) nstep = nstep + 1 dtau = alpha * axp_tau / dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0) axp_tau_pre = axp_tau - dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0)*dtau/2d0 axp_tau = axp_tau - dadtau(axp_tau_pre,O_mat_0,O_vac_0,O_k_0)*dtau tau = tau - dtau dt = alpha * axp_t / dadt(axp_t,O_mat_0,O_vac_0,O_k_0) axp_t_pre = axp_t - dadt(axp_t,O_mat_0,O_vac_0,O_k_0)*dt/2d0 axp_t = axp_t - dadt(axp_t_pre,O_mat_0,O_vac_0,O_k_0)*dt t = t - dt if(mod(nstep,nskip)==0)then nout=nout+1 t_out(nout)=t tau_out(nout)=tau axp_out(nout)=axp_tau hexp_out(nout)=dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0)/axp_tau end if end do t_out(ntable)=t tau_out(ntable)=tau axp_out(ntable)=axp_tau hexp_out(ntable)=dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0)/axp_tau end subroutine friedman function dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0) use amr_parameters real(kind=8)::dadtau,axp_tau,O_mat_0,O_vac_0,O_k_0 dadtau = axp_tau*axp_tau*axp_tau * & & ( O_mat_0 + & & O_vac_0 * axp_tau*axp_tau*axp_tau + & & O_k_0 * axp_tau ) dadtau = sqrt(dadtau) return end function dadtau function dadt(axp_t,O_mat_0,O_vac_0,O_k_0) use amr_parameters real(kind=8)::dadt,axp_t,O_mat_0,O_vac_0,O_k_0 dadt = (1.0D0/axp_t)* & & ( O_mat_0 + & & O_vac_0 * axp_t*axp_t*axp_t + & & O_k_0 * axp_t ) dadt = sqrt(dadt) return end function dadt /data1/mabe/MeraTest/Ramses/patch_2019_10version//particle_tree.f90 !################################################################ !################################################################ !################################################################ !################################################################ subroutine init_tree use pm_commons use amr_commons use mpi_mod use dice_commons implicit none #ifndef WITHOUTMPI integer::info #endif !------------------------------------------------------ ! This subroutine build the particle linked list at the ! coarse level for ALL the particles in the box. ! This routine should be used only as initial set up for ! the particle tree. !------------------------------------------------------ integer::ipart,idim,i,nxny,ilevel integer::npart1,icpu,nx_loc logical::error real(dp),dimension(1:3)::xbound integer,dimension(1:nvector),save::ix,iy,iz integer,dimension(1:nvector),save::ind_grid,ind_part logical,dimension(1:nvector),save::ok=.true. real(dp),dimension(1:3)::skip_loc real(dp)::scale if(verbose)write(*,*)' Entering init_tree' ! Local constants nxny=nx*ny xbound(1:3)=(/dble(nx),dble(ny),dble(nz)/) nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) !---------------------------------- ! Initialize particle linked list !---------------------------------- prevp(1)=0; nextp(1)=2 do ipart=2,npartmax-1 prevp(ipart)=ipart-1 nextp(ipart)=ipart+1 end do prevp(npartmax)=npartmax-1; nextp(npartmax)=0 ! Free memory linked list headp_free=npart+1 tailp_free=npartmax numbp_free=tailp_free-headp_free+1 if(numbp_free>0)then prevp(headp_free)=0 end if nextp(tailp_free)=0 #ifndef WITHOUTMPI call MPI_ALLREDUCE(numbp_free,numbp_free_tot,1,MPI_INTEGER,MPI_MIN,& & MPI_COMM_WORLD,info) #endif #ifdef WITHOUTMPI numbp_free_tot=numbp_free #endif !-------------- ! Periodic box !-------------- do idim=1,ndim do ipart=1,npart if(xp(ipart,idim)/scale+skip_loc(idim)<0.0d0) & & xp(ipart,idim)=xp(ipart,idim)+(xbound(idim)-skip_loc(idim))*scale if(xp(ipart,idim)/scale+skip_loc(idim)>=xbound(idim)) & & xp(ipart,idim)=xp(ipart,idim)-(xbound(idim)-skip_loc(idim))*scale end do if(sink)then do ipart=1,nsink if(xsink(ipart,idim)/scale+skip_loc(idim)<0.0d0) & & xsink(ipart,idim)=xsink(ipart,idim)+(xbound(idim)-skip_loc(idim))*scale if(xsink(ipart,idim)/scale+skip_loc(idim)>=xbound(idim)) & & xsink(ipart,idim)=xsink(ipart,idim)-(xbound(idim)-skip_loc(idim))*scale end do endif end do !---------------------------------- ! Reset all linked lists at level 1 !---------------------------------- do i=1,active(1)%ngrid headp(active(1)%igrid(i))=0 tailp(active(1)%igrid(i))=0 numbp(active(1)%igrid(i))=0 end do do icpu=1,ncpu do i=1,reception(icpu,1)%ngrid headp(reception(icpu,1)%igrid(i))=0 tailp(reception(icpu,1)%igrid(i))=0 numbp(reception(icpu,1)%igrid(i))=0 end do end do !------------------------------------------------ ! Build linked list at level 1 by vector sweeps !------------------------------------------------ do ipart=1,npart,nvector npart1=min(nvector,npart-ipart+1) ! Gather particles do i=1,npart1 ind_part(i)=ipart+i-1 end do ! Compute coarse cell #if NDIM>0 do i=1,npart1 ix(i)=int(xp(ind_part(i),1)/scale+skip_loc(1)) end do #endif #if NDIM>1 do i=1,npart1 iy(i)=int(xp(ind_part(i),2)/scale+skip_loc(2)) end do #endif #if NDIM>2 do i=1,npart1 iz(i)=int(xp(ind_part(i),3)/scale+skip_loc(3)) end do #endif ! Compute level 1 grid index error=.false. do i=1,npart1 ind_grid(i)=son(1+ix(i)+nx*iy(i)+nxny*iz(i)) if(ind_grid(i)==0)error=.true. end do if(error)then write(*,*)'Error in init_tree' write(*,*)'Particles appear in unrefined regions' call clean_stop end if ! Add particle to level 1 linked list call add_list(ind_part,ind_grid,ok,npart1) end do ! destroy and recreate cloud particles to account for changes in sink ! radius, newly added sinks, etc do ilevel=levelmin-1,1,-1 call merge_tree_fine(ilevel) end do #if NDIM==3 if(sink)then call kill_entire_cloud(1) call create_cloud_from_sink endif #endif ! Sort particles down to levelmin do ilevel=1,levelmin-1 call make_tree_fine(ilevel) call kill_tree_fine(ilevel) ! Update boundary conditions for remaining particles call virtual_tree_fine(ilevel) end do end subroutine init_tree !################################################################ !################################################################ !################################################################ !################################################################ subroutine make_tree_fine(ilevel) use pm_commons use amr_commons implicit none integer::ilevel !----------------------------------------------------------------------- ! This subroutine checks if particles have moved from their parent grid ! to one of the 3**ndim neighboring sister grids. The particle is then ! disconnected from the parent grid linked list, and connected to the ! corresponding sister grid linked list. If the sister grid does ! not exist, the particle is left to its original parent grid. ! Particles must not move to a distance greater than direct neighbors ! boundaries. Otherwise an error message is issued and the code stops. !----------------------------------------------------------------------- integer::idim,nx_loc real(dp)::dx,scale real(dp),dimension(1:3)::xbound real(dp),dimension(1:3)::skip_loc integer::igrid,jgrid,ipart,jpart,next_part integer::ig,ip,npart1,icpu integer,dimension(1:nvector),save::ind_grid,ind_part,ind_grid_part if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Mesh spacing in that level dx=0.5D0**ilevel xbound(1:3)=(/dble(nx),dble(ny),dble(nz)/) nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) ! Loop over cpus do icpu=1,ncpu igrid=headl(icpu,ilevel) ig=0 ip=0 ! Loop over grids do jgrid=1,numbl(icpu,ilevel) npart1=numbp(igrid) ! Number of particles in the grid if(npart1>0)then ig=ig+1 ind_grid(ig)=igrid ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) if(ig==0)then ig=1 ind_grid(ig)=igrid end if ip=ip+1 ind_part(ip)=ipart ind_grid_part(ip)=ig ! Gather nvector particles if(ip==nvector)then call check_tree(ind_grid,ind_part,ind_grid_part,ig,ip,ilevel) ip=0 ig=0 end if ipart=next_part ! Go to next particle end do ! End loop over particles end if igrid=next(igrid) ! Go to next grid end do ! End loop over grids if(ip>0)call check_tree(ind_grid,ind_part,ind_grid_part,ig,ip,ilevel) end do ! End loop over cpus ! Periodic boundaries if(sink)then do idim=1,ndim do ipart=1,nsink if(xsink(ipart,idim)/scale+skip_loc(idim)<0.0d0) & & xsink(ipart,idim)=xsink(ipart,idim)+(xbound(idim)-skip_loc(idim))*scale if(xsink(ipart,idim)/scale+skip_loc(idim)>=xbound(idim)) & & xsink(ipart,idim)=xsink(ipart,idim)-(xbound(idim)-skip_loc(idim))*scale end do end do endif 111 format(' Entering make_tree_fine for level ',I2) end subroutine make_tree_fine !################################################################ !################################################################ !################################################################ !################################################################ subroutine check_tree(ind_grid,ind_part,ind_grid_part,ng,np,ilevel) use amr_commons use pm_commons implicit none integer::ng,np,ilevel integer,dimension(1:nvector)::ind_grid integer,dimension(1:nvector)::ind_grid_part,ind_part !----------------------------------------------------------------------- ! This routine is called by make_tree_fine. !----------------------------------------------------------------------- logical::error integer::i,j,idim,nx_loc real(dp)::dx,xxx,scale real(dp),dimension(1:3)::xbound ! Grid-based arrays integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids real(dp),dimension(1:nvector,1:ndim),save::x0 integer ,dimension(1:nvector),save::ind_father ! Particle-based arrays integer,dimension(1:nvector),save::ind_son,igrid_son integer,dimension(1:nvector),save::list1,list2 logical,dimension(1:nvector),save::ok real(dp),dimension(1:3)::skip_loc ! Mesh spacing in that level dx=0.5D0**ilevel xbound(1:3)=(/dble(nx),dble(ny),dble(nz)/) nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do i=1,ng x0(i,idim)=xg(ind_grid(i),idim)-3.0D0*dx end do end do ! Gather 27 neighboring father cells (should be present anytime !) do i=1,ng ind_father(i)=father(ind_grid(i)) end do call get3cubefather(ind_father,nbors_father_cells,nbors_father_grids,ng,ilevel) ! Compute particle position in 3-cube error=.false. ind_son(1:np)=1 ok(1:np)=.false. do idim=1,ndim do j=1,np i=floor((xp(ind_part(j),idim)/scale+skip_loc(idim)-x0(ind_grid_part(j),idim))/dx/2.0D0) if(i<0.or.i>2)error=.true. i=MAX(i,0) i=MIN(i,2) ind_son(j)=ind_son(j)+i*3**(idim-1) ! Check if particle has escaped from its parent grid ok(j)=ok(j).or.i.ne.1 end do end do if(error)then write(*,*)'Problem in check_tree at level ',ilevel write(*,*)'A particle has moved outside allowed boundaries' do idim=1,ndim do j=1,np i=floor((xp(ind_part(j),idim)/scale+skip_loc(idim)-x0(ind_grid_part(j),idim))/dx/2.0D0) if(i<0.or.i>2)then write(*,*)xp(ind_part(j),1:ndim) write(*,*)x0(ind_grid_part(j),1:ndim)*scale endif end do end do stop end if ! Compute neighboring grid index do j=1,np igrid_son(j)=son(nbors_father_cells(ind_grid_part(j),ind_son(j))) end do ! If escaped particle sits in unrefined cell, leave it to its parent grid. ! For ilevel=levelmin, this should never happen. do j=1,np if(igrid_son(j)==0)ok(j)=.false. end do ! Periodic box do idim=1,ndim do j=1,np if(ok(j))then xxx=xp(ind_part(j),idim)/scale+skip_loc(idim)-xg(igrid_son(j),idim) if(xxx> xbound(idim)/2.0)then xp(ind_part(j),idim)=xp(ind_part(j),idim)-(xbound(idim)-skip_loc(idim))*scale endif if(xxx<-xbound(idim)/2.0)then xp(ind_part(j),idim)=xp(ind_part(j),idim)+(xbound(idim)-skip_loc(idim))*scale endif endif enddo enddo ! Switch particles linked list do j=1,np if(ok(j))then list1(j)=ind_grid(ind_grid_part(j)) list2(j)=igrid_son(j) end if end do call remove_list(ind_part,list1,ok,np) call add_list(ind_part,list2,ok,np) end subroutine check_tree !################################################################ !################################################################ !################################################################ !################################################################ subroutine kill_tree_fine(ilevel) use pm_commons use amr_commons implicit none integer::ilevel !------------------------------------------------------------------------ ! This routine sorts particle between ilevel grids and their ! ilevel+1 children grids. Particles are disconnected from their parent ! grid linked list and connected to their corresponding child grid linked ! list. If the child grid does not exist, the particle is left to its ! original parent grid. !------------------------------------------------------------------------ integer::igrid,jgrid,ipart,jpart,next_part integer::i,ig,ip,npart1,icpu integer,dimension(1:nvector),save::ind_grid,ind_part,ind_grid_part if(numbtot(1,ilevel)==0)return if(ilevel==nlevelmax)return if(numbtot(1,ilevel+1)==0)return if(verbose)write(*,111)ilevel ! Reset all linked lists at level ilevel+1 do i=1,active(ilevel+1)%ngrid headp(active(ilevel+1)%igrid(i))=0 tailp(active(ilevel+1)%igrid(i))=0 numbp(active(ilevel+1)%igrid(i))=0 end do do icpu=1,ncpu do i=1,reception(icpu,ilevel+1)%ngrid headp(reception(icpu,ilevel+1)%igrid(i))=0 tailp(reception(icpu,ilevel+1)%igrid(i))=0 numbp(reception(icpu,ilevel+1)%igrid(i))=0 end do end do ! Sort particles between ilevel and ilevel+1 ! Loop over cpus do icpu=1,ncpu igrid=headl(icpu,ilevel) ig=0 ip=0 ! Loop over grids do jgrid=1,numbl(icpu,ilevel) npart1=numbp(igrid) ! Number of particles in the grid if(npart1>0)then ig=ig+1 ind_grid(ig)=igrid ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) if(ig==0)then ig=1 ind_grid(ig)=igrid end if ip=ip+1 ind_part(ip)=ipart ind_grid_part(ip)=ig if(ip==nvector)then call kill_tree(ind_grid,ind_part,ind_grid_part,ig,ip,ilevel) ip=0 ig=0 end if ipart=next_part ! Go to next particle end do ! End loop over particles end if igrid=next(igrid) ! Go to next grid end do ! End loop over grids if(ip>0)call kill_tree(ind_grid,ind_part,ind_grid_part,ig,ip,ilevel) end do ! End loop over cpus 111 format(' Entering kill_tree_fine for level ',I2) end subroutine kill_tree_fine !################################################################ !################################################################ !################################################################ !################################################################ subroutine kill_tree(ind_grid,ind_part,ind_grid_part,ng,np,ilevel) use amr_commons use pm_commons implicit none integer::ng,np,ilevel integer,dimension(1:nvector)::ind_grid integer,dimension(1:nvector)::ind_grid_part,ind_part !----------------------------------------------------------------------- ! This routine is called by subroutine kill_tree_fine. !----------------------------------------------------------------------- integer::i,j,idim,nx_loc real(dp)::dx,xxx,scale ! Grid based arrays real(dp),dimension(1:nvector,1:ndim),save::x0 ! Particle based arrays integer,dimension(1:nvector),save::igrid_son,ind_son integer,dimension(1:nvector),save::list1,list2 logical,dimension(1:nvector),save::ok real(dp),dimension(1:3)::skip_loc ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) ! Compute lower left corner of grid do idim=1,ndim do i=1,ng x0(i,idim)=xg(ind_grid(i),idim)-dx end do end do ! Select only particles within grid boundaries ok(1:np)=.true. do idim=1,ndim do j=1,np xxx=(xp(ind_part(j),idim)/scale+skip_loc(idim)-x0(ind_grid_part(j),idim))/dx ok(j)=ok(j) .and. (xxx >= 0d0 .and. xxx < 2.0d0) end do end do ! Determines in which son particles sit ind_son(1:np)=0 do idim=1,ndim do j=1,np i=int((xp(ind_part(j),idim)/scale+skip_loc(idim)-x0(ind_grid_part(j),idim))/dx) ind_son(j)=ind_son(j)+i*2**(idim-1) end do end do do j=1,np ind_son(j)=ncoarse+ind_son(j)*ngridmax+ind_grid(ind_grid_part(j)) end do ! Determine which son cell is refined igrid_son(1:np)=0 do j=1,np if(ok(j))igrid_son(j)=son(ind_son(j)) end do do j=1,np ok(j)=igrid_son(j)>0 end do ! Compute particle linked list do j=1,np if(ok(j))then list1(j)=ind_grid(ind_grid_part(j)) list2(j)=igrid_son(j) end if end do ! Remove particles from their original linked lists call remove_list(ind_part,list1,ok,np) ! Add particles to their new linked lists call add_list(ind_part,list2,ok,np) end subroutine kill_tree !################################################################ !################################################################ !################################################################ !################################################################ subroutine merge_tree_fine(ilevel) use pm_commons use amr_commons implicit none integer::ilevel !-------------------------------------------------------------------- ! This routine disconnects all particles contained in children grids ! and connects them to their parent grid linked list. !--------------------------------------------------------------- integer::igrid,iskip,icpu integer::i,ind,ncache,ngrid integer,dimension(1:nvector),save::ind_grid,ind_cell,ind_grid_son logical,dimension(1:nvector),save::ok if(numbtot(1,ilevel)==0)return if(ilevel==nlevelmax)return if(verbose)write(*,111)ilevel ! Loop over cpus do icpu=1,ncpu if(icpu==myid)then ncache=active(ilevel)%ngrid else ncache=reception(icpu,ilevel)%ngrid end if ! Loop over grids by vector sweeps do igrid=1,ncache,nvector ngrid=MIN(nvector,ncache-igrid+1) if(icpu==myid)then do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do else do i=1,ngrid ind_grid(i)=reception(icpu,ilevel)%igrid(igrid+i-1) end do end if ! Loop over children grids do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,ngrid ind_cell(i)=iskip+ind_grid(i) end do do i=1,ngrid ind_grid_son(i)=son(ind_cell(i)) end do do i=1,ngrid ok(i)=ind_grid_son(i)>0 end do do i=1,ngrid if(ok(i))then if(numbp(ind_grid_son(i))>0)then if(numbp(ind_grid(i))>0)then ! Connect son linked list at the tail of father linked list nextp(tailp(ind_grid(i)))=headp(ind_grid_son(i)) prevp(headp(ind_grid_son(i)))=tailp(ind_grid(i)) numbp(ind_grid(i))=numbp(ind_grid(i))+numbp(ind_grid_son(i)) tailp(ind_grid(i))=tailp(ind_grid_son(i)) else ! Initialize father linked list headp(ind_grid(i))=headp(ind_grid_son(i)) tailp(ind_grid(i))=tailp(ind_grid_son(i)) numbp(ind_grid(i))=numbp(ind_grid_son(i)) end if end if end if end do end do ! End loop over children end do ! End loop over grids end do ! End loop over cpus 111 format(' Entering merge_tree_fine for level ',I2) end subroutine merge_tree_fine !################################################################ !################################################################ !################################################################ !################################################################ subroutine virtual_tree_fine(ilevel) use pm_commons use amr_commons use mpi_mod use dice_commons implicit none integer::ilevel !----------------------------------------------------------------------- ! This subroutine move particles across processors boundaries. !----------------------------------------------------------------------- #ifndef WITHOUTMPI integer::ip,ipcom,npart1,next_part,ncache,ncache_tot integer::icpu,igrid,ipart,jpart integer::info,buf_count,tagf=102,tagu=102 integer::countsend,countrecv integer,dimension(MPI_STATUS_SIZE,2*ncpu)::statuses integer,dimension(2*ncpu)::reqsend,reqrecv integer,dimension(ncpu)::sendbuf,recvbuf logical::ok_free integer::particle_data_width integer,dimension(1:nvector),save::ind_part,ind_list,ind_com #endif if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel #ifdef WITHOUTMPI return #endif #ifndef WITHOUTMPI ! Count particle sitting in virtual boundaries do icpu=1,ncpu reception(icpu,ilevel)%npart=0 do igrid=1,reception(icpu,ilevel)%ngrid reception(icpu,ilevel)%npart=reception(icpu,ilevel)%npart+& & numbp(reception(icpu,ilevel)%igrid(igrid)) end do sendbuf(icpu)=reception(icpu,ilevel)%npart end do ! Calculate how many particle properties are being transferred particle_data_width = twondim+1 if(star.or.sink) then if(metal) then particle_data_width=twondim+3 else particle_data_width=twondim+2 endif endif #ifdef OUTPUT_PARTICLE_POTENTIAL particle_data_width=particle_data_width+1 #endif ! DICE patch / gas temperature if(dice_init) particle_data_width=particle_data_width+2 ! Allocate communication buffer in emission do icpu=1,ncpu ncache=reception(icpu,ilevel)%npart if(ncache>0)then ! Allocate reception buffer allocate(reception(icpu,ilevel)%fp(1:ncache,1:4)) allocate(reception(icpu,ilevel)%up(1:ncache,1:particle_data_width)) end if end do ! Gather particle in communication buffer do icpu=1,ncpu if(reception(icpu,ilevel)%npart>0)then ! Gather particles by vector sweeps ipcom=0 ip=0 do igrid=1,reception(icpu,ilevel)%ngrid npart1=numbp(reception(icpu,ilevel)%igrid(igrid)) ipart =headp(reception(icpu,ilevel)%igrid(igrid)) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) ip=ip+1 ipcom=ipcom+1 ind_com (ip)=ipcom ind_part(ip)=ipart ind_list(ip)=reception(icpu,ilevel)%igrid(igrid) reception(icpu,ilevel)%fp(ipcom,1)=igrid if(ip==nvector)then call fill_comm(ind_part,ind_com,ind_list,ip,ilevel,icpu) ip=0 end if ipart=next_part ! Go to next particle end do end do if(ip>0)call fill_comm(ind_part,ind_com,ind_list,ip,ilevel,icpu) end if end do ! Communicate virtual particle number to parent cpu call MPI_ALLTOALL(sendbuf,1,MPI_INTEGER,recvbuf,1,MPI_INTEGER,MPI_COMM_WORLD,info) ! Allocate communication buffer in reception do icpu=1,ncpu emission(icpu,ilevel)%npart=recvbuf(icpu) ncache=emission(icpu,ilevel)%npart if(ncache>0)then ! Allocate reception buffer allocate(emission(icpu,ilevel)%fp(1:ncache,1:4)) allocate(emission(icpu,ilevel)%up(1:ncache,1:particle_data_width)) end if end do ! Receive particles countrecv=0 do icpu=1,ncpu ncache=emission(icpu,ilevel)%npart if(ncache>0)then buf_count=ncache*4 countrecv=countrecv+1 #ifndef LONGINT call MPI_IRECV(emission(icpu,ilevel)%fp,buf_count, & & MPI_INTEGER,icpu-1,& & tagf,MPI_COMM_WORLD,reqrecv(countrecv),info) #else call MPI_IRECV(emission(icpu,ilevel)%fp,buf_count, & & MPI_INTEGER8,icpu-1,& & tagf,MPI_COMM_WORLD,reqrecv(countrecv),info) #endif buf_count=ncache*particle_data_width countrecv=countrecv+1 call MPI_IRECV(emission(icpu,ilevel)%up,buf_count, & & MPI_DOUBLE_PRECISION,icpu-1,& & tagu,MPI_COMM_WORLD,reqrecv(countrecv),info) end if end do ! Send particles countsend=0 do icpu=1,ncpu ncache=reception(icpu,ilevel)%npart if(ncache>0)then buf_count=ncache*4 countsend=countsend+1 #ifndef LONGINT call MPI_ISEND(reception(icpu,ilevel)%fp,buf_count, & & MPI_INTEGER,icpu-1,& & tagf,MPI_COMM_WORLD,reqsend(countsend),info) #else call MPI_ISEND(reception(icpu,ilevel)%fp,buf_count, & & MPI_INTEGER8,icpu-1,& & tagf,MPI_COMM_WORLD,reqsend(countsend),info) #endif buf_count=ncache*particle_data_width countsend=countsend+1 call MPI_ISEND(reception(icpu,ilevel)%up,buf_count, & & MPI_DOUBLE_PRECISION,icpu-1,& & tagu,MPI_COMM_WORLD,reqsend(countsend),info) end if end do ! Wait for full completion of receives call MPI_WAITALL(countrecv,reqrecv,statuses,info) ! Compute total number of newly created particles ncache_tot=0 do icpu=1,ncpu ncache_tot=ncache_tot+emission(icpu,ilevel)%npart end do ! Wait for full completion of sends call MPI_WAITALL(countsend,reqsend,statuses,info) call MPI_ALLREDUCE(numbp_free,numbp_free_tot,1,MPI_INTEGER,MPI_MIN,& & MPI_COMM_WORLD,info) ok_free=(numbp_free-ncache_tot)>=0 if(.not. ok_free)then write(*,*)'No more free memory for particles' write(*,*)'Increase npartmax' write(*,*)numbp_free,ncache_tot write(*,*)myid write(*,*)emission(1:ncpu,ilevel)%npart write(*,*)'============================' write(*,*)reception(1:ncpu,ilevel)%npart call MPI_ABORT(MPI_COMM_WORLD,1,info) end if ! Scatter new particles from communication buffer do icpu=1,ncpu ! Loop over particles by vector sweeps ncache=emission(icpu,ilevel)%npart do ipart=1,ncache,nvector npart1=min(nvector,ncache-ipart+1) do ip=1,npart1 ind_com(ip)=ipart+ip-1 end do call empty_comm(ind_com,npart1,ilevel,icpu) end do end do ! Deallocate temporary communication buffers do icpu=1,ncpu ncache=emission(icpu,ilevel)%npart if(ncache>0)then deallocate(emission(icpu,ilevel)%fp) deallocate(emission(icpu,ilevel)%up) end if ncache=reception(icpu,ilevel)%npart if(ncache>0)then deallocate(reception(icpu,ilevel)%fp) deallocate(reception(icpu,ilevel)%up) end if end do #endif 111 format(' Entering virtual_tree_fine for level ',I2) end subroutine virtual_tree_fine !################################################################ !################################################################ !################################################################ !################################################################ subroutine fill_comm(ind_part,ind_com,ind_list,np,ilevel,icpu) use pm_commons use amr_commons use dice_commons implicit none integer::np,ilevel,icpu integer,dimension(1:nvector)::ind_part,ind_com,ind_list integer::current_property integer::i,idim logical,dimension(1:nvector),save::ok=.true. ! Gather particle level and identity do i=1,np reception(icpu,ilevel)%fp(ind_com(i),2)=levelp(ind_part(i)) reception(icpu,ilevel)%fp(ind_com(i),3)=idp (ind_part(i)) reception(icpu,ilevel)%fp(ind_com(i),4)=part2int(typep(ind_part(i))) end do ! Gather particle position and velocity do idim=1,ndim do i=1,np reception(icpu,ilevel)%up(ind_com(i),idim )=xp(ind_part(i),idim) reception(icpu,ilevel)%up(ind_com(i),idim+ndim)=vp(ind_part(i),idim) end do end do current_property = twondim+1 ! Gather particle mass do i=1,np reception(icpu,ilevel)%up(ind_com(i),current_property)=mp(ind_part(i)) end do current_property = current_property+1 #ifdef OUTPUT_PARTICLE_POTENTIAL ! Gather particle potential do i=1,np reception(icpu,ilevel)%up(ind_com(i),current_property)=ptcl_phi(ind_part(i)) end do current_property = current_property+1 #endif ! Gather particle birth epoch if(star.or.sink)then do i=1,np reception(icpu,ilevel)%up(ind_com(i),current_property)=tp(ind_part(i)) end do current_property = current_property+1 if(metal)then do i=1,np reception(icpu,ilevel)%up(ind_com(i),current_property)=zp(ind_part(i)) end do current_property = current_property+1 end if end if ! DICE patch / gas temperature if(dice_init) then do i=1,np reception(icpu,ilevel)%up(ind_com(i),current_property)=up(ind_part(i)) end do current_property = current_property+1 if(cosmo) then do i=1,np reception(icpu,ilevel)%up(ind_com(i),current_property)=maskp(ind_part(i)) end do current_property = current_property+1 endif endif ! Remove particles from parent linked list call remove_list(ind_part,ind_list,ok,np) call add_free(ind_part,np) end subroutine fill_comm !################################################################ !################################################################ !################################################################ !################################################################ subroutine empty_comm(ind_com,np,ilevel,icpu) use pm_commons use amr_commons use dice_commons implicit none integer::np,icpu,ilevel integer,dimension(1:nvector)::ind_com integer::i,idim,igrid integer,dimension(1:nvector),save::ind_list,ind_part logical,dimension(1:nvector),save::ok=.true. integer::current_property ! Compute parent grid index do i=1,np igrid=int(emission(icpu,ilevel)%fp(ind_com(i),1), 4) ind_list(i)=emission(icpu,ilevel)%igrid(igrid) end do ! Add particle to parent linked list call remove_free(ind_part,np) call add_list(ind_part,ind_list,ok,np) ! Scatter particle level and identity do i=1,np levelp(ind_part(i))=int(emission(icpu,ilevel)%fp(ind_com(i),2), 4) idp (ind_part(i))=int(emission(icpu,ilevel)%fp(ind_com(i),3)) typep(ind_part(i)) = int2part(int(emission(icpu,ilevel)%fp(ind_com(i),4), 4)) end do ! Scatter particle position and velocity do idim=1,ndim do i=1,np xp(ind_part(i),idim)=emission(icpu,ilevel)%up(ind_com(i),idim ) vp(ind_part(i),idim)=emission(icpu,ilevel)%up(ind_com(i),idim+ndim) end do end do current_property = twondim+1 ! Scatter particle mass do i=1,np mp(ind_part(i))=emission(icpu,ilevel)%up(ind_com(i),current_property) end do current_property = current_property+1 #ifdef OUTPUT_PARTICLE_POTENTIAL ! Scatter particle phi do i=1,np ptcl_phi(ind_part(i))=emission(icpu,ilevel)%up(ind_com(i),current_property) end do current_property = current_property+1 #endif ! Scatter particle birth eopch if(star.or.sink)then do i=1,np tp(ind_part(i))=emission(icpu,ilevel)%up(ind_com(i),current_property) end do current_property = current_property+1 if(metal)then do i=1,np zp(ind_part(i))=emission(icpu,ilevel)%up(ind_com(i),current_property) end do current_property = current_property+1 end if end if ! DICE patch / gas temperature if(dice_init) then do i=1,np up(ind_part(i))=emission(icpu,ilevel)%up(ind_com(i),current_property) end do current_property = current_property+1 if(cosmo) then do i=1,np maskp(ind_part(i))=emission(icpu,ilevel)%up(ind_com(i),current_property) end do current_property = current_property+1 endif endif end subroutine empty_comm !################################################################ !################################################################ !################################################################ !################################################################ /data1/mabe/MeraTest/Ramses/patch_2019_10version//read_params.f90 module dice_commons use amr_commons use hydro_commons ! particle data character(len=512)::ic_file, ic_format ! misc real(dp)::IG_rho = 1.0D-5 real(dp)::IG_T2 = 1.0D7 real(dp)::IG_metal = 0.01 real(dp)::ic_scale_pos = 1.0 real(dp)::ic_scale_vel = 1.0 real(dp)::ic_scale_mass = 1.0 real(dp)::ic_scale_u = 1.0 real(dp)::ic_scale_age = 1.0 real(dp)::ic_scale_metal = 1.0 real(dp)::ic_t_restart = 0.0D0 integer::ic_mask_ivar = 0 real(dp)::ic_mask_min = 1d40 real(dp)::ic_mask_max = -1d40 integer::ic_mask_ptype = -1 integer::ic_ifout = 1 integer::ic_nfile = 1 integer,dimension(1:6)::ic_skip_type = -1 integer,dimension(1:6)::cosmo_add_gas_index = -1 real(dp),dimension(1:3)::ic_mag_const = (/ 0.0, 0.0, 0.0 /) real(dp),dimension(1:3)::ic_center = (/ 0.0, 0.0, 0.0 /) character(len=4)::ic_head_name = 'HEAD' character(len=4)::ic_pos_name = 'POS ' character(len=4)::ic_vel_name = 'VEL ' character(len=4)::ic_id_name = 'ID ' character(len=4)::ic_mass_name = 'MASS' character(len=4)::ic_u_name = 'U ' character(len=4)::ic_metal_name = 'Z ' character(len=4)::ic_age_name = 'AGE ' ! Gadget units in cgs real(dp)::gadget_scale_l = 3.085677581282D21 real(dp)::gadget_scale_v = 1.0D5 real(dp)::gadget_scale_m = 1.9891D43 real(dp)::gadget_scale_t = 1.0D6*365*24*3600 real(dp),allocatable,dimension(:)::up real(dp),allocatable,dimension(:)::maskp logical::dice_init = .false. logical::amr_struct = .false. ! magnetic integer,parameter::MAXGAL= 32 real(dp),dimension(1:MAXGAL)::ic_mag_center_x = 0.0 real(dp),dimension(1:MAXGAL)::ic_mag_center_y = 0.0 real(dp),dimension(1:MAXGAL)::ic_mag_center_z = 0.0 real(dp),dimension(1:MAXGAL)::ic_mag_axis_x = 0.0 real(dp),dimension(1:MAXGAL)::ic_mag_axis_y = 0.0 real(dp),dimension(1:MAXGAL)::ic_mag_axis_z = 1.0 real(dp),dimension(1:MAXGAL)::ic_mag_scale_R = 1.0 real(dp),dimension(1:MAXGAL)::ic_mag_scale_H = 1.0 real(dp),dimension(1:MAXGAL)::ic_mag_scale_B = 0.0 end module dice_commons subroutine read_params use amr_commons use pm_parameters use poisson_parameters use hydro_parameters use mpi_mod use dice_commons implicit none !-------------------------------------------------- ! Local variables !-------------------------------------------------- integer::i,narg,levelmax character(LEN=80)::infile, info_file character(LEN=80)::cmdarg character(LEN=5)::nchar integer(kind=8)::ngridtot=0 integer(kind=8)::nparttot=0 real(kind=8)::delta_tout=0,tend=0 real(kind=8)::delta_aout=0,aend=0 logical::nml_ok, info_ok integer,parameter::tag=1134 #ifndef WITHOUTMPI integer::dummy_io,ierr,info2 #endif !-------------------------------------------------- ! Namelist definitions !-------------------------------------------------- namelist/run_params/clumpfind,cosmo,pic,sink,lightcone,poisson,hydro,rt,verbose,debug & & ,nrestart,ncontrol,nstepmax,nsubcycle,nremap,ordering & & ,bisec_tol,static,overload,cost_weighting,aton,nrestart_quad,restart_remap & & ,static_dm,static_gas,static_stars,convert_birth_times,use_proper_time,remap_pscalar namelist/output_params/noutput,foutput,aout,tout & & ,tend,delta_tout,aend,delta_aout,gadget_output,walltime_hrs,minutes_dump namelist/amr_params/levelmin,levelmax,ngridmax,ngridtot & & ,npartmax,nparttot,nexpand,boxlen,nlevel_collapse namelist/poisson_params/epsilon,gravity_type,gravity_params & & ,cg_levelmin,cic_levelmax namelist/lightcone_params/thetay_cone,thetaz_cone,zmax_cone namelist/movie_params/levelmax_frame,nw_frame,nh_frame,ivar_frame & & ,xcentre_frame,ycentre_frame,zcentre_frame,movie_vars & & ,deltax_frame,deltay_frame,deltaz_frame,movie,zoom_only_frame & & ,imovout,imov,tstartmov,astartmov,tendmov,aendmov,proj_axis,movie_vars_txt & & ,theta_camera,phi_camera,dtheta_camera,dphi_camera,focal_camera,dist_camera,ddist_camera & & ,perspective_camera,smooth_frame,shader_frame,tstart_theta_camera,tstart_phi_camera & & ,tend_theta_camera,tend_phi_camera,method_frame,varmin_frame,varmax_frame namelist/dice_params/ ic_file,ic_nfile,ic_format,IG_rho,IG_T2,IG_metal & & ,ic_head_name,ic_pos_name,ic_vel_name,ic_id_name,ic_mass_name & & ,ic_u_name,ic_metal_name,ic_age_name & & ,gadget_scale_l, gadget_scale_v, gadget_scale_m ,gadget_scale_t & & ,ic_scale_pos,ic_scale_vel,ic_scale_mass,ic_scale_u,ic_scale_age & & ,ic_scale_metal,ic_center,ic_ifout,amr_struct,ic_t_restart,ic_mag_const & & ,ic_mag_center_x,ic_mag_center_y,ic_mag_center_z & & ,ic_mag_axis_x,ic_mag_axis_y,ic_mag_axis_z & & ,ic_mag_scale_R,ic_mag_scale_H,ic_mag_scale_B,cosmo_add_gas_index,ic_skip_type & & ,ic_mask_ivar,ic_mask_min,ic_mask_max,ic_mask_ptype ! MPI initialization #ifndef WITHOUTMPI call MPI_INIT(ierr) call MPI_COMM_RANK(MPI_COMM_WORLD,myid,ierr) call MPI_COMM_SIZE(MPI_COMM_WORLD,ncpu,ierr) myid=myid+1 ! Careful with this... #endif #ifdef WITHOUTMPI ncpu=1 myid=1 #endif !-------------------------------------------------- ! Advertise RAMSES !-------------------------------------------------- if(myid==1)then write(*,*)'_/_/_/ _/_/ _/ _/ _/_/_/ _/_/_/_/ _/_/_/ ' write(*,*)'_/ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/ ' write(*,*)'_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ ' write(*,*)'_/_/_/ _/_/_/_/ _/ _/ _/_/ _/_/_/ _/_/ ' write(*,*)'_/ _/ _/ _/ _/ _/ _/ _/ _/ ' write(*,*)'_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ ' write(*,*)'_/ _/ _/ _/ _/ _/ _/_/_/ _/_/_/_/ _/_/_/ ' write(*,*)' Version 3.0 ' write(*,*)' written by Romain Teyssier (University of Zurich) ' write(*,*)' (c) CEA 1999-2007, UZH 2008-2014 ' write(*,*)' ' write(*,'(' Working with nproc = ',I4,' for ndim = ',I1)')ncpu,ndim ! Check nvar is not too small #ifdef SOLVERhydro write(*,'(' Using solver = hydro with nvar = ',I2)')nvar if(nvar=ndim+2' write(*,'(' Please recompile with -DNVAR=',I2)')ndim+2 call clean_stop endif #endif #ifdef SOLVERmhd write(*,'(' Using solver = mhd with nvar = ',I2)')nvar if(nvar<8)then write(*,*)'You should have: nvar>=8' write(*,'(' Please recompile with -DNVAR=8')') call clean_stop endif #endif !Write I/O group size information if(IOGROUPSIZE>0.or.IOGROUPSIZECONE>0.or.IOGROUPSIZEREP>0)write(*,*)' ' if(IOGROUPSIZE>0) write(*,*)'IOGROUPSIZE=',IOGROUPSIZE if(IOGROUPSIZECONE>0) write(*,*)'IOGROUPSIZECONE=',IOGROUPSIZECONE if(IOGROUPSIZEREP>0) write(*,*)'IOGROUPSIZEREP=',IOGROUPSIZEREP if(IOGROUPSIZE>0.or.IOGROUPSIZECONE>0.or.IOGROUPSIZEREP>0)write(*,*)' ' ! Write information about git version !call write_gitinfo !Manuel ! Read namelist filename from command line argument narg = command_argument_count() IF(narg .LT. 1)THEN write(*,*)'You should type: ramses3d input.nml [nrestart]' write(*,*)'File input.nml should contain a parameter namelist' write(*,*)'nrestart is optional' call clean_stop END IF CALL getarg(1,infile) endif #ifndef WITHOUTMPI call MPI_BCAST(infile,80,MPI_CHARACTER,0,MPI_COMM_WORLD,ierr) #endif !------------------------------------------------- ! Read the namelist !------------------------------------------------- ! Wait for the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if (mod(myid-1,IOGROUPSIZE)/=0) then call MPI_RECV(dummy_io,1,MPI_INTEGER,myid-1-1,tag,& & MPI_COMM_WORLD,MPI_STATUS_IGNORE,info2) end if endif #endif namelist_file=TRIM(infile) INQUIRE(file=infile,exist=nml_ok) if(.not. nml_ok)then if(myid==1)then write(*,*)'File '//TRIM(infile)//' does not exist' endif call clean_stop end if !------------------------------------------------- ! Default passive scalar map !------------------------------------------------- #if NVAR>NDIM+2 allocate(remap_pscalar(1:nvar-(ndim+2))) do i=1,nvar-(ndim+2) remap_pscalar(i) = i+ndim+2 enddo #endif open(1,file=infile) rewind(1) read(1,NML=run_params) rewind(1) read(1,NML=output_params) rewind(1) read(1,NML=amr_params) rewind(1) read(1,NML=lightcone_params,END=83) 83 continue rewind(1) read(1,NML=movie_params,END=82) 82 continue rewind(1) read(1,NML=poisson_params,END=81) 81 continue rewind(1) read(1,NML=dice_params,END=106) 106 continue !------------------------------------------------- ! Read optional nrestart command-line argument !------------------------------------------------- if (myid==1 .and. narg == 2) then CALL getarg(2,cmdarg) read(cmdarg,*) nrestart endif if (myid==1 .and. nrestart .gt. 0) then call title(nrestart,nchar) info_file='output_'//TRIM(nchar)//'/info_'//TRIM(nchar)//'.txt' inquire(file=info_file, exist=info_ok) do while(.not. info_ok .and. nrestart .gt. 1) nrestart = nrestart - 1 call title(nrestart,nchar) info_file='output_'//TRIM(nchar)//'/info_'//TRIM(nchar)//'.txt' inquire(file=info_file, exist=info_ok) enddo endif #ifndef WITHOUTMPI call MPI_BCAST(info_ok,1,MPI_LOGICAL,0,MPI_COMM_WORLD,ierr) #endif if (nrestart .gt. 0 .and. .not. info_ok) then if (myid==1) then write(*,*) 'Error: Could not find restart file' endif call clean_stop endif #ifndef WITHOUTMPI call MPI_BCAST(nrestart,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) #endif !------------------------------------------------- ! Compute time step for outputs !------------------------------------------------- if(tend>0)then if(delta_tout==0)delta_tout=tend noutput=MIN(int(tend/delta_tout),MAXOUT) do i=1,noutput tout(i)=dble(i)*delta_tout end do else if(aend>0)then if(delta_aout==0)delta_aout=aend noutput=MIN(int(aend/delta_aout),MAXOUT) do i=1,noutput aout(i)=dble(i)*delta_aout end do endif noutput=MIN(noutput,MAXOUT) if(imovout>0) then allocate(tmovout(0:imovout)) allocate(amovout(0:imovout)) tmovout=1d100 amovout=1d100 if(tendmov>0)then do i=0,imovout tmovout(i)=(tendmov-tstartmov)*dble(i)/dble(imovout)+tstartmov enddo endif if(aendmov>0)then do i=0,imovout amovout(i)=(aendmov-astartmov)*dble(i)/dble(imovout)+astartmov enddo endif if(tendmov==0.and.aendmov==0)movie=.false. endif !-------------------------------------------------- ! Check for errors in the namelist so far !-------------------------------------------------- levelmin=MAX(levelmin,1) nlevelmax=levelmax nml_ok=.true. if(levelmin<1)then if(myid==1)write(*,*)'Error in the namelist:' if(myid==1)write(*,*)'levelmin should not be lower than 1 !!!' nml_ok=.false. end if if(nlevelmax1)verbose=.false. if(sink.and.(.not.pic))then pic=.true. endif !if(clumpfind.and.(.not.pic))then ! pic=.true. !endif !if(pic.and.(.not.poisson))then ! poisson=.true. !endif call read_hydro_params(nml_ok) #ifdef RT call rt_read_hydro_params() #endif #if NDIM==3 if (sink)call read_sink_params if (clumpfind .or. sink)call read_clumpfind_params #endif if (movie)call set_movie_vars close(1) ! Send the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if(mod(myid,IOGROUPSIZE)/=0 .and.(myid.lt.ncpu))then dummy_io=1 call MPI_SEND(dummy_io,1,MPI_INTEGER,myid-1+1,tag, & & MPI_COMM_WORLD,info2) end if endif #endif !----------------- ! Max size checks !----------------- if(nlevelmax>MAXLEVEL)then write(*,*) 'Error: nlevelmax>MAXLEVEL' call clean_stop end if if(nregion>MAXREGION)then write(*,*) 'Error: nregion>MAXREGION' call clean_stop end if !----------------------------------- ! Rearrange level dependent arrays !----------------------------------- do i=nlevelmax,levelmin,-1 nexpand (i)=nexpand (i-levelmin+1) nsubcycle (i)=nsubcycle (i-levelmin+1) r_refine (i)=r_refine (i-levelmin+1) a_refine (i)=a_refine (i-levelmin+1) b_refine (i)=b_refine (i-levelmin+1) x_refine (i)=x_refine (i-levelmin+1) y_refine (i)=y_refine (i-levelmin+1) z_refine (i)=z_refine (i-levelmin+1) m_refine (i)=m_refine (i-levelmin+1) exp_refine(i)=exp_refine(i-levelmin+1) initfile (i)=initfile (i-levelmin+1) end do do i=1,levelmin-1 nexpand (i)= 1 nsubcycle (i)= 1 r_refine (i)=-1.0 a_refine (i)= 1.0 b_refine (i)= 1.0 x_refine (i)= 0.0 y_refine (i)= 0.0 z_refine (i)= 0.0 m_refine (i)=-1.0 exp_refine(i)= 2.0 initfile (i)= ' ' end do if(.not.cosmo)then use_proper_time=.false. convert_birth_times=.false. endif if(.not. nml_ok)then if(myid==1)write(*,*)'Too many errors in the namelist' if(myid==1)write(*,*)'Aborting...' call clean_stop end if #ifndef WITHOUTMPI call MPI_BARRIER(MPI_COMM_WORLD,ierr) #endif end subroutine read_params /data1/mabe/MeraTest/Ramses/patch_2019_10version//rho_fine.f90 !############################################################################## !############################################################################## !############################################################################## !############################################################################## subroutine rho_fine(ilevel,icount) use amr_commons use pm_commons use hydro_commons use poisson_commons use cooling_module use mpi_mod use dice_commons implicit none #ifndef WITHOUTMPI integer::info real(kind=8),dimension(1:ndim+1)::multipole_in,multipole_out #endif integer::ilevel,icount !------------------------------------------------------------------ ! This routine computes the density field at level ilevel using ! the CIC scheme. Particles that are not entirely in ! level ilevel contribute also to the level density field ! (boundary particles) using buffer grids. ! Array flag1, flag2 and phi are used as temporary work space. ! Array rho and cpu_map2 are stored with: ! - rho containing the Poisson source term ! - cpu_map2 containing the refinement map due to particle ! number density criterion (quasi Lagrangian mesh). !------------------------------------------------------------------ integer::iskip,icpu,ind,i,nx_loc,ibound real(dp)::dx,d_scale,scale,dx_loc,scalar if(.not. poisson)return if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=icoarse_max-icoarse_min+1 scale=boxlen/dble(nx_loc) dx_loc=dx*scale if(ilevel==levelmin)multipole=0d0 !------------------------------------------------------- ! Initialize rho to analytical and baryon density field !------------------------------------------------------- if(dice_init.and.amr_struct) then if(hydro)call multipole_from_current_level(ilevel) call cic_from_multipole(ilevel) ! Update boundaries call make_virtual_reverse_dp(rho(1),ilevel) call make_virtual_fine_dp (rho(1),ilevel) else if(ilevel==levelmin.or.icount>1)then do i=nlevelmax,ilevel,-1 ! Compute mass multipole if(hydro)call multipole_fine(i) ! Perform TSC using pseudo-particle #ifdef TSC if (ndim==3)then call tsc_from_multipole(i) else write(*,*)'TSC not supported for ndim neq 3' call clean_stop end if #else ! Perform CIC using pseudo-particle call cic_from_multipole(i) #endif ! Update boundaries call make_virtual_reverse_dp(rho(1),i) call make_virtual_fine_dp (rho(1),i) end do end if endif !-------------------------- ! Initialize fields to zero !-------------------------- do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid phi(active(ilevel)%igrid(i)+iskip)=0.0D0 end do if(ilevel==cic_levelmax)then do i=1,active(ilevel)%ngrid rho_top(active(ilevel)%igrid(i)+iskip)=0.0D0 end do endif end do if(cic_levelmax>0.and.ilevel>cic_levelmax)then do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid rho_top(active(ilevel)%igrid(i)+iskip)=rho_top(father(active(ilevel)%igrid(i))) rho(active(ilevel)%igrid(i)+iskip)=rho(active(ilevel)%igrid(i)+iskip)+ & & rho_top(active(ilevel)%igrid(i)+iskip) end do end do endif !------------------------------------------------------------------------- ! Initialize 'number density' field to baryon number density in array phi. !------------------------------------------------------------------------- if(m_refine(ilevel)>-1.0d0)then d_scale=max(mass_sph/dx_loc**ndim,smallr) do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax if(hydro)then if(ivar_refine>0)then do i=1,active(ilevel)%ngrid scalar=uold(active(ilevel)%igrid(i)+iskip,ivar_refine) & & /max(uold(active(ilevel)%igrid(i)+iskip,1),smallr) if(scalar>var_cut_refine)then phi(active(ilevel)%igrid(i)+iskip)= & & rho(active(ilevel)%igrid(i)+iskip)/d_scale endif end do else do i=1,active(ilevel)%ngrid phi(active(ilevel)%igrid(i)+iskip)= & & rho(active(ilevel)%igrid(i)+iskip)/d_scale end do endif endif end do endif !------------------------------------------------------- ! Initialize rho and phi to zero in virtual boundaries !------------------------------------------------------- do icpu=1,ncpu do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,reception(icpu,ilevel)%ngrid rho(reception(icpu,ilevel)%igrid(i)+iskip)=0.0D0 phi(reception(icpu,ilevel)%igrid(i)+iskip)=0.0D0 end do if(ilevel==cic_levelmax)then do i=1,reception(icpu,ilevel)%ngrid rho_top(reception(icpu,ilevel)%igrid(i)+iskip)=0.0D0 end do endif end do end do !--------------------------------------------------------- ! Compute particle contribution to density field !--------------------------------------------------------- ! Compute density due to current level particles if(pic)then call rho_from_current_level(ilevel) end if ! Update boudaries call make_virtual_reverse_dp(rho(1),ilevel) call make_virtual_fine_dp (rho(1),ilevel) if(ilevel==cic_levelmax)then call make_virtual_reverse_dp(rho_top(1),ilevel) endif if(cic_levelmax>0.and.ilevel>=cic_levelmax)then call make_virtual_fine_dp (rho_top(1),ilevel) endif if(m_refine(ilevel)>-1.0d0)then call make_virtual_reverse_dp(phi(1),ilevel) call make_virtual_fine_dp (phi(1),ilevel) endif !-------------------------------------------------------------- ! Compute multipole contribution from all cpus and set rho_tot !-------------------------------------------------------------- #ifndef WITHOUTMPI if(ilevel==levelmin)then multipole_in=multipole call MPI_ALLREDUCE(multipole_in,multipole_out,ndim+1,MPI_DOUBLE_PRECISION,MPI_SUM,MPI_COMM_WORLD,info) multipole=multipole_out endif #endif if(nboundary==0)then rho_tot=multipole(1)/scale**ndim if(debug)write(*,*)'rho_average=',rho_tot else rho_tot=0d0 endif !---------------------------------------------------- ! Reset rho and phi in physical boundaries !---------------------------------------------------- do ibound=1,nboundary do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,boundary(ibound,ilevel)%ngrid phi(boundary(ibound,ilevel)%igrid(i)+iskip)=0.0 rho(boundary(ibound,ilevel)%igrid(i)+iskip)=0.0 end do end do end do !----------------------------------------- ! Compute quasi Lagrangian refinement map !----------------------------------------- if(m_refine(ilevel)>-1.0d0)then do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid if(phi(active(ilevel)%igrid(i)+iskip)>=m_refine(ilevel))then cpu_map2(active(ilevel)%igrid(i)+iskip)=1 else cpu_map2(active(ilevel)%igrid(i)+iskip)=0 end if end do end do ! Update boundaries call make_virtual_fine_int(cpu_map2(1),ilevel) end if !! do ind=1,twotondim !! iskip=ncoarse+(ind-1)*ngridmax !! do i=1,active(ilevel)%ngrid !! print*,rho(active(ilevel)%igrid(i)+iskip),rho_tot !! end do !! end do 111 format(' Entering rho_fine for level ',I2) end subroutine rho_fine !############################################################################## !############################################################################## !############################################################################## !############################################################################## subroutine rho_from_current_level(ilevel) use amr_commons use pm_commons use hydro_commons use poisson_commons implicit none integer::ilevel !------------------------------------------------------------------ ! This routine computes the density field at level ilevel using ! the CIC scheme from particles that are not entirely in ! level ilevel (boundary particles). ! Arrays flag1 and flag2 are used as temporary work space. !------------------------------------------------------------------ integer::igrid,jgrid,ipart,jpart,idim,icpu integer::i,ig,ip,npart1 real(dp)::dx integer,dimension(1:nvector),save::ind_grid,ind_cell integer,dimension(1:nvector),save::ind_part,ind_grid_part real(dp),dimension(1:nvector,1:ndim),save::x0 ! Mesh spacing in that level dx=0.5D0**ilevel ! Loop over cpus do icpu=1,ncpu ! Loop over grids igrid=headl(icpu,ilevel) ig=0 ip=0 do jgrid=1,numbl(icpu,ilevel) npart1=numbp(igrid) ! Number of particles in the grid if(npart1>0)then ig=ig+1 ind_grid(ig)=igrid ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 if(ig==0)then ig=1 ind_grid(ig)=igrid end if ip=ip+1 ind_part(ip)=ipart ind_grid_part(ip)=ig if(ip==nvector)then ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do i=1,ig x0(i,idim)=xg(ind_grid(i),idim)-3.0D0*dx end do end do do i=1,ig ind_cell(i)=father(ind_grid(i)) end do #ifdef TSC call tsc_amr(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) #else call cic_amr(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) #endif ip=0 ig=0 end if ipart=nextp(ipart) ! Go to next particle end do ! End loop over particles end if igrid=next(igrid) ! Go to next grid end do ! End loop over grids if(ip>0)then ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do i=1,ig x0(i,idim)=xg(ind_grid(i),idim)-3.0D0*dx end do end do do i=1,ig ind_cell(i)=father(ind_grid(i)) end do #ifdef TSC call tsc_amr(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) #else call cic_amr(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) #endif end if end do ! End loop over cpus end subroutine rho_from_current_level subroutine multipole_from_current_level(ilevel) use amr_commons use pm_commons use hydro_commons use poisson_commons implicit none integer::ilevel !------------------------------------------------------------------ ! This routine computes the density field at level ilevel using ! the CIC scheme from particles that are not entirely in ! level ilevel (boundary particles). ! Arrays flag1 and flag2 are used as temporary work space. !------------------------------------------------------------------ integer::igrid,jgrid,ipart,jpart,idim,icpu,ind,iskip,ibound integer::j,ig,ip,npart1,npart2,next_part real(dp)::dx integer,dimension(1:nvector),save::ind_grid,ind_cell integer,dimension(1:nvector),save::ind_part,ind_grid_part real(dp),dimension(1:nvector,1:ndim),save::x0 !!!!!!!!!!!!!!!!!!!!!!!!!!! integer ::nx_loc real(dp),dimension(1:twotondim,1:3)::xc integer ::ix,iy,iz real(kind=8)::dx_loc,scale,vol_loc real(dp),dimension(1:3)::skip_loc ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc=dx_loc**ndim do ind=1,twotondim iz=(ind-1)/4 iy=(ind-1-4*iz)/2 ix=(ind-1-2*iy-4*iz) if(ndim>0)xc(ind,1)=(dble(ix)-0.5D0)*dx if(ndim>1)xc(ind,2)=(dble(iy)-0.5D0)*dx if(ndim>2)xc(ind,3)=(dble(iz)-0.5D0)*dx end do !!!!!!!!!!!!!!!!!!!!!!!!!!! if(verbose)write(*,111)ilevel ! Mesh spacing in that level dx=0.5D0**ilevel ! Initialize unew field to zero do icpu=1,ncpu do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do idim=1,ndim+1 do j=1,reception(icpu,ilevel)%ngrid unew(reception(icpu,ilevel)%igrid(j)+iskip,idim)=0.0D0 end do end do end do end do do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do idim=1,ndim+1 do j=1,active(ilevel)%ngrid unew(active(ilevel)%igrid(j)+iskip,idim)=0.0D0 end do end do end do ! Reset unew in physical boundaries do ibound=1,nboundary do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do idim=1,ndim+1 do j=1,boundary(ibound,ilevel)%ngrid unew(boundary(ibound,ilevel)%igrid(j)+iskip,idim)=0.0 end do end do end do end do ! Loop over cpus do icpu=1,ncpu ! Loop over grids igrid=headl(icpu,ilevel) ig=0 ip=0 do jgrid=1,numbl(icpu,ilevel) npart1=numbp(igrid) ! Number of particles in the grid npart2=0 ! Count gas particles if(npart1>0)then ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) if(idp(ipart).eq.1)then npart2=npart2+1 endif ipart=next_part ! Go to next particle end do endif if(npart2>0)then ig=ig+1 ind_grid(ig)=igrid ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) ! Select only gas particles if(idp(ipart).eq.1)then if(ig==0)then ig=1 ind_grid(ig)=igrid end if ip=ip+1 ind_part(ip)=ipart ind_grid_part(ip)=ig endif if(ip==nvector)then ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do j=1,ig x0(j,idim)=xg(ind_grid(j),idim)-3.0D0*dx end do end do do j=1,ig ind_cell(j)=father(ind_grid(j)) end do call ngp_amr_gas(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) ip=0 ig=0 end if ipart=next_part ! Go to next particle end do ! End loop over particles end if igrid=next(igrid) ! Go to next grid end do ! End loop over grids if(ip>0)then ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do j=1,ig x0(j,idim)=xg(ind_grid(j),idim)-3.0D0*dx end do end do do j=1,ig ind_cell(j)=father(ind_grid(j)) end do call ngp_amr_gas(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) end if end do ! End loop over cpus ! Update boundaries do idim=1,ndim+1 call make_virtual_reverse_dp(unew(1,idim),ilevel) call make_virtual_fine_dp(unew(1,idim),ilevel) end do ! Check for over-refinement do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do j=1,active(ilevel)%ngrid if(unew(active(ilevel)%igrid(j)+iskip,1)==0d0) then unew(active(ilevel)%igrid(j)+iskip,1)=smallr*vol_loc do idim=1,ndim unew(active(ilevel)%igrid(j)+iskip,idim+1)=(xg(active(ilevel)%igrid(j),idim)+xc(ind,idim)-skip_loc(idim))*scale & & *unew(active(ilevel)%igrid(j)+iskip,1) end do endif end do end do do idim=1,ndim+1 call make_virtual_fine_dp(unew(1,idim),ilevel) end do 111 format(' Entering multipole_from_current_level for level',i2) end subroutine multipole_from_current_level !############################################################################## !############################################################################## !############################################################################## !############################################################################## subroutine cic_amr(ind_cell,ind_part,ind_grid_part,x0,ng,np,ilevel) use amr_commons use pm_commons use poisson_commons use dice_commons use hydro_commons, ONLY: mass_sph implicit none integer::ng,np,ilevel integer ,dimension(1:nvector)::ind_cell,ind_grid_part,ind_part real(dp),dimension(1:nvector,1:ndim)::x0 !------------------------------------------------------------------ ! This routine computes the density field at level ilevel using ! the CIC scheme. Only cells that are in level ilevel ! are updated by the input particle list. !------------------------------------------------------------------ logical::error integer::j,ind,idim,nx_loc real(dp)::dx,dx_loc,scale,vol_loc ! Grid-based arrays integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids ! Particle-based arrays logical ,dimension(1:nvector),save::ok real(dp),dimension(1:nvector),save::mmm real(dp),dimension(1:nvector),save::ttt=0d0 ! Save type type(part_t),dimension(1:nvector),save::fam real(dp),dimension(1:nvector),save::vol2 real(dp),dimension(1:nvector,1:ndim),save::x,dd,dg integer ,dimension(1:nvector,1:ndim),save::ig,id,igg,igd,icg,icd real(dp),dimension(1:nvector,1:twotondim),save::vol integer ,dimension(1:nvector,1:twotondim),save::igrid,icell,indp,kg real(dp),dimension(1:3)::skip_loc ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc=dx_loc**ndim ! Gather neighboring father cells (should be present anytime !) call get3cubefather(ind_cell,nbors_father_cells,nbors_father_grids,ng,ilevel) ! Rescale particle position at level ilevel do idim=1,ndim do j=1,np x(j,idim)=xp(ind_part(j),idim)/scale+skip_loc(idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)-x0(ind_grid_part(j),idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/dx end do end do ! Gather particle mass and family do j=1,np fam(j) = typep(ind_part(j)) if (is_tracer(fam(j))) then mmm(j)=0.0d0 else mmm(j)=mp(ind_part(j)) end if end do ! FIXME: should use mmm instead of mp, but gives different binary output ! for no reason that I can think of if(ilevel==levelmin)then do j=1,np multipole(1)=multipole(1)+mp(ind_part(j)) ! multipole(1)=multipole(1)+mmm(j) end do do idim=1,ndim do j=1,np multipole(idim+1)=multipole(idim+1)+mp(ind_part(j))*xp(ind_part(j),idim) ! multipole(idim+1)=multipole(idim+1)+mmm(j)*xp(ind_part(j),idim) end do end do end if ! Gather particle birth epoch if(star)then do j=1,np ttt(j)=tp(ind_part(j)) end do endif ! Check for illegal moves error=.false. do idim=1,ndim do j=1,np if(x(j,idim)<0.5D0.or.x(j,idim)>5.5D0)error=.true. end do end do if(error)then write(*,*)'problem in cic' do idim=1,ndim do j=1,np if(x(j,idim)<0.5D0.or.x(j,idim)>5.5D0)then write(*,*)x(j,1:ndim) endif end do end do stop end if ! CIC at level ilevel (dd: right cloud boundary; dg: left cloud boundary) do idim=1,ndim do j=1,np dd(j,idim)=x(j,idim)+0.5D0 id(j,idim)=int(dd(j,idim)) dd(j,idim)=dd(j,idim)-id(j,idim) dg(j,idim)=1.0D0-dd(j,idim) ig(j,idim)=id(j,idim)-1 end do end do ! Compute cloud volumes #if NDIM==1 do j=1,np vol(j,1)=dg(j,1) vol(j,2)=dd(j,1) end do #endif #if NDIM==2 do j=1,np vol(j,1)=dg(j,1)*dg(j,2) vol(j,2)=dd(j,1)*dg(j,2) vol(j,3)=dg(j,1)*dd(j,2) vol(j,4)=dd(j,1)*dd(j,2) end do #endif #if NDIM==3 do j=1,np vol(j,1)=dg(j,1)*dg(j,2)*dg(j,3) vol(j,2)=dd(j,1)*dg(j,2)*dg(j,3) vol(j,3)=dg(j,1)*dd(j,2)*dg(j,3) vol(j,4)=dd(j,1)*dd(j,2)*dg(j,3) vol(j,5)=dg(j,1)*dg(j,2)*dd(j,3) vol(j,6)=dd(j,1)*dg(j,2)*dd(j,3) vol(j,7)=dg(j,1)*dd(j,2)*dd(j,3) vol(j,8)=dd(j,1)*dd(j,2)*dd(j,3) end do #endif ! Compute parent grids do idim=1,ndim do j=1,np igg(j,idim)=ig(j,idim)/2 igd(j,idim)=id(j,idim)/2 end do end do #if NDIM==1 do j=1,np kg(j,1)=1+igg(j,1) kg(j,2)=1+igd(j,1) end do #endif #if NDIM==2 do j=1,np kg(j,1)=1+igg(j,1)+3*igg(j,2) kg(j,2)=1+igd(j,1)+3*igg(j,2) kg(j,3)=1+igg(j,1)+3*igd(j,2) kg(j,4)=1+igd(j,1)+3*igd(j,2) end do #endif #if NDIM==3 do j=1,np kg(j,1)=1+igg(j,1)+3*igg(j,2)+9*igg(j,3) kg(j,2)=1+igd(j,1)+3*igg(j,2)+9*igg(j,3) kg(j,3)=1+igg(j,1)+3*igd(j,2)+9*igg(j,3) kg(j,4)=1+igd(j,1)+3*igd(j,2)+9*igg(j,3) kg(j,5)=1+igg(j,1)+3*igg(j,2)+9*igd(j,3) kg(j,6)=1+igd(j,1)+3*igg(j,2)+9*igd(j,3) kg(j,7)=1+igg(j,1)+3*igd(j,2)+9*igd(j,3) kg(j,8)=1+igd(j,1)+3*igd(j,2)+9*igd(j,3) end do #endif do ind=1,twotondim do j=1,np igrid(j,ind)=son(nbors_father_cells(ind_grid_part(j),kg(j,ind))) end do end do ! Compute parent cell position do idim=1,ndim do j=1,np icg(j,idim)=ig(j,idim)-2*igg(j,idim) icd(j,idim)=id(j,idim)-2*igd(j,idim) end do end do #if NDIM==1 do j=1,np icell(j,1)=1+icg(j,1) icell(j,2)=1+icd(j,1) end do #endif #if NDIM==2 do j=1,np icell(j,1)=1+icg(j,1)+2*icg(j,2) icell(j,2)=1+icd(j,1)+2*icg(j,2) icell(j,3)=1+icg(j,1)+2*icd(j,2) icell(j,4)=1+icd(j,1)+2*icd(j,2) end do #endif #if NDIM==3 do j=1,np icell(j,1)=1+icg(j,1)+2*icg(j,2)+4*icg(j,3) icell(j,2)=1+icd(j,1)+2*icg(j,2)+4*icg(j,3) icell(j,3)=1+icg(j,1)+2*icd(j,2)+4*icg(j,3) icell(j,4)=1+icd(j,1)+2*icd(j,2)+4*icg(j,3) icell(j,5)=1+icg(j,1)+2*icg(j,2)+4*icd(j,3) icell(j,6)=1+icd(j,1)+2*icg(j,2)+4*icd(j,3) icell(j,7)=1+icg(j,1)+2*icd(j,2)+4*icd(j,3) icell(j,8)=1+icd(j,1)+2*icd(j,2)+4*icd(j,3) end do #endif ! Compute parent cell adress do ind=1,twotondim do j=1,np indp(j,ind)=ncoarse+(icell(j,ind)-1)*ngridmax+igrid(j,ind) end do end do ! Update mass density and number density fields do ind=1,twotondim do j=1,np ok(j)=(igrid(j,ind)>0).and.is_not_tracer(fam(j)) if(dice_init) ok(j)=ok(j).and.(idp(ind_part(j)).ne.1) end do do j=1,np vol2(j)=mmm(j)*vol(j,ind)/vol_loc end do if(cic_levelmax==0.or.ilevel<=cic_levelmax)then do j=1,np if(ok(j))then rho(indp(j,ind))=rho(indp(j,ind))+vol2(j) end if end do else if(ilevel>cic_levelmax)then do j=1,np ! check for non-DM (and non-tracer) if ( ok(j) .and. is_not_DM(fam(j)) ) then rho(indp(j,ind))=rho(indp(j,ind))+vol2(j) end if end do endif if(ilevel==cic_levelmax)then do j=1,np ! check for DM if ( ok(j) .and. is_DM(fam(j)) ) then rho_top(indp(j,ind))=rho_top(indp(j,ind))+vol2(j) end if end do endif do j=1,np vol2(j)=vol(j,ind) end do ! Remove test particles for static runs if(static)then do j=1,np ok(j)=ok(j).and.mmm(j)>0.0 end do endif ! Keep only DM particle with a mass below the mass cut if(mass_cut_refine>0.0)then do j=1,np if ( is_DM(fam(j)) ) then ok(j)=ok(j) .and. mmm(j) < mass_cut_refine endif end do endif ! Rescale the mass by mass_sph for baryon particles if(star)then do j=1,np if ( is_not_DM(fam(j)) ) then vol2(j) = vol2(j)*mmm(j)/mass_sph endif end do endif if(cic_levelmax==0.or.ilevel=cic_levelmax)then do j=1,np if ( ok(j) .and. is_not_DM(fam(j)) ) then phi(indp(j,ind))=phi(indp(j,ind))+vol2(j) end if end do endif ! Always refine sinks to the maximum level ! by setting particle number density above m_refine(ilevel) if(sink_refine)then do j=1,np if ( is_cloud(fam(j)) ) then ! if (direct_force_sink(-1*idp(ind_part(j))))then phi(indp(j,ind))=phi(indp(j,ind))+m_refine(ilevel) ! endif end if end do end if end do end subroutine cic_amr !########################################################### !########################################################### !########################################################### !########################################################### subroutine multipole_fine(ilevel) use amr_commons use hydro_commons use poisson_commons use mpi_mod implicit none integer::ilevel !------------------------------------------------------------------- ! This routine compute array rho (source term for Poisson equation) ! by first reseting array rho to zero, then ! by affecting the gas density to leaf cells, and finally ! by performing a restriction operation for split cells. ! For pure particle runs, the restriction is not necessary and the ! routine only set rho to zero. On the other hand, for the Multigrid ! solver, the restriction is necessary in any case. !------------------------------------------------------------------- integer ::ind,i,ncache,igrid,ngrid,iskip,nx_loc integer ::idim,nleaf,nsplit,ix,iy,iz,iskip_son,ind_son,ind_grid_son,ind_cell_son integer,dimension(1:nvector),save::ind_grid,ind_cell,ind_leaf,ind_split real(dp),dimension(1:nvector,1:ndim),save::xx real(dp),dimension(1:nvector),save::dd real(kind=8)::dx,dx_loc,scale,vol_loc,mm real(dp),dimension(1:3)::skip_loc real(dp),dimension(1:twotondim,1:3)::xc if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc=dx_loc**ndim do ind=1,twotondim iz=(ind-1)/4 iy=(ind-1-4*iz)/2 ix=(ind-1-2*iy-4*iz) if(ndim>0)xc(ind,1)=(dble(ix)-0.5D0)*dx if(ndim>1)xc(ind,2)=(dble(iy)-0.5D0)*dx if(ndim>2)xc(ind,3)=(dble(iz)-0.5D0)*dx end do ! Initialize fields to zero do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid unew(active(ilevel)%igrid(i)+iskip,1)=0.0D0 end do do idim=1,ndim do i=1,active(ilevel)%ngrid unew(active(ilevel)%igrid(i)+iskip,idim+1)=0.0D0 end do end do end do ! Compute mass multipoles in each cell ncache=active(ilevel)%ngrid do igrid=1,ncache,nvector ngrid=MIN(nvector,ncache-igrid+1) do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do ! Loop over cells do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax ! Gather cell indices do i=1,ngrid ind_cell(i)=ind_grid(i)+iskip end do ! Gather leaf cells and compute cell centers nleaf=0 do i=1,ngrid if(son(ind_cell(i))==0)then nleaf=nleaf+1 ind_leaf(nleaf)=ind_cell(i) do idim=1,ndim xx(nleaf,idim)=(xg(ind_grid(i),idim)+xc(ind,idim)-skip_loc(idim))*scale end do end if end do ! Compute gas multipole for leaf cells only if(hydro)then do i=1,nleaf mm=max(uold(ind_leaf(i),1),smallr)*vol_loc unew(ind_leaf(i),1)=unew(ind_leaf(i),1)+mm end do do idim=1,ndim do i=1,nleaf mm=max(uold(ind_leaf(i),1),smallr)*vol_loc unew(ind_leaf(i),idim+1)=unew(ind_leaf(i),idim+1)+mm*xx(i,idim) end do end do endif ! Add analytical density profile for leaf cells only if(gravity_type < 0)then ! Call user defined routine rho_ana call rho_ana(xx,dd,dx_loc,nleaf) ! Scatter results to array phi do i=1,nleaf unew(ind_leaf(i),1)=unew(ind_leaf(i),1)+dd(i)*vol_loc end do do idim=1,ndim do i=1,nleaf mm=dd(i)*vol_loc unew(ind_leaf(i),idim+1)=unew(ind_leaf(i),idim+1)+mm*xx(i,idim) end do end do end if ! Gather split cells nsplit=0 do i=1,ngrid if(son(ind_cell(i))>0)then nsplit=nsplit+1 ind_split(nsplit)=ind_cell(i) end if end do ! Add children multipoles do ind_son=1,twotondim iskip_son=ncoarse+(ind_son-1)*ngridmax do i=1,nsplit ind_grid_son=son(ind_split(i)) ind_cell_son=iskip_son+ind_grid_son unew(ind_split(i),1)=unew(ind_split(i),1)+unew(ind_cell_son,1) end do do idim=1,ndim do i=1,nsplit ind_grid_son=son(ind_split(i)) ind_cell_son=iskip_son+ind_grid_son unew(ind_split(i),idim+1)=unew(ind_split(i),idim+1)+unew(ind_cell_son,idim+1) end do end do end do end do enddo ! Update boundaries do idim=1,ndim+1 call make_virtual_fine_dp(unew(1,idim),ilevel) end do 111 format(' Entering multipole_fine for level',i2) end subroutine multipole_fine !########################################################### !########################################################### !########################################################### !########################################################### subroutine ngp_amr_gas(ind_cell,ind_part,ind_grid_part,x0,ng,np,ilevel) use amr_commons use pm_commons use hydro_commons use poisson_commons implicit none integer::ng,np,ilevel integer ,dimension(1:nvector)::ind_cell,ind_grid_part,ind_part real(dp),dimension(1:nvector,1:ndim)::x0 !------------------------------------------------------------------ ! This routine computes the density field at level ilevel using ! the CIC scheme. Only cells that are in level ilevel ! are updated by the input particle list. !------------------------------------------------------------------ integer::j,idim,nx_loc real(dp)::dx,dx_loc,scale ! Grid-based arrays integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids ! Particle-based arrays logical ,dimension(1:nvector),save::ok real(dp),dimension(1:nvector,1:ndim),save::x integer ,dimension(1:nvector,1:ndim),save::id,igd,icd integer ,dimension(1:nvector),save::igrid,icell,indp,kg real(dp),dimension(1:3)::skip_loc real(dp),dimension(1:nvector),save::vol_loc ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc(1:nvector)=dx_loc**ndim call get3cubefather(ind_cell,nbors_father_cells,nbors_father_grids,ng,ilevel) ! Rescale position at level ilevel do idim=1,ndim do j=1,np x(j,idim)=xp(ind_part(j),idim)/scale+skip_loc(idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)-x0(ind_grid_part(j),idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/dx end do end do ! NGP at level ilevel do idim=1,ndim do j=1,np id(j,idim)=x(j,idim) end do end do ! Compute parent grids do idim=1,ndim do j=1,np igd(j,idim)=id(j,idim)/2 end do end do do j=1,np kg(j)=1+igd(j,1)+3*igd(j,2)+9*igd(j,3) end do do j=1,np igrid(j)=son(nbors_father_cells(ind_grid_part(j),kg(j))) end do ! Check if particles are entirely in level ilevel ok(1:np)=.true. do j=1,np ok(j)=ok(j).and.igrid(j)>0 end do ! Compute parent cell position do idim=1,ndim do j=1,np if(ok(j)) then icd(j,idim)=id(j,idim)-2*igd(j,idim) endif end do end do do j=1,np if(ok(j)) then icell(j)=1+icd(j,1)+2*icd(j,2)+4*icd(j,3) endif end do ! Compute parent cell adresses do j=1,np if(ok(j))then indp(j)=ncoarse+(icell(j)-1)*ngridmax+igrid(j) else indp(j) = nbors_father_cells(ind_grid_part(j),kg(j)) end if end do if(hydro)then do j=1,np unew(indp(j),1)=unew(indp(j),1)+mp(ind_part(j)) end do do idim=1,ndim do j=1,np unew(indp(j),idim+1)=unew(indp(j),idim+1)+mp(ind_part(j))*xp(ind_part(j),idim) end do end do endif end subroutine ngp_amr_gas !########################################################### !########################################################### !########################################################### !########################################################### subroutine cic_from_multipole(ilevel) use amr_commons use hydro_commons use poisson_commons use mpi_mod implicit none integer::ilevel !------------------------------------------------------------------- ! This routine compute array rho (source term for Poisson equation) ! by first reseting array rho to zero, then ! by affecting the gas density to leaf cells, and finally ! by performing a restriction operation for split cells. ! For pure particle runs, the restriction is not necessary and the ! routine only set rho to zero. On the other hand, for the Multigrid ! solver, the restriction is necessary in any case. !------------------------------------------------------------------- integer::ind,i,icpu,ncache,ngrid,iskip,ibound,igrid integer,dimension(1:nvector),save::ind_grid if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Initialize density field to zero do icpu=1,ncpu do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,reception(icpu,ilevel)%ngrid rho(reception(icpu,ilevel)%igrid(i)+iskip)=0.0D0 end do end do end do do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid rho(active(ilevel)%igrid(i)+iskip)=0.0D0 end do end do ! Reset rho in physical boundaries do ibound=1,nboundary do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,boundary(ibound,ilevel)%ngrid rho(boundary(ibound,ilevel)%igrid(i)+iskip)=0.0 end do end do end do if(hydro)then ! Perform a restriction over split cells (ilevel+1) ncache=active(ilevel)%ngrid do igrid=1,ncache,nvector ! Gather nvector grids ngrid=MIN(nvector,ncache-igrid+1) do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do call cic_cell(ind_grid,ngrid,ilevel) end do end if 111 format(' Entering cic_from_multipole for level',i2) end subroutine cic_from_multipole !########################################################### !########################################################### !########################################################### !########################################################### subroutine cic_cell(ind_grid,ngrid,ilevel) use amr_commons use poisson_commons use hydro_commons, ONLY: unew implicit none integer::ngrid,ilevel integer,dimension(1:nvector)::ind_grid ! ! integer::i,j,idim,ind_cell_son,iskip_son,np,ind_son,nx_loc,ind integer ,dimension(1:nvector),save::ind_cell integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids ! Particle-based arrays logical ,dimension(1:nvector),save::ok real(dp),dimension(1:nvector),save::mmm real(dp),dimension(1:nvector),save::vol2 real(dp),dimension(1:nvector,1:ndim),save::x,dd,dg integer ,dimension(1:nvector,1:ndim),save::ig,id,igg,igd,icg,icd real(dp),dimension(1:nvector,1:twotondim),save::vol integer ,dimension(1:nvector,1:twotondim),save::igrid,icell,indp,kg real(dp),dimension(1:3)::skip_loc real(kind=8)::dx,dx_loc,scale,vol_loc logical::error ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc=dx_loc**ndim np=ngrid ! Compute father cell index do i=1,ngrid ind_cell(i)=father(ind_grid(i)) end do ! Gather 3x3x3 neighboring parent cells call get3cubefather(ind_cell,nbors_father_cells,nbors_father_grids,ngrid,ilevel) ! Loop over grid cells do ind_son=1,twotondim iskip_son=ncoarse+(ind_son-1)*ngridmax ! Compute pseudo particle (centre of mass) position do idim=1,ndim do j=1,np ind_cell_son=iskip_son+ind_grid(j) x(j,idim)=unew(ind_cell_son,idim+1)/unew(ind_cell_son,1) end do end do ! Compute total multipole if(ilevel==levelmin)then do idim=1,ndim+1 do j=1,np ind_cell_son=iskip_son+ind_grid(j) multipole(idim)=multipole(idim)+unew(ind_cell_son,idim) end do end do endif ! Rescale particle position at level ilevel do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/scale+skip_loc(idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)-(xg(ind_grid(j),idim)-3d0*dx) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/dx end do end do ! Gather particle mass do j=1,np ind_cell_son=iskip_son+ind_grid(j) mmm(j)=unew(ind_cell_son,1) end do ! CIC at level ilevel (dd: right cloud boundary; dg: left cloud boundary) do idim=1,ndim do j=1,np dd(j,idim)=x(j,idim)+0.5D0 id(j,idim)=int(dd(j,idim)) dd(j,idim)=dd(j,idim)-id(j,idim) dg(j,idim)=1.0D0-dd(j,idim) ig(j,idim)=id(j,idim)-1 end do end do ! Check for illegal moves error=.false. do idim=1,ndim do j=1,np if(x(j,idim)<0.5D0.or.x(j,idim)>5.5D0)error=.true. end do end do if(error)then write(*,*)'problem in cic' do idim=1,ndim do j=1,np if(x(j,idim)<0.5D0.or.x(j,idim)>5.5D0)then write(*,*)x(j,1:ndim) endif end do end do stop end if ! Compute cloud volumes #if NDIM==1 do j=1,np vol(j,1)=dg(j,1) vol(j,2)=dd(j,1) end do #endif #if NDIM==2 do j=1,np vol(j,1)=dg(j,1)*dg(j,2) vol(j,2)=dd(j,1)*dg(j,2) vol(j,3)=dg(j,1)*dd(j,2) vol(j,4)=dd(j,1)*dd(j,2) end do #endif #if NDIM==3 do j=1,np vol(j,1)=dg(j,1)*dg(j,2)*dg(j,3) vol(j,2)=dd(j,1)*dg(j,2)*dg(j,3) vol(j,3)=dg(j,1)*dd(j,2)*dg(j,3) vol(j,4)=dd(j,1)*dd(j,2)*dg(j,3) vol(j,5)=dg(j,1)*dg(j,2)*dd(j,3) vol(j,6)=dd(j,1)*dg(j,2)*dd(j,3) vol(j,7)=dg(j,1)*dd(j,2)*dd(j,3) vol(j,8)=dd(j,1)*dd(j,2)*dd(j,3) end do #endif ! Compute parent grids do idim=1,ndim do j=1,np igg(j,idim)=ig(j,idim)/2 igd(j,idim)=id(j,idim)/2 end do end do #if NDIM==1 do j=1,np kg(j,1)=1+igg(j,1) kg(j,2)=1+igd(j,1) end do #endif #if NDIM==2 do j=1,np kg(j,1)=1+igg(j,1)+3*igg(j,2) kg(j,2)=1+igd(j,1)+3*igg(j,2) kg(j,3)=1+igg(j,1)+3*igd(j,2) kg(j,4)=1+igd(j,1)+3*igd(j,2) end do #endif #if NDIM==3 do j=1,np kg(j,1)=1+igg(j,1)+3*igg(j,2)+9*igg(j,3) kg(j,2)=1+igd(j,1)+3*igg(j,2)+9*igg(j,3) kg(j,3)=1+igg(j,1)+3*igd(j,2)+9*igg(j,3) kg(j,4)=1+igd(j,1)+3*igd(j,2)+9*igg(j,3) kg(j,5)=1+igg(j,1)+3*igg(j,2)+9*igd(j,3) kg(j,6)=1+igd(j,1)+3*igg(j,2)+9*igd(j,3) kg(j,7)=1+igg(j,1)+3*igd(j,2)+9*igd(j,3) kg(j,8)=1+igd(j,1)+3*igd(j,2)+9*igd(j,3) end do #endif do ind=1,twotondim do j=1,np igrid(j,ind)=son(nbors_father_cells(j,kg(j,ind))) end do end do ! Compute parent cell position do idim=1,ndim do j=1,np icg(j,idim)=ig(j,idim)-2*igg(j,idim) icd(j,idim)=id(j,idim)-2*igd(j,idim) end do end do #if NDIM==1 do j=1,np icell(j,1)=1+icg(j,1) icell(j,2)=1+icd(j,1) end do #endif #if NDIM==2 do j=1,np icell(j,1)=1+icg(j,1)+2*icg(j,2) icell(j,2)=1+icd(j,1)+2*icg(j,2) icell(j,3)=1+icg(j,1)+2*icd(j,2) icell(j,4)=1+icd(j,1)+2*icd(j,2) end do #endif #if NDIM==3 do j=1,np icell(j,1)=1+icg(j,1)+2*icg(j,2)+4*icg(j,3) icell(j,2)=1+icd(j,1)+2*icg(j,2)+4*icg(j,3) icell(j,3)=1+icg(j,1)+2*icd(j,2)+4*icg(j,3) icell(j,4)=1+icd(j,1)+2*icd(j,2)+4*icg(j,3) icell(j,5)=1+icg(j,1)+2*icg(j,2)+4*icd(j,3) icell(j,6)=1+icd(j,1)+2*icg(j,2)+4*icd(j,3) icell(j,7)=1+icg(j,1)+2*icd(j,2)+4*icd(j,3) icell(j,8)=1+icd(j,1)+2*icd(j,2)+4*icd(j,3) end do #endif ! Compute parent cell adress do ind=1,twotondim do j=1,np indp(j,ind)=ncoarse+(icell(j,ind)-1)*ngridmax+igrid(j,ind) end do end do ! Update mass density and number density fields do ind=1,twotondim do j=1,np ok(j)=igrid(j,ind)>0 end do do j=1,np vol2(j)=mmm(j)*vol(j,ind)/vol_loc end do do j=1,np if(ok(j))then rho(indp(j,ind))=rho(indp(j,ind))+vol2(j) end if end do end do end do ! End loop over grid cells end subroutine cic_cell !############################################################################## !############################################################################## !############################################################################## !############################################################################## #if NDIM==3 subroutine tsc_amr(ind_cell,ind_part,ind_grid_part,x0,ng,np,ilevel) use amr_commons use amr_parameters use pm_commons use poisson_commons use hydro_commons, ONLY: mass_sph implicit none integer::ng,np,ilevel integer ,dimension(1:nvector)::ind_cell,ind_grid_part,ind_part real(dp),dimension(1:nvector,1:ndim)::x0 !------------------------------------------------------------------ ! This routine computes the density field at level ilevel using ! the TSC scheme. Only cells that are in level ilevel ! are updated by the input particle list. !------------------------------------------------------------------ integer::j,ind,idim,nx_loc real(dp)::dx,dx_loc,scale,vol_loc ! Grid-based arrays integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids ! Particle-based arrays logical ,dimension(1:nvector),save::ok,abandoned real(dp),dimension(1:nvector),save::mmm real(dp),dimension(1:nvector),save::ttt=0d0 type(part_t),dimension(1:nvector),save::fam real(dp),dimension(1:nvector),save::vol2 real(dp),dimension(1:nvector,1:ndim),save::x,cl,cr,cc,wl,wr,wc integer ,dimension(1:nvector,1:ndim),save::igl,igr,igc,icl,icr,icc real(dp),dimension(1:nvector,1:threetondim),save::vol integer ,dimension(1:nvector,1:threetondim),save::igrid,icell,indp,kg real(dp),dimension(1:3)::skip_loc if (ndim .ne. 3)then write(*,*)'TSC not supported for ndim neq 3' call clean_stop end if ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc=dx_loc**ndim ! Gather neighboring father cells (should be present at anytime!) call get3cubefather(ind_cell,nbors_father_cells,nbors_father_grids,ng,ilevel) ! Rescale particle position at level ilevel do idim=1,ndim do j=1,np x(j,idim)=xp(ind_part(j),idim)/scale+skip_loc(idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)-x0(ind_grid_part(j),idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/dx end do end do ! Gather particle mass & type do j=1,np fam(j) = typep(ind_part(j)) if (is_tracer(fam(j))) then mmm(j)=0. else mmm(j)=mp(ind_part(j)) end if end do if(ilevel==levelmin)then do j=1,np multipole(1)=multipole(1)+mmm(j) end do do idim=1,ndim do j=1,np multipole(idim+1)=multipole(idim+1)+mmm(j)*xp(ind_part(j),idim) end do end do end if ! Gather particle birth epoch if(star)then do j=1,np ttt(j)=tp(ind_part(j)) end do endif ! Check for illegal moves abandoned(1:np)=.false. do idim=1,ndim do j=1,np if(x(j,idim)<1.0D0.or.x(j,idim)>5.0D0) abandoned(j)=.true. end do end do ! TSC at level ilevel; a particle contributes ! to three cells in each dimension ! cl: position of leftmost cell centre ! cc: position of central cell centre ! cr: position of rightmost cell centre ! wl: weighting function for leftmost cell ! wc: weighting function for central cell ! wr: weighting function for rightmost cell do idim=1,ndim do j=1,np if(.not.abandoned(j)) then cl(j,idim)=dble(int(x(j,idim)))-0.5D0 cc(j,idim)=dble(int(x(j,idim)))+0.5D0 cr(j,idim)=dble(int(x(j,idim)))+1.5D0 wl(j,idim)=0.50D0*(1.5D0-abs(x(j,idim)-cl(j,idim)))**2 wc(j,idim)=0.75D0- (x(j,idim)-cc(j,idim)) **2 wr(j,idim)=0.50D0*(1.5D0-abs(x(j,idim)-cr(j,idim)))**2 end if end do end do ! Compute cloud volumes do j=1,np if(.not.abandoned(j)) then vol(j,1 )=wl(j,1)*wl(j,2)*wl(j,3) vol(j,2 )=wc(j,1)*wl(j,2)*wl(j,3) vol(j,3 )=wr(j,1)*wl(j,2)*wl(j,3) vol(j,4 )=wl(j,1)*wc(j,2)*wl(j,3) vol(j,5 )=wc(j,1)*wc(j,2)*wl(j,3) vol(j,6 )=wr(j,1)*wc(j,2)*wl(j,3) vol(j,7 )=wl(j,1)*wr(j,2)*wl(j,3) vol(j,8 )=wc(j,1)*wr(j,2)*wl(j,3) vol(j,9 )=wr(j,1)*wr(j,2)*wl(j,3) vol(j,10)=wl(j,1)*wl(j,2)*wc(j,3) vol(j,11)=wc(j,1)*wl(j,2)*wc(j,3) vol(j,12)=wr(j,1)*wl(j,2)*wc(j,3) vol(j,13)=wl(j,1)*wc(j,2)*wc(j,3) vol(j,14)=wc(j,1)*wc(j,2)*wc(j,3) vol(j,15)=wr(j,1)*wc(j,2)*wc(j,3) vol(j,16)=wl(j,1)*wr(j,2)*wc(j,3) vol(j,17)=wc(j,1)*wr(j,2)*wc(j,3) vol(j,18)=wr(j,1)*wr(j,2)*wc(j,3) vol(j,19)=wl(j,1)*wl(j,2)*wr(j,3) vol(j,20)=wc(j,1)*wl(j,2)*wr(j,3) vol(j,21)=wr(j,1)*wl(j,2)*wr(j,3) vol(j,22)=wl(j,1)*wc(j,2)*wr(j,3) vol(j,23)=wc(j,1)*wc(j,2)*wr(j,3) vol(j,24)=wr(j,1)*wc(j,2)*wr(j,3) vol(j,25)=wl(j,1)*wr(j,2)*wr(j,3) vol(j,26)=wc(j,1)*wr(j,2)*wr(j,3) vol(j,27)=wr(j,1)*wr(j,2)*wr(j,3) end if end do ! Compute parent grids do idim=1,ndim do j=1,np if(.not.abandoned(j)) then igl(j,idim)=(int(cl(j,idim)))/2 igc(j,idim)=(int(cc(j,idim)))/2 igr(j,idim)=(int(cr(j,idim)))/2 end if end do end do do j=1,np if(.not.abandoned(j)) then kg(j,1 )=1+igl(j,1)+3*igl(j,2)+9*igl(j,3) kg(j,2 )=1+igc(j,1)+3*igl(j,2)+9*igl(j,3) kg(j,3 )=1+igr(j,1)+3*igl(j,2)+9*igl(j,3) kg(j,4 )=1+igl(j,1)+3*igc(j,2)+9*igl(j,3) kg(j,5 )=1+igc(j,1)+3*igc(j,2)+9*igl(j,3) kg(j,6 )=1+igr(j,1)+3*igc(j,2)+9*igl(j,3) kg(j,7 )=1+igl(j,1)+3*igr(j,2)+9*igl(j,3) kg(j,8 )=1+igc(j,1)+3*igr(j,2)+9*igl(j,3) kg(j,9 )=1+igr(j,1)+3*igr(j,2)+9*igl(j,3) kg(j,10)=1+igl(j,1)+3*igl(j,2)+9*igc(j,3) kg(j,11)=1+igc(j,1)+3*igl(j,2)+9*igc(j,3) kg(j,12)=1+igr(j,1)+3*igl(j,2)+9*igc(j,3) kg(j,13)=1+igl(j,1)+3*igc(j,2)+9*igc(j,3) kg(j,14)=1+igc(j,1)+3*igc(j,2)+9*igc(j,3) kg(j,15)=1+igr(j,1)+3*igc(j,2)+9*igc(j,3) kg(j,16)=1+igl(j,1)+3*igr(j,2)+9*igc(j,3) kg(j,17)=1+igc(j,1)+3*igr(j,2)+9*igc(j,3) kg(j,18)=1+igr(j,1)+3*igr(j,2)+9*igc(j,3) kg(j,19)=1+igl(j,1)+3*igl(j,2)+9*igr(j,3) kg(j,20)=1+igc(j,1)+3*igl(j,2)+9*igr(j,3) kg(j,21)=1+igr(j,1)+3*igl(j,2)+9*igr(j,3) kg(j,22)=1+igl(j,1)+3*igc(j,2)+9*igr(j,3) kg(j,23)=1+igc(j,1)+3*igc(j,2)+9*igr(j,3) kg(j,24)=1+igr(j,1)+3*igc(j,2)+9*igr(j,3) kg(j,25)=1+igl(j,1)+3*igr(j,2)+9*igr(j,3) kg(j,26)=1+igc(j,1)+3*igr(j,2)+9*igr(j,3) kg(j,27)=1+igr(j,1)+3*igr(j,2)+9*igr(j,3) end if end do do ind=1,threetondim do j=1,np igrid(j,ind)=son(nbors_father_cells(ind_grid_part(j),kg(j,ind))) end do end do ! Compute parent cell position do idim=1,ndim do j=1,np if(.not.abandoned(j)) then icl(j,idim)=int(cl(j,idim))-2*igl(j,idim) icc(j,idim)=int(cc(j,idim))-2*igc(j,idim) icr(j,idim)=int(cr(j,idim))-2*igr(j,idim) end if end do end do do j=1,np if(.not.abandoned(j)) then icell(j,1 )=1+icl(j,1)+2*icl(j,2)+4*icl(j,3) icell(j,2 )=1+icc(j,1)+2*icl(j,2)+4*icl(j,3) icell(j,3 )=1+icr(j,1)+2*icl(j,2)+4*icl(j,3) icell(j,4 )=1+icl(j,1)+2*icc(j,2)+4*icl(j,3) icell(j,5 )=1+icc(j,1)+2*icc(j,2)+4*icl(j,3) icell(j,6 )=1+icr(j,1)+2*icc(j,2)+4*icl(j,3) icell(j,7 )=1+icl(j,1)+2*icr(j,2)+4*icl(j,3) icell(j,8 )=1+icc(j,1)+2*icr(j,2)+4*icl(j,3) icell(j,9 )=1+icr(j,1)+2*icr(j,2)+4*icl(j,3) icell(j,10)=1+icl(j,1)+2*icl(j,2)+4*icc(j,3) icell(j,11)=1+icc(j,1)+2*icl(j,2)+4*icc(j,3) icell(j,12)=1+icr(j,1)+2*icl(j,2)+4*icc(j,3) icell(j,13)=1+icl(j,1)+2*icc(j,2)+4*icc(j,3) icell(j,14)=1+icc(j,1)+2*icc(j,2)+4*icc(j,3) icell(j,15)=1+icr(j,1)+2*icc(j,2)+4*icc(j,3) icell(j,16)=1+icl(j,1)+2*icr(j,2)+4*icc(j,3) icell(j,17)=1+icc(j,1)+2*icr(j,2)+4*icc(j,3) icell(j,18)=1+icr(j,1)+2*icr(j,2)+4*icc(j,3) icell(j,19)=1+icl(j,1)+2*icl(j,2)+4*icr(j,3) icell(j,20)=1+icc(j,1)+2*icl(j,2)+4*icr(j,3) icell(j,21)=1+icr(j,1)+2*icl(j,2)+4*icr(j,3) icell(j,22)=1+icl(j,1)+2*icc(j,2)+4*icr(j,3) icell(j,23)=1+icc(j,1)+2*icc(j,2)+4*icr(j,3) icell(j,24)=1+icr(j,1)+2*icc(j,2)+4*icr(j,3) icell(j,25)=1+icl(j,1)+2*icr(j,2)+4*icr(j,3) icell(j,26)=1+icc(j,1)+2*icr(j,2)+4*icr(j,3) icell(j,27)=1+icr(j,1)+2*icr(j,2)+4*icr(j,3) end if end do ! Compute parent cell adress do ind=1,threetondim do j=1,np if(.not.abandoned(j)) then indp(j,ind)=ncoarse+(icell(j,ind)-1)*ngridmax+igrid(j,ind) end if end do end do ! Update mass density and number density fields do ind=1,threetondim do j=1,np if(.not.abandoned(j)) then ok(j)=igrid(j,ind)>0 end if end do do j=1,np if(.not.abandoned(j)) then vol2(j)=mmm(j)*vol(j,ind)/vol_loc end if end do if(cic_levelmax==0.or.ilevel<=cic_levelmax) then do j=1,np if(ok(j).and.(.not.abandoned(j))) then rho(indp(j,ind))=rho(indp(j,ind))+vol2(j) end if end do else if(ilevel>cic_levelmax) then do j=1,np if ( ok(j) .and. is_not_DM(fam(j)) .and. (.not.abandoned(j)) ) then rho(indp(j,ind))=rho(indp(j,ind))+vol2(j) end if end do endif if(ilevel==cic_levelmax)then do j=1,np if ( ok(j) .and. is_DM(fam(j)) .and. (.not.abandoned(j)) ) then rho_top(indp(j,ind))=rho_top(indp(j,ind))+vol2(j) end if end do endif do j=1,np if(.not.abandoned(j)) then vol2(j)=vol(j,ind) end if end do ! Remove test particles for static runs if(static) then do j=1,np if(.not.abandoned(j)) then ok(j)=ok(j).and.(mmm(j)>0.0) end if end do endif ! Remove massive dark matter particle if(mass_cut_refine>0.0) then do j=1,np if ( is_DM(fam(j)) .and. (.not.abandoned(j)) ) then ok(j)=ok(j).and.mmm(j)=cic_levelmax) then do j=1,np if ( ok(j) .and. is_not_DM(fam(j)) .and. (.not.abandoned(j)) ) then phi(indp(j,ind))=phi(indp(j,ind))+vol2(j) end if end do endif end do end subroutine tsc_amr #endif !########################################################### !########################################################### !########################################################### !########################################################### #if NDIM==3 subroutine tsc_from_multipole(ilevel) use amr_commons use hydro_commons use poisson_commons use mpi_mod implicit none integer::ilevel !------------------------------------------------------------------- ! This routine compute array rho (source term for Poisson equation) ! by first reseting array rho to zero, then ! by affecting the gas density to leaf cells, and finally ! by performing a restriction operation for split cells. ! For pure particle runs, the restriction is not necessary and the ! routine only set rho to zero. On the other hand, for the Multigrid ! solver, the restriction is necessary in any case. !------------------------------------------------------------------- integer::ind,i,icpu,ncache,ngrid,iskip,ibound integer::igrid integer,dimension(1:nvector),save::ind_grid if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Initialize density field to zero do icpu=1,ncpu do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,reception(icpu,ilevel)%ngrid rho(reception(icpu,ilevel)%igrid(i)+iskip)=0.0D0 end do end do end do do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid rho(active(ilevel)%igrid(i)+iskip)=0.0D0 end do end do ! Reset rho in physical boundaries do ibound=1,nboundary do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,boundary(ibound,ilevel)%ngrid rho(boundary(ibound,ilevel)%igrid(i)+iskip)=0.0 end do end do end do if(hydro)then ! Perform a restriction over split cells (ilevel+1) ncache=active(ilevel)%ngrid do igrid=1,ncache,nvector ! Gather nvector grids ngrid=MIN(nvector,ncache-igrid+1) do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do call tsc_cell(ind_grid,ngrid,ilevel) end do end if 111 format(' Entering tsc_from_multipole for level',i2) end subroutine tsc_from_multipole #endif !########################################################### !########################################################### !########################################################### !########################################################### #if NDIM==3 subroutine tsc_cell(ind_grid,ngrid,ilevel) use amr_commons use poisson_commons use hydro_commons, ONLY: unew implicit none integer::ngrid,ilevel integer,dimension(1:nvector)::ind_grid ! ! integer::i,j,idim,ind_cell_son,iskip_son,np,ind_son,nx_loc,ind integer ,dimension(1:nvector),save::ind_cell integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids ! Particle-based arrays logical ,dimension(1:nvector),save::ok real(dp),dimension(1:nvector),save::mmm real(dp),dimension(1:nvector),save::vol2 real(dp),dimension(1:nvector,1:ndim),save::x,cl,cr,cc,wl,wr,wc integer ,dimension(1:nvector,1:ndim),save::igl,igr,igc,icl,icr,icc real(dp),dimension(1:nvector,1:threetondim),save::vol integer ,dimension(1:nvector,1:threetondim),save::igrid,icell,indp,kg real(dp),dimension(1:3)::skip_loc real(kind=8)::dx,dx_loc,scale,vol_loc logical::error ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc=dx_loc**ndim np=ngrid ! Compute father cell index do i=1,ngrid ind_cell(i)=father(ind_grid(i)) end do ! Gather 3x3x3 neighboring parent cells call get3cubefather(ind_cell,nbors_father_cells,nbors_father_grids,ngrid,ilevel) ! Loop over grid cells do ind_son=1,twotondim iskip_son=ncoarse+(ind_son-1)*ngridmax ! Compute pseudo particle (centre of mass) position do idim=1,ndim do j=1,np ind_cell_son=iskip_son+ind_grid(j) x(j,idim)=unew(ind_cell_son,idim+1)/unew(ind_cell_son,1) end do end do ! Compute total multipole if(ilevel==levelmin)then do idim=1,ndim+1 do j=1,np ind_cell_son=iskip_son+ind_grid(j) multipole(idim)=multipole(idim)+unew(ind_cell_son,idim) end do end do endif ! Rescale particle position at level ilevel do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/scale+skip_loc(idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)-(xg(ind_grid(j),idim)-3d0*dx) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/dx end do end do ! Gather particle mass do j=1,np ind_cell_son=iskip_son+ind_grid(j) mmm(j)=unew(ind_cell_son,1) end do ! TSC at level ilevel; a particle contributes ! to three cells in each dimension ! cl: position of leftmost cell centre ! cc: position of central cell centre ! cr: position of rightmost cell centre ! wl: weighting function for leftmost cell ! wc: weighting function for central cell ! wr: weighting function for rightmost cell do idim=1,ndim do j=1,np cl(j,idim)=dble(int(x(j,idim)))-0.5D0 cc(j,idim)=dble(int(x(j,idim)))+0.5D0 cr(j,idim)=dble(int(x(j,idim)))+1.5D0 wl(j,idim)=0.50D0*(1.5D0-abs(x(j,idim)-cl(j,idim)))**2 wc(j,idim)=0.75D0- (x(j,idim)-cc(j,idim)) **2 wr(j,idim)=0.50D0*(1.5D0-abs(x(j,idim)-cr(j,idim)))**2 end do end do ! Check for illegal moves error=.false. do idim=1,ndim do j=1,np if(x(j,idim)<1.0D0.or.x(j,idim)>5.0D0)error=.true. end do end do if(error)then write(*,*)'problem in tsc_cell' do idim=1,ndim do j=1,np if(x(j,idim)<1.0D0.or.x(j,idim)>5.0D0)then write(*,*)x(j,1:ndim) endif end do end do stop end if ! Compute cloud volumes do j=1,np vol(j,1 )=wl(j,1)*wl(j,2)*wl(j,3) vol(j,2 )=wc(j,1)*wl(j,2)*wl(j,3) vol(j,3 )=wr(j,1)*wl(j,2)*wl(j,3) vol(j,4 )=wl(j,1)*wc(j,2)*wl(j,3) vol(j,5 )=wc(j,1)*wc(j,2)*wl(j,3) vol(j,6 )=wr(j,1)*wc(j,2)*wl(j,3) vol(j,7 )=wl(j,1)*wr(j,2)*wl(j,3) vol(j,8 )=wc(j,1)*wr(j,2)*wl(j,3) vol(j,9 )=wr(j,1)*wr(j,2)*wl(j,3) vol(j,10)=wl(j,1)*wl(j,2)*wc(j,3) vol(j,11)=wc(j,1)*wl(j,2)*wc(j,3) vol(j,12)=wr(j,1)*wl(j,2)*wc(j,3) vol(j,13)=wl(j,1)*wc(j,2)*wc(j,3) vol(j,14)=wc(j,1)*wc(j,2)*wc(j,3) vol(j,15)=wr(j,1)*wc(j,2)*wc(j,3) vol(j,16)=wl(j,1)*wr(j,2)*wc(j,3) vol(j,17)=wc(j,1)*wr(j,2)*wc(j,3) vol(j,18)=wr(j,1)*wr(j,2)*wc(j,3) vol(j,19)=wl(j,1)*wl(j,2)*wr(j,3) vol(j,20)=wc(j,1)*wl(j,2)*wr(j,3) vol(j,21)=wr(j,1)*wl(j,2)*wr(j,3) vol(j,22)=wl(j,1)*wc(j,2)*wr(j,3) vol(j,23)=wc(j,1)*wc(j,2)*wr(j,3) vol(j,24)=wr(j,1)*wc(j,2)*wr(j,3) vol(j,25)=wl(j,1)*wr(j,2)*wr(j,3) vol(j,26)=wc(j,1)*wr(j,2)*wr(j,3) vol(j,27)=wr(j,1)*wr(j,2)*wr(j,3) end do ! Compute parent grids do idim=1,ndim do j=1,np igl(j,idim)=(int(cl(j,idim)))/2 igc(j,idim)=(int(cc(j,idim)))/2 igr(j,idim)=(int(cr(j,idim)))/2 end do end do do j=1,np kg(j,1 )=1+igl(j,1)+3*igl(j,2)+9*igl(j,3) kg(j,2 )=1+igc(j,1)+3*igl(j,2)+9*igl(j,3) kg(j,3 )=1+igr(j,1)+3*igl(j,2)+9*igl(j,3) kg(j,4 )=1+igl(j,1)+3*igc(j,2)+9*igl(j,3) kg(j,5 )=1+igc(j,1)+3*igc(j,2)+9*igl(j,3) kg(j,6 )=1+igr(j,1)+3*igc(j,2)+9*igl(j,3) kg(j,7 )=1+igl(j,1)+3*igr(j,2)+9*igl(j,3) kg(j,8 )=1+igc(j,1)+3*igr(j,2)+9*igl(j,3) kg(j,9 )=1+igr(j,1)+3*igr(j,2)+9*igl(j,3) kg(j,10)=1+igl(j,1)+3*igl(j,2)+9*igc(j,3) kg(j,11)=1+igc(j,1)+3*igl(j,2)+9*igc(j,3) kg(j,12)=1+igr(j,1)+3*igl(j,2)+9*igc(j,3) kg(j,13)=1+igl(j,1)+3*igc(j,2)+9*igc(j,3) kg(j,14)=1+igc(j,1)+3*igc(j,2)+9*igc(j,3) kg(j,15)=1+igr(j,1)+3*igc(j,2)+9*igc(j,3) kg(j,16)=1+igl(j,1)+3*igr(j,2)+9*igc(j,3) kg(j,17)=1+igc(j,1)+3*igr(j,2)+9*igc(j,3) kg(j,18)=1+igr(j,1)+3*igr(j,2)+9*igc(j,3) kg(j,19)=1+igl(j,1)+3*igl(j,2)+9*igr(j,3) kg(j,20)=1+igc(j,1)+3*igl(j,2)+9*igr(j,3) kg(j,21)=1+igr(j,1)+3*igl(j,2)+9*igr(j,3) kg(j,22)=1+igl(j,1)+3*igc(j,2)+9*igr(j,3) kg(j,23)=1+igc(j,1)+3*igc(j,2)+9*igr(j,3) kg(j,24)=1+igr(j,1)+3*igc(j,2)+9*igr(j,3) kg(j,25)=1+igl(j,1)+3*igr(j,2)+9*igr(j,3) kg(j,26)=1+igc(j,1)+3*igr(j,2)+9*igr(j,3) kg(j,27)=1+igr(j,1)+3*igr(j,2)+9*igr(j,3) end do do ind=1,threetondim do j=1,np igrid(j,ind)=son(nbors_father_cells(j,kg(j,ind))) end do end do ! Compute parent cell position do idim=1,ndim do j=1,np icl(j,idim)=int(cl(j,idim))-2*igl(j,idim) icc(j,idim)=int(cc(j,idim))-2*igc(j,idim) icr(j,idim)=int(cr(j,idim))-2*igr(j,idim) end do end do do j=1,np icell(j,1 )=1+icl(j,1)+2*icl(j,2)+4*icl(j,3) icell(j,2 )=1+icc(j,1)+2*icl(j,2)+4*icl(j,3) icell(j,3 )=1+icr(j,1)+2*icl(j,2)+4*icl(j,3) icell(j,4 )=1+icl(j,1)+2*icc(j,2)+4*icl(j,3) icell(j,5 )=1+icc(j,1)+2*icc(j,2)+4*icl(j,3) icell(j,6 )=1+icr(j,1)+2*icc(j,2)+4*icl(j,3) icell(j,7 )=1+icl(j,1)+2*icr(j,2)+4*icl(j,3) icell(j,8 )=1+icc(j,1)+2*icr(j,2)+4*icl(j,3) icell(j,9 )=1+icr(j,1)+2*icr(j,2)+4*icl(j,3) icell(j,10)=1+icl(j,1)+2*icl(j,2)+4*icc(j,3) icell(j,11)=1+icc(j,1)+2*icl(j,2)+4*icc(j,3) icell(j,12)=1+icr(j,1)+2*icl(j,2)+4*icc(j,3) icell(j,13)=1+icl(j,1)+2*icc(j,2)+4*icc(j,3) icell(j,14)=1+icc(j,1)+2*icc(j,2)+4*icc(j,3) icell(j,15)=1+icr(j,1)+2*icc(j,2)+4*icc(j,3) icell(j,16)=1+icl(j,1)+2*icr(j,2)+4*icc(j,3) icell(j,17)=1+icc(j,1)+2*icr(j,2)+4*icc(j,3) icell(j,18)=1+icr(j,1)+2*icr(j,2)+4*icc(j,3) icell(j,19)=1+icl(j,1)+2*icl(j,2)+4*icr(j,3) icell(j,20)=1+icc(j,1)+2*icl(j,2)+4*icr(j,3) icell(j,21)=1+icr(j,1)+2*icl(j,2)+4*icr(j,3) icell(j,22)=1+icl(j,1)+2*icc(j,2)+4*icr(j,3) icell(j,23)=1+icc(j,1)+2*icc(j,2)+4*icr(j,3) icell(j,24)=1+icr(j,1)+2*icc(j,2)+4*icr(j,3) icell(j,25)=1+icl(j,1)+2*icr(j,2)+4*icr(j,3) icell(j,26)=1+icc(j,1)+2*icr(j,2)+4*icr(j,3) icell(j,27)=1+icr(j,1)+2*icr(j,2)+4*icr(j,3) end do ! Compute parent cell adress do ind=1,threetondim do j=1,np indp(j,ind)=ncoarse+(icell(j,ind)-1)*ngridmax+igrid(j,ind) end do end do ! Update mass density and number density fields do ind=1,twotondim do j=1,np ok(j)=igrid(j,ind)>0 end do do j=1,np vol2(j)=mmm(j)*vol(j,ind)/vol_loc end do do j=1,np if(ok(j))then rho(indp(j,ind))=rho(indp(j,ind))+vol2(j) end if end do end do end do ! End loop over grid cells end subroutine tsc_cell #endif !########################################################### !########################################################### !########################################################### !########################################################### Memory used: 1.0 Bytes flag1: true Memory used: 1.0 KB flag2: true Memory used: 1.0 MB flag3: true Memory used: 1.0 GB flag4: true Memory used: 1.0 TB flag5: true [Mera]: Get a list of all exported Mera types and functions: =============================================================== 81-element Vector{Symbol}: Symbol("@apply") Symbol("@filter") Symbol("@where") :ArgumentsType :ClumpDataType :CompilationInfoType :ContainMassDataSetType :DataMapsType :DataSetType :DescriptorType :FileNamesType :GravDataType :GridInfoType :Histogram2DMapType :HydroDataType :HydroMapsType :HydroPartType :InfoType :MaskArrayAbstractType :MaskArrayType :MaskType :Mera :PartDataType :PartInfoType :PartMapsType :PhysicalUnitsType :PhysicalUnitsType001 :ScalesType :ScalesType001 :amroverview :average_mweighted :average_velocity :bell :bulk_velocity :center_of_mass :checkoutputs :checksimulations :com :construct_datatype :convertdata :createpath :createscales :dataoverview :export_vtk :getclumps :getextent :getgravity :gethydro :getinfo :getmass :getparticles :getpositions :gettime :getunit :getvar :getvelocities :humanize :infodata :loaddata :makefile :msum :namelist :notifyme :patchfile :printtime :projection :savedata :shellregion :showprogress :showprogress_mode :storageoverview :subregion :timerfile :usedmemory :verbose :verbose_mode :viewallfields :viewdata :viewfields :viewmodule :wstat -------------------------------------- [ Info: getinfo: -------------------------------------- [Mera]: 2025-07-04T17:16:31.031 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:16:01.413 ctime: 2025-07-04T17:16:01.413 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:16:31.038 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:16:31.042 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:16:01.413 ctime: 2025-07-04T17:16:01.413 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false namelist-file: false timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= -------------------------------------- [ Info: info overview: -------------------------------------- output = 2 path = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ fnames ==> subfields: (:output, :info, :amr, :hydro, :hydro_descriptor, :gravity, :particles, :part_descriptor, :rt, :rt_descriptor, :rt_descriptor_v0, :clumps, :timer, :header, :namelist, :compilation, :makefile, :patchfile) simcode = RAMSES mtime = 2025-07-04T17:16:01.503 ctime = 2025-07-04T17:16:01.503 ncpu = 4 ndim = 3 levelmin = 3 levelmax = 7 boxlen = 100.0 time = 0.330855641315456 aexp = 1.0 H0 = 1.0 omega_m = 1.0 omega_l = 0.0 omega_k = 0.0 omega_b = 0.045 unit_l = 3.085677581282e21 unit_d = 6.77025430198932e-23 unit_m = 1.9890999999999996e42 unit_v = 6.559266058737735e6 unit_t = 4.70430312423675e14 gamma = 1.6667 hydro = true nvarh = 6 nvarp = 8 nvarrt = 0 variable_list = [:rho, :vx, :vy, :vz, :p, :var6] gravity_variable_list = [:epot, :ax, :ay, :az] particles_variable_list = [:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals] rt_variable_list = Symbol[] clumps_variable_list = Symbol[] sinks_variable_list = Symbol[] descriptor ==> subfields: (:hversion, :hydro, :htypes, :usehydro, :hydrofile, :pversion, :particles, :ptypes, :useparticles, :particlesfile, :gravity, :usegravity, :gravityfile, :rtversion, :rt, :rtPhotonGroups, :usert, :rtfile, :clumps, :useclumps, :clumpsfile, :sinks, :usesinks, :sinksfile) amr = true gravity = true particles = true rt = false clumps = false sinks = false namelist = true namelist_content ==> dictionary: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") headerfile = true makefile = true files_content ==> subfields: (:makefile, :timerfile, :patchfile) timerfile = true compilationfile = true patchfile = true Narraysize = 0 scale ==> subfields: (:Mpc, :kpc, :pc, :mpc, :ly, :Au, :km, :m, :cm, :mm, :μm, :Mpc3, :kpc3, :pc3, :mpc3, :ly3, :Au3, :km3, :m3, :cm3, :mm3, :μm3, :Msol_pc3, :Msun_pc3, :g_cm3, :Msol_pc2, :Msun_pc2, :g_cm2, :Gyr, :Myr, :yr, :s, :ms, :Msol, :Msun, :Mearth, :Mjupiter, :g, :km_s, :m_s, :cm_s, :nH, :erg, :g_cms2, :T_mu, :K_mu, :T, :K, :Ba, :g_cm_s2, :p_kB, :K_cm3) grid_info ==> subfields: (:ngridmax, :nstep_coarse, :nx, :ny, :nz, :nlevelmax, :nboundary, :ngrid_current, :bound_key, :cpu_read) part_info ==> subfields: (:eta_sn, :age_sn, :f_w, :Npart, :Ndm, :Nstars, :Nsinks, :Ncloud, :Ndebris, :Nother, :Nundefined, :other_tracer1, :debris_tracer, :cloud_tracer, :star_tracer, :other_tracer2, :gas_tracer) compilation ==> subfields: (:compile_date, :patch_dir, :remote_repo, :local_branch, :last_commit) constants ==> subfields: (:Au, :Mpc, :kpc, :pc, :mpc, :ly, :Msol, :Msun, :Mearth, :Mjupiter, :Rsol, :Rsun, :me, :mp, :mn, :mH, :amu, :NA, :c, :G, :kB, :Gyr, :Myr, :yr) output = 2 path = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ fnames ==> subfields: (:output, :info, :amr, :hydro, :hydro_descriptor, :gravity, :particles, :part_descriptor, :rt, :rt_descriptor, :rt_descriptor_v0, :clumps, :timer, :header, :namelist, :compilation, :makefile, :patchfile) simcode = RAMSES mtime = 2025-07-04T17:16:01.503 ctime = 2025-07-04T17:16:01.503 ncpu = 4 ndim = 3 levelmin = 3 levelmax = 7 boxlen = 100.0 time = 0.330855641315456 aexp = 1.0 H0 = 1.0 omega_m = 1.0 omega_l = 0.0 omega_k = 0.0 omega_b = 0.045 unit_l = 3.085677581282e21 unit_d = 6.77025430198932e-23 unit_m = 1.9890999999999996e42 unit_v = 6.559266058737735e6 unit_t = 4.70430312423675e14 gamma = 1.6667 hydro = true nvarh = 6 nvarp = 8 nvarrt = 0 variable_list = [:rho, :vx, :vy, :vz, :p, :var6] gravity_variable_list = [:epot, :ax, :ay, :az] particles_variable_list = [:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals] rt_variable_list = Symbol[] clumps_variable_list = Symbol[] sinks_variable_list = Symbol[] descriptor ==> subfields: (:hversion, :hydro, :htypes, :usehydro, :hydrofile, :pversion, :particles, :ptypes, :useparticles, :particlesfile, :gravity, :usegravity, :gravityfile, :rtversion, :rt, :rtPhotonGroups, :usert, :rtfile, :clumps, :useclumps, :clumpsfile, :sinks, :usesinks, :sinksfile) amr = true gravity = true particles = true rt = false clumps = false sinks = false namelist = true namelist_content ==> dictionary: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") headerfile = true makefile = true files_content ==> subfields: (:makefile, :timerfile, :patchfile) timerfile = true compilationfile = true patchfile = true Narraysize = 0 scale ==> subfields: (:Mpc, :kpc, :pc, :mpc, :ly, :Au, :km, :m, :cm, :mm, :μm, :Mpc3, :kpc3, :pc3, :mpc3, :ly3, :Au3, :km3, :m3, :cm3, :mm3, :μm3, :Msol_pc3, :Msun_pc3, :g_cm3, :Msol_pc2, :Msun_pc2, :g_cm2, :Gyr, :Myr, :yr, :s, :ms, :Msol, :Msun, :Mearth, :Mjupiter, :g, :km_s, :m_s, :cm_s, :nH, :erg, :g_cms2, :T_mu, :K_mu, :T, :K, :Ba, :g_cm_s2, :p_kB, :K_cm3) grid_info ==> subfields: (:ngridmax, :nstep_coarse, :nx, :ny, :nz, :nlevelmax, :nboundary, :ngrid_current, :bound_key, :cpu_read) part_info ==> subfields: (:eta_sn, :age_sn, :f_w, :Npart, :Ndm, :Nstars, :Nsinks, :Ncloud, :Ndebris, :Nother, :Nundefined, :other_tracer1, :debris_tracer, :cloud_tracer, :star_tracer, :other_tracer2, :gas_tracer) compilation ==> subfields: (:compile_date, :patch_dir, :remote_repo, :local_branch, :last_commit) constants ==> subfields: (:Au, :Mpc, :kpc, :pc, :mpc, :ly, :Msol, :Msun, :Mearth, :Mjupiter, :Rsol, :Rsun, :me, :mp, :mn, :mH, :amu, :NA, :c, :G, :kB, :Gyr, :Myr, :yr) [Mera]: Fields to scale from user/code units to selected units ======================================================================= Mpc = 0.0010000000000006482 kpc = 1.0000000000006481 pc = 1000.0000000006482 mpc = 1.0000000000006482e6 ly = 3261.5637769461323 Au = 2.0626480623310105e23 km = 3.0856775812820004e16 m = 3.085677581282e19 cm = 3.085677581282e21 mm = 3.085677581282e22 μm = 3.085677581282e25 Mpc3 = 1.0000000000019446e-9 kpc3 = 1.0000000000019444 pc3 = 1.0000000000019448e9 mpc3 = 1.0000000000019446e18 ly3 = 3.469585750743794e10 Au3 = 8.775571306099254e69 km3 = 2.9379989454983075e49 m3 = 2.9379989454983063e58 cm3 = 2.9379989454983065e64 mm3 = 2.937998945498306e67 μm3 = 2.937998945498306e76 Msol_pc3 = 0.9999999999980551 Msun_pc3 = 0.9999999999980551 g_cm3 = 6.77025430198932e-23 Msol_pc2 = 999.9999999987034 Msun_pc2 = 999.9999999987034 g_cm2 = 0.20890821919226463 Gyr = 0.014907037050462488 Myr = 14.907037050462488 yr = 1.4907037050462488e7 s = 4.70430312423675e14 ms = 4.70430312423675e17 Msol = 9.999999999999998e8 Msun = 9.999999999999998e8 Mearth = 3.330598439436053e14 Mjupiter = 1.0479261167570186e12 g = 1.9890999999999996e42 km_s = 65.59266058737735 m_s = 65592.66058737735 cm_s = 6.559266058737735e6 nH = 30.996344997059538 erg = 8.557898117221824e55 g_cms2 = 2.9128322630389308e-9 T_mu = 517302.3151964531 K_mu = 517302.3151964531 T = 680660.9410479647 K = 680660.9410479647 Ba = 2.9128322630389304e-9 g_cm_s2 = 2.9128322630389304e-9 p_kB = 2.1098001354745913e7 K_cm3 = 2.1098001354745913e7 [Mera]: Constants given in cgs units ========================================= Au = 0.01495978707 Mpc = 3.08567758128e24 kpc = 3.08567758128e21 pc = 3.08567758128e18 mpc = 3.08567758128e15 ly = 9.4607304725808e17 Msol = 1.9891e33 Msun = 1.9891e33 Mearth = 5.9722e27 Mjupiter = 1.89813e30 Rsol = 6.96e10 Rsun = 6.96e10 me = 9.1093897e-28 mp = 1.6726231e-24 mn = 1.6749286e-24 mH = 1.66e-24 amu = 1.6605402e-24 NA = 6.0221367e23 c = 2.99792458e10 G = 6.67259e-8 kB = 1.38062e-16 Gyr = 3.15576e16 Myr = 3.15576e13 yr = 3.15576e7 [Mera]: Paths and file-names ================================= output = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002 info = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/info_00002.txt amr = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/amr_00002. hydro = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/hydro_00002. hydro_descriptor = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/hydro_file_descriptor.txt gravity = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/grav_00002. particles = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/part_00002. part_descriptor = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/part_file_descriptor.txt rt = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/rt_00002. rt_descriptor = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/rt_file_descriptor.txt rt_descriptor_v0 = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/info_rt_00002.txt clumps = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/clump_00002. timer = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/timer_00002.txt header = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/header_00002.txt namelist = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/namelist.txt compilation = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/compilation.txt makefile = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/makefile.txt patchfile = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00002/patches.txt [Mera]: Descriptor overview ================================= hversion = 1 hydro = [:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity] htypes = ["d", "d", "d", "d", "d", "d"] usehydro = false hydrofile = true pversion = 1 particles = [:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity] ptypes = ["d", "d", "d", "d", "d", "d", "d", "i", "i", "b", "b", "d", "d"] useparticles = false particlesfile = true gravity = [:epot, :ax, :ay, :az] usegravity = false gravityfile = false rtversion = 0 rt = Dict{Any, Any}() rtPhotonGroups = Dict{Any, Any}() usert = false rtfile = false clumps = Symbol[] useclumps = false clumpsfile = false sinks = Symbol[] usesinks = false sinksfile = false [Mera]: Namelist file content ================================= &UNITS_PARAMS units_length = 0.308567758128200E+22 ! kpc units_density = 0.677025430198932E-22 ! 1e9 Msol/kpc^3 units_time = 0.470430312423675E+15 ! G &HYDRO_PARAMS slope_type =3 gamma =1.6667 riemann ='hllc' courant_factor =0.8 smallr =1e-11 &DICE_PARAMS ic_u_name ='U ' ! Name of the internal energy datablock (Gadget2 format only) amr_struct =.false. ! Reproduce the AMR structure of the Gadget2 file resulting from a ramses to gadget conversion ic_metal_name ='Z ' ! Name of the metallicity datablock (Gadget2 format only) gadget_scale_l =3.085677581282D21 ! Gadget file length unit ic_mag_center_y =0.0 ! y-coordinate of the magnetic field symmetry center ic_vel_name ='VEL ' ! Name of the velocity vector datablock (Gadget2 format only) ic_mag_axis_x =0.0 ! Magnetic field normal vector x-component ic_scale_vel =1.0 ! Scaling factor for the velocity vector ic_head_name ='HEAD' ! Name of the Header datablock (Gadget2 format only) ic_skip_type = -1 ! Skip specific particle type ic_mag_center_z =0.0 ! z-coordinate of the magnetic field symmetry center ic_scale_metal =1.0 ! Scaling factor for the metallicity ic_format ='Gadget2' ! Format of the initial conditions. 'Gadget1' or 'Gadget2' ic_scale_u =1.0 ! Scaling factor for the internal energy ic_center =0.0,0.0,0.0 ! Shift center parameter. ICs are automatically shifted with boxlen/2 ic_mass_name ='MASS' ! Name of the mass datablock (Gadget2 format only) ic_age_name ='AGE ' ! Name of the particle age datablock (Gadget2 format only) gadget_scale_v =1.0D5 ! Gadget file velocity unit ic_mag_axis_z =1.0 ! Magnetic field normal vector z-component ic_nfile =1 ! If greater than one, look for files with name matching ic_file//'.n' IG_rho =1.0D-6 ! Intergalactic gas density ic_mag_scale_B =0.0 ! Foreground toroidal magnetic field value ic_mag_const =0.0,0.0,0.0 ! Background magnetic field value for x,y,z component IG_T2 =1.0D6 ! Intergalactic gas temperature ic_mag_axis_y =0.0 ! Magnetic field normal vector y-component gadget_scale_t =3.15360e+13 ! Gadget file time unit ic_id_name ='ID ' ! Name of the particle identifier datablock (Gadget2 format only) cosmo_add_gas_index = -1 ! Gas particle type index for cosmo runs ic_scale_age =1.0 ! Scaling factor for the particles age ic_file ='mera_spiral.g2' ! Name of the initial conditions file ic_mag_scale_R =1.0 ! Toroidal magnetic field scalelength IG_metal =1.0D-4 ! Intergalactic gas metallicity ic_scale_pos =1.0 ! Scaling factor for the position vector ic_mag_scale_H =1.0 ! Toroidal magnetic field scaleheight ic_scale_mass =1.0 ! Scaling factor for the mass ic_pos_name ='POS ' ! Name of the position vector datablock (Gadget2 format only) gadget_scale_m =1.9891D43 ! Gadget file mass unit ic_ifout =1 ! Change ramses output index for restarts ic_mag_center_x =0.0 ! x-coordinate of the magnetic field symmetry center &INIT_PARAMS initfile(1) ='./' !initfile(1) ='./' filetype ='dice' &REFINE_PARAMS interpol_var =1 !primitive interpol_type =2 !0 m_refine =20,20,20,20,20,20,20,20,20,20 mass_sph = 1.000276597482903e-6 ! 1e3 Msol !interpol_var =0 !conservatives &BOUNDARY_PARAMS jbound_min = 0, 0,-1,+1,-1,-1 ibound_max =-1,+1,+1,+1,+1,+1 jbound_max = 0, 0,-1,+1,+1,+1 kbound_max = 0, 0, 0, 0,-1,+1 ibound_min =-1,+1,-1,-1,-1,-1 bound_type = 2, 2, 2, 2, 2, 2 !2 kbound_min = 0, 0, 0, 0,-1,+1 no_inflow =.true. nboundary = 6 &AMR_PARAMS npartmax = 500000 levelmin =3 nexpand =1 boxlen =100. !kpc levelmax =7 ngridmax = 100000 &FEEDBACK_PARAMS f_ek =0. !t_diss = 1. !Myr eta_sn =0.2 t_sne =10. !10. !Myr !delayed_cooling =.true. &OUTPUT_PARAMS tend =10 !Final time of the simulation delta_tout =0.1 !Time increment between outputs &POISSON_PARAMS gravity_type =-3 &SF_PARAMS T2_star = 1e4 n_star = 1 m_star = 1. ! in units mass_sph eps_star = 0.02 !2% &COOLING_PARAMS metal =.true. cooling =.true. z_ave =1. &RUN_PARAMS pic =.true. poisson =.true. nremap =5 !10 ncontrol =1 !frequency of screen output verbose =.false. nrestart =0 hydro =.true. nsubcycle =20*2 [Mera]: Grid overview ============================ ngridmax = 100000 nstep_coarse = 1 nx = 3 ny = 3 nz = 3 nlevelmax = 7 nboundary = 6 ngrid_current = 17157 bound_key ==> length(5) cpu_read ==> length(5) [Mera]: Particle overview =============================== eta_sn = 0.0 age_sn = 0.6708241192497574 f_w = 0.0 Npart = 0 Ndm = 39970 Nstars = 7528 Nsinks = 0 Ncloud = 0 Ndebris = 0 Nother = 0 Nundefined = 0 other_tracer1 = 0 debris_tracer = 0 cloud_tracer = 0 star_tracer = 0 other_tracer2 = 0 gas_tracer = 0 [Mera]: Compilation file overview ======================================== compile_date = patch_dir = remote_repo = local_branch = last_commit = [Mera]: Makefile content ================================= ############################################################################# # If you have problems with this makefile, contact Romain.Teyssier@gmail.com ############################################################################# # Compilation time parameters NVECTOR = 64 #32 NDIM = 3 NPRE = 8 NVAR = 6 NENER = 0 SOLVER = hydro PATCH = /data1/mabe/MeraTest/Ramses/patch_2019_10version/ GRACKLE = 0 EXEC = ramses_mera_spiral # Set to one to use 'include "mpif.h"' instead of more recent "use mpi" OLD_MPI_SUPPORT = 0 ############################################################################# #GITBRANCH = $(shell git rev-parse --abbrev-ref HEAD) #GITHASH = $(shell git log --pretty=format:'%H' -n 1) #GITREMOTE = $(shell git config --get branch.$(GITBRANCH).remote) #GITREPO = $(shell git config --get remote.$(GITREMOTE).url) #BUILDDATE = $(shell date +"%D-%T") DEFINES = -DNVECTOR=$(NVECTOR) -DNDIM=$(NDIM) -DNPRE=$(NPRE) -DNENER=$(NENER) -DNVAR=$(NVAR) \ -DSOLVER$(SOLVER) ifeq ($(GRACKLE),1) DEFINES += -Dgrackle endif ifeq ($(OLD_MPI_SUPPORT),1) DEFINES += -DMPI_OLD endif ############################################################################# # Fortran compiler options and directives # --- No MPI, gfortran ------------------------------- ###F90 = gfortran -O3 -frecord-marker=4 -fbacktrace -ffree-line-length-none -g -fimplicit-none ###FFLAGS = -x f95-cpp-input $(DEFINES) -DWITHOUTMPI # --- No MPI, tau ---------------------------------- #F90 = tau_f90.sh -optKeepFiles -optPreProcess -optCPPOpts=$(DEFINES) -DWITHOUTMPI # --- No MPI, pgf90 ---------------------------------- #F90 = pgf90 #FFLAGS = -Mpreprocess $(DEFINES) -DWITHOUTMPI # --- No MPI, xlf ------------------------------------ #F90 = xlf #FFLAGS = -WF,-DNDIM=$(NDIM),-DNPRE=$(NPRE),-DNVAR=$(NVAR),-DSOLVER$(SOLVER),-DWITHOUTMPI -qfree=f90 -qsuffix=f=f90 -qsuffix=cpp=f90 # --- No MPI, f90 ------------------------------------ #F90 = f90 #FFLAGS = -cpp $(DEFINES) -DWITHOUTMPI # --- No MPI, ifort ---------------------------------- #F90 = ifort #FFLAGS = -cpp $(DEFINES) -DWITHOUTMPI # --- MPI, gfortran syntax ------------------------------ F90 = mpif90 -frecord-marker=4 -O3 -ffree-line-length-none -g -fbacktrace FFLAGS = -x f95-cpp-input $(DEFINES) # --- MPI, gfortran DEBUG syntax ------------------------------ #F90 = mpif90 -frecord-marker=4 -ffree-line-length-none -fbacktrace -g -O -fbounds-check -Wuninitialized -Wall #FFLAGS = -x f95-cpp-input -ffpe-trap=zero,underflow,overflow,invalid -finit-real=nan $(DEFINES) # --- MPI, pgf90 syntax ------------------------------ #F90 = mpif90 -O3 #FFLAGS = -Mpreprocess $(DEFINES) # --- MPI, ifort syntax ------------------------------ #F90 = mpiifort #f90 #FFLAGS = -cpp -Ofast -free $(DEFINES) -DNOSYSTEM # -Ofast -free # --- MPI, ifort syntax, additional checks ----------- #F90 = mpif90 #FFLAGS = -warn all -O0 -g -traceback -fpe0 -ftrapuv -check bounds -cpp $(DEFINES) -DNOSYSTEM # --- MPI, cray syntax, high optimisation ----------- # --- NOTE: 03 is slower, hfp3 is too aggresive #F90 = ftn #FFLAGS = -eZ $(DEFINES) -DCRAY -O2 -hfp2 -g # --- MPI, ifort syntax ------------------------------ #F90 = ftn #FFLAGS = -xAVX -g -traceback -fpp -fast $(DEFINES) -DNOSYSTEM #-DRT # --- MPI, ifort syntax, additional checks ----------- #F90 = ftn #FFLAGS = -O3 -g -traceback -fpe0 -ftrapuv -cpp $(DEFINES) -DNOSYSTEM #-DRT ############################################################################# MOD = mod ############################################################################# # MPI librairies LIBMPI = #LIBMPI = -lfmpi -lmpi -lelan # --- CUDA libraries, for Titane --- LIBCUDA = -L/opt/cuda/lib -lm -lcuda -lcudart ifeq ($(GRACKLE),1) # Add include and library install path for grackle and hdf5 here LIBS_GRACKLE = -L$(HOME)/local/lib -lgrackle -lhdf5 -lz -lgfortran -ldl LIBS_OBJ = -I$(HOME)/local/include -DCONFIG_BFLOAT_8 -DH5_USE_16_API -fPIC endif LIBS = $(LIBMPI) $(LIBS_GRACKLE) ############################################################################# # Sources directories are searched in this exact order VPATH = $(shell [ -z $(PATCH) ] || find $(PATCH) -type d):../$(SOLVER):../aton:../hydro:../pm:../poisson:../amr:../io:../tools ############################################################################# # All objects MODOBJ = mpi_mod.o amr_parameters.o amr_commons.o random.o pm_parameters.o pm_commons.o poisson_parameters.o dump_utils.o constants.o ifeq ($(GRACKLE),1) MODOBJ += grackle_parameters.o endif MODOBJ += poisson_commons.o hydro_parameters.o hydro_commons.o cooling_module.o bisection.o sparse_mat.o \ clfind_commons.o gadgetreadfile.o write_makefile.o write_patch.o #write_makefile.o write_patch.o write_gitinfo.o AMROBJ = read_params.o init_amr.o init_time.o init_refine.o adaptive_loop.o amr_step.o update_time.o \ output_amr.o flag_utils.o physical_boundaries.o virtual_boundaries.o refine_utils.o nbors_utils.o \ hilbert.o load_balance.o title.o sort.o cooling_fine.o units.o light_cone.o memory.o \ end.o movie.o # Particle-Mesh objects PMOBJ = init_part.o output_part.o rho_fine.o synchro_fine.o move_fine.o newdt_fine.o particle_tree.o \ add_list.o remove_list.o star_formation.o sink_particle.o feedback.o clump_finder.o clump_merger.o \ flag_formation_sites.o init_sink.o output_sink.o # Poisson solver objects POISSONOBJ = init_poisson.o phi_fine_cg.o interpol_phi.o force_fine.o multigrid_coarse.o multigrid_fine_commons.o \ multigrid_fine_fine.o multigrid_fine_coarse.o gravana.o boundary_potential.o rho_ana.o output_poisson.o # Hydro objects HYDROOBJ = init_hydro.o init_flow_fine.o write_screen.o output_hydro.o courant_fine.o godunov_fine.o \ uplmde.o umuscl.o interpol_hydro.o godunov_utils.o condinit.o hydro_flag.o hydro_boundary.o \ boundana.o read_hydro_params.o synchro_hydro_fine.o EXTTOOLS = specfun.o gammafunc.o # Patch objects sinclude $(PATCH)/Makefile # All objects AMRLIB = $(EXTTOOLS) $(AMROBJ) $(HYDROOBJ) $(PMOBJ) $(POISSONOBJ) # ATON objects ATON_MODOBJ = timing.o radiation_commons.o rad_step.o ATON_OBJ = observe.o init_radiation.o rad_init.o rad_boundary.o rad_stars.o rad_backup.o ../aton/atonlib/libaton.a ############################################################################# ramses: $(MODOBJ) $(AMRLIB) ramses.o $(F90) $(MODOBJ) $(AMRLIB) ramses.o -o $(EXEC)$(NDIM)d $(LIBS) rm write_makefile.f90 rm write_patch.f90 ramses_aton: $(MODOBJ) $(ATON_MODOBJ) $(AMRLIB) $(ATON_OBJ) ramses.o $(F90) $(MODOBJ) $(ATON_MODOBJ) $(AMRLIB) $(ATON_OBJ) ramses.o -o $(EXEC)$(NDIM)d $(LIBS) $(LIBCUDA) rm write_makefile.f90 rm write_patch.f90 ############################################################################# #write_gitinfo.o: FORCE # $(F90) $(FFLAGS) -DPATCH=\'$(PATCH)\' -DGITBRANCH=\'$(GITBRANCH)\' -DGITHASH=\'"$(GITHASH)"\' \ -DGITREPO=\'$(GITREPO)\' -DBUILDDATE=\'"$(BUILDDATE)"\' -c ../amr/write_gitinfo.f90 -o $@ write_makefile.o: FORCE ../utils/scripts/cr_write_makefile.sh $(MAKEFILE_LIST) $(F90) $(FFLAGS) -c write_makefile.f90 -o $@ write_patch.o: FORCE ../utils/scripts/cr_write_patch.sh $(PATCH) $(F90) $(FFLAGS) -c write_patch.f90 -o $@ %.o:%.F $(F90) $(FFLAGS) -c $^ -o $@ $(LIBS_OBJ) %.o:%.f90 $(F90) $(FFLAGS) -c $^ -o $@ $(LIBS_OBJ) FORCE: ############################################################################# clean: rm -f *.o *.$(MOD) *.i ############################################################################# [Mera]: Timer-file content ================================= -------------------------------------------------------------------- minimum average maximum standard dev std/av % rmn rmx TIMER 0.117 0.118 0.120 0.001 0.010 0.6 4 1 refine 0.122 0.123 0.123 0.000 0.001 0.7 1 4 load balance 0.029 0.110 0.235 0.078 0.704 0.6 1 4 particles 0.039 0.039 0.039 0.000 0.001 0.2 4 1 io 0.360 0.407 0.452 0.034 0.083 2.2 4 1 feedback 3.859 3.899 3.923 0.025 0.006 20.8 4 1 poisson 0.408 0.452 0.479 0.027 0.059 2.4 4 1 rho 0.094 0.097 0.099 0.002 0.017 0.5 4 2 courant 0.018 0.022 0.028 0.004 0.175 0.1 3 4 hydro - set unew 6.766 7.357 7.768 0.402 0.055 39.3 1 2 hydro - godunov 5.130 5.546 6.137 0.402 0.073 29.6 2 1 hydro - rev ghostzones 0.024 0.026 0.028 0.002 0.078 0.1 3 2 hydro - set uold 0.012 0.019 0.028 0.006 0.321 0.1 1 2 hydro upload fine 0.336 0.343 0.355 0.007 0.021 1.8 1 2 cooling 0.024 0.025 0.026 0.001 0.036 0.1 2 4 hydro - ghostzones 0.120 0.123 0.125 0.002 0.014 0.7 4 1 flag 18.706 100.0 TOTAL [Mera]: List of files-content ================================= (:makefile, :timerfile, :patchfile) -------------------------------------- [ Info: hydro data inspection: -------------------------------------- [Mera]: 2025-07-04T17:16:53.670 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:16:53.675 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... ┌ Warning: `Progress(n::Integer, dt::Real, desc::AbstractString = "Progress: ", barlen = nothing, color::Symbol = :green, output::IO = stderr; offset::Integer = 0)` is deprecated, use `Progress(n; dt = dt, desc = desc, barlen = barlen, color = color, output = output, offset = offset)` instead. │ caller = ip:0x0 └ @ Core :-1 Memory used for data table :33.19815254211426 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:17:26.204 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:17:26.209 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :33.19815254211426 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:17:28.024 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:17:28.029 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1,) = (:rho,) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :16.5991792678833 MB ------------------------------------------------------- Ncol_flag1 = true [Mera]: Get hydro data: 2025-07-04T17:17:30.059 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2) = (:rho, :vx) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :19.918973922729492 MB ------------------------------------------------------- Ncol_flag2 = true [Mera]: Get hydro data: 2025-07-04T17:17:32.715 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5) = (:rho, :vx, :vy, :vz, :p) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :29.878357887268066 MB ------------------------------------------------------- Ncol_flag3 = true [Mera]: 2025-07-04T17:17:35.088 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:17:35.092 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(-1, 1) = (:cpu, :rho) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :19.918973922729492 MB ------------------------------------------------------- flag1: CPU numbers loaded = true [Mera]: Get hydro data: 2025-07-04T17:17:37.540 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(-1, 1, 2, 3, 4, 5, 6) = (:cpu, :rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :36.51794719696045 MB ------------------------------------------------------- flag2: CPU numbers loaded = true [Mera]: 2025-07-04T17:17:40.197 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:17:40.202 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :33.19815254211426 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:17:42.076 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:17:42.081 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :36.9853515625 KB ------------------------------------------------------- [Mera]: 2025-07-04T17:17:44.335 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:17:44.339 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :33.19815254211426 MB ------------------------------------------------------- min-rho: 2.9886133478553677e-8 [Mera]: 2025-07-04T17:17:46.059 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:17:46.064 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :33.19815254211426 MB ------------------------------------------------------- min-p: 1.0e-7 [Mera]: 2025-07-04T17:17:48.319 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:17:48.323 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :33.19815254211426 MB ------------------------------------------------------- data ==> JuliaDB table: (:level, :cx, :cy, :cz, :rho, :vx, :vy, :vz, :p, :var6) info ==> subfields: (:output, :path, :fnames, :simcode, :mtime, :ctime, :ncpu, :ndim, :levelmin, :levelmax, :boxlen, :time, :aexp, :H0, :omega_m, :omega_l, :omega_k, :omega_b, :unit_l, :unit_d, :unit_m, :unit_v, :unit_t, :gamma, :hydro, :nvarh, :nvarp, :nvarrt, :variable_list, :gravity_variable_list, :particles_variable_list, :rt_variable_list, :clumps_variable_list, :sinks_variable_list, :descriptor, :amr, :gravity, :particles, :rt, :clumps, :sinks, :namelist, :namelist_content, :headerfile, :makefile, :files_content, :timerfile, :compilationfile, :patchfile, :Narraysize, :scale, :grid_info, :part_info, :compilation, :constants) lmin = 3 lmax = 7 boxlen = 100.0 ranges = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0] selected_hydrovars = [1, 2, 3, 4, 5, 6] smallr = 0.0 smallc = 0.0 scale ==> subfields: (:Mpc, :kpc, :pc, :mpc, :ly, :Au, :km, :m, :cm, :mm, :μm, :Mpc3, :kpc3, :pc3, :mpc3, :ly3, :Au3, :km3, :m3, :cm3, :mm3, :μm3, :Msol_pc3, :Msun_pc3, :g_cm3, :Msol_pc2, :Msun_pc2, :g_cm2, :Gyr, :Myr, :yr, :s, :ms, :Msol, :Msun, :Mearth, :Mjupiter, :g, :km_s, :m_s, :cm_s, :nH, :erg, :g_cms2, :T_mu, :K_mu, :T, :K, :Ba, :g_cm_s2, :p_kB, :K_cm3) [Mera]: 2025-07-04T17:17:52.995 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:17:52.999 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :33.19815254211426 MB ------------------------------------------------------- Counting... [Mera]: 2025-07-04T17:17:56.803 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:17:56.806 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :33.19815254211426 MB ------------------------------------------------------- Calculating... 40%|████████████████████▍ | ETA: 0:00:02 hydro data inspection: Error During Test at /home/pkgeval/.julia/packages/Mera/y3DCP/test/general.jl:260 Test threw exception Expression: hydro_dataoverview(output, path) FieldError: type Core.TypeName has no field `mt`, available fields: `name`, `module`, `singletonname`, `names`, `atomicfields`, `constfields`, `wrapper`, `Typeofwrapper`, `cache`, `linearcache`, `partial`, `hash`, `max_args`, `n_uninitialized`, `flags`, `cache_entry_count`, `max_methods`, `constprop_heuristic` Stacktrace: [1] getproperty(x::Core.TypeName, f::Symbol) @ Base ./Base_compiler.jl:57 [2] nicename(f::Function) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:576 [3] (::IndexedTables.var"#init_funcs##0#init_funcs##1")(g::Function) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:598 [4] map @ ./tuple.jl:360 [inlined] [5] init_funcs(f::Tuple{typeof(min), typeof(max)}, isvec::Bool) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:587 [6] init_inputs(f::Tuple{typeof(min), typeof(max)}, input::Vector{Float64}, isvec::Bool) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:615 [7] _reduce_select(f::Tuple{typeof(min), typeof(max)}, t::IndexedTable{StructArrays.StructVector{@NamedTuple{level::Int64, cx::Int64, cy::Int64, cz::Int64, rho::Float64, vx::Float64, vy::Float64, vz::Float64, p::Float64, var6::Float64}, @NamedTuple{level::Vector{Int64}, cx::Vector{Int64}, cy::Vector{Int64}, cz::Vector{Int64}, rho::Vector{Float64}, vx::Vector{Float64}, vy::Vector{Float64}, vz::Vector{Float64}, p::Vector{Float64}, var6::Vector{Float64}}, Int64}}, select::Symbol) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/reduce.jl:37 [8] reduce(f::Tuple{typeof(min), typeof(max)}, t::IndexedTable{StructArrays.StructVector{@NamedTuple{level::Int64, cx::Int64, cy::Int64, cz::Int64, rho::Float64, vx::Float64, vy::Float64, vz::Float64, p::Float64, var6::Float64}, @NamedTuple{level::Vector{Int64}, cx::Vector{Int64}, cy::Vector{Int64}, cz::Vector{Int64}, rho::Vector{Float64}, vx::Vector{Float64}, vy::Vector{Float64}, vz::Vector{Float64}, p::Vector{Float64}, var6::Vector{Float64}}, Int64}}; select::Symbol, kws::@Kwargs{}) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/reduce.jl:33 [9] macro expansion @ ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:508 [inlined] [10] macro expansion @ ~/.julia/packages/ProgressMeter/kniaW/src/ProgressMeter.jl:1021 [inlined] [11] dataoverview(dataobject::HydroDataType; verbose::Bool) @ Mera ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:487 [12] dataoverview @ ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:452 [inlined] [13] hydro_dataoverview(output::Int64, path::String) @ Main ~/.julia/packages/Mera/y3DCP/test/inspection/01_hydro_inspection.jl:127 [14] eval_test_function(func::Any, args::Any, kwargs::Any, quoted_func::Union{Expr, Symbol}, source::LineNumberNode, negate::Bool) @ Test /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:384 [15] top-level scope @ ~/.julia/packages/Mera/y3DCP/test/general.jl:246 [16] macro expansion @ /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:1855 [inlined] [17] macro expansion @ ~/.julia/packages/Mera/y3DCP/test/general.jl:260 [inlined] [18] macro expansion @ /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:738 [inlined] [Mera]: 2025-07-04T17:18:02.151 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:18:02.154 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :33.19815254211426 MB ------------------------------------------------------- -------------------------------------- [ Info: hydro selected ranges: -------------------------------------- [Mera]: 2025-07-04T17:18:04.443 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:18:04.447 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :2.5010547637939453 MB ------------------------------------------------------- [Mera]: Get hydro data: 2025-07-04T17:18:04.991 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Reading data... Memory used for data table :251.080078125 KB ------------------------------------------------------- code unit ranges: true -flag01 lmax: true -flag02 different data true -flag03 [Mera]: Get hydro data: 2025-07-04T17:18:06.756 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Reading data... Memory used for data table :251.080078125 KB ------------------------------------------------------- ranges relative to a given center gives same data: true -flag4 [Mera]: Get hydro data: 2025-07-04T17:18:07.245 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Reading data... Memory used for data table :251.080078125 KB ------------------------------------------------------- ranges given in physical units gives same data: true -flag5 [Mera]: Get hydro data: 2025-07-04T17:18:07.684 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Reading data... Memory used for data table :251.080078125 KB ------------------------------------------------------- :bc call in center argument gives same data: true -flag6 -------------------------------------- [ Info: particle data inspection: -------------------------------------- [Mera]: 2025-07-04T17:18:20.860 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:18:20.866 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :3.71567440032959 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:18:29.655 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:18:29.660 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :3.71567440032959 MB ------------------------------------------------------- loaded particles: 47497 information from getinfo: 47498 [Mera]: 2025-07-04T17:18:30.339 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:18:30.344 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :3.71567440032959 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:18:31.712 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:18:31.716 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(4,) = (:mass,) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :1.9033832550048828 MB ------------------------------------------------------- Ncol_flag1 = true [Mera]: Get particle data: 2025-07-04T17:18:33.480 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(4, 8) = (:mass, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :2.265841484069824 MB ------------------------------------------------------- Ncol_flag2 = true [Mera]: 2025-07-04T17:18:35.202 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:18:35.207 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(-1, 4) = (:cpu, :mass) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :2.2658567428588867 MB ------------------------------------------------------- flag1: CPU numbers loaded = true [Mera]: Get particle data: 2025-07-04T17:18:37.071 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(-1, 1, 2, 3, 4, 5, 6, 7, 8) = (:cpu, :vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :4.078147888183594 MB ------------------------------------------------------- flag2: CPU numbers loaded = true [Mera]: 2025-07-04T17:18:39.556 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:18:39.561 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :3.71567440032959 MB ------------------------------------------------------- data ==> JuliaDB table: (:level, :x, :y, :z, :id, :family, :tag, :vx, :vy, :vz, :mass, :birth, :metals) info ==> subfields: (:output, :path, :fnames, :simcode, :mtime, :ctime, :ncpu, :ndim, :levelmin, :levelmax, :boxlen, :time, :aexp, :H0, :omega_m, :omega_l, :omega_k, :omega_b, :unit_l, :unit_d, :unit_m, :unit_v, :unit_t, :gamma, :hydro, :nvarh, :nvarp, :nvarrt, :variable_list, :gravity_variable_list, :particles_variable_list, :rt_variable_list, :clumps_variable_list, :sinks_variable_list, :descriptor, :amr, :gravity, :particles, :rt, :clumps, :sinks, :namelist, :namelist_content, :headerfile, :makefile, :files_content, :timerfile, :compilationfile, :patchfile, :Narraysize, :scale, :grid_info, :part_info, :compilation, :constants) lmin = 3 lmax = 7 boxlen = 100.0 ranges = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0] selected_partvars = [:level, :x, :y, :z, :id, :family, :tag, :vx, :vy, :vz, :mass, :birth, :metals] scale ==> subfields: (:Mpc, :kpc, :pc, :mpc, :ly, :Au, :km, :m, :cm, :mm, :μm, :Mpc3, :kpc3, :pc3, :mpc3, :ly3, :Au3, :km3, :m3, :cm3, :mm3, :μm3, :Msol_pc3, :Msun_pc3, :g_cm3, :Msol_pc2, :Msun_pc2, :g_cm2, :Gyr, :Myr, :yr, :s, :ms, :Msol, :Msun, :Mearth, :Mjupiter, :g, :km_s, :m_s, :cm_s, :nH, :erg, :g_cms2, :T_mu, :K_mu, :T, :K, :Ba, :g_cm_s2, :p_kB, :K_cm3) [Mera]: 2025-07-04T17:18:42.175 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:18:42.180 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :3.71567440032959 MB ------------------------------------------------------- Counting... [Mera]: 2025-07-04T17:18:44.890 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:18:44.895 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :3.71567440032959 MB ------------------------------------------------------- Calculating... particle data inspection: Error During Test at /home/pkgeval/.julia/packages/Mera/y3DCP/test/general.jl:291 Test threw exception Expression: particles_dataoverview(output, path) FieldError: type Core.TypeName has no field `mt`, available fields: `name`, `module`, `singletonname`, `names`, `atomicfields`, `constfields`, `wrapper`, `Typeofwrapper`, `cache`, `linearcache`, `partial`, `hash`, `max_args`, `n_uninitialized`, `flags`, `cache_entry_count`, `max_methods`, `constprop_heuristic` Stacktrace: [1] getproperty(x::Core.TypeName, f::Symbol) @ Base ./Base_compiler.jl:57 [2] nicename(f::Function) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:576 [3] (::IndexedTables.var"#init_funcs##0#init_funcs##1")(g::Function) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:598 [4] map @ ./tuple.jl:360 [inlined] [5] init_funcs(f::Tuple{typeof(min), typeof(max)}, isvec::Bool) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:587 [6] init_inputs(f::Tuple{typeof(min), typeof(max)}, input::Vector{Float64}, isvec::Bool) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:615 [7] _reduce_select(f::Tuple{typeof(min), typeof(max)}, t::IndexedTable{StructArrays.StructVector{@NamedTuple{level::Int32, x::Float64, y::Float64, z::Float64, id::Int32, family::Int8, tag::Int8, vx::Float64, vy::Float64, vz::Float64, mass::Float64, birth::Float64, metals::Float64}, @NamedTuple{level::Vector{Int32}, x::Vector{Float64}, y::Vector{Float64}, z::Vector{Float64}, id::Vector{Int32}, family::Vector{Int8}, tag::Vector{Int8}, vx::Vector{Float64}, vy::Vector{Float64}, vz::Vector{Float64}, mass::Vector{Float64}, birth::Vector{Float64}, metals::Vector{Float64}}, Int64}}, select::Symbol) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/reduce.jl:37 [8] reduce(f::Tuple{typeof(min), typeof(max)}, t::IndexedTable{StructArrays.StructVector{@NamedTuple{level::Int32, x::Float64, y::Float64, z::Float64, id::Int32, family::Int8, tag::Int8, vx::Float64, vy::Float64, vz::Float64, mass::Float64, birth::Float64, metals::Float64}, @NamedTuple{level::Vector{Int32}, x::Vector{Float64}, y::Vector{Float64}, z::Vector{Float64}, id::Vector{Int32}, family::Vector{Int8}, tag::Vector{Int8}, vx::Vector{Float64}, vy::Vector{Float64}, vz::Vector{Float64}, mass::Vector{Float64}, birth::Vector{Float64}, metals::Vector{Float64}}, Int64}}; select::Symbol, kws::@Kwargs{}) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/reduce.jl:33 [9] dataoverview(dataobject::PartDataType; verbose::Bool) @ Mera ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:738 [10] dataoverview @ ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:698 [inlined] [11] particles_dataoverview(output::Int64, path::String) @ Main ~/.julia/packages/Mera/y3DCP/test/inspection/01_particle_inspection.jl:91 [12] eval_test_function(func::Any, args::Any, kwargs::Any, quoted_func::Union{Expr, Symbol}, source::LineNumberNode, negate::Bool) @ Test /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:384 [13] top-level scope @ ~/.julia/packages/Mera/y3DCP/test/general.jl:274 [14] macro expansion @ /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:1855 [inlined] [15] macro expansion @ ~/.julia/packages/Mera/y3DCP/test/general.jl:291 [inlined] [16] macro expansion @ /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:738 [inlined] [Mera]: 2025-07-04T17:18:48.699 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:18:48.703 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :3.71567440032959 MB ------------------------------------------------------- -------------------------------------- [ Info: particle selected ranges: -------------------------------------- [Mera]: 2025-07-04T17:18:52.579 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:18:52.582 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :3.71567440032959 MB ------------------------------------------------------- [Mera]: Get particle data: 2025-07-04T17:18:53.136 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Found 3.737900e+04 particles Memory used for data table :2.924433708190918 MB ------------------------------------------------------- code unit ranges: true -flag01 different data true -flag03 [Mera]: Get particle data: 2025-07-04T17:18:54.786 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Found 3.737900e+04 particles Memory used for data table :2.924433708190918 MB ------------------------------------------------------- ranges relative to a given center gives same data: true -flag4 [Mera]: Get particle data: 2025-07-04T17:18:55.376 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Found 3.737900e+04 particles Memory used for data table :2.924433708190918 MB ------------------------------------------------------- ranges given in physical units gives same data: true -flag5 [Mera]: Get particle data: 2025-07-04T17:18:55.881 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Found 3.737900e+04 particles Memory used for data table :2.924433708190918 MB ------------------------------------------------------- :bc call in center argument gives same data: true -flag6 -------------------------------------- [ Info: gravity data inspection: -------------------------------------- [Mera]: 2025-07-04T17:18:57.578 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:18:57.583 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :26.558563232421875 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:19:03.132 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:19:03.136 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :26.558563232421875 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:19:04.293 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:19:04.297 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1,) = (:epot,) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :16.5991792678833 MB ------------------------------------------------------- Ncol_flag1 = true [Mera]: Get gravity data: 2025-07-04T17:19:06.560 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2) = (:epot, :ax) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :19.918973922729492 MB ------------------------------------------------------- Ncol_flag2 = true [Mera]: 2025-07-04T17:19:08.410 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:19:08.414 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(-1, 1) = (:cpu, :epot) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :19.918973922729492 MB ------------------------------------------------------- Ncol_flag1 = true [Mera]: Get gravity data: 2025-07-04T17:19:10.249 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(-1, 1, 2, 3, 4) = (:cpu, :epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :29.878357887268066 MB ------------------------------------------------------- Ncol_flag2 = true [Mera]: 2025-07-04T17:19:12.312 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:19:12.317 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :26.558563232421875 MB ------------------------------------------------------- data ==> JuliaDB table: (:level, :cx, :cy, :cz, :epot, :ax, :ay, :az) info ==> subfields: (:output, :path, :fnames, :simcode, :mtime, :ctime, :ncpu, :ndim, :levelmin, :levelmax, :boxlen, :time, :aexp, :H0, :omega_m, :omega_l, :omega_k, :omega_b, :unit_l, :unit_d, :unit_m, :unit_v, :unit_t, :gamma, :hydro, :nvarh, :nvarp, :nvarrt, :variable_list, :gravity_variable_list, :particles_variable_list, :rt_variable_list, :clumps_variable_list, :sinks_variable_list, :descriptor, :amr, :gravity, :particles, :rt, :clumps, :sinks, :namelist, :namelist_content, :headerfile, :makefile, :files_content, :timerfile, :compilationfile, :patchfile, :Narraysize, :scale, :grid_info, :part_info, :compilation, :constants) lmin = 3 lmax = 7 boxlen = 100.0 ranges = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0] selected_gravvars = [1, 2, 3, 4] scale ==> subfields: (:Mpc, :kpc, :pc, :mpc, :ly, :Au, :km, :m, :cm, :mm, :μm, :Mpc3, :kpc3, :pc3, :mpc3, :ly3, :Au3, :km3, :m3, :cm3, :mm3, :μm3, :Msol_pc3, :Msun_pc3, :g_cm3, :Msol_pc2, :Msun_pc2, :g_cm2, :Gyr, :Myr, :yr, :s, :ms, :Msol, :Msun, :Mearth, :Mjupiter, :g, :km_s, :m_s, :cm_s, :nH, :erg, :g_cms2, :T_mu, :K_mu, :T, :K, :Ba, :g_cm_s2, :p_kB, :K_cm3) [Mera]: 2025-07-04T17:19:14.561 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:19:14.566 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :26.558563232421875 MB ------------------------------------------------------- Counting... [Mera]: 2025-07-04T17:19:16.788 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:19:16.792 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :26.558563232421875 MB ------------------------------------------------------- Calculating... 40%|████████████████████▍ | ETA: 0:00:02 gravity data inspection: Error During Test at /home/pkgeval/.julia/packages/Mera/y3DCP/test/general.jl:313 Test threw exception Expression: gravity_dataoverview(output, path) FieldError: type Core.TypeName has no field `mt`, available fields: `name`, `module`, `singletonname`, `names`, `atomicfields`, `constfields`, `wrapper`, `Typeofwrapper`, `cache`, `linearcache`, `partial`, `hash`, `max_args`, `n_uninitialized`, `flags`, `cache_entry_count`, `max_methods`, `constprop_heuristic` Stacktrace: [1] getproperty(x::Core.TypeName, f::Symbol) @ Base ./Base_compiler.jl:57 [2] nicename(f::Function) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:576 [3] (::IndexedTables.var"#init_funcs##0#init_funcs##1")(g::Function) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:598 [4] map @ ./tuple.jl:360 [inlined] [5] init_funcs(f::Tuple{typeof(min), typeof(max)}, isvec::Bool) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:587 [6] init_inputs(f::Tuple{typeof(min), typeof(max)}, input::Vector{Float64}, isvec::Bool) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:615 [7] _reduce_select(f::Tuple{typeof(min), typeof(max)}, t::IndexedTable{StructArrays.StructVector{@NamedTuple{level::Int64, cx::Int64, cy::Int64, cz::Int64, epot::Float64, ax::Float64, ay::Float64, az::Float64}, @NamedTuple{level::Vector{Int64}, cx::Vector{Int64}, cy::Vector{Int64}, cz::Vector{Int64}, epot::Vector{Float64}, ax::Vector{Float64}, ay::Vector{Float64}, az::Vector{Float64}}, Int64}}, select::Symbol) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/reduce.jl:37 [8] reduce(f::Tuple{typeof(min), typeof(max)}, t::IndexedTable{StructArrays.StructVector{@NamedTuple{level::Int64, cx::Int64, cy::Int64, cz::Int64, epot::Float64, ax::Float64, ay::Float64, az::Float64}, @NamedTuple{level::Vector{Int64}, cx::Vector{Int64}, cy::Vector{Int64}, cz::Vector{Int64}, epot::Vector{Float64}, ax::Vector{Float64}, ay::Vector{Float64}, az::Vector{Float64}}, Int64}}; select::Symbol, kws::@Kwargs{}) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/reduce.jl:33 [9] macro expansion @ ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:616 [inlined] [10] macro expansion @ ~/.julia/packages/ProgressMeter/kniaW/src/ProgressMeter.jl:1021 [inlined] [11] dataoverview(dataobject::GravDataType; verbose::Bool) @ Mera ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:595 [12] dataoverview @ ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:560 [inlined] [13] gravity_dataoverview(output::Int64, path::String) @ Main ~/.julia/packages/Mera/y3DCP/test/inspection/01_gravity_inspection.jl:85 [14] eval_test_function(func::Any, args::Any, kwargs::Any, quoted_func::Union{Expr, Symbol}, source::LineNumberNode, negate::Bool) @ Test /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:384 [15] top-level scope @ ~/.julia/packages/Mera/y3DCP/test/general.jl:305 [16] macro expansion @ /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:1855 [inlined] [17] macro expansion @ ~/.julia/packages/Mera/y3DCP/test/general.jl:313 [inlined] [18] macro expansion @ /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:738 [inlined] [Mera]: 2025-07-04T17:19:21.243 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:19:21.247 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :26.558563232421875 MB ------------------------------------------------------- -------------------------------------- [ Info: gravity selected ranges: -------------------------------------- [Mera]: 2025-07-04T17:19:23.763 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:19:23.768 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :2.000885009765625 MB ------------------------------------------------------- [Mera]: Get gravity data: 2025-07-04T17:19:24.403 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Reading data... Memory used for data table :200.90625 KB ------------------------------------------------------- code unit ranges: true -flag01 lmax: true -flag02 different data true -flag03 [Mera]: Get gravity data: 2025-07-04T17:19:25.566 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Reading data... Memory used for data table :200.90625 KB ------------------------------------------------------- ranges relative to a given center gives same data: true -flag4 [Mera]: Get gravity data: 2025-07-04T17:19:26.202 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Reading data... Memory used for data table :200.90625 KB ------------------------------------------------------- ranges given in physical units gives same data: true -flag5 [Mera]: Get gravity data: 2025-07-04T17:19:26.838 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Reading data... Memory used for data table :200.90625 KB ------------------------------------------------------- :bc call in center argument gives same data: true -flag6 -------------------------------------- [ Info: getvar hydro: -------------------------------------- Predefined vars that can be calculated for each cell/particle: ---------------------------------------------------------------- =============================[gas]:============================= -all the non derived hydro vars- :cpu, :level, :rho, :cx, :cy, :cz, :vx, :vy, :vz, :p, var6,... -derived hydro vars- :x, :y, :z :mass, :cellsize, :volume, :freefall_time :cs, :mach, :machx, :machy, :machz, :jeanslength, :jeansnumber :T, :Temp, :Temperature with p/rho :h, :hx, :hy, :hz (specific angular momentum) ==========================[particles]:========================== -all the non derived particle vars- :cpu, :level, :id, :family, :tag :x, :y, :z, :vx, :vy, :vz, :mass, :birth, :metal.... -derived particle vars- :age ===========================[gravity]:=========================== -all the non derived gravity vars- :cpu, :level, cx, cy, cz, :epot, :ax, :ay, :az -derived gravity vars- :x, :y, :z :cellsize, :volume ===========================[clumps]:=========================== :peak_x or :x, :peak_y or :y, :peak_z or :z :v, :ekin,... =====================[gas or particles]:======================= :v, :ekin related to a given center: --------------------------- :r_cylinder, :r_sphere (radial components) :ϕ :vr_cylinder :vϕ_cylinder ---------------------------------------------------------------- -------------------------------------- [ Info: getvar particles: -------------------------------------- -------------------------------------- [ Info: projection hydro: -------------------------------------- Predefined vars for projections: ------------------------------------------------ =====================[gas]:===================== -all the non derived hydro vars- :cpu, :level, :rho, :cx, :cy, :cz, :vx, :vy, :vz, :p, var6,... further possibilities: :rho, :density, :ρ -derived hydro vars- :x, :y, :z :sd or :Σ or :surfacedensity :mass, :cellsize, :freefall_time :cs, :mach, :machx, :machy, :machz, :jeanslength, :jeansnumber :t, :Temp, :Temperature with p/rho ==================[particles]:================== all the non derived vars: :cpu, :level, :id, :family, :tag :x, :y, :z, :vx, :vy, :vz, :mass, :birth, :metal.... -derived particle vars- :age ==============[gas or particles]:=============== :v, :ekin squared => :vx2, :vy2, :vz2 velocity dispersion => σx, σy, σz, σ related to a given center: --------------------------- :vr_cylinder, vr_sphere (radial components) :vϕ_cylinder, :vθ squared => :vr_cylinder2, :vϕ_cylinder2 velocity dispersion => σr_cylinder, σϕ_cylinder 2d maps (not projected) => :r_cylinder, :ϕ ------------------------------------------------ [Mera]: 2025-07-04T17:20:38.781 center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Selected var(s)=(:mass, :sd) Weighting = :mass Effective resolution: 2048^2 Map size: 2048 x 2048 Pixel size: 48.828 [pc] Simulation min.: 781.25 [pc] [Mera]: 2025-07-04T17:20:44.594 center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Selected var(s)=(:mass, :sd) Weighting = :mass Effective resolution: 2048^2 Map size: 2048 x 2048 Pixel size: 48.828 [pc] Simulation min.: 781.25 [pc] -------------------------------------- [ Info: projection particle/stars: -------------------------------------- [Mera]: 2025-07-04T17:21:09.125 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Effective resolution: 128^2 Pixel size: 781.25 [pc] Simulation min.: 781.25 [pc] :mask provided by function [Mera]: 2025-07-04T17:21:16.429 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Effective resolution: 128^2 Pixel size: 781.25 [pc] Simulation min.: 781.25 [pc] :mask provided by function [Mera]: 2025-07-04T17:21:28.211 center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Effective resolution: 32^2 Pixel size: 3.125 [kpc] Simulation min.: 781.25 [pc] :mask provided by function [Mera]: 2025-07-04T17:21:33.415 center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Effective resolution: 2048^2 Pixel size: 48.828 [pc] Simulation min.: 781.25 [pc] :mask provided by function [Mera]: 2025-07-04T17:21:34.220 center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Effective resolution: 2048^2 Pixel size: 48.828 [pc] Simulation min.: 781.25 [pc] :mask provided by function -------------------------------------- [ Info: Write/Read MERA files: -------------------------------------- [Mera]: 2025-07-04T17:22:07.521 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:22:07.525 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :33.19815254211426 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:22:08.576 Create file: output_00002.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: hydro - Data variables: (:level, :cx, :cy, :cz, :rho, :vx, :vy, :vz, :p, :var6) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x00, 0x30, 0x40, 0x60, 0xd4, 0x72, 0x00, 0x00, 0xc0, 0x31, 0x40, 0x60, 0xd4, 0x72, 0x00, 0x00, 0x10, 0xf8, 0x19], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ----------------------------------- Memory size: 33.605 MB (uncompressed) Total file size: 18.985 MB ----------------------------------- [Mera]: 2025-07-04T17:22:36.351 Mera-file output_00002.jld2 contains: Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x00, 0x30, 0x40, 0x60, 0xd4, 0x72, 0x00, 0x00, 0xc0, 0x31, 0x40, 0x60, 0xd4, 0x72, 0x00, 0x00, 0x10, 0xf8, 0x19], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 33.60507392883301 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 18.985 MB ----------------------------------- flag1: hydro in jld2 file? true [Mera]: 2025-07-04T17:23:17.125 Create file: output_00002.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: hydro - Data variables: (:level, :cx, :cy, :cz, :rho, :vx, :vy, :vz, :p, :var6) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x20, 0xe6, 0xdc, 0x14, 0xd4, 0x72, 0x00, 0x00, 0x70, 0xbe, 0x73, 0x69, 0xd4, 0x72, 0x00, 0x00, 0xe0, 0xe3, 0xdc], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ----------------------------------- Memory size: 33.605 MB (uncompressed) Total file size: 18.985 MB ----------------------------------- [Mera]: 2025-07-04T17:23:17.750 Create file: output_00002.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: hydro - Data variables: (:level, :cx, :cy, :cz, :rho, :vx, :vy, :vz, :p, :var6) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x68, 0x37, 0x49, 0x60, 0xd4, 0x72, 0x00, 0x00, 0x80, 0x01, 0x48, 0x60, 0xd4, 0x72, 0x00, 0x00, 0xd8, 0xe9, 0x4b], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ----------------------------------- Memory size: 33.605 MB (uncompressed) Total file size: 18.985 MB ----------------------------------- [Mera]: 2025-07-04T17:23:18.140 Mera-file output_00002.jld2 contains: Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x68, 0x37, 0x49, 0x60, 0xd4, 0x72, 0x00, 0x00, 0x80, 0x01, 0x48, 0x60, 0xd4, 0x72, 0x00, 0x00, 0xd8, 0xe9, 0x4b], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 33.60507392883301 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 18.985 MB ----------------------------------- flag2: hydro in jld2 file? true [Mera]: Get particle data: 2025-07-04T17:23:18.153 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :3.71567440032959 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:19.167 Create file: output_00002.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: particles - Data variables: (:level, :x, :y, :z, :id, :family, :tag, :vx, :vy, :vz, :mass, :birth, :metals) ----------------------------------- I/O mode: append - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ----------------------------------- Memory size: 4.123 MB (uncompressed) Total file size: 22.694 MB ----------------------------------- [Mera]: Get gravity data: 2025-07-04T17:23:21.718 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :26.558563232421875 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:22.380 Create file: output_00002.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: gravity - Data variables: (:level, :cx, :cy, :cz, :epot, :ax, :ay, :az) ----------------------------------- I/O mode: append - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ----------------------------------- Memory size: 26.965 MB (uncompressed) Total file size: 37.282 MB ----------------------------------- [Mera]: 2025-07-04T17:23:24.171 Mera-file output_00002.jld2 contains: Datatype: particles merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 4.122832298278809 MB (uncompressed) Datatype: gravity merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 26.965469360351562 MB (uncompressed) Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x68, 0x37, 0x49, 0x60, 0xd4, 0x72, 0x00, 0x00, 0x80, 0x01, 0x48, 0x60, 0xd4, 0x72, 0x00, 0x00, 0xd8, 0xe9, 0x4b], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 33.60507392883301 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 37.282 MB ----------------------------------- flag3: hydro in jld2 file? true flag4: gravity in jld2 file? true flag5: particles in jld2 file? true [Mera]: 2025-07-04T17:23:24.991 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:23:24.994 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :33.19815254211426 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:25.699 Open Mera-file output_00002.jld2: [Mera]: 2025-07-04T17:23:25.699 Use datatype: hydro Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:23:29.325 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :33.60195350646973 MB ------------------------------------------------------- flag1: data load hydro: true [Mera]: Get particle data: 2025-07-04T17:23:29.380 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :3.71567440032959 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:29.839 Open Mera-file output_00002.jld2: [Mera]: 2025-07-04T17:23:29.839 Use datatype: particles Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:23:30.677 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :4.119513511657715 MB ------------------------------------------------------- flag2: data load particles: true [Mera]: Get gravity data: 2025-07-04T17:23:30.721 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :26.558563232421875 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:31.389 Open Mera-file output_00002.jld2: [Mera]: 2025-07-04T17:23:31.389 Use datatype: gravity Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:23:32.919 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :26.96233367919922 MB ------------------------------------------------------- flag3: data load gravity: true [Mera]: 2025-07-04T17:23:32.971 Open Mera-file output_00002.jld2: [Mera]: 2025-07-04T17:23:32.971 Use datatype: hydro Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:23:33.514 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :33.60195350646973 MB ------------------------------------------------------- flag4: data load hydro: true [Mera]: 2025-07-04T17:23:33.559 Open Mera-file output_00002.jld2: [Mera]: 2025-07-04T17:23:33.559 Use datatype: hydro Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:23:33.606 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :33.60195350646973 MB ------------------------------------------------------- flag5: data load hydro: true [Mera]: 2025-07-04T17:23:33.664 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:23:33.668 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :3.71567440032959 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:34.100 Create file: output_00002.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: particles - Data variables: (:level, :x, :y, :z, :id, :family, :tag, :vx, :vy, :vz, :mass, :birth, :metals) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x10, 0xc2, 0x67, 0x14, 0xd4, 0x72, 0x00, 0x00, 0x90, 0x74, 0x17, 0x68, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ----------------------------------- Memory size: 4.123 MB (uncompressed) Total file size: 3.727 MB ----------------------------------- [Mera]: 2025-07-04T17:23:34.224 Mera-file output_00002.jld2 contains: Datatype: particles merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x10, 0xc2, 0x67, 0x14, 0xd4, 0x72, 0x00, 0x00, 0x90, 0x74, 0x17, 0x68, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 4.122832298278809 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 3.727 MB ----------------------------------- [Mera]: Get gravity data: 2025-07-04T17:23:34.234 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :26.558563232421875 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:34.878 Create file: output_00002.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: gravity - Data variables: (:level, :cx, :cy, :cz, :epot, :ax, :ay, :az) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0xb0, 0x4d, 0x96, 0x15, 0xd4, 0x72, 0x00, 0x00, 0x90, 0x74, 0x17, 0x68, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ----------------------------------- Memory size: 26.965 MB (uncompressed) Total file size: 14.606 MB ----------------------------------- [Mera]: 2025-07-04T17:23:35.847 Mera-file output_00002.jld2 contains: Datatype: gravity merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0xb0, 0x4d, 0x96, 0x15, 0xd4, 0x72, 0x00, 0x00, 0x90, 0x74, 0x17, 0x68, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 26.965469360351562 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 14.606 MB ----------------------------------- flag1: particles in jld2 file? true flag1a: no hydro in jld2 file? true flag2: gravity in jld2 file? true flag2a: no hydro in jld2 file? true [Mera]: 2025-07-04T17:23:38.987 Requested datatypes: [:hydro] [Mera]: 2025-07-04T17:23:39.015 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] reading/writing lmax: 7 of 7 ----------------------------------- Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x80, 0x2c, 0x40, 0x60, 0xd4, 0x72, 0x00, 0x00, 0x40, 0x7b, 0x40, 0x60, 0xd4, 0x72, 0x00, 0x00, 0x90, 0xa8, 0xcf], false) ----------------------------------- - hydro [Mera]: Get hydro data: 2025-07-04T17:23:39.084 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :33.19815254211426 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:39.816 Create file: output_00002.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: hydro - Data variables: (:level, :cx, :cy, :cz, :rho, :vx, :vy, :vz, :p, :var6) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x50, 0x1b, 0x40, 0x60, 0xd4, 0x72, 0x00, 0x00, 0x40, 0xac, 0x40, 0x60, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ----------------------------------- Memory size: 33.605 MB (uncompressed) Total file size: 18.985 MB ----------------------------------- Total datasize: - total folder: 72.421 MB - selected: 45.109 MB - used: 33.605 MB - new on disc: 18.985 MB [Mera]: 2025-07-04T17:23:40.119 Mera-file output_00002.jld2 contains: Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x50, 0x1b, 0x40, 0x60, 0xd4, 0x72, 0x00, 0x00, 0x40, 0xac, 0x40, 0x60, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 33.60507392883301 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 18.985 MB ----------------------------------- [Mera]: 2025-07-04T17:23:41.066 Mera-file output_00002.jld2 contains: Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x50, 0x1b, 0x40, 0x60, 0xd4, 0x72, 0x00, 0x00, 0x40, 0xac, 0x40, 0x60, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 33.60507392883301 MB (uncompressed) ----------------------------------- convert stat: true ----------------------------------- Total file size: 19.005 MB ----------------------------------- flag1: hydro in jld2 file? true flag1a: particles not in jld2 file? true [Mera]: 2025-07-04T17:23:41.682 Requested datatypes: [:hydro] [Mera]: 2025-07-04T17:23:41.683 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] reading/writing lmax: 7 of 7 ----------------------------------- Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00], false) ----------------------------------- - hydro [Mera]: Get hydro data: 2025-07-04T17:23:41.689 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :33.19815254211426 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:42.412 Create file: output_00002.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: hydro - Data variables: (:level, :cx, :cy, :cz, :rho, :vx, :vy, :vz, :p, :var6) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x8a, 0xa2], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ----------------------------------- Memory size: 33.605 MB (uncompressed) Total file size: 18.985 MB ----------------------------------- Total datasize: - total folder: 72.421 MB - selected: 45.109 MB - used: 33.605 MB - new on disc: 18.985 MB [Mera]: 2025-07-04T17:23:43.311 Mera-file output_00002.jld2 contains: Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x8a, 0xa2], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 33.60507392883301 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 18.985 MB ----------------------------------- [Mera]: 2025-07-04T17:23:43.337 Mera-file output_00002.jld2 contains: Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x8a, 0xa2], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 33.60507392883301 MB (uncompressed) ----------------------------------- convert stat: true ----------------------------------- Total file size: 19.005 MB ----------------------------------- flag2: hydro in jld2 file? true flag2a: particles not in jld2 file? true [Mera]: 2025-07-04T17:23:43.352 Requested datatypes: [:hydro, :gravity, :particles, :clumps] [Mera]: 2025-07-04T17:23:43.352 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] reading/writing lmax: 7 of 7 ----------------------------------- Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0xb0, 0x82, 0x78, 0x14, 0xd4, 0x72, 0x00, 0x00, 0x90, 0x74, 0x17, 0x68, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) ----------------------------------- - hydro [Mera]: Get hydro data: 2025-07-04T17:23:43.358 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :33.19815254211426 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:44.010 Create file: output_00002.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: hydro - Data variables: (:level, :cx, :cy, :cz, :rho, :vx, :vy, :vz, :p, :var6) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x40, 0xee, 0x75, 0x69, 0xd4, 0x72, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ----------------------------------- Memory size: 33.605 MB (uncompressed) Total file size: 18.985 MB ----------------------------------- - gravity [Mera]: Get gravity data: 2025-07-04T17:23:44.608 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :26.558563232421875 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:45.254 Create file: output_00002.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: gravity - Data variables: (:level, :cx, :cy, :cz, :epot, :ax, :ay, :az) ----------------------------------- I/O mode: append - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x70, 0xfe, 0x18, 0x1c, 0xd4, 0x72, 0x00, 0x00, 0x90, 0x74, 0x17, 0x68, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ----------------------------------- Memory size: 26.965 MB (uncompressed) Total file size: 33.573 MB ----------------------------------- - particles [Mera]: Get particle data: 2025-07-04T17:23:45.641 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :3.71567440032959 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:46.151 Create file: output_00002.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: particles - Data variables: (:level, :x, :y, :z, :id, :family, :tag, :vx, :vy, :vz, :mass, :birth, :metals) ----------------------------------- I/O mode: append - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x43, 0x6f, 0x64, 0x65, 0x63, 0x4c, 0x7a, 0x34, 0x2e, 0x4c, 0x5a, 0x34, 0x46, 0x5f, 0x63, 0x63, 0x74, 0x78, 0x17], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [2] ------------------------------------------------------ Folder: 72.42 MB <2.79 MB>/file AMR-Files: 13.3 MB <3.32 MB>/file Hydro-Files: 31.81 MB <6.36 MB>/file Gravity-Files: 21.21 MB <5.3 MB>/file Particle-Files: 3.72 MB <760.93 KB>/file mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ----------------------------------- Memory size: 4.123 MB (uncompressed) Total file size: 37.282 MB ----------------------------------- Total datasize: - total folder: 72.421 MB - selected: 70.035 MB - used: 64.693 MB - new on disc: 37.282 MB [Mera]: 2025-07-04T17:23:46.296 Mera-file output_00002.jld2 contains: Datatype: particles merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x43, 0x6f, 0x64, 0x65, 0x63, 0x4c, 0x7a, 0x34, 0x2e, 0x4c, 0x5a, 0x34, 0x46, 0x5f, 0x63, 0x63, 0x74, 0x78, 0x17], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 4.122832298278809 MB (uncompressed) Datatype: gravity merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x70, 0xfe, 0x18, 0x1c, 0xd4, 0x72, 0x00, 0x00, 0x90, 0x74, 0x17, 0x68, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 26.965469360351562 MB (uncompressed) Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x40, 0xee, 0x75, 0x69, 0xd4, 0x72, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 33.60507392883301 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 37.282 MB ----------------------------------- [Mera]: 2025-07-04T17:23:46.354 Mera-file output_00002.jld2 contains: Datatype: particles merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x43, 0x6f, 0x64, 0x65, 0x63, 0x4c, 0x7a, 0x34, 0x2e, 0x4c, 0x5a, 0x34, 0x46, 0x5f, 0x63, 0x63, 0x74, 0x78, 0x17], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 4.122832298278809 MB (uncompressed) Datatype: gravity merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x70, 0xfe, 0x18, 0x1c, 0xd4, 0x72, 0x00, 0x00, 0x90, 0x74, 0x17, 0x68, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 26.965469360351562 MB (uncompressed) Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x40, 0xee, 0x75, 0x69, 0xd4, 0x72, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 33.60507392883301 MB (uncompressed) ----------------------------------- convert stat: true ----------------------------------- Total file size: 37.318 MB ----------------------------------- flag3: hydro in jld2 file? true flag4: gravity in jld2 file? true flag5: particles in jld2 file? true [Mera]: 2025-07-04T17:23:46.451 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:23:46.454 Use datatype: hydro Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:23:46.461 Use datatype: hydro Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:23:46.467 Use datatype: hydro Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:23:46.473 Use datatype: hydro Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:23:46.480 Use datatype: particles Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:23:46.486 Use datatype: gravity Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:23:46.914 Mera-file output_00002.jld2 contains: ├─📂 hydro │ ├─🔢 data │ ├─🔢 info │ └─📂 information │ ├─🔢 compression │ ├─🔢 comments │ ├─🔢 storage │ ├─🔢 memory │ └─📂 versions │ ├─🔢 merafile_version │ ├─🔢 JLD2compatible_versions │ ├─🔢 JLD2 │ ├─🔢 CodecZlib │ ├─🔢 CodecBzip2 │ ├─🔢 Mera │ └─🔢 CodecLz4 ├─📂 gravity │ ├─🔢 data │ ├─🔢 info │ └─📂 information │ ├─🔢 compression │ ├─🔢 comments │ ├─🔢 storage │ ├─🔢 memory │ └─📂 versions │ ├─🔢 merafile_version │ ├─🔢 JLD2compatible_versions │ ├─🔢 JLD2 │ ├─🔢 CodecZlib │ ├─🔢 CodecBzip2 │ ├─🔢 Mera │ └─🔢 CodecLz4 ├─📂 particles │ ├─🔢 data │ ├─🔢 info │ └─📂 information │ ├─🔢 compression │ ├─🔢 comments │ ├─🔢 storage │ ├─🔢 memory │ └─📂 versions │ ├─🔢 merafile_version │ ├─🔢 JLD2compatible_versions │ ├─🔢 JLD2 │ ├─🔢 CodecZlib │ ├─🔢 CodecBzip2 │ ├─🔢 Mera │ └─🔢 CodecLz4 └─🔢 convertstat Datatype: particles merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x43, 0x6f, 0x64, 0x65, 0x63, 0x4c, 0x7a, 0x34, 0x2e, 0x4c, 0x5a, 0x34, 0x46, 0x5f, 0x63, 0x63, 0x74, 0x78, 0x17], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 4.122832298278809 MB (uncompressed) Datatype: gravity merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x70, 0xfe, 0x18, 0x1c, 0xd4, 0x72, 0x00, 0x00, 0x90, 0x74, 0x17, 0x68, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 26.965469360351562 MB (uncompressed) Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x40, 0xee, 0x75, 0x69, 0xd4, 0x72, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 33.60507392883301 MB (uncompressed) ----------------------------------- convert stat: true ----------------------------------- Total file size: 37.318 MB ----------------------------------- [Mera]: 2025-07-04T17:23:47.088 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:23:47.091 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :33.19815254211426 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:48.441 Open Mera-file output_00002.jld2: [Mera]: 2025-07-04T17:23:48.442 Use datatype: hydro Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:23:48.494 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :33.60195350646973 MB ------------------------------------------------------- flag1: data load hydro: true [Mera]: Get particle data: 2025-07-04T17:23:48.535 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.749700e+04 particles Memory used for data table :3.71567440032959 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:48.952 Open Mera-file output_00002.jld2: [Mera]: 2025-07-04T17:23:48.952 Use datatype: particles Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:23:48.974 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :4.119513511657715 MB ------------------------------------------------------- flag2: data load particles: true [Mera]: Get gravity data: 2025-07-04T17:23:49.004 Key vars=(:level, :cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :26.558563232421875 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:50.150 Open Mera-file output_00002.jld2: [Mera]: 2025-07-04T17:23:50.150 Use datatype: gravity Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:23:50.203 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :26.96233367919922 MB ------------------------------------------------------- flag3: data load gravity: true [Mera]: 2025-07-04T17:23:50.242 Open Mera-file output_00002.jld2: [Mera]: 2025-07-04T17:23:50.242 Use datatype: hydro Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:23:50.307 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :33.60195350646973 MB ------------------------------------------------------- flag4: data load hydro: true [Mera]: 2025-07-04T17:23:50.347 Open Mera-file output_00002.jld2: [Mera]: 2025-07-04T17:23:50.347 Use datatype: hydro Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:23:50.396 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :33.60195350646973 MB ------------------------------------------------------- flag5: data load hydro: true -------------------------------------- [ Info: data types: -------------------------------------- [Mera]: 2025-07-04T17:23:51.079 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:23:51.082 [Mera]: 2025-07-04T17:23:51.255 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:23:51.258 [Mera]: 2025-07-04T17:23:51.260 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:23:51.262 [Mera]: 2025-07-04T17:23:51.264 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:23:51.268 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get clump data: 2025-07-04T17:23:51.271 [Mera]: 2025-07-04T17:23:51.272 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:23:51.275 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:23:51.288 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:23:51.291 [Mera]: 2025-07-04T17:23:51.300 Code: RAMSES output [2] summary: mtime: 2025-07-04T17:16:01.503 ctime: 2025-07-04T17:16:01.503 ======================================================= simulation time: 4.93 [Myr] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level(s): 3 - 7 --> cellsize(s): 12.5 [kpc] - 781.25 [pc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 7.528000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:23:51.303 [Mera]: 2025-07-04T17:23:51.314 [Mera]: 2025-07-04T17:23:51.324 [Mera]: 2025-07-04T17:23:51.333 -------------------------------------- [ Info: file/folder-names: -------------------------------------- -------------------------------------- [ Info: general tests: -------------------------------------- verbose_mode: true verbose_mode: false verbose_mode: nothing showprogress_mode: true showprogress_mode: false showprogress_mode: nothing [Mera]: Fields to use as arguments in functions ======================================================================= pxsize = missing res = missing lmax = missing xrange = missing yrange = missing zrange = missing radius = missing height = missing direction = missing plane = missing plane_ranges = missing thickness = missing position = missing center = missing range_unit = missing data_center = missing data_center_unit = missing verbose = missing show_progress = missing [Mera]: 2025-07-04T17:23:55.541 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Namelist file content ================================= &UNITS_PARAMS units_length = 0.308567758128200E+22 ! kpc units_density = 0.677025430198932E-22 ! 1e9 Msol/kpc^3 units_time = 0.470430312423675E+15 ! G &HYDRO_PARAMS slope_type =3 gamma =1.6667 riemann ='hllc' courant_factor =0.8 smallr =1e-11 &DICE_PARAMS ic_u_name ='U ' ! Name of the internal energy datablock (Gadget2 format only) amr_struct =.false. ! Reproduce the AMR structure of the Gadget2 file resulting from a ramses to gadget conversion ic_metal_name ='Z ' ! Name of the metallicity datablock (Gadget2 format only) gadget_scale_l =3.085677581282D21 ! Gadget file length unit ic_mag_center_y =0.0 ! y-coordinate of the magnetic field symmetry center ic_vel_name ='VEL ' ! Name of the velocity vector datablock (Gadget2 format only) ic_mag_axis_x =0.0 ! Magnetic field normal vector x-component ic_scale_vel =1.0 ! Scaling factor for the velocity vector ic_head_name ='HEAD' ! Name of the Header datablock (Gadget2 format only) ic_skip_type = -1 ! Skip specific particle type ic_mag_center_z =0.0 ! z-coordinate of the magnetic field symmetry center ic_scale_metal =1.0 ! Scaling factor for the metallicity ic_format ='Gadget2' ! Format of the initial conditions. 'Gadget1' or 'Gadget2' ic_scale_u =1.0 ! Scaling factor for the internal energy ic_center =0.0,0.0,0.0 ! Shift center parameter. ICs are automatically shifted with boxlen/2 ic_mass_name ='MASS' ! Name of the mass datablock (Gadget2 format only) ic_age_name ='AGE ' ! Name of the particle age datablock (Gadget2 format only) gadget_scale_v =1.0D5 ! Gadget file velocity unit ic_mag_axis_z =1.0 ! Magnetic field normal vector z-component ic_nfile =1 ! If greater than one, look for files with name matching ic_file//'.n' IG_rho =1.0D-6 ! Intergalactic gas density ic_mag_scale_B =0.0 ! Foreground toroidal magnetic field value ic_mag_const =0.0,0.0,0.0 ! Background magnetic field value for x,y,z component IG_T2 =1.0D6 ! Intergalactic gas temperature ic_mag_axis_y =0.0 ! Magnetic field normal vector y-component gadget_scale_t =3.15360e+13 ! Gadget file time unit ic_id_name ='ID ' ! Name of the particle identifier datablock (Gadget2 format only) cosmo_add_gas_index = -1 ! Gas particle type index for cosmo runs ic_scale_age =1.0 ! Scaling factor for the particles age ic_file ='mera_spiral.g2' ! Name of the initial conditions file ic_mag_scale_R =1.0 ! Toroidal magnetic field scalelength IG_metal =1.0D-4 ! Intergalactic gas metallicity ic_scale_pos =1.0 ! Scaling factor for the position vector ic_mag_scale_H =1.0 ! Toroidal magnetic field scaleheight ic_scale_mass =1.0 ! Scaling factor for the mass ic_pos_name ='POS ' ! Name of the position vector datablock (Gadget2 format only) gadget_scale_m =1.9891D43 ! Gadget file mass unit ic_ifout =1 ! Change ramses output index for restarts ic_mag_center_x =0.0 ! x-coordinate of the magnetic field symmetry center &INIT_PARAMS initfile(1) ='./' !initfile(1) ='./' filetype ='dice' &REFINE_PARAMS interpol_var =1 !primitive interpol_type =2 !0 m_refine =20,20,20,20,20,20,20,20,20,20 mass_sph = 1.000276597482903e-6 ! 1e3 Msol !interpol_var =0 !conservatives &BOUNDARY_PARAMS jbound_min = 0, 0,-1,+1,-1,-1 ibound_max =-1,+1,+1,+1,+1,+1 jbound_max = 0, 0,-1,+1,+1,+1 kbound_max = 0, 0, 0, 0,-1,+1 ibound_min =-1,+1,-1,-1,-1,-1 bound_type = 2, 2, 2, 2, 2, 2 !2 kbound_min = 0, 0, 0, 0,-1,+1 no_inflow =.true. nboundary = 6 &AMR_PARAMS npartmax = 500000 levelmin =6 !3 nexpand =1 boxlen =100. !kpc levelmax =6 !7 ngridmax = 100000 &FEEDBACK_PARAMS f_ek =0. !t_diss = 1. !Myr eta_sn =0.2 t_sne =10. !10. !Myr !delayed_cooling =.true. &CLUMPFIND_PARAMS density_threshold =3 ivar_clump =1 &OUTPUT_PARAMS tend =10 !Final time of the simulation delta_tout =0.1 !Time increment between outputs &POISSON_PARAMS gravity_type =-3 &SF_PARAMS T2_star = 1e4 n_star = 1 m_star = 1. ! in units mass_sph eps_star = 0.02 !2% &COOLING_PARAMS metal =.true. cooling =.true. z_ave =1. &RUN_PARAMS pic =.true. poisson =.true. clumpfind =true nremap =5 !10 ncontrol =1 !frequency of screen output verbose =.false. nrestart =0 hydro =.true. nsubcycle =20*2 [Mera]: 2025-07-04T17:23:55.763 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Patch-file content ================================= /data2/mabe/MeraTest/Ramses/patch_2019_10version/add_list.f90 !################################################################ !################################################################ !################################################################ !################################################################ subroutine add_list(ind_part,list2,ok,np) use amr_commons use pm_commons implicit none integer::np integer,dimension(1:nvector)::ind_part,list2 logical,dimension(1:nvector)::ok ! ! Add particles to their new linked lists ! integer::j do j=1,np if(ok(j))then if(numbp(list2(j))>0)then ! Add particle at the tail of its linked list nextp(tailp(list2(j)))=ind_part(j) prevp(ind_part(j))=tailp(list2(j)) nextp(ind_part(j))=0 tailp(list2(j))=ind_part(j) numbp(list2(j))=numbp(list2(j))+1 else ! Initialise linked list headp(list2(j))=ind_part(j) tailp(list2(j))=ind_part(j) prevp(ind_part(j))=0 nextp(ind_part(j))=0 numbp(list2(j))=1 end if end if end do end subroutine add_list !################################################################ !################################################################ !################################################################ !################################################################ subroutine add_free(ind_part,np) use amr_commons use pm_commons use dice_commons implicit none integer::np integer,dimension(1:nvector)::ind_part ! ! Add particles to the free memory linked list ! and reset all particle variables ! integer::j,idim do idim=1,ndim do j=1,np xp(ind_part(j),idim)=0.0 vp(ind_part(j),idim)=0.0 end do end do do j=1,np mp(ind_part(j))=0.0 idp(ind_part(j))=0 levelp(ind_part(j))=0 typep(ind_part(j))%family=FAM_UNDEF typep(ind_part(j))%tag=0 end do if(star.or.sink)then do j=1,np tp(ind_part(j))=0.0 end do if(metal)then do j=1,np zp(ind_part(j))=0.0 end do end if end if ! DICE patch if(dice_init) then do j=1,np up(ind_part(j))=0.0 end do endif do j=1,np if(numbp_free>0)then ! Add particle at the tail of its linked list nextp(tailp_free)=ind_part(j) prevp(ind_part(j))=tailp_free nextp(ind_part(j))=0 tailp_free=ind_part(j) numbp_free=numbp_free+1 else ! Initialise linked list headp_free=ind_part(j) tailp_free=ind_part(j) prevp(ind_part(j))=0 nextp(ind_part(j))=0 numbp_free=1 end if end do npart=npartmax-numbp_free end subroutine add_free !################################################################ !################################################################ !################################################################ !################################################################ subroutine add_free_cond(ind_part,ok,np) use amr_commons use pm_commons use dice_commons implicit none integer::np integer,dimension(1:nvector)::ind_part logical,dimension(1:nvector)::ok ! ! Add particles to the free memory linked list ! and reset all particle variables ! integer::j,idim do idim=1,ndim do j=1,np if(ok(j))then xp(ind_part(j),idim)=0.0 vp(ind_part(j),idim)=0.0 endif end do end do do j=1,np if(ok(j))then mp(ind_part(j))=0.0 idp(ind_part(j))=0 levelp(ind_part(j))=0 typep(ind_part(j))%family = FAM_UNDEF typep(ind_part(j))%tag = 0 endif end do if(star.or.sink)then do j=1,np if(ok(j))then tp(ind_part(j))=0.0 endif end do if(metal)then do j=1,np if(ok(j))then zp(ind_part(j))=0.0 endif end do end if end if ! DICE patch if(dice_init) then do j=1,np if(ok(j))then up(ind_part(j))=0.0 endif end do endif do j=1,np if(ok(j))then if(numbp_free>0)then ! Add particle at the tail of its linked list nextp(tailp_free)=ind_part(j) prevp(ind_part(j))=tailp_free nextp(ind_part(j))=0 tailp_free=ind_part(j) numbp_free=numbp_free+1 else ! Initialise linked list headp_free=ind_part(j) tailp_free=ind_part(j) prevp(ind_part(j))=0 nextp(ind_part(j))=0 numbp_free=1 end if endif end do npart=npartmax-numbp_free end subroutine add_free_cond /data2/mabe/MeraTest/Ramses/patch_2019_10version/gadgetreadfile.f90 MODULE gadgetreadfilemod ! ! Routines to read L-Gadget2 particle data files in Fortran ! Adapted from http://astro.dur.ac.uk/~jch/password_pages/index.html ! ! CHARACTER(LEN=*) :: basefile - the base snapshot name. It may get a file id added ! ! ! ! ! Data type corresponding to gadget file header TYPE gadgetheadertype INTEGER*4, DIMENSION(6) :: npart REAL*8, DIMENSION(6) :: mass REAL*8 :: time REAL*8 :: redshift INTEGER*4 :: flag_sfr INTEGER*4 :: flag_feedback INTEGER*4, DIMENSION(6) :: nparttotal INTEGER*4 :: flag_cooling INTEGER*4 :: numfiles REAL*8 :: boxsize REAL*8 :: omega0 REAL*8 :: omegalambda REAL*8 :: hubbleparam INTEGER*4 :: flag_stellarage INTEGER*4 :: flag_metals INTEGER*4, DIMENSION(6) :: totalhighword INTEGER*4 :: flag_entropy_instead_u INTEGER*4 :: flag_doubleprecision INTEGER*4 :: flag_ic_info REAL*4 :: lpt_scalingfactor CHARACTER, DIMENSION(48) :: unused END TYPE gadgetheadertype CONTAINS ! --------------------------------------------------------------------------- SUBROUTINE gadgetreadheader(basename,ifile, header, ok) ! ! Read and return the gadget file header for the specified file ! IMPLICIT NONE ! Input parameters CHARACTER(LEN=*), INTENT(IN) :: basename INTEGER, INTENT(IN):: ifile ! Header to return TYPE (gadgetheadertype), INTENT(OUT) :: header logical, INTENT(OUT)::ok ! Internal variables CHARACTER(LEN=256) :: filename CHARACTER(LEN=6) :: fileno integer::dummy_int,blck_size,head_blck character(LEN=4)::blck_name filename = TRIM(basename) INQUIRE(file=filename, exist=ok) if (.not.ok) then ! Generate the number to go on the end of the filename IF(ifile.LT.10)THEN WRITE(fileno,'('.',1i1.1)')ifile ELSE IF (ifile.LT.100)THEN WRITE(fileno,'('.',1i2.2)')ifile ELSE IF (ifile.LT.1000)THEN WRITE(fileno,'('.',1i3.3)')ifile ELSE IF (ifile.LT.10000)THEN WRITE(fileno,'('.',1i4.4)')ifile ELSE WRITE(fileno,'('.',1i5.5)')ifile END IF filename = TRIM(basename) // fileno INQUIRE(file=filename, exist=ok) if(.not.ok) then write(*,*) 'No file '//basename//' or '//filename RETURN end if end if !OPEN(unit=1,file=filename,status='old',action='read',form='unformatted') OPEN(unit=1,file=filename,status='old',action='read',form='unformatted',access='stream') read(1,POS=1) dummy_int read(1,POS=1+sizeof(dummy_int)) blck_name read(1,POS=1+sizeof(dummy_int)+sizeof(blck_name)) dummy_int read(1,POS=1+2*sizeof(dummy_int)+sizeof(blck_name)) dummy_int read(1,POS=1+3*sizeof(dummy_int)+sizeof(blck_name)) blck_size head_blck = 1+sizeof(blck_name)+4*sizeof(dummy_int) ! Byte swapping doesn't work if you just do READ(1)header !READ(1)header%npart,header%mass,header%time,header%redshift, & ! header%flag_sfr,header%flag_feedback,header%nparttotal, & ! header%flag_cooling,header%numfiles,header%boxsize, & ! header%omega0,header%omegalambda,header%hubbleparam, & ! header%flag_stellarage,header%flag_metals,header%totalhighword, & ! header%flag_entropy_instead_u, header%flag_doubleprecision, & ! header%flag_ic_info, header%lpt_scalingfactor READ(1,POS=head_blck) header%npart,header%mass,header%time,header%redshift, & header%flag_sfr,header%flag_feedback,header%nparttotal, & header%flag_cooling,header%numfiles,header%boxsize, & header%omega0,header%omegalambda,header%hubbleparam, & header%flag_stellarage,header%flag_metals,header%totalhighword, & header%flag_entropy_instead_u, header%flag_doubleprecision, & header%flag_ic_info, header%lpt_scalingfactor CLOSE(1) END SUBROUTINE gadgetreadheader ! --------------------------------------------------------------------------- SUBROUTINE gadgetreadfile(basename,ifile,header,pos,vel,id) ! ! Read and return all data from the specified file. Output arrays must ! already be allocated. Use readheader to get particle numbers to do this. ! IMPLICIT NONE ! Input parameters CHARACTER(LEN=*), INTENT(IN) :: basename INTEGER, INTENT(IN) :: ifile ! Header and hash table to return TYPE (gadgetheadertype) :: header ! Particle data REAL, DIMENSION(3,*) :: pos,vel #ifndef LONGINT INTEGER*4, DIMENSION(*) :: id #else INTEGER*8, DIMENSION(*) :: id #endif ! Internal variables CHARACTER(LEN=256) :: filename CHARACTER(LEN=6) :: fileno INTEGER :: np logical::ok ! Generate the number to go on the end of the filename IF(ifile.LT.10)THEN WRITE(fileno,'('.',1i1.1)')ifile ELSE IF (ifile.LT.100)THEN WRITE(fileno,'('.',1i2.2)')ifile ELSE IF (ifile.LT.1000)THEN WRITE(fileno,'('.',1i3.3)')ifile ELSE IF (ifile.LT.10000)THEN WRITE(fileno,'('.',1i4.4)')ifile ELSE WRITE(fileno,'('.',1i5.5)')ifile END IF filename = TRIM(basename) // fileno INQUIRE(file=filename, exist=ok) if(.not.ok) then write(*,*) 'No file '//filename RETURN end if OPEN(unit=1,file=filename,status='old',action='read',form='unformatted') ! Byte swapping doesn't appear to work if you just do READ(1)header READ(1)header%npart,header%mass,header%time,header%redshift, & header%flag_sfr,header%flag_feedback,header%nparttotal, & header%flag_cooling,header%numfiles,header%boxsize, & header%omega0,header%omegalambda,header%hubbleparam, & header%flag_stellarage,header%flag_metals,header%totalhighword, & header%flag_entropy_instead_u, header%flag_doubleprecision, & header%flag_ic_info, header%lpt_scalingfactor np=header%npart(2) READ(1)pos(1:3,1:np) READ(1)vel(1:3,1:np) READ(1)id(1:np) CLOSE(1) END SUBROUTINE gadgetreadfile ! --------------------------------------------------------------------------- SUBROUTINE gadgetwritefile(basename,ifile,header,pos,vel,id) ! ! Read and return all data from the specified file. Output arrays must ! already be allocated. Use readheader to get particle numbers to do this. ! IMPLICIT NONE ! Input parameters CHARACTER(LEN=*), INTENT(IN) :: basename INTEGER, INTENT(IN) :: ifile ! Header and hash table to return TYPE (gadgetheadertype) :: header ! Particle data REAL, DIMENSION(3,*) :: pos,vel #ifndef LONGINT INTEGER*4, DIMENSION(*) :: id #else INTEGER*8, DIMENSION(*) :: id #endif ! Internal variables CHARACTER(LEN=256) :: filename CHARACTER(LEN=6) :: fileno INTEGER :: np logical::ok ! Generate the number to go on the end of the filename IF(ifile.LT.10)THEN WRITE(fileno,'('.',1i1.1)')ifile ELSE IF (ifile.LT.100)THEN WRITE(fileno,'('.',1i2.2)')ifile ELSE IF (ifile.LT.1000)THEN WRITE(fileno,'('.',1i3.3)')ifile ELSE IF (ifile.LT.10000)THEN WRITE(fileno,'('.',1i4.4)')ifile ELSE WRITE(fileno,'('.',1i5.5)')ifile END IF filename = TRIM(basename) // fileno OPEN(unit=1,file=filename,status='unknown',action='write',form='unformatted') WRITE(1)header%npart,header%mass,header%time,header%redshift, & header%flag_sfr,header%flag_feedback,header%nparttotal, & header%flag_cooling,header%numfiles,header%boxsize, & header%omega0,header%omegalambda,header%hubbleparam, & header%flag_stellarage,header%flag_metals,header%totalhighword, & header%flag_entropy_instead_u, header%flag_doubleprecision, & header%flag_ic_info, header%lpt_scalingfactor, header%unused np=header%npart(2) WRITE(1)pos(1:3,1:np) WRITE(1)vel(1:3,1:np) WRITE(1)id(1:np) CLOSE(1) END SUBROUTINE gadgetwritefile END MODULE gadgetreadfilemod /data2/mabe/MeraTest/Ramses/patch_2019_10version/init_flow_fine.f90 !################################################################ !################################################################ !################################################################ !################################################################ subroutine init_flow use amr_commons use hydro_commons, ONLY: nvar, uold use dice_commons implicit none integer::ilevel,ivar #ifdef SOLVERmhd integer::i #endif if(verbose)write(*,*)'Entering init_flow' do ilevel=nlevelmax,1,-1 if(ilevel>=levelmin)call init_flow_fine(ilevel) call upload_fine(ilevel) do ivar=1,nvar call make_virtual_fine_dp(uold(1,ivar),ilevel) end do if(simple_boundary)call make_boundary_hydro(ilevel) end do if(verbose)write(*,*)'Complete init_flow' #ifdef SOLVERmhd ! magnetic field parameters if(myid==1) write(*,'(A50)')'__________________________________________________' if(myid==1) write(*,*) 'Background magnetic field' if(myid==1) write(*,'(A50)')'__________________________________________________' if(myid==1) write(*,'(A,E15.7)') 'Bx:',ic_mag_const(1) if(myid==1) write(*,'(A,E15.7)') 'By:',ic_mag_const(2) if(myid==1) write(*,'(A,E15.7)') 'Bz:',ic_mag_const(3) do i=1,MAXGAL if (ic_mag_scale_B(i) .EQ. 0.0) cycle if(myid==1) write(*,'(A50)')'__________________________________________________' if(myid==1) write(*,'(A,I3)') ' Foreground magnetic field',i if(myid==1) write(*,'(A50)')'__________________________________________________' if(myid==1) write(*,'(A,E15.7)') 'pos x:', ic_mag_center_x(i) if(myid==1) write(*,'(A,E15.7)') 'pos y:', ic_mag_center_y(i) if(myid==1) write(*,'(A,E15.7)') 'pos z:', ic_mag_center_z(i) enddo if(myid==1) write(*,'(A50)')'__________________________________________________' #endif end subroutine init_flow !################################################################ !################################################################ !################################################################ !################################################################ subroutine init_flow_fine(ilevel) use amr_commons use hydro_commons use cooling_module use mpi_mod use dice_commons implicit none #ifndef WITHOUTMPI integer::info,info2,dummy_io #endif integer::ilevel integer::i,icell,igrid,ncache,iskip,ngrid,ilun integer::ind,ivar,ix,iy,iz,nx_loc integer::i1,i2,i3,i1_min,i1_max,i2_min,i2_max,i3_min,i3_max integer::buf_count integer ,dimension(1:nvector),save::ind_grid,ind_cell real(dp)::scale_nH,scale_T2,scale_l,scale_d,scale_t,scale_v real(dp)::dx,rr,vx,vy,vz,ek,ei,pp,xx1,xx2,xx3,dx_loc,scale,xval real(dp),dimension(1:3)::skip_loc real(dp),dimension(1:twotondim,1:3)::xc real(dp),dimension(1:nvector) ,save::vv real(dp)::axlen real(dp),allocatable,dimension(:,:,:)::init_array real(kind=4),allocatable,dimension(:,:) ::init_plane logical::error,ok_file1,ok_file2,ok_file3,ok_file character(LEN=80)::filename character(LEN=5)::nchar,ncharvar integer,parameter::tag=1107 if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Conversion factor from user units to cgs units call units(scale_l,scale_t,scale_d,scale_v,scale_nH,scale_T2) ! Mesh size at level ilevel in coarse cell units dx=0.5D0**ilevel ! Set position of cell centers relative to grid center do ind=1,twotondim iz=(ind-1)/4 iy=(ind-1-4*iz)/2 ix=(ind-1-2*iy-4*iz) if(ndim>0)xc(ind,1)=(dble(ix)-0.5D0)*dx if(ndim>1)xc(ind,2)=(dble(iy)-0.5D0)*dx if(ndim>2)xc(ind,3)=(dble(iz)-0.5D0)*dx end do ! Local constants nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale ncache=active(ilevel)%ngrid !-------------------------------------- ! Compute initial conditions from files !-------------------------------------- filename=TRIM(initfile(ilevel))//'/ic_d' INQUIRE(file=filename,exist=ok_file1) if(multiple)then filename=TRIM(initfile(ilevel))//'/dir_deltab/ic_deltab.00001' INQUIRE(file=filename,exist=ok_file2) else filename=TRIM(initfile(ilevel))//'/ic_deltab' INQUIRE(file=filename,exist=ok_file2) endif ok_file = ok_file1 .or. ok_file2 if(ok_file)then !------------------------------------------------------------------------- ! First step: compute level boundaries in terms of initial condition array !------------------------------------------------------------------------- if(ncache>0)then i1_min=n1(ilevel)+1; i1_max=0 i2_min=n2(ilevel)+1; i2_max=0 i3_min=n3(ilevel)+1; i3_max=0 do ind=1,twotondim do i=1,ncache igrid=active(ilevel)%igrid(i) xx1=xg(igrid,1)+xc(ind,1)-skip_loc(1) xx1=(xx1*(dxini(ilevel)/dx)-xoff1(ilevel))/dxini(ilevel) xx2=xg(igrid,2)+xc(ind,2)-skip_loc(2) xx2=(xx2*(dxini(ilevel)/dx)-xoff2(ilevel))/dxini(ilevel) xx3=xg(igrid,3)+xc(ind,3)-skip_loc(3) xx3=(xx3*(dxini(ilevel)/dx)-xoff3(ilevel))/dxini(ilevel) i1_min=MIN(i1_min,int(xx1)+1) i1_max=MAX(i1_max,int(xx1)+1) i2_min=MIN(i2_min,int(xx2)+1) i2_max=MAX(i2_max,int(xx2)+1) i3_min=MIN(i3_min,int(xx3)+1) i3_max=MAX(i3_max,int(xx3)+1) end do end do error=.false. if(i1_min<1.or.i1_max>n1(ilevel))error=.true. if(i2_min<1.or.i2_max>n2(ilevel))error=.true. if(i3_min<1.or.i3_max>n3(ilevel))error=.true. if(error) then write(*,*)'Some grid are outside initial conditions sub-volume' write(*,*)'for ilevel=',ilevel write(*,*)i1_min,i1_max write(*,*)i2_min,i2_max write(*,*)i3_min,i3_max write(*,*)n1(ilevel),n2(ilevel),n3(ilevel) call clean_stop end if endif !----------------------------------------- ! Second step: read initial condition file !----------------------------------------- ! Allocate initial conditions array if(ncache>0)allocate(init_array(i1_min:i1_max,i2_min:i2_max,i3_min:i3_max)) allocate(init_plane(1:n1(ilevel),1:n2(ilevel))) ! Loop over input variables do ivar=1,nvar if(cosmo)then ! Read baryons initial overdensity and displacement at a=aexp if(multiple)then call title(myid,nchar) if(ivar==1)filename=TRIM(initfile(ilevel))//'/dir_deltab/ic_deltab.'//TRIM(nchar) if(ivar==2)filename=TRIM(initfile(ilevel))//'/dir_velcx/ic_velcx.'//TRIM(nchar) if(ivar==3)filename=TRIM(initfile(ilevel))//'/dir_velcy/ic_velcy.'//TRIM(nchar) if(ivar==4)filename=TRIM(initfile(ilevel))//'/dir_velcz/ic_velcz.'//TRIM(nchar) if(ivar==5)filename=TRIM(initfile(ilevel))//'/dir_tempb/ic_tempb.'//TRIM(nchar) else if(ivar==1)filename=TRIM(initfile(ilevel))//'/ic_deltab' if(ivar==2)filename=TRIM(initfile(ilevel))//'/ic_velcx' if(ivar==3)filename=TRIM(initfile(ilevel))//'/ic_velcy' if(ivar==4)filename=TRIM(initfile(ilevel))//'/ic_velcz' if(ivar==5)filename=TRIM(initfile(ilevel))//'/ic_tempb' endif else ! Read primitive variables if(ivar==1)filename=TRIM(initfile(ilevel))//'/ic_d' if(ivar==2)filename=TRIM(initfile(ilevel))//'/ic_u' if(ivar==3)filename=TRIM(initfile(ilevel))//'/ic_v' if(ivar==4)filename=TRIM(initfile(ilevel))//'/ic_w' if(ivar==5)filename=TRIM(initfile(ilevel))//'/ic_p' endif call title(ivar,ncharvar) if(ivar>5)then call title(ivar-5,ncharvar) filename=TRIM(initfile(ilevel))//'/ic_pvar_'//TRIM(ncharvar) endif INQUIRE(file=filename,exist=ok_file3) if(ok_file3)then ! Reading the existing file if(myid==1)write(*,*)'Reading file '//TRIM(filename) if(multiple)then ilun=ncpu+myid+103 ! Wait for the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if (mod(myid-1,IOGROUPSIZE)/=0) then call MPI_RECV(dummy_io,1,MPI_INTEGER,myid-1-1,tag,& & MPI_COMM_WORLD,MPI_STATUS_IGNORE,info2) end if endif #endif open(ilun,file=filename,form='unformatted') rewind ilun read(ilun) ! skip first line do i3=1,n3(ilevel) read(ilun) ((init_plane(i1,i2),i1=1,n1(ilevel)),i2=1,n2(ilevel)) if(ncache>0)then if(i3.ge.i3_min.and.i3.le.i3_max)then init_array(i1_min:i1_max,i2_min:i2_max,i3) = & & init_plane(i1_min:i1_max,i2_min:i2_max) end if endif end do close(ilun) ! Send the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if(mod(myid,IOGROUPSIZE)/=0 .and.(myid.lt.ncpu))then dummy_io=1 call MPI_SEND(dummy_io,1,MPI_INTEGER,myid-1+1,tag, & & MPI_COMM_WORLD,info2) end if endif #endif else if(myid==1)then open(10,file=filename,form='unformatted') rewind 10 read(10) ! skip first line endif do i3=1,n3(ilevel) if(myid==1)then read(10) ((init_plane(i1,i2),i1=1,n1(ilevel)),i2=1,n2(ilevel)) else init_plane=0.0 endif buf_count=n1(ilevel)*n2(ilevel) #ifndef WITHOUTMPI call MPI_BCAST(init_plane,buf_count,MPI_REAL,0,MPI_COMM_WORLD,info) #endif if(ncache>0)then if(i3.ge.i3_min.and.i3.le.i3_max)then init_array(i1_min:i1_max,i2_min:i2_max,i3) = & & init_plane(i1_min:i1_max,i2_min:i2_max) end if endif end do if(myid==1)close(10) endif else ! If file doesn't exist, initialize variable to default value ! In most cases, this is zero (you can change that if necessary) if(myid==1)write(*,*)'File '//TRIM(filename)//' not found' if(myid==1)write(*,*)'Initialize corresponding variable to default value' if(ncache>0)then init_array=0d0 ! Default value for metals if(cosmo.and.ivar==imetal.and.metal)init_array=z_ave*0.02 ! from solar units ! Default value for ionization fraction if(cosmo)xval=sqrt(omega_m)/(h0/100.*omega_b) ! From the book of Peebles p. 173 if(cosmo.and.ivar==ixion.and.aton)init_array=1.2d-5*xval endif endif if(ncache>0)then ! For cosmo runs, rescale initial conditions to code units if(cosmo)then ! Compute approximate average temperature in K if(.not. cooling)T2_start=1.356d-2/aexp**2 if(ivar==1)init_array=(1.0+dfact(ilevel)*init_array)*omega_b/omega_m if(ivar==2)init_array=dfact(ilevel)*vfact(1)*dx_loc/dxini(ilevel)*init_array/vfact(ilevel) if(ivar==3)init_array=dfact(ilevel)*vfact(1)*dx_loc/dxini(ilevel)*init_array/vfact(ilevel) if(ivar==4)init_array=dfact(ilevel)*vfact(1)*dx_loc/dxini(ilevel)*init_array/vfact(ilevel) if(ivar==ndim+2)init_array=(1.0+init_array)*T2_start/scale_T2 endif ! Loop over cells do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,ncache igrid=active(ilevel)%igrid(i) icell=igrid+iskip xx1=xg(igrid,1)+xc(ind,1)-skip_loc(1) xx1=(xx1*(dxini(ilevel)/dx)-xoff1(ilevel))/dxini(ilevel) xx2=xg(igrid,2)+xc(ind,2)-skip_loc(2) xx2=(xx2*(dxini(ilevel)/dx)-xoff2(ilevel))/dxini(ilevel) xx3=xg(igrid,3)+xc(ind,3)-skip_loc(3) xx3=(xx3*(dxini(ilevel)/dx)-xoff3(ilevel))/dxini(ilevel) i1=int(xx1)+1 i1=int(xx1)+1 i2=int(xx2)+1 i2=int(xx2)+1 i3=int(xx3)+1 i3=int(xx3)+1 ! Scatter to corresponding primitive variable uold(icell,ivar)=init_array(i1,i2,i3) end do end do ! End loop over cells endif end do ! End loop over input variables ! Deallocate initial conditions array if(ncache>0)deallocate(init_array) deallocate(init_plane) !---------------------------------------------------------------- ! For cosmology runs: compute pressure, prevent negative density !---------------------------------------------------------------- if(cosmo)then ! Loop over grids by vector sweeps do igrid=1,ncache,nvector ngrid=MIN(nvector,ncache-igrid+1) do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do ! Loop over cells do ind=1,twotondim ! Gather cell indices iskip=ncoarse+(ind-1)*ngridmax do i=1,ngrid ind_cell(i)=iskip+ind_grid(i) end do ! Prevent negative density do i=1,ngrid rr=max(uold(ind_cell(i),1),0.1*omega_b/omega_m) uold(ind_cell(i),1)=rr end do ! Compute pressure from temperature and density do i=1,ngrid uold(ind_cell(i),ndim+2)=uold(ind_cell(i),1)*uold(ind_cell(i),ndim+2) end do end do ! End loop over cells end do ! End loop over grids end if !--------------------------------------------------- ! Third step: compute initial conservative variables !--------------------------------------------------- ! Loop over grids by vector sweeps do igrid=1,ncache,nvector ngrid=MIN(nvector,ncache-igrid+1) do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do vy=0.0 vz=0.0 ! Loop over cells do ind=1,twotondim ! Gather cell indices iskip=ncoarse+(ind-1)*ngridmax do i=1,ngrid ind_cell(i)=iskip+ind_grid(i) end do ! Compute total energy density do i=1,ngrid rr=uold(ind_cell(i),1) vx=uold(ind_cell(i),2) #if NDIM>1 vy=uold(ind_cell(i),3) #endif #if NDIM>2 vz=uold(ind_cell(i),4) #endif pp=uold(ind_cell(i),ndim+2) ek=0.5d0*(vx**2+vy**2+vz**2) ei=pp/(gamma-1.0) vv(i)=ei+rr*ek end do ! Scatter to corresponding conservative variable do i=1,ngrid uold(ind_cell(i),ndim+2)=vv(i) end do ! Compute momentum density do ivar=1,ndim do i=1,ngrid rr=uold(ind_cell(i),1) vx=uold(ind_cell(i),ivar+1) vv(i)=rr*vx end do ! Scatter to corresponding conservative variable do i=1,ngrid uold(ind_cell(i),ivar+1)=vv(i) end do end do #if NVAR > NDIM + 2 ! Compute passive variable density do ivar=ndim+3,nvar do i=1,ngrid rr=uold(ind_cell(i),1) uold(ind_cell(i),ivar)=rr*uold(ind_cell(i),ivar) end do enddo #endif end do ! End loop over cells end do ! End loop over grids !------------------------------------------------------- ! Compute initial conditions from subroutine condinit !------------------------------------------------------- else do i=1,MAXGAL if (ic_mag_scale_B(i) .EQ. 0.0) cycle ! renormalise axes axlen = SQRT(ic_mag_axis_x(i)**2 + ic_mag_axis_y(i)**2 + ic_mag_axis_z(i)**2) ic_mag_axis_x(i) = ic_mag_axis_x(i) / axlen ic_mag_axis_y(i) = ic_mag_axis_y(i) / axlen ic_mag_axis_z(i) = ic_mag_axis_z(i) / axlen enddo ! Initialise uold with values from the DICE_PARAMS namelist call reset_uold(ilevel) ! Update the grid using the gas particles read from the Gadget1 file ! NGP scheme is used call condinit_loc(ilevel) ! Reverse update boundaries do ivar=1,nvar call make_virtual_reverse_dp(uold(1,ivar),ilevel) end do call init_uold(ilevel) do ivar=1,nvar call make_virtual_fine_dp(uold(1,ivar),ilevel) end do end if 111 format(' Entering init_flow_fine for level ',I2) end subroutine init_flow_fine !################################################################ !################################################################ !################################################################ !################################################################ subroutine region_condinit(x,q,dx,nn) use amr_parameters use hydro_parameters implicit none integer ::nn real(dp)::dx real(dp),dimension(1:nvector,1:nvar)::q real(dp),dimension(1:nvector,1:ndim)::x integer::i,k real(dp)::vol,r,xn,yn,zn,en #if NVAR > NDIM + 2 || NENER > 0 integer::ivar #endif ! Set some (tiny) default values in case n_region=0 q(1:nn,1)=smallr q(1:nn,2)=0.0d0 #if NDIM>1 q(1:nn,3)=0.0d0 #endif #if NDIM>2 q(1:nn,4)=0.0d0 #endif q(1:nn,ndim+2)=smallr*smallc**2/gamma #if NVAR > NDIM + 2 do ivar=ndim+3,nvar q(1:nn,ivar)=0.0d0 end do #endif ! Loop over initial conditions regions do k=1,nregion ! For 'square' regions only: if(region_type(k) .eq. 'square')then ! Exponent of choosen norm en=exp_region(k) do i=1,nn ! Compute position in normalized coordinates xn=0.0d0; yn=0.0d0; zn=0.0d0 xn=2.0d0*abs(x(i,1)-x_center(k))/length_x(k) #if NDIM>1 yn=2.0d0*abs(x(i,2)-y_center(k))/length_y(k) #endif #if NDIM>2 zn=2.0d0*abs(x(i,3)-z_center(k))/length_z(k) #endif ! Compute cell 'radius' relative to region center if(exp_region(k)<10)then r=(xn**en+yn**en+zn**en)**(1.0/en) else r=max(xn,yn,zn) end if ! If cell lies within region, ! REPLACE primitive variables by region values if(r<1.0)then q(i,1)=d_region(k) q(i,2)=u_region(k) #if NDIM>1 q(i,3)=v_region(k) #endif #if NDIM>2 q(i,4)=w_region(k) #endif q(i,ndim+2)=p_region(k) #if NENER>0 do ivar=1,nener q(i,ndim+2+ivar)=prad_region(k,ivar) enddo #endif #if NVAR>NDIM+2+NENER do ivar=ndim+3+nener,nvar q(i,ivar)=var_region(k,ivar-ndim-2-nener) end do #endif end if end do end if ! For 'point' regions only: if(region_type(k) .eq. 'point')then ! Volume elements vol=dx**ndim ! Compute CIC weights relative to region center do i=1,nn xn=1.0; yn=1.0; zn=1.0 xn=max(1.0-abs(x(i,1)-x_center(k))/dx,0.0_dp) #if NDIM>1 yn=max(1.0-abs(x(i,2)-y_center(k))/dx,0.0_dp) #endif #if NDIM>2 zn=max(1.0-abs(x(i,3)-z_center(k))/dx,0.0_dp) #endif r=xn*yn*zn ! If cell lies within CIC cloud, ! ADD to primitive variables the region values q(i,1)=q(i,1)+d_region(k)*r/vol q(i,2)=q(i,2)+u_region(k)*r #if NDIM>1 q(i,3)=q(i,3)+v_region(k)*r #endif #if NDIM>2 q(i,4)=q(i,4)+w_region(k)*r #endif q(i,ndim+2)=q(i,ndim+2)+p_region(k)*r/vol #if NENER>0 do ivar=1,nener q(i,ndim+2+ivar)=q(i,ndim+2+ivar)+prad_region(k,ivar)*r/vol enddo #endif #if NVAR>NDIM+2+NENER do ivar=ndim+3+nener,nvar q(i,ivar)=var_region(k,ivar-ndim-2-nener) end do #endif end do end if end do return end subroutine region_condinit subroutine reset_uold(ilevel) use amr_commons use hydro_commons use dice_commons implicit none integer::ilevel !-------------------------------------------------------------------------- ! This routine sets array uold to zero before calling ! the hydro scheme. uold is set to zero in virtual boundaries as well. !-------------------------------------------------------------------------- integer::i,ivar,ind,icpu,iskip if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Set uold to uold for myid cells do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do ivar=1,nvar do i=1,active(ilevel)%ngrid uold(active(ilevel)%igrid(i)+iskip,ivar)=0D0 end do end do end do ! Set uold to 0 for virtual boundary cells do icpu=1,ncpu do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do ivar=1,nvar do i=1,reception(icpu,ilevel)%ngrid uold(reception(icpu,ilevel)%igrid(i)+iskip,ivar)=0D0 end do end do end do end do 111 format(' Entering init_uold for level ',i2) end subroutine reset_uold subroutine init_uold(ilevel) use amr_commons use hydro_commons use dice_commons implicit none integer::ilevel !-------------------------------------------------------------------------- ! This routine sets array unew to its initial value uold before calling ! the hydro scheme. unew is set to zero in virtual boundaries. !-------------------------------------------------------------------------- integer::i,ivar,ind,icpu,iskip,idim real(dp)::u,e real(dp)::scale_l,scale_t,scale_d,scale_v,scale_nH,scale_T2 call units(scale_l,scale_t,scale_d,scale_v,scale_nH,scale_T2) if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Set uold to namelist values for myid cells do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do ivar=nvar,1,-1 do i=1,active(ilevel)%ngrid if(uold(active(ilevel)%igrid(i)+iskip,1).lt.IG_rho/scale_nH) then uold(active(ilevel)%igrid(i)+iskip,ivar) = 0D0 if(ivar.eq.1) uold(active(ilevel)%igrid(i)+iskip,ivar) = max(IG_rho/scale_nH,smallr) if(ivar.eq.ndim+2)then uold(active(ilevel)%igrid(i)+iskip,ivar) = IG_T2/scale_T2/(gamma-1)*max(IG_rho/scale_nH,smallr) endif if(metal) then if(ivar.eq.imetal) uold(active(ilevel)%igrid(i)+iskip,ivar) = max(IG_rho/scale_nH,smallr)*IG_metal endif endif end do end do end do ! Set cell averaged kinetic energy do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid ! Initialisation of the refinement mask if((ic_mask_ivar.gt.0).and.(ivar_refine.gt.0).and.(ic_mask_ivar.le.nvar).and.(ivar_refine.le.nvar))then ! Switch to K/mu for ic_mask_ivar=ndim+2 case if(ic_mask_ivar.eq.ndim+2) then u = uold(active(ilevel)%igrid(i)+iskip,ic_mask_ivar)*scale_T2*(gamma-1) else u = uold(active(ilevel)%igrid(i)+iskip,ic_mask_ivar) endif if(ic_mask_ivar.gt.1)then u = u/uold(active(ilevel)%igrid(i)+iskip,1) endif if((u.ge.ic_mask_min).and.(u.le.ic_mask_max))then uold(active(ilevel)%igrid(i)+iskip,ivar_refine) = 1.0*uold(active(ilevel)%igrid(i)+iskip,1) endif endif e = 0d0 do idim=1,ndim e = e+0.5*uold(active(ilevel)%igrid(i)+iskip,idim+1)**2/uold(active(ilevel)%igrid(i)+iskip,1) enddo uold(active(ilevel)%igrid(i)+iskip,ndim+2) = uold(active(ilevel)%igrid(i)+iskip,ndim+2)+e end do end do #ifdef SOLVERmhd ! set constant magnetic field CALL mag_constant(ilevel) ! toroidal field CALL mag_compute(ilevel) #endif ! Set uold to 0 for virtual boundary cells do icpu=1,ncpu do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do ivar=1,nvar do i=1,reception(icpu,ilevel)%ngrid uold(reception(icpu,ilevel)%igrid(i)+iskip,ivar)=0.0 end do end do end do end do 111 format(' Entering init_uold for level ',i2) end subroutine init_uold subroutine condinit_loc(ilevel) use amr_commons use pm_commons use hydro_commons use poisson_commons use dice_commons implicit none integer::ilevel !------------------------------------------------------------------ ! This routine computes the initial density field at level ilevel using ! the CIC scheme from particles that are not entirely in ! level ilevel (boundary particles). ! Arrays flag1 and flag2 are used as temporary work space. !------------------------------------------------------------------ integer::igrid,jgrid,ipart,jpart,idim,icpu,next_part integer::i,ig,ip,npart1,npart2 real(dp)::dx integer,dimension(1:nvector),save::ind_grid,ind_cell integer,dimension(1:nvector),save::ind_part,ind_grid_part real(dp),dimension(1:nvector,1:ndim),save::x0 if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Mesh spacing in that level dx=0.5D0**ilevel ! Loop over cpus do icpu=1,ncpu ! Loop over grids igrid=headl(icpu,ilevel) ig=0 ip=0 do jgrid=1,numbl(icpu,ilevel) npart1=numbp(igrid) ! Number of particles in the grid npart2=0 ! Count gas particles if(npart1>0)then ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) if(ic_mask_ptype.eq.-1)then if(idp(ipart).eq.1)then npart2=npart2+1 endif else npart2=npart2+1 endif ipart=next_part ! Go to next particle end do endif ! Gather gas particles if(npart2>0)then ig=ig+1 ind_grid(ig)=igrid ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) if(ic_mask_ptype.eq.-1)then if(idp(ipart).eq.1)then if(ig==0)then ig=1 ind_grid(ig)=igrid end if ip=ip+1 ind_part(ip)=ipart ind_grid_part(ip)=ig endif else if(ig==0)then ig=1 ind_grid(ig)=igrid end if ip=ip+1 ind_part(ip)=ipart ind_grid_part(ip)=ig endif if(ip==nvector)then ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do i=1,ig x0(i,idim)=xg(ind_grid(i),idim)-3.0D0*dx end do end do do i=1,ig ind_cell(i)=father(ind_grid(i)) end do if(amr_struct) then call init_gas_ngp(ind_grid,ind_part,ind_grid_part,ig,ip,ilevel) else call init_gas_cic(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) endif ip=0 ig=0 end if ipart=next_part ! Go to next particle end do ! End loop over particles end if igrid=next(igrid) ! Go to next grid end do ! End loop over grids if(ip>0)then ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do i=1,ig x0(i,idim)=xg(ind_grid(i),idim)-3.0D0*dx end do end do do i=1,ig ind_cell(i)=father(ind_grid(i)) end do if(amr_struct) then call init_gas_ngp(ind_grid,ind_part,ind_grid_part,ig,ip,ilevel) else call init_gas_cic(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) endif end if end do 111 format(' Entering condinit_loc for level ',I2) end subroutine condinit_loc !================================================================================== !================================================================================== !================================================================================== subroutine init_gas_cic(ind_cell,ind_part,ind_grid_part,x0,ng,np,ilevel) use amr_commons use pm_commons use hydro_commons use dice_commons use cooling_module implicit none integer::ng,np,ilevel integer ,dimension(1:nvector)::ind_cell,ind_grid_part,ind_part real(dp),dimension(1:nvector,1:ndim)::x0 !------------------------------------------------------------------ ! This routine computes the initial density field at level ilevel using ! the CIC scheme. Only cells that are in level ilevel ! are updated by the input particle list. !------------------------------------------------------------------ logical::error integer::j,ind,idim,nx_loc real(dp)::dx,dx_loc,scale ! Grid-based arrays integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids ! Particle-based arrays logical ,dimension(1:nvector),save::ok real(dp),dimension(1:nvector,1:ndim),save::xx,dd,dg integer ,dimension(1:nvector,1:ndim),save::ig,id,igg,igd,icg,icd real(dp),dimension(1:nvector,1:twotondim),save::vol integer ,dimension(1:nvector,1:twotondim),save::igrid,icell,indp,kg real(dp),dimension(1:3)::skip_loc real(dp),dimension(1:nvector),save::ethermal real(dp),dimension(1:nvector),save::vol_loc real(dp)::scale_nH,scale_T2,scale_l,scale_d,scale_t,scale_v call units(scale_l,scale_t,scale_d,scale_v,scale_nH,scale_T2) ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc(1:nvector)=dx_loc**ndim ! Gather neighboring father cells (should be present anytime !) call get3cubefather(ind_cell,nbors_father_cells,nbors_father_grids,ng,ilevel) ! Rescale particle position at level ilevel do idim=1,ndim do j=1,np xx(j,idim)=xp(ind_part(j),idim)/scale+skip_loc(idim) end do end do do idim=1,ndim do j=1,np xx(j,idim)=xx(j,idim)-x0(ind_grid_part(j),idim) end do end do do idim=1,ndim do j=1,np xx(j,idim)=xx(j,idim)/dx end do end do ! Check for illegal moves error=.false. do idim=1,ndim do j=1,np if(xx(j,idim)<0.5D0.or.xx(j,idim)>5.5D0)error=.true. end do end do if(error)then write(*,*)'problem in cic' do idim=1,ndim do j=1,np if(xx(j,idim)<0.5D0.or.xx(j,idim)>5.5D0)then write(*,*)xx(j,1:ndim) endif end do end do stop end if ! CIC at level ilevel (dd: right cloud boundary; dg: left cloud boundary) do idim=1,ndim do j=1,np dd(j,idim)=xx(j,idim)+0.5D0 id(j,idim)=dd(j,idim) dd(j,idim)=dd(j,idim)-id(j,idim) dg(j,idim)=1.0D0-dd(j,idim) ig(j,idim)=id(j,idim)-1 end do end do ! Compute cloud volumes #if NDIM==1 do j=1,np vol(j,1)=dg(j,1) vol(j,2)=dd(j,1) end do #endif #if NDIM==2 do j=1,np vol(j,1)=dg(j,1)*dg(j,2) vol(j,2)=dd(j,1)*dg(j,2) vol(j,3)=dg(j,1)*dd(j,2) vol(j,4)=dd(j,1)*dd(j,2) end do #endif #if NDIM==3 do j=1,np vol(j,1)=dg(j,1)*dg(j,2)*dg(j,3) vol(j,2)=dd(j,1)*dg(j,2)*dg(j,3) vol(j,3)=dg(j,1)*dd(j,2)*dg(j,3) vol(j,4)=dd(j,1)*dd(j,2)*dg(j,3) vol(j,5)=dg(j,1)*dg(j,2)*dd(j,3) vol(j,6)=dd(j,1)*dg(j,2)*dd(j,3) vol(j,7)=dg(j,1)*dd(j,2)*dd(j,3) vol(j,8)=dd(j,1)*dd(j,2)*dd(j,3) end do #endif ! Compute parent grids do idim=1,ndim do j=1,np igg(j,idim)=ig(j,idim)/2 igd(j,idim)=id(j,idim)/2 end do end do #if NDIM==1 do j=1,np kg(j,1)=1+igg(j,1) kg(j,2)=1+igd(j,1) end do #endif #if NDIM==2 do j=1,np kg(j,1)=1+igg(j,1)+3*igg(j,2) kg(j,2)=1+igd(j,1)+3*igg(j,2) kg(j,3)=1+igg(j,1)+3*igd(j,2) kg(j,4)=1+igd(j,1)+3*igd(j,2) end do #endif #if NDIM==3 do j=1,np kg(j,1)=1+igg(j,1)+3*igg(j,2)+9*igg(j,3) kg(j,2)=1+igd(j,1)+3*igg(j,2)+9*igg(j,3) kg(j,3)=1+igg(j,1)+3*igd(j,2)+9*igg(j,3) kg(j,4)=1+igd(j,1)+3*igd(j,2)+9*igg(j,3) kg(j,5)=1+igg(j,1)+3*igg(j,2)+9*igd(j,3) kg(j,6)=1+igd(j,1)+3*igg(j,2)+9*igd(j,3) kg(j,7)=1+igg(j,1)+3*igd(j,2)+9*igd(j,3) kg(j,8)=1+igd(j,1)+3*igd(j,2)+9*igd(j,3) end do #endif do ind=1,twotondim do j=1,np if(nbors_father_cells(ind_grid_part(j),kg(j,ind)).gt.0) then igrid(j,ind)=son(nbors_father_cells(ind_grid_part(j),kg(j,ind))) else igrid(j,ind)=0 endif end do end do ! Compute parent cell position do idim=1,ndim do j=1,np icg(j,idim)=ig(j,idim)-2*igg(j,idim) icd(j,idim)=id(j,idim)-2*igd(j,idim) end do end do #if NDIM==1 do j=1,np icell(j,1)=1+icg(j,1) icell(j,2)=1+icd(j,1) end do #endif #if NDIM==2 do j=1,np icell(j,1)=1+icg(j,1)+2*icg(j,2) icell(j,2)=1+icd(j,1)+2*icg(j,2) icell(j,3)=1+icg(j,1)+2*icd(j,2) icell(j,4)=1+icd(j,1)+2*icd(j,2) end do #endif #if NDIM==3 do j=1,np icell(j,1)=1+icg(j,1)+2*icg(j,2)+4*icg(j,3) icell(j,2)=1+icd(j,1)+2*icg(j,2)+4*icg(j,3) icell(j,3)=1+icg(j,1)+2*icd(j,2)+4*icg(j,3) icell(j,4)=1+icd(j,1)+2*icd(j,2)+4*icg(j,3) icell(j,5)=1+icg(j,1)+2*icg(j,2)+4*icd(j,3) icell(j,6)=1+icd(j,1)+2*icg(j,2)+4*icd(j,3) icell(j,7)=1+icg(j,1)+2*icd(j,2)+4*icd(j,3) icell(j,8)=1+icd(j,1)+2*icd(j,2)+4*icd(j,3) end do #endif ! Update mass density and number density fields do ind=1,twotondim ! Check if particles are entirely in level ilevel do j=1,np ok(j)=igrid(j,ind)>0 end do ! Compute parent cell adress do j=1,np if(ok(j))then indp(j,ind)=ncoarse+(icell(j,ind)-1)*ngridmax+igrid(j,ind) end if end do do j=1,np ok(j)=ok(j).and.(idp(ind_part(j)).eq.1) end do ! Update hydro variables do j=1,np if(ok(j)) then ! Specific kinetic energy of the gas particle ethermal(j)=up(ind_part(j)) ! Update hydro variable in CIC cells uold(indp(j,ind),1)=uold(indp(j,ind),1)+mp(ind_part(j))*vol(j,ind)/vol_loc(j) do idim=1,ndim uold(indp(j,ind),idim+1)=uold(indp(j,ind),idim+1)+mp(ind_part(j))*vol(j,ind)/vol_loc(j)*vp(ind_part(j),idim) end do uold(indp(j,ind),ndim+2)=uold(indp(j,ind),ndim+2)+mp(ind_part(j))*vol(j,ind)/vol_loc(j)*ethermal(j) if(metal) then uold(indp(j,ind),imetal)=uold(indp(j,ind),imetal)+mp(ind_part(j))*vol(j,ind)/vol_loc(j)*zp(ind_part(j)) endif endif ! Update passive scalar mask if(ic_mask_ptype.gt.-1) then uold(indp(j,ind),ivar_refine)=uold(indp(j,ind),ivar_refine)+mp(ind_part(j))*vol(j,ind)/vol_loc(j)*maskp(ind_part(j)) endif end do end do end subroutine init_gas_cic subroutine init_gas_ngp(ind_grid,ind_part,ind_grid_part,ng,np,ilevel) use amr_commons use pm_commons use hydro_commons use random use dice_commons implicit none integer::ng,np,ilevel integer,dimension(1:nvector)::ind_grid integer,dimension(1:nvector)::ind_grid_part,ind_part !------------------------------------------------------------------ ! This routine computes the initial density field at level ilevel using ! the NGP scheme. Only cells that are in level ilevel ! are updated by the input particle list. !------------------------------------------------------------------ integer::i,j,idim,nx_loc real(dp)::dx,dx_loc,scale ! Grid based arrays real(dp),dimension(1:nvector,1:ndim),save::x0 integer ,dimension(1:nvector),save::ind_cell integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids real(dp),dimension(1:nvector),save::ethermal ! Particle based arrays logical ,dimension(1:nvector),save::ok real(dp),dimension(1:nvector),save::vol_loc real(dp),dimension(1:nvector,1:ndim),save::x integer ,dimension(1:nvector,1:ndim),save::id,igd,icd integer ,dimension(1:nvector),save::igrid,icell,indp,kg real(dp),dimension(1:3)::skip_loc ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc(1:nvector)=dx_loc**ndim ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do i=1,ng x0(i,idim)=xg(ind_grid(i),idim)-3.0D0*dx end do end do ! Gather 27 neighboring father cells (should be present anytime !) do i=1,ng ind_cell(i)=father(ind_grid(i)) end do call get3cubefather(ind_cell,nbors_father_cells,nbors_father_grids,ng,ilevel) ! Rescale position at level ilevel do idim=1,ndim do j=1,np x(j,idim)=xp(ind_part(j),idim)/scale+skip_loc(idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)-x0(ind_grid_part(j),idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/dx end do end do ! NGP at level ilevel do idim=1,ndim do j=1,np id(j,idim)=x(j,idim) end do end do ! Compute parent grids do idim=1,ndim do j=1,np igd(j,idim)=id(j,idim)/2 end do end do do j=1,np kg(j)=1+igd(j,1)+3*igd(j,2)+9*igd(j,3) end do do j=1,np if(nbors_father_cells(ind_grid_part(j),kg(j)).gt.0) then igrid(j)=son(nbors_father_cells(ind_grid_part(j),kg(j))) else igrid(j)=0 endif end do ! Compute parent cell position do idim=1,ndim do j=1,np icd(j,idim)=id(j,idim)-2*igd(j,idim) end do end do do j=1,np icell(j)=1+icd(j,1)+2*icd(j,2)+4*icd(j,3) end do ! Check if particles are entirely in level ilevel do j=1,np ok(j)=igrid(j)>0 end do ! Compute parent cell adresses do j=1,np if(ok(j))then indp(j)=ncoarse+(icell(j)-1)*ngridmax+igrid(j) endif end do do j=1,np ok(j)=ok(j).and.(idp(ind_part(j)).eq.1) end do ! Update hydro variables do j=1,np if(ok(j))then ethermal(j)=up(ind_part(j)) ! Update density in NGP cell uold(indp(j),1)=uold(indp(j),1)+mp(ind_part(j))/vol_loc(j) ! Update velocity in NGP cell do idim=1,ndim uold(indp(j),idim+1)=uold(indp(j),idim+1)+mp(ind_part(j))/vol_loc(j)*vp(ind_part(j),idim) end do ! Update temperature in NGP cell uold(indp(j),ndim+2)=uold(indp(j),ndim+2)+mp(ind_part(j))/vol_loc(j)*ethermal(j) ! Update passive hydro variables in NGP cell if(metal) then uold(indp(j),imetal)=uold(indp(j),imetal)+mp(ind_part(j))/vol_loc(j)*zp(ind_part(j)) endif endif ! Update passive scalar mask if(ic_mask_ptype.gt.-1) then uold(indp(j),ivar_refine)=uold(indp(j),ivar_refine)+mp(ind_part(j))/vol_loc(j)*maskp(ind_part(j)) endif end do end subroutine init_gas_ngp #ifdef SOLVERmhd subroutine mag_constant(ilevel) ! constant background magnetic field use amr_commons use hydro_commons use dice_commons implicit none integer::i,ind,iskip,ilevel do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid uold(active(ilevel)%igrid(i)+iskip,6:8) = ic_mag_const uold(active(ilevel)%igrid(i)+iskip,nvar+1:nvar+3) = ic_mag_const enddo enddo end subroutine mag_constant subroutine mag_compute(ilevel) use amr_commons !use pm_commons use hydro_commons use dice_commons !use random implicit none integer::i,j,ilevel,icell logical::nogal real(dp)::Axdl,Axdr,Axul,Axur real(dp)::Aydl,Aydr,Ayul,Ayur real(dp)::Azdl,Azdr,Azul,Azur real(dp)::Bxl,Bxr,Byl,Byr,Bzl,Bzr real(dp),dimension(1:3)::pos,cell_center real(dp)::dx,dxhalf,dxmin,dxminhalf,scale,dx_loc,vol_loc integer::nx_loc,ind,ix,iy,iz,iskip,nfine real(dp),dimension(1:3)::skip_loc real(dp),dimension(1:twotondim,1:3)::xc nogal=.true. do i=1,MAXGAL ! check if galaxy has a magnetic field if (ic_mag_scale_B(i) .NE. 0.0) nogal=.false. enddo if (nogal) return ! Mesh spacing in that level dx=0.5D0**ilevel dxhalf = 0.5D0*dx dxmin = 0.5D0**nlevelmax dxminhalf = 0.5D0*dxmin nfine = 2**(nlevelmax-ilevel) nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc=dx_loc**ndim do ind=1,twotondim iz=(ind-1)/4 iy=(ind-1-4*iz)/2 ix=(ind-1-2*iy-4*iz) if(ndim>0)xc(ind,1)=(dble(ix)-0.5D0)*dx if(ndim>1)xc(ind,2)=(dble(iy)-0.5D0)*dx if(ndim>2)xc(ind,3)=(dble(iz)-0.5D0)*dx end do ! compute field do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do j=1,active(ilevel)%ngrid icell=active(ilevel)%igrid(j) cell_center = xg(icell,:)+xc(ind,:)-skip_loc(:) ! edge coordinates ! Ax pos = cell_center pos(1) = pos(1) - dxhalf + dxminhalf pos(2) = pos(2) - dxhalf pos(3) = pos(3) - dxhalf Axdl=0.0;Axdr=0.0;Axul=0.0;Axur=0.0 do i=1,nfine CALL mag_toroidal(pos,1,Axdl) pos(1) = pos(1) + dxmin enddo pos(2) = pos(2) + dx do i=1,nfine pos(1) = pos(1) - dxmin CALL mag_toroidal(pos,1,Axdr) enddo pos(3) = pos(3) + dx do i=1,nfine CALL mag_toroidal(pos,1,Axur) pos(1) = pos(1) + dxmin enddo pos(2) = pos(2) - dx do i=1,nfine pos(1) = pos(1) - dxmin CALL mag_toroidal(pos,1,Axul) enddo ! Ay pos = cell_center pos(1) = pos(1) - dxhalf pos(2) = pos(2) - dxhalf + dxminhalf pos(3) = pos(3) - dxhalf Aydl=0.0;Aydr=0.0;Ayul=0.0;Ayur=0.0 do i=1,nfine CALL mag_toroidal(pos,2,Aydl) pos(2) = pos(2) + dxmin enddo pos(1) = pos(1) + dx do i=1,nfine pos(2) = pos(2) - dxmin CALL mag_toroidal(pos,2,Aydr) enddo pos(3) = pos(3) + dx do i=1,nfine CALL mag_toroidal(pos,2,Ayur) pos(2) = pos(2) + dxmin enddo pos(1) = pos(1) - dx do i=1,nfine pos(2) = pos(2) - dxmin CALL mag_toroidal(pos,2,Ayul) enddo ! Az pos = cell_center pos(1) = pos(1) - dxhalf pos(2) = pos(2) - dxhalf pos(3) = pos(3) - dxhalf + dxminhalf Azdl=0.0;Azdr=0.0;Azul=0.0;Azur=0.0 do i=1,nfine CALL mag_toroidal(pos,3,Azdl) pos(3) = pos(3) + dxmin enddo pos(1) = pos(1) + dx do i=1,nfine pos(3) = pos(3) - dxmin CALL mag_toroidal(pos,3,Azdr) enddo pos(2) = pos(2) + dx do i=1,nfine CALL mag_toroidal(pos,3,Azur) pos(3) = pos(3) + dxmin enddo pos(1) = pos(1) - dx do i=1,nfine pos(3) = pos(3) - dxmin CALL mag_toroidal(pos,3,Azul) enddo ! Bx left Bxl = ((Azul - Azdl) - (Ayul - Aydl))/dx / nfine uold(icell+iskip,6) = uold(icell+iskip,6) + Bxl ! By left Byl = ((Axul - Axdl) - (Azdr - Azdl))/dx / nfine uold(icell+iskip,7) = uold(icell+iskip,7) + Byl ! Bz left Bzl = ((Aydr - Aydl) - (Axdr - Axdl))/dx / nfine uold(icell+iskip,8) = uold(icell+iskip,8) + Bzl ! Bx right Bxr = ((Azur - Azdr) - (Ayur - Aydr))/dx / nfine uold(icell+iskip,nvar+1) = uold(icell+iskip,nvar+1) + Bxr ! By right Byr = ((Axur - Axdr) - (Azur - Azul))/dx / nfine uold(icell+iskip,nvar+2) = uold(icell+iskip,nvar+2) + Byr ! Bz right Bzr = ((Ayur - Ayul) - (Axur - Axul))/dx / nfine uold(icell+iskip,nvar+3) = uold(icell+iskip,nvar+3) + Bzr end do end do end subroutine mag_compute subroutine mag_toroidal(pos,dir,A) use dice_commons use amr_parameters, ONLY: boxlen implicit none real(dp)::r,h real(dp)::Ah,A integer::i,dir real(dp),dimension(1:3)::pos,gcenter,gaxis,xrel,grad real(dp)::sB,sR,sH do i=1,MAXGAL ! check if galaxy has a magnetic field if (ic_mag_scale_B(i) .EQ. 0.0) cycle gcenter(1) = 0.5d0 + ic_mag_center_x(i)/boxlen gcenter(2) = 0.5d0 + ic_mag_center_y(i)/boxlen gcenter(3) = 0.5d0 + ic_mag_center_z(i)/boxlen gaxis(1) = ic_mag_axis_x(i) gaxis(2) = ic_mag_axis_y(i) gaxis(3) = ic_mag_axis_z(i) sR = ic_mag_scale_R(i) / boxlen sH = ic_mag_scale_H(i) / boxlen sB = ic_mag_scale_B(i) ! coordinates in galaxy frame xrel = pos - gcenter h = DOT_PRODUCT(xrel,gaxis) grad = xrel - h*gaxis r = NORM2(grad) Ah = sB * sR * exp(-r/sR) * exp(-ABS(h)/sH) ! vector in cartesian frame A = A + Ah*gaxis(dir) end do end subroutine #endif /data2/mabe/MeraTest/Ramses/patch_2019_10version/init_part.f90 subroutine init_part use amr_commons use pm_commons use clfind_commons ! DICE patch use dice_commons use cooling_module use gadgetreadfilemod ! DICE patch #ifdef RT use rt_parameters,only: convert_birth_times #endif use mpi_mod implicit none !------------------------------------------------------------ ! Allocate particle-based arrays. ! Read particles positions and velocities from grafic files !------------------------------------------------------------ integer::npart2,ndim2,ncpu2 integer::ipart,jpart,ipart_old,ilevel,idim integer::i,igrid,ncache,ngrid,iskip integer::ind,ix,iy,iz,ilun,icpu integer::i1,i2,i3 integer::i1_min=0,i1_max=0,i2_min=0,i2_max=0,i3_min=0,i3_max=0 integer::buf_count,indglob real(dp)::dx,xx1,xx2,xx3,vv1,vv2,vv3,mm1 real(dp)::min_mdm_cpu,min_mdm_all real(dp),dimension(1:twotondim,1:3)::xc integer ,dimension(1:nvector)::ind_grid,ind_cell,ii integer,dimension(1:nvector)::pp integer(i8b),dimension(1:ncpu)::npart_cpu,npart_all real(dp),allocatable,dimension(:)::xdp integer,allocatable,dimension(:)::isp integer(i8b),allocatable,dimension(:)::isp8 integer(1),allocatable,dimension(:)::ii1 real(kind=4),allocatable,dimension(:,:)::init_plane,init_plane_x integer(i8b),allocatable,dimension(:,:)::init_plane_id real(dp),allocatable,dimension(:,:,:)::init_array,init_array_x integer(i8b),allocatable,dimension(:,:,:)::init_array_id real(kind=8),dimension(1:nvector,1:3)::xx,vv real(kind=8),dimension(1:nvector)::mm type(part_t)::tmppart real(kind=8)::dispmax=0.0 #ifndef WITHOUTMPI real(dp),dimension(1:nvector,1:3)::xx_dp integer,dimension(1:nvector)::cc integer,dimension(MPI_STATUS_SIZE,2*ncpu)::statuses integer,dimension(2*ncpu)::reqsend,reqrecv integer,dimension(ncpu)::sendbuf,recvbuf integer::dummy_io,info,info2,npart_new integer::countsend,countrecv integer::ibuf,tagu=102 integer,parameter::tagg=1109,tagg2=1110,tagg3=1111 #endif logical::error,keep_part,eof,read_pos=.false.,ok,read_ids=.false. character(LEN=80)::filename,filename_x, filename_id character(LEN=80)::fileloc character(LEN=20)::filetype_loc character(LEN=5)::nchar,ncharcpu ! DICE patch integer::j,type_index integer::dummy_int,blck_size,jump_blck,blck_cnt,stat,ifile integer::head_blck,pos_blck,vel_blck,id_blck,mass_blck,u_blck,metal_blck,age_blck integer::head_size,pos_size,vel_size,id_size,mass_size,u_size,metal_size,age_size integer::kpart,lpart,mpart,opart,gpart,ngas,nhalo !integer, dimension(nvector)::ids real(dp)::scale_nH,scale_T2,scale_l,scale_d,scale_t,scale_v,scale_m real(dp),dimension(1:nvector)::tt,zz,uu real,dimension(1:nvector,1:3)::xx_sp,vv_sp real,dimension(1:nvector)::mm_sp,tt_sp,zz_sp,uu_sp real(dp)::mgas_tot real::dummy_real,ipbar character(LEN=12)::ifile_str character(LEN=4)::blck_name logical::eob,file_exists,skip TYPE(gadgetheadertype)::header ! DICE patch if(verbose)write(*,*)'Entering init_part' if(myid.eq.1)write(*,*)'WARNING: NEVER USE FAMILY CODES / TAGS > 127.' if(myid.eq.1)write(*,*)'See https://bitbucket.org/rteyssie/ramses/wiki/Particle%20Families' if(allocated(xp))then if(verbose)write(*,*)'Initial conditions already set' return end if ! Allocate particle variables allocate(xp (npartmax,ndim)) allocate(vp (npartmax,ndim)) allocate(mp (npartmax)) allocate(nextp (npartmax)) allocate(prevp (npartmax)) allocate(levelp(npartmax)) allocate(idp (npartmax)) allocate(typep (npartmax)) #ifdef OUTPUT_PARTICLE_POTENTIAL allocate(ptcl_phi(npartmax)) #endif ! DICE patch allocate(up(npartmax)) if(ic_mask_ptype.gt.-1)then allocate(maskp(npartmax)) endif ! DICE patch xp=0.0; vp=0.0; mp=0.0; levelp=0; idp=0 typep(1:npartmax)%family=FAM_UNDEF; typep(1:npartmax)%tag=0 if(star.or.sink)then allocate(tp(npartmax)) tp=0.0 if(metal)then allocate(zp(npartmax)) zp=0.0 end if end if !-------------------- ! Read part.tmp file !-------------------- if(nrestart>0)then ilun=2*ncpu+myid+103 call title(nrestart,nchar) if(IOGROUPSIZEREP>0)then call title(((myid-1)/IOGROUPSIZEREP)+1,ncharcpu) fileloc='output_'//TRIM(nchar)//'/group_'//TRIM(ncharcpu)//'/part_'//TRIM(nchar)//'.out' else fileloc='output_'//TRIM(nchar)//'/part_'//TRIM(nchar)//'.out' endif call title(myid,nchar) fileloc=TRIM(fileloc)//TRIM(nchar) ! Wait for the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if (mod(myid-1,IOGROUPSIZE)/=0) then call MPI_RECV(dummy_io,1,MPI_INTEGER,myid-1-1,tagg,& & MPI_COMM_WORLD,MPI_STATUS_IGNORE,info2) end if endif #endif open(unit=ilun,file=fileloc,form='unformatted') rewind(ilun) read(ilun)ncpu2 read(ilun)ndim2 read(ilun)npart2 read(ilun)localseed read(ilun)nstar_tot read(ilun)mstar_tot read(ilun)mstar_lost read(ilun)nsink if(ncpu2.ne.ncpu.or.ndim2.ne.ndim.or.npart2.gt.npartmax)then write(*,*)'File part.tmp not compatible' write(*,*)'Found =',ncpu2,ndim2,npart2 write(*,*)'Expected=',ncpu,ndim,npartmax call clean_stop end if ! Read position allocate(xdp(1:npart2)) do idim=1,ndim read(ilun)xdp xp(1:npart2,idim)=xdp end do ! Read velocity do idim=1,ndim read(ilun)xdp vp(1:npart2,idim)=xdp end do ! Read mass read(ilun)xdp mp(1:npart2)=xdp deallocate(xdp) ! Read identity allocate(isp8(1:npart2)) read(ilun)isp8 idp(1:npart2)=isp8 deallocate(isp8) ! Read level allocate(isp(1:npart2)) read(ilun)isp levelp(1:npart2)=isp deallocate(isp) ! Read family allocate(ii1(1:npart2)) read(ilun)ii1 typep(1:npart2)%family = ii1 ! Read tag read(ilun)ii1 typep(1:npart2)%tag = ii1 deallocate(ii1) #ifdef OUTPUT_PARTICLE_POTENTIAL ! We don't need the potential, but read it anyway (to get the records correctly for tp/zp) read(ilun) #endif if(star.or.sink)then ! Read birth epoch allocate(xdp(1:npart2)) read(ilun)xdp tp(1:npart2)=xdp if(convert_birth_times) then do i = 1, npart2 ! Convert birth time to proper for RT postpr. call getProperTime(tp(i),tp(i)) enddo endif if(metal)then ! Read metallicity read(ilun)xdp zp(1:npart2)=xdp end if deallocate(xdp) end if close(ilun) ! Send the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if(mod(myid,IOGROUPSIZE)/=0 .and.(myid.lt.ncpu))then dummy_io=1 call MPI_SEND(dummy_io,1,MPI_INTEGER,myid-1+1,tagg, & & MPI_COMM_WORLD,info2) end if endif #endif ! Get nlevelmax_part from cosmological inital conditions if(cosmo)then min_mdm_cpu = 1.0 do ipart=1,npart2 ! Get dark matter only if (is_DM(typep(ipart))) then ! note: using two nested if so that the second one is only evaluated for DM particles if (mp(ipart) .lt. min_mdm_cpu) min_mdm_cpu = mp(ipart) end if end do #ifndef WITHOUTMPI call MPI_ALLREDUCE(min_mdm_cpu,min_mdm_all,1,MPI_DOUBLE_PRECISION,MPI_MIN,MPI_COMM_WORLD,info) #else min_mdm_all = min_mdm_cpu #endif ilevel = 1 do while(.true.) mm1 = 0.5d0**(3*ilevel)*(1.0d0-omega_b/omega_m) if((mm1.GT.0.90*min_mdm_all).AND.(mm1.LT.1.10*min_mdm_all))then nlevelmax_part = ilevel exit endif ilevel = ilevel+1 enddo if(myid==1) write(*,*) 'nlevelmax_part=',nlevelmax_part endif if(debug)write(*,*)'part.tmp read for processor ',myid npart=npart2 else filetype_loc=filetype !if(.not. cosmo)filetype_loc='ascii' select case (filetype_loc) case ('grafic') call load_grafic case ('ascii') call load_ascii case ('gadget') call load_gadget case ('dice') call load_dice case DEFAULT write(*,*) 'Unsupported format file ' // filetype call clean_stop end select end if if(sink)call init_sink contains subroutine load_grafic ! Read data in the grafic format. The particle type is derived ! following conversion rules (see pm_commons:props2type) ! Grafic format for Ramses assumes the following unit for particles: ! - Header lengths (boxszie, pixel size...) in comoving Mpc ! - Velocities in proper km s**-1 (file ic_velc*) ! - Displacements from cell centers in comoving Mpc/h ! (file ic_posc* if present, if not generated through Zeldovich approximation) ! - Ids in int or long int ! (file ic_particle_ids if present, if not generated internally) !---------------------------------------------------- ! Reading initial conditions GRAFIC2 multigrid arrays !---------------------------------------------------- ipart=0 ! Loop over initial condition levels do ilevel=levelmin,nlevelmax if(initfile(ilevel)==' ')cycle ! Mesh size at level ilevel in coarse cell units dx=0.5D0**ilevel ! Set position of cell centers relative to grid center do ind=1,twotondim iz=(ind-1)/4 iy=(ind-1-4*iz)/2 ix=(ind-1-2*iy-4*iz) if(ndim>0)xc(ind,1)=(dble(ix)-0.5D0)*dx if(ndim>1)xc(ind,2)=(dble(iy)-0.5D0)*dx if(ndim>2)xc(ind,3)=(dble(iz)-0.5D0)*dx end do !-------------------------------------------------------------- ! First step: compute level boundaries and particle positions !-------------------------------------------------------------- i1_min=n1(ilevel)+1; i1_max=0 i2_min=n2(ilevel)+1; i2_max=0 i3_min=n3(ilevel)+1; i3_max=0 ipart_old=ipart ! Loop over grids by vector sweeps ncache=active(ilevel)%ngrid do igrid=1,ncache,nvector ngrid=MIN(nvector,ncache-igrid+1) do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do ! Loop over cells do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,ngrid ind_cell(i)=iskip+ind_grid(i) end do do i=1,ngrid xx1=xg(ind_grid(i),1)+xc(ind,1) xx1=(xx1*(dxini(ilevel)/dx)-xoff1(ilevel))/dxini(ilevel) xx2=xg(ind_grid(i),2)+xc(ind,2) xx2=(xx2*(dxini(ilevel)/dx)-xoff2(ilevel))/dxini(ilevel) xx3=xg(ind_grid(i),3)+xc(ind,3) xx3=(xx3*(dxini(ilevel)/dx)-xoff3(ilevel))/dxini(ilevel) i1_min=MIN(i1_min,int(xx1)+1) i1_max=MAX(i1_max,int(xx1)+1) i2_min=MIN(i2_min,int(xx2)+1) i2_max=MAX(i2_max,int(xx2)+1) i3_min=MIN(i3_min,int(xx3)+1) i3_max=MAX(i3_max,int(xx3)+1) keep_part=son(ind_cell(i))==0 if(keep_part)then ipart=ipart+1 if(ipart>npartmax)then write(*,*)'Maximum number of particles incorrect' write(*,*)'npartmax should be greater than',ipart call clean_stop endif if(ndim>0)xp(ipart,1)=xg(ind_grid(i),1)+xc(ind,1) if(ndim>1)xp(ipart,2)=xg(ind_grid(i),2)+xc(ind,2) if(ndim>2)xp(ipart,3)=xg(ind_grid(i),3)+xc(ind,3) mp(ipart)=0.5d0**(3*ilevel)*(1.0d0-omega_b/omega_m) end if end do end do ! End loop over cells end do ! End loop over grids ! Check that all grids are within initial condition region error=.false. if(active(ilevel)%ngrid>0)then if(i1_min<1.or.i1_max>n1(ilevel))error=.true. if(i2_min<1.or.i2_max>n2(ilevel))error=.true. if(i3_min<1.or.i3_max>n3(ilevel))error=.true. end if if(error) then write(*,*)'Some grid are outside initial conditions sub-volume' write(*,*)'for ilevel=',ilevel write(*,*)i1_min,i1_max write(*,*)i2_min,i2_max write(*,*)i3_min,i3_max write(*,*)n1(ilevel),n2(ilevel),n3(ilevel) call clean_stop end if if(debug)then write(*,*)myid,i1_min,i1_max,i2_min,i2_max,i3_min,i3_max endif !--------------------------------------------------------------------- ! Second step: read initial condition file and set particle velocities !--------------------------------------------------------------------- ! Allocate initial conditions array if(active(ilevel)%ngrid>0)then allocate(init_array(i1_min:i1_max,i2_min:i2_max,i3_min:i3_max)) allocate(init_array_x(i1_min:i1_max,i2_min:i2_max,i3_min:i3_max)) init_array=0d0 init_array_x=0d0 end if allocate(init_plane(1:n1(ilevel),1:n2(ilevel))) allocate(init_plane_x(1:n1(ilevel),1:n2(ilevel))) filename_id=TRIM(initfile(ilevel))//'/ic_particle_ids' INQUIRE(file=filename_id,exist=read_ids) if(read_ids) then if(myid==1)write(*,*)'Reading particle ids from file '//TRIM(filename_id) allocate(init_plane_id(1:n1(ilevel),1:n2(ilevel))) allocate(init_array_id(i1_min:i1_max,i2_min:i2_max,i3_min:i3_max)) end if ! Loop over input variables do idim=1,ndim ! Read dark matter initial displacement field if(multiple)then call title(myid,nchar) if(idim==1)filename=TRIM(initfile(ilevel))//'/dir_velcx/ic_velcx.'//TRIM(nchar) if(idim==2)filename=TRIM(initfile(ilevel))//'/dir_velcy/ic_velcy.'//TRIM(nchar) if(idim==3)filename=TRIM(initfile(ilevel))//'/dir_velcz/ic_velcz.'//TRIM(nchar) else if(idim==1)filename=TRIM(initfile(ilevel))//'/ic_velcx' if(idim==2)filename=TRIM(initfile(ilevel))//'/ic_velcy' if(idim==3)filename=TRIM(initfile(ilevel))//'/ic_velcz' if(idim==1)filename_x=TRIM(initfile(ilevel))//'/ic_poscx' if(idim==2)filename_x=TRIM(initfile(ilevel))//'/ic_poscy' if(idim==3)filename_x=TRIM(initfile(ilevel))//'/ic_poscz' INQUIRE(file=filename_x,exist=ok) if(.not.ok)then read_pos = .false. else read_pos = .true. if(myid==1)write(*,*)'Reading file '//TRIM(filename_x) end if endif if(myid==1)write(*,*)'Reading file '//TRIM(filename) if(multiple)then ilun=myid+103 ! Wait for the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if (mod(myid-1,IOGROUPSIZE)/=0) then call MPI_RECV(dummy_io,1,MPI_INTEGER,myid-1-1,tagg2,& & MPI_COMM_WORLD,MPI_STATUS_IGNORE,info2) end if endif #endif open(ilun,file=filename,form='unformatted') rewind ilun read(ilun) ! skip first line do i3=1,n3(ilevel) read(ilun)((init_plane(i1,i2),i1=1,n1(ilevel)),i2=1,n2(ilevel)) if(active(ilevel)%ngrid>0)then if(i3.ge.i3_min.and.i3.le.i3_max)then init_array(i1_min:i1_max,i2_min:i2_max,i3) = & & init_plane(i1_min:i1_max,i2_min:i2_max) end if endif end do close(ilun) ! Send the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if(mod(myid,IOGROUPSIZE)/=0 .and.(myid.lt.ncpu))then dummy_io=1 call MPI_SEND(dummy_io,1,MPI_INTEGER,myid-1+1,tagg2, & & MPI_COMM_WORLD,info2) end if endif #endif else if(myid==1)then open(10,file=filename,form='unformatted') rewind 10 read(10) ! skip first line end if do i3=1,n3(ilevel) if(myid==1)then if(debug.and.mod(i3,10)==0)write(*,*)'Reading plane ',i3 read(10)((init_plane(i1,i2),i1=1,n1(ilevel)),i2=1,n2(ilevel)) else init_plane=0.0 endif buf_count=n1(ilevel)*n2(ilevel) #ifndef WITHOUTMPI call MPI_BCAST(init_plane,buf_count,MPI_REAL,0,MPI_COMM_WORLD,info) #endif if(active(ilevel)%ngrid>0)then if(i3.ge.i3_min.and.i3.le.i3_max)then init_array(i1_min:i1_max,i2_min:i2_max,i3) = & & init_plane(i1_min:i1_max,i2_min:i2_max) end if endif end do if(myid==1)close(10) if(read_pos) then if(myid==1)then open(10,file=filename_x,form='unformatted') rewind 10 read(10) ! skip first line end if do i3=1,n3(ilevel) if(myid==1)then if(debug.and.mod(i3,10)==0)write(*,*)'Reading plane ',i3 read(10)((init_plane_x(i1,i2),i1=1,n1(ilevel)),i2=1,n2(ilevel)) else init_plane_x=0.0 endif buf_count=n1(ilevel)*n2(ilevel) #ifndef WITHOUTMPI call MPI_BCAST(init_plane_x,buf_count,MPI_REAL,0,MPI_COMM_WORLD,info) #endif if(active(ilevel)%ngrid>0)then if(i3.ge.i3_min.and.i3.le.i3_max)then init_array_x(i1_min:i1_max,i2_min:i2_max,i3) = & & init_plane_x(i1_min:i1_max,i2_min:i2_max) end if endif end do if(myid==1)close(10) end if if(read_ids) then if(myid==1)then open(10,file=filename_id,form='unformatted') rewind 10 read(10) ! skip first line end if do i3=1,n3(ilevel) if(myid==1)then if(debug.and.mod(i3,10)==0)write(*,*)'Reading plane ',i3 read(10)((init_plane_id(i1,i2),i1=1,n1(ilevel)),i2=1,n2(ilevel)) else init_plane_id=0.0 endif buf_count=n1(ilevel)*n2(ilevel) #ifndef WITHOUTMPI #ifndef LONGINT call MPI_BCAST(init_plane_id,buf_count,MPI_INTEGER,0,MPI_COMM_WORLD,info) #else call MPI_BCAST(init_plane_id,buf_count,MPI_INTEGER8,0,MPI_COMM_WORLD,info) #endif #endif if(active(ilevel)%ngrid>0)then if(i3.ge.i3_min.and.i3.le.i3_max)then init_array_id(i1_min:i1_max,i2_min:i2_max,i3) = & & init_plane_id(i1_min:i1_max,i2_min:i2_max) end if endif end do if(myid==1)close(10) end if endif if(active(ilevel)%ngrid>0)then ! Rescale initial displacement field to code units init_array=dfact(ilevel)*dx/dxini(ilevel)*init_array/vfact(ilevel) if(read_pos)then init_array_x = init_array_x/boxlen_ini endif ! Loop over grids by vector sweeps ipart=ipart_old ncache=active(ilevel)%ngrid do igrid=1,ncache,nvector ngrid=MIN(nvector,ncache-igrid+1) do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do ! Loop over cells do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,ngrid ind_cell(i)=iskip+ind_grid(i) end do do i=1,ngrid xx1=xg(ind_grid(i),1)+xc(ind,1) xx1=(xx1*(dxini(ilevel)/dx)-xoff1(ilevel))/dxini(ilevel) xx2=xg(ind_grid(i),2)+xc(ind,2) xx2=(xx2*(dxini(ilevel)/dx)-xoff2(ilevel))/dxini(ilevel) xx3=xg(ind_grid(i),3)+xc(ind,3) xx3=(xx3*(dxini(ilevel)/dx)-xoff3(ilevel))/dxini(ilevel) i1=int(xx1)+1 i1=int(xx1)+1 i2=int(xx2)+1 i2=int(xx2)+1 i3=int(xx3)+1 i3=int(xx3)+1 keep_part=son(ind_cell(i))==0 if(keep_part)then ipart=ipart+1 vp(ipart,idim)=init_array(i1,i2,i3) if(.not. read_pos)then dispmax=max(dispmax,abs(init_array(i1,i2,i3)/dx)) else xp(ipart,idim)=xg(ind_grid(i),idim)+xc(ind,idim)+init_array_x(i1,i2,i3) dispmax=max(dispmax,abs(init_array_x(i1,i2,i3)/dx)) if (read_ids) then idp(ipart) = init_array_id(i1,i2,i3) end if endif end if end do end do ! End loop over cells end do ! End loop over grids endif end do ! End loop over input variables ! Deallocate initial conditions array if(active(ilevel)%ngrid>0)then deallocate(init_array,init_array_x) end if deallocate(init_plane,init_plane_x) if(read_ids) then deallocate(init_plane_id) deallocate(init_array_id) end if if(debug)write(*,*)'npart=',ipart,'/',npartmax,' for PE=',myid end do ! End loop over levels ! Initial particle number npart=ipart ! Move particle according to Zeldovich approximation if(.not. read_pos)then xp(1:npart,1:ndim)=xp(1:npart,1:ndim)+vp(1:npart,1:ndim) endif ! Scale displacement to velocity vp(1:npart,1:ndim)=vfact(1)*vp(1:npart,1:ndim) ! Periodic box do ipart=1,npart #if NDIM>0 if(xp(ipart,1)< 0.0d0 )xp(ipart,1)=xp(ipart,1)+dble(nx) if(xp(ipart,1)>=dble(nx))xp(ipart,1)=xp(ipart,1)-dble(nx) #endif #if NDIM>1 if(xp(ipart,2)< 0.0d0 )xp(ipart,2)=xp(ipart,2)+dble(ny) if(xp(ipart,2)>=dble(ny))xp(ipart,2)=xp(ipart,2)-dble(ny) #endif #if NDIM>2 if(xp(ipart,3)< 0.0d0 )xp(ipart,3)=xp(ipart,3)+dble(nz) if(xp(ipart,3)>=dble(nz))xp(ipart,3)=xp(ipart,3)-dble(nz) #endif end do #ifndef WITHOUTMPI ! Compute particle Hilbert ordering sendbuf=0 do ipart=1,npart xx(1,1:3)=xp(ipart,1:3) xx_dp(1,1:3)=xx(1,1:3) call cmp_cpumap(xx_dp,cc,1) if(cc(1).ne.myid)sendbuf(cc(1))=sendbuf(cc(1))+1 end do ! Allocate communication buffer in emission do icpu=1,ncpu ncache=sendbuf(icpu) if(ncache>0)then allocate(emission(icpu,1)%up(1:ncache,1:twondim+1)) allocate(emission(icpu,1)%fp(1:ncache,1:2)) end if end do ! Fill communicators jpart=0 sendbuf=0 do ipart=1,npart xx(1,1:3)=xp(ipart,1:3) xx_dp(1,1:3)=xx(1,1:3) call cmp_cpumap(xx_dp,cc,1) if(cc(1).ne.myid)then icpu=cc(1) sendbuf(icpu)=sendbuf(icpu)+1 ibuf=sendbuf(icpu) emission(icpu,1)%up(ibuf,1)=xp(ipart,1) emission(icpu,1)%up(ibuf,2)=xp(ipart,2) emission(icpu,1)%up(ibuf,3)=xp(ipart,3) emission(icpu,1)%up(ibuf,4)=vp(ipart,1) emission(icpu,1)%up(ibuf,5)=vp(ipart,2) emission(icpu,1)%up(ibuf,6)=vp(ipart,3) emission(icpu,1)%up(ibuf,7)=mp(ipart) emission(icpu,1)%fp(ibuf,1)=part2int(typep(ipart)) emission(icpu,1)%fp(ibuf,2)=idp(ipart) else jpart=jpart+1 xp(jpart,1:3)=xp(ipart,1:3) vp(jpart,1:3)=vp(ipart,1:3) mp(jpart) =mp(ipart) idp(jpart) =idp(ipart) endif end do ! Communicate virtual particle number to parent cpu call MPI_ALLTOALL(sendbuf,1,MPI_INTEGER,recvbuf,1,MPI_INTEGER,MPI_COMM_WORLD,info) ! Compute total number of newly created particles npart_new=0 do icpu=1,ncpu npart_new=npart_new+recvbuf(icpu) end do if(jpart+npart_new.gt.npartmax)then write(*,*)'No more free memory for particles' write(*,*)'Increase npartmax' write(*,*)myid write(*,*)jpart,npart_new write(*,*)bound_key call MPI_ABORT(MPI_COMM_WORLD,1,info) end if ! Allocate communication buffer in reception do icpu=1,ncpu ncache=recvbuf(icpu) if(ncache>0)then allocate(reception(icpu,1)%up(1:ncache,1:twondim+1)) allocate(reception(icpu,1)%fp(1:ncache,1:2)) end if end do ! Taking care of real values ! Receive particles countrecv=0 do icpu=1,ncpu ncache=recvbuf(icpu) if(ncache>0)then buf_count=ncache*(twondim+1) countrecv=countrecv+1 call MPI_IRECV(reception(icpu,1)%up,buf_count, & & MPI_DOUBLE_PRECISION,icpu-1,& & tagu,MPI_COMM_WORLD,reqrecv(countrecv),info) end if end do ! Send particles countsend=0 do icpu=1,ncpu ncache=sendbuf(icpu) if(ncache>0)then buf_count=ncache*(twondim+1) countsend=countsend+1 call MPI_ISEND(emission(icpu,1)%up,buf_count, & & MPI_DOUBLE_PRECISION,icpu-1,& & tagu,MPI_COMM_WORLD,reqsend(countsend),info) end if end do ! Wait for full completion of receives call MPI_WAITALL(countrecv,reqrecv,statuses,info) ! Wait for full completion of sends call MPI_WAITALL(countsend,reqsend,statuses,info) ! Taking care of int values ! Receive particles countrecv=0 do icpu=1,ncpu ncache=recvbuf(icpu) if(ncache>0)then buf_count=ncache * 2 countrecv=countrecv+1 #ifndef LONGINT call MPI_IRECV(reception(icpu,1)%fp,buf_count, & & MPI_INTEGER,icpu-1,& & tagu,MPI_COMM_WORLD,reqrecv(countrecv),info) #else call MPI_IRECV(reception(icpu,1)%fp,buf_count, & & MPI_INTEGER8,icpu-1,& & tagu,MPI_COMM_WORLD,reqrecv(countrecv),info) #endif end if end do ! Send particles countsend=0 do icpu=1,ncpu ncache=sendbuf(icpu) if(ncache>0)then buf_count=ncache * 2 countsend=countsend+1 #ifndef LONGINT call MPI_ISEND(emission(icpu,1)%fp,buf_count, & & MPI_INTEGER,icpu-1,& & tagu,MPI_COMM_WORLD,reqsend(countsend),info) #else call MPI_ISEND(emission(icpu,1)%fp,buf_count, & & MPI_INTEGER8,icpu-1,& & tagu,MPI_COMM_WORLD,reqsend(countsend),info) #endif end if end do ! Wait for full completion of receives call MPI_WAITALL(countrecv,reqrecv,statuses,info) ! Wait for full completion of sends call MPI_WAITALL(countsend,reqsend,statuses,info) ! Create new particles do icpu=1,ncpu do ibuf=1,recvbuf(icpu) jpart=jpart+1 xp(jpart,1)=reception(icpu,1)%up(ibuf,1) xp(jpart,2)=reception(icpu,1)%up(ibuf,2) xp(jpart,3)=reception(icpu,1)%up(ibuf,3) vp(jpart,1)=reception(icpu,1)%up(ibuf,4) vp(jpart,2)=reception(icpu,1)%up(ibuf,5) vp(jpart,3)=reception(icpu,1)%up(ibuf,6) mp(jpart) =reception(icpu,1)%up(ibuf,7) idp(jpart) =reception(icpu,1)%fp(ibuf,2) end do end do ! Erase old particles do ipart=jpart+1,npart xp(ipart,1)=0d0 xp(ipart,2)=0d0 xp(ipart,3)=0d0 vp(ipart,1)=0d0 vp(ipart,2)=0d0 vp(ipart,3)=0d0 mp(ipart)=0d0 idp(ipart)=0 end do npart=jpart ! Deallocate communicators do icpu=1,ncpu if(sendbuf(icpu)>0) then deallocate(emission(icpu,1)%up) deallocate(emission(icpu,1)%fp) end if if(recvbuf(icpu)>0)then deallocate(reception(icpu,1)%up) deallocate(reception(icpu,1)%fp) end if end do write(*,*)'npart=',ipart,'/',npartmax,' for PE=',myid #endif ! Compute particle initial level do ipart=1,npart levelp(ipart)=levelmin end do ! Setup DM for all particles do ipart=1, npart typep(ipart)%family = FAM_DM typep(ipart)%tag = 0 end do ! Compute particle initial age and metallicity if(star.or.sink)then do ipart=1,npart tp(ipart)=0d0 if(metal)then zp(ipart)=0d0 end if end do end if ! Compute particle initial identity if(.not.read_ids) then npart_cpu=0; npart_all=0 npart_cpu(myid)=npart #ifndef WITHOUTMPI #ifndef LONGINT call MPI_ALLREDUCE(npart_cpu,npart_all,ncpu,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,info) #else call MPI_ALLREDUCE(npart_cpu,npart_all,ncpu,MPI_INTEGER8,MPI_SUM,MPI_COMM_WORLD,info) #endif npart_cpu(1)=npart_all(1) #endif do icpu=2,ncpu npart_cpu(icpu)=npart_cpu(icpu-1)+npart_all(icpu) end do if(myid==1)then do ipart=1,npart idp(ipart)=ipart end do else do ipart=1,npart idp(ipart)=npart_cpu(myid-1)+ipart end do end if end if end subroutine load_grafic subroutine load_ascii ! This function load from ASCII file. As is, you can only load dark matter particles ! Local particle count ipart=0 if(TRIM(initfile(levelmin)).NE.' ')then filename=TRIM(initfile(levelmin))//'/ic_part' if(myid==1)then open(10,file=filename,form='formatted') indglob=0 end if eof=.false. do while (.not.eof) xx=0.0 if(myid==1)then jpart=0 do i=1,nvector read(10,*,end=111)xx1,xx2,xx3,vv1,vv2,vv3,mm1 jpart=jpart+1 indglob=indglob+1 xx(i,1)=xx1+boxlen/2.0 xx(i,2)=xx2+boxlen/2.0 xx(i,3)=xx3+boxlen/2.0 vv(i,1)=vv1 vv(i,2)=vv2 vv(i,3)=vv3 mm(i )=mm1 ii(i )=indglob tmppart%family = FAM_DM tmppart%tag = 0 pp(i )=part2int(tmppart) end do 111 continue if(jpartnpartmax)then write(*,*)'Maximum number of particles incorrect' write(*,*)'npartmax should be greater than',ipart call clean_stop endif xp(ipart,1:3)= xx(i,1:3) vp(ipart,1:3)= vv(i,1:3) mp(ipart) = mm(i) levelp(ipart)= levelmin idp(ipart) = ii(i) ! Get back the particle type from the communicated ! shortened integer typep(ipart) = int2part(pp(i)) #ifndef WITHOUTMPI endif #endif enddo end do if(myid==1)close(10) end if npart=ipart ! Compute total number of particle npart_cpu=0; npart_all=0 npart_cpu(myid)=npart #ifndef WITHOUTMPI #ifndef LONGINT call MPI_ALLREDUCE(npart_cpu,npart_all,ncpu,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,info) #else call MPI_ALLREDUCE(npart_cpu,npart_all,ncpu,MPI_INTEGER8,MPI_SUM,MPI_COMM_WORLD,info) #endif npart_cpu(1)=npart_all(1) #endif do icpu=2,ncpu npart_cpu(icpu)=npart_cpu(icpu-1)+npart_all(icpu) end do if(debug)write(*,*)'npart=',npart,'/',npart_cpu(ncpu) end subroutine load_ascii subroutine load_dice !!! DICE dice_init=.true. ! Conversion factor from user units to cgs units call units(scale_l,scale_t,scale_d,scale_v,scale_nH,scale_T2) scale_m = scale_d*scale_l**3 ! Reading header of the Gadget file error=.false. ipart = 0 do ifile=1,ic_nfile write(ifile_str,*) ifile if(ic_nfile.eq.1) then filename=TRIM(initfile(levelmin))//'/'//TRIM(ic_file) else filename=TRIM(initfile(levelmin))//'/'//TRIM(ic_file)//'.'//ADJUSTL(ifile_str) endif INQUIRE(FILE=filename,EXIST=file_exists) if(.not.file_exists) then if(myid==1) write(*,*) TRIM(filename),' not found' call clean_stop endif if(myid==1)then write(*,'(A12,A)') ' Opening -> ',filename if((ic_format.ne.'Gadget1').and.(ic_format.ne.'Gadget2')) then if(myid==1) write(*,*) 'Specify a valid IC file format [ic_format=Gadget1/Gadget2]' error=.true. endif OPEN(unit=1,file=filename,status='old',action='read',form='unformatted',access='stream') ! Init block address head_blck = -1 pos_blck = -1 vel_blck = -1 id_blck = -1 u_blck = -1 mass_blck = -1 metal_blck = -1 age_blck = -1 if(ic_format .eq. 'Gadget1') then ! Init block counter jump_blck = 1 blck_cnt = 1 do while(.true.) ! Reading data block header read(1,POS=jump_blck,iostat=stat) blck_size if(stat /= 0) exit ! Saving data block positions if(blck_cnt .eq. 1) then head_blck = jump_blck+sizeof(blck_size) head_size = blck_size write(*,*)blck_cnt,blck_size endif if(blck_cnt .eq. 2) then pos_blck = jump_blck+sizeof(blck_size) pos_size = blck_size/(3*sizeof(dummy_real)) write(*,*)blck_cnt,blck_size endif if(blck_cnt .eq. 3) then vel_blck = jump_blck+sizeof(blck_size) vel_size = blck_size/(3*sizeof(dummy_real)) write(*,*)blck_cnt,blck_size endif if(blck_cnt .eq. 4) then id_blck = jump_blck+sizeof(blck_size) id_size = blck_size/sizeof(dummy_int) write(*,*)blck_cnt,blck_size endif if(blck_cnt .eq. 5) then u_blck = jump_blck+sizeof(blck_size) u_size = blck_size/sizeof(dummy_real) write(*,*)blck_cnt,blck_size endif if(blck_cnt .eq. 6) then mass_blck = jump_blck+sizeof(blck_size) mass_size = blck_size/sizeof(dummy_real) write(*,*)blck_cnt,blck_size endif if(blck_cnt .eq. 7) then metal_blck = jump_blck+sizeof(blck_size) metal_size = blck_size/sizeof(dummy_real) write(*,*)blck_cnt,blck_size endif if(blck_cnt .eq. 8) then age_blck = jump_blck+sizeof(blck_size) age_size = blck_size/sizeof(dummy_real) write(*,*)blck_cnt,blck_size endif jump_blck = jump_blck+blck_size+2*sizeof(dummy_int) blck_cnt = blck_cnt+1 enddo endif if(ic_format .eq. 'Gadget2') then ! Init block counter jump_blck = 1 write(*,'(A50)')'__________________________________________________' do while(.true.) ! Reading data block header read(1,POS=jump_blck,iostat=stat) dummy_int if(stat /= 0) exit read(1,POS=jump_blck+sizeof(dummy_int),iostat=stat) blck_name if(stat /= 0) exit read(1,POS=jump_blck+sizeof(dummy_int)+sizeof(blck_name),iostat=stat) dummy_int if(stat /= 0) exit read(1,POS=jump_blck+2*sizeof(dummy_int)+sizeof(blck_name),iostat=stat) dummy_int if(stat /= 0) exit read(1,POS=jump_blck+3*sizeof(dummy_int)+sizeof(blck_name),iostat=stat) blck_size if(stat /= 0) exit ! Saving data block positions if(blck_name .eq. ic_head_name) then head_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) head_size = blck_size write(*,*) '-> Found ',blck_name,' block' endif if(blck_name .eq. ic_pos_name) then pos_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) pos_size = blck_size/(3*sizeof(dummy_real)) write(*,*) '-> Found ',blck_name,' block' endif if(blck_name .eq. ic_vel_name) then vel_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) vel_size = blck_size/(3*sizeof(dummy_real)) write(*,*) '-> Found ',blck_name,' block' endif if(blck_name .eq. ic_id_name) then id_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) id_size = blck_size/sizeof(dummy_int) write(*,*) '-> Found ',blck_name,' block' endif if(blck_name .eq. ic_mass_name) then mass_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) mass_size = blck_size/sizeof(dummy_real) write(*,*) '-> Found ',blck_name,' block' endif if(blck_name .eq. ic_u_name) then u_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) u_size = blck_size/sizeof(dummy_real) write(*,*) '-> Found ',blck_name,' block' endif if(blck_name .eq. ic_metal_name) then metal_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) metal_size = blck_size/sizeof(dummy_real) write(*,*) '-> Found ',blck_name,' block' endif if(blck_name .eq. ic_age_name) then age_blck = jump_blck+sizeof(blck_name)+4*sizeof(dummy_int) age_size = blck_size/sizeof(dummy_real) write(*,*) '-> Found ',blck_name,' block' endif jump_blck = jump_blck+blck_size+sizeof(blck_name)+5*sizeof(dummy_int) enddo endif if((head_blck.eq.-1).or.(pos_blck.eq.-1).or.(vel_blck.eq.-1)) then write(*,*) 'Gadget file does not contain handful data' error=.true. endif if(head_size.ne.256) then write(*,*) 'Gadget header is not 256 bytes' error=.true. endif ! Byte swapping doesn't appear to work if you just do READ(1)header READ(1,POS=head_blck) header%npart,header%mass,header%time,header%redshift, & header%flag_sfr,header%flag_feedback,header%nparttotal, & header%flag_cooling,header%numfiles,header%boxsize, & header%omega0,header%omegalambda,header%hubbleparam, & header%flag_stellarage,header%flag_metals,header%totalhighword, & header%flag_entropy_instead_u, header%flag_doubleprecision, & header%flag_ic_info, header%lpt_scalingfactor nstar_tot = sum(header%npart(3:5)) npart = sum(header%npart) ngas = header%npart(1) nhalo = header%npart(2) if(cosmo) T2_start = 1.356d-2/aexp**2 write(*,'(A50)')'__________________________________________________' write(*,*)'Found ',npart,' particles' skip=.false. do j=1,6 if(ic_skip_type(j).eq.0) skip=.true. enddo if(.not.skip) write(*,*)'----> ',header%npart(1),' type 0 particles with header mass ',header%mass(1) skip=.false. do j=1,6 if(ic_skip_type(j).eq.1) skip=.true. enddo if(.not.skip) write(*,*)'----> ',header%npart(2),' type 1 particles with header mass ',header%mass(2) skip=.false. do j=1,6 if(ic_skip_type(j).eq.2) skip=.true. enddo if(.not.skip) write(*,*)'----> ',header%npart(3),' type 2 particles with header mass ',header%mass(3) skip=.false. do j=1,6 if(ic_skip_type(j).eq.3) skip=.true. enddo if(.not.skip) write(*,*)'----> ',header%npart(4),' type 3 particles with header mass ',header%mass(4) skip=.false. do j=1,6 if(ic_skip_type(j).eq.4) skip=.true. enddo if(.not.skip) write(*,*)'----> ',header%npart(5),' type 4 particles with header mass ',header%mass(5) skip=.false. do j=1,6 if(ic_skip_type(j).eq.5) skip=.true. enddo if(.not.skip) write(*,*)'----> ',header%npart(6),' type 5 particles with header mass ',header%mass(6) write(*,'(A50)')'_____________________progress_____________________' if((pos_size.ne.npart).or.(vel_size.ne.npart)) then write(*,*) 'POS =',pos_size write(*,*) 'VEL =',vel_size write(*,*) 'Number of particles does not correspond to block sizes' error=.true. endif endif if(error) call clean_stop #ifndef WITHOUTMPI call MPI_BCAST(nstar_tot,1,MPI_INTEGER,0,MPI_COMM_WORLD,info) #endif eob = .false. kpart = 0 lpart = 0 mpart = 0 gpart = 0 opart = 0 mgas_tot = 0. ipbar = 0. do while(.not.eob) xx=0. vv=0. ii=0 mm=0. tt=0. zz=0. uu=0. if(myid==1)then jpart=0 do i=1,nvector jpart=jpart+1 ! All particles counter kpart=kpart+1 if(kpart.le.header%npart(1)) type_index = 1 do j=1,5 if(kpart.gt.sum(header%npart(1:j)).and.kpart.le.sum(header%npart(1:j+1))) type_index = j+1 enddo if((sum(header%npart(3:5)).gt.0).and.(kpart.gt.(header%npart(1)+header%npart(2)))) mpart=mpart+1 if(type_index.ne.2) gpart=gpart+1 ! Reading Gadget1 or Gadget2 file line-by-line ! Mandatory data read(1,POS=pos_blck+3*sizeof(dummy_real)*(kpart-1)) xx_sp(i,1:3) read(1,POS=vel_blck+3*sizeof(dummy_real)*(kpart-1)) vv_sp(i,1:3) if(header%mass(type_index).gt.0) then mm_sp(i) = header%mass(type_index) else opart=opart+1 read(1,POS=mass_blck+sizeof(dummy_real)*(opart-1)) mm_sp(i) endif ! Optional data if(id_blck.ne.-1) then read(1,POS=id_blck+sizeof(dummy_int)*(kpart-1)) ii(i) else ii(i) = kpart endif if(kpart.le.header%npart(1)) then if((u_blck.ne.-1).and.(u_size.eq.header%npart(1))) then read(1,POS=u_blck+sizeof(dummy_real)*(kpart-1)) uu_sp(i) endif endif if(metal) then if((metal_blck.ne.-1).and.(metal_size.eq.npart)) then read(1,POS=metal_blck+sizeof(dummy_real)*(kpart-1)) zz_sp(i) endif if((metal_blck.ne.-1).and.(metal_size.eq.ngas+nstar_tot)) then read(1,POS=metal_blck+sizeof(dummy_real)*(gpart-1)) zz_sp(i) endif endif if(star) then if((age_blck.ne.-1).and.(age_size.eq.sum(header%npart(3:5)))) then if((sum(header%npart(3:5)).gt.0).and.(kpart.gt.(header%npart(1)+header%npart(2)))) then read(1,POS=age_blck+sizeof(dummy_real)*(mpart-1)) tt_sp(i) endif endif endif ! Scaling to ramses code units if(cosmo) then gadget_scale_l = scale_l/header%boxsize gadget_scale_v = 1e3*SQRT(aexp)/header%boxsize*aexp/100. endif xx(i,:) = xx_sp(i,:)*(gadget_scale_l/scale_l)*ic_scale_pos vv(i,:) = vv_sp(i,:)*(gadget_scale_v/scale_v)*ic_scale_vel mm(i) = mm_sp(i)*(gadget_scale_m/scale_m)*ic_scale_mass if(cosmo) then if(type_index .eq. 1) mass_sph = mm(i) if(xx(i,1)< 0.0d0 )xx(i,1)=xx(i,1)+dble(nx) if(xx(i,1)>=dble(nx))xx(i,1)=xx(i,1)-dble(nx) if(xx(i,2)< 0.0d0 )xx(i,2)=xx(i,2)+dble(ny) if(xx(i,2)>=dble(ny))xx(i,2)=xx(i,2)-dble(ny) if(xx(i,3)< 0.0d0 )xx(i,3)=xx(i,3)+dble(nz) if(xx(i,3)>=dble(nz))xx(i,3)=xx(i,3)-dble(nz) endif if(metal) then if(metal_blck.ne.-1) then zz(i) = zz_sp(i)*ic_scale_metal else zz(i) = 0.02*z_ave endif endif if(kpart.gt.header%npart(1)+header%npart(2)) then if(age_blck.ne.-1) then if(cosmo) then tt(i) = tt_sp(i) else tt(i) = tt_sp(i)*(gadget_scale_t/(scale_t/aexp**2))*ic_scale_age endif else tt(i) = -13.8*1d9*3.15360d7/scale_t ! Age of the universe endif endif if(kpart.le.header%npart(1)) then if(cosmo) then uu(i) = T2_start/scale_T2 else ! Temperature stored in units of K/mu uu(i) = uu_sp(i)*mu_mol*(gadget_scale_v/scale_v)**2*ic_scale_u endif endif if(kpart.le.header%npart(1)) mgas_tot = mgas_tot+mm(i) ! Check the End Of Block if(kpart.ge.ipbar*(npart/49.0))then write(*,'(A1)',advance='no') '_' ipbar = ipbar+1.0 endif if(kpart.ge.npart) then write(*,'(A1)') ' ' write(*,'(A,A7,A)') ' ',TRIM(ic_format),' file successfully loaded' write(*,'(A50)')'__________________________________________________' eob=.true. exit endif enddo endif #ifndef WITHOUTMPI call MPI_BCAST(eob,1 ,MPI_LOGICAL ,0,MPI_COMM_WORLD,info) call MPI_BCAST(xx,nvector*3 ,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,info) call MPI_BCAST(vv,nvector*3 ,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,info) call MPI_BCAST(ii,nvector ,MPI_INTEGER ,0,MPI_COMM_WORLD,info) call MPI_BCAST(mm,nvector ,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,info) call MPI_BCAST(zz,nvector ,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,info) call MPI_BCAST(tt,nvector ,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,info) call MPI_BCAST(uu,nvector ,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,info) call MPI_BCAST(jpart,1 ,MPI_INTEGER ,0,MPI_COMM_WORLD,info) call MPI_BCAST(header%npart,6,MPI_INTEGER ,0,MPI_COMM_WORLD,info) call cmp_cpumap(xx,cc,jpart) #endif do i=1,jpart #ifndef WITHOUTMPI ! Check the CPU map if(cc(i)==myid)then #endif ! Determine current particle type if((lpart+i).le.header%npart(1)) type_index = 1 do j=1,5 if((lpart+i).gt.sum(header%npart(1:j)).and.(lpart+i).le.sum(header%npart(1:j+1))) type_index = j+1 enddo skip = .false. do j=1,6 if(ic_skip_type(j).eq.type_index-1) skip=.true. enddo if(.not.skip) then if(abs(xx(i,1)-ic_center(1)).ge.boxlen/2d0) cycle if(abs(xx(i,2)-ic_center(2)).ge.boxlen/2d0) cycle if(abs(xx(i,3)-ic_center(3)).ge.boxlen/2d0) cycle ipart = ipart+1 if(ipart.gt.npartmax) then write(*,*) 'Increase npartmax' #ifndef WITHOUTMPI call MPI_ABORT(MPI_COMM_WORLD,1,info) #else stop #endif endif xp(ipart,1:3) = xx(i,1:3)+boxlen/2.0D0-ic_center(1:3) vp(ipart,1:3) = vv(i,1:3) ! Flag gas particles with idp=1 if(type_index.gt.1)then idp(ipart) = ii(i)+1 else idp(ipart) = 1 endif mp(ipart) = mm(i) levelp(ipart) = levelmin if(star) then tp(ipart) = tt(i) ! Particle metallicity if(metal) then zp(ipart) = zz(i) endif endif if(type_index.gt.2)then if(star)then typep(ipart)%family = FAM_STAR typep(ipart)%tag = 0 end if else if(type_index.eq.2)then typep(ipart)%family = FAM_DM typep(ipart)%tag = 0 end if up(ipart) = uu(i) if(ic_mask_ptype.gt.-1)then if(ic_mask_ptype.eq.type_index-1)then maskp(ipart) = 1.0 else maskp(ipart) = 0.0 endif endif ! Add a gas particle outside the zoom region if(cosmo) then do j=1,6 if(type_index.eq.cosmo_add_gas_index(j)) then ! Add a gas particle xp(ipart+1,1:3) = xp(ipart,1:3) vp(ipart+1,1:3) = vp(ipart,1:3) idp(ipart+1) = -1 mp(ipart+1) = mp(ipart)*(omega_b/omega_m) levelp(ipart+1) = levelmin up(ipart+1) = T2_start/scale_T2 if(metal) then zp(ipart+1) = z_ave*0.02 endif ! Remove mass from the DM particle mp(ipart) = mp(ipart)-mp(ipart+1) ! Update index ipart = ipart+1 endif end do endif endif #ifndef WITHOUTMPI endif #endif enddo lpart = lpart+jpart enddo if(myid==1)then write(*,'(A,E10.3,A)') ' Gas mass in AMR grid -> ',mgas_tot,' unit_m' write(*,'(A50)')'__________________________________________________' close(1) endif enddo npart = ipart ! Compute total number of particle npart_cpu = 0 npart_all = 0 npart_cpu(myid) = npart #ifndef WITHOUTMPI call MPI_ALLREDUCE(npart_cpu,npart_all,ncpu,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,info) npart_cpu(1) = npart_all(1) #else npart_all = npart #endif if(myid==1)then write(*,*) ' npart_tot -> ',sum(npart_all) write(*,'(A50)')'__________________________________________________' close(1) endif do icpu=2,ncpu npart_cpu(icpu)=npart_cpu(icpu-1)+npart_all(icpu) end do if(debug)write(*,*)'npart=',npart,'/',npart_cpu(ncpu) ifout = ic_ifout t = ic_t_restart ! DICE patch end subroutine load_dice end subroutine init_part #define TIME_START(cs) call SYSTEM_CLOCK(COUNT=cs) #define TIME_END(ce) call SYSTEM_CLOCK(COUNT=ce) #define TIME_SPENT(cs,ce,cr) REAL((ce-cs)/cr) subroutine load_gadget ! This routine only creates DM particles use amr_commons use pm_commons use gadgetreadfilemod use mpi_mod implicit none #ifndef WITHOUTMPI integer::info integer,dimension(1:nvector)::cc #endif logical::ok TYPE(gadgetheadertype)::gadgetheader integer::numfiles integer::ifile real,dimension(:,:),allocatable:: pos, vel real(dp)::massparticles integer(kind=8)::allparticles integer(i8b),dimension(:),allocatable:: ids integer::nparticles integer::i,icpu,ipart,start integer(i8b),dimension(1:ncpu)::npart_cpu,npart_all character(LEN=256)::filename real(dp),dimension(1:nvector,1:3)::xx_dp integer::clock_start,clock_end,clock_rate real(dp)::gadgetvfact ! Local particle count ipart=0 call SYSTEM_CLOCK(COUNT_RATE=clock_rate) if(TRIM(initfile(levelmin)).NE.' ')then filename=TRIM(initfile(levelmin)) ! read first header to get information call gadgetreadheader(filename, 0, gadgetheader, ok) if(.not.ok) call clean_stop numfiles = gadgetheader%numfiles gadgetvfact = SQRT(aexp) / gadgetheader%boxsize * aexp / 100. #ifndef LONGINT allparticles=int(gadgetheader%nparttotal(2),kind=8) #else allparticles=int(gadgetheader%nparttotal(2),kind=8) & & +int(gadgetheader%totalhighword(2),kind=8)*4294967296_i8b !2^32 #endif massparticles=1d0/dble(allparticles) do ifile=0,numfiles-1 call gadgetreadheader(filename, ifile, gadgetheader, ok) nparticles = gadgetheader%npart(2) allocate(pos(3,nparticles)) allocate(vel(3,nparticles)) allocate(ids(nparticles)) TIME_START(clock_start) call gadgetreadfile(filename,ifile,gadgetheader, pos, vel, ids) TIME_END(clock_end) if(debug) write(*,*) myid, ':Read ', nparticles, ' from gadget file ', ifile, ' in ', & TIME_SPENT(clock_start, clock_end, clock_rate) start = 1 TIME_START(clock_start) do i=1,nparticles xx_dp(1,1) = pos(1,i)/gadgetheader%boxsize xx_dp(1,2) = pos(2,i)/gadgetheader%boxsize xx_dp(1,3) = pos(3,i)/gadgetheader%boxsize #ifndef WITHOUTMPI call cmp_cpumap(xx_dp,cc,1) if(cc(1)==myid)then #endif ipart=ipart+1 #ifndef WITHOUTMPI if (ipart .ge. size(mp)) then write(*,*) 'For ', myid, ipart, ' exceeds ', size(mp) call clean_stop end if #endif xp(ipart,1:3)=xx_dp(1,1:3) vp(ipart,1) =vel(1, i) * gadgetvfact vp(ipart,2) =vel(2, i) * gadgetvfact vp(ipart,3) =vel(3, i) * gadgetvfact mp(ipart) = massparticles levelp(ipart)=levelmin idp(ipart) =ids(i) ! Get the particle type typep(ipart)%family = FAM_DM typep(ipart)%tag = 0 #ifndef WITHOUTMPI endif #endif enddo #ifndef WITHOUTMPI TIME_END(clock_end) if(debug) write(*,*) myid, ':Processed ', nparticles, ' in ',& & TIME_SPENT(clock_start, clock_end, clock_rate), ' ipart now ', ipart #endif deallocate(pos,vel,ids) end do end if npart=ipart ! Compute total number of particleclock_rate npart_cpu=0; npart_all=0 npart_cpu(myid)=npart #ifndef WITHOUTMPI #ifndef LONGINT call MPI_ALLREDUCE(npart_cpu,npart_all,ncpu,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,info) #else call MPI_ALLREDUCE(npart_cpu,npart_all,ncpu,MPI_INTEGER8,MPI_SUM,MPI_COMM_WORLD,info) #endif npart_cpu(1)=npart_all(1) #endif do icpu=2,ncpu npart_cpu(icpu)=npart_cpu(icpu-1)+npart_all(icpu) end do write(*,*)'npart=',npart,'/',npartmax end subroutine load_gadget /data2/mabe/MeraTest/Ramses/patch_2019_10version/init_refine.f90 !################################################################ !################################################################ !################################################################ !################################################################ subroutine init_refine use amr_commons use pm_commons use dice_commons implicit none !------------------------------------------- ! This routine builds the initial AMR grid !------------------------------------------- integer::ilevel if(myid==1)write(*,*)'Building initial AMR grid' init=.true. ! Base refinement do ilevel=1,levelmin call flag call refine end do ! Further refinements if necessary do ilevel=levelmin+1,nlevelmax if(initfile(levelmin).ne.' '.and.initfile(ilevel).eq.' ')exit if(hydro)call init_flow #ifdef RT if(rt)call rt_init_flow #endif if(ivar_refine==0)call init_refmap call flag call refine if(nremap>0)call load_balance if(numbtot(1,ilevel)==0)exit end do ! Final pass to initialize the flow init=.false. if(hydro)call init_flow #ifdef RT if(rt)call rt_init_flow #endif end subroutine init_refine !################################################################ !################################################################ !################################################################ !################################################################ subroutine init_refine_2 !-------------------------------------------------------------- ! This routine builds additional refinements to the ! the initial AMR grid for filetype ne 'grafic' ! DICE patch: It is ensured that all the particles are ! transfered down to level 1 before initialising the grid !-------------------------------------------------------------- use amr_commons use hydro_commons #ifdef RT use rt_hydro_commons #endif use pm_commons use poisson_commons use dice_commons implicit none integer::ilevel,i,ivar real(dp)::scale_l,scale_t,scale_d,scale_v,scale_nH,scale_T2 real(dp)::eps_star2 call units(scale_l,scale_t,scale_d,scale_v,scale_nH,scale_T2) if(filetype.eq.'grafic')return if(myid==1.and.amr_struct) then write(*,*) 'Initial conditions with AMR data structure' write(*,'(A50)')'__________________________________________________' end if do i=levelmin,nlevelmax+1 ! DICE------ do ilevel=levelmin-1,1,-1 if(pic)call merge_tree_fine(ilevel) enddo ! ---------- call refine_coarse do ilevel=1,nlevelmax call build_comm(ilevel) call make_virtual_fine_int(cpu_map(1),ilevel) call refine_fine(ilevel) ! DICE------ if(pic)call make_tree_fine(ilevel) ! ---------- if(hydro)call init_flow_fine(ilevel) ! DICE------ if(pic)then call kill_tree_fine(ilevel) call virtual_tree_fine(ilevel) endif ! ---------- #ifdef RT if(rt)call rt_init_flow_fine(ilevel) #endif end do ! DICE------ do ilevel=nlevelmax-1,levelmin,-1 if(pic)call merge_tree_fine(ilevel) enddo ! ---------- if(nremap>0)call load_balance do ilevel=levelmin,nlevelmax if(pic)call make_tree_fine(ilevel) if(poisson)call rho_fine(ilevel,2) if(hydro)call init_flow_fine(ilevel) if(pic)then call kill_tree_fine(ilevel) call virtual_tree_fine(ilevel) endif end do do ilevel=nlevelmax,levelmin,-1 if(pic)call merge_tree_fine(ilevel) if(hydro)then call upload_fine(ilevel) #ifdef SOLVERmhd do ivar=1,nvar+3 #else do ivar=1,nvar #endif call make_virtual_fine_dp(uold(1,ivar),ilevel) #ifdef SOLVERmhd end do #else end do #endif if(simple_boundary)call make_boundary_hydro(ilevel) endif #ifdef RT if(rt)then call rt_upload_fine(ilevel) do ivar=1,nrtvar call make_virtual_fine_dp(rtuold(1,ivar),ilevel) end do if(simple_boundary)call rt_make_boundary_hydro(ilevel) end if #endif end do do ilevel=nlevelmax,1,-1 call flag_fine(ilevel,2) end do call flag_coarse end do ! DICE------ do ilevel=levelmin-1,1,-1 if(pic)call merge_tree_fine(ilevel) enddo call kill_gas_part(1) do ilevel=1,nlevelmax if(pic)then call make_tree_fine(ilevel) call kill_tree_fine(ilevel) call virtual_tree_fine(ilevel) endif end do do ilevel=nlevelmax,levelmin,-1 call merge_tree_fine(ilevel) end do deallocate(up) if(sf_virial)then eps_star2=eps_star eps_star=0d0 do ilevel=nlevelmax,levelmin,-1 call star_formation(ilevel) enddo eps_star=eps_star2 endif dice_init=.false. ! ---------- #ifdef RT if(rt_is_init_xion) then if(myid==1) write(*,*) 'Initializing ionization states from T profile' do ilevel=nlevelmax,1,-1 call rt_init_xion(ilevel) call upload_fine(ilevel) end do endif #endif end subroutine init_refine_2 !################################################################ !################################################################ !################################################################ !################################################################ subroutine kill_gas_part(ilevel) use pm_commons use amr_commons implicit none integer::ilevel #ifndef WITHOUTMPI include 'mpif.h' #endif !-------------------------------------------------------- ! This subroutine removes the gas particles ! initially present in the gadget1 DICE output !-------------------------------------------------------- integer::igrid,jgrid,ipart,jpart,next_part integer::ig,ip,npart1,npart2,icpu,info integer,dimension(1:nvector)::ind_grid,ind_part,ind_grid_part logical,dimension(1:nvector)::ok=.true. integer::npart_all integer,dimension(1:ncpu)::npart_cpu,npart_cpu_all npart_cpu = 0 npart_all = 0 if(numbtot(1,ilevel)==0)return ! Gather gas particles. ! Loop over cpus do icpu=1,ncpu igrid=headl(icpu,ilevel) ig=0 ip=0 ! Loop over grids do jgrid=1,numbl(icpu,ilevel) npart1=numbp(igrid) ! Number of particles in the grid npart2=0 ! Count gas particles if(npart1>0)then ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) if(idp(ipart).eq.1)then npart2=npart2+1 endif ipart=next_part ! Go to next particle end do npart_cpu(myid)=npart_cpu(myid)+npart2 endif ! Gather gas particles if(npart2>0)then ig=ig+1 ind_grid(ig)=igrid ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) ! Select only gas particles if(idp(ipart).eq.1)then if(ig==0)then ig=1 ind_grid(ig)=igrid end if ip=ip+1 ind_part(ip)=ipart ind_grid_part(ip)=ig endif if(ip==nvector)then call remove_list(ind_part,ind_grid_part,ok,ip) call add_free_cond(ind_part,ok,ip) ip=0 ig=0 end if ipart=next_part ! Go to next particle end do ! End loop over particles end if igrid=next(igrid) ! Go to next grid end do ! End loop over grids if(ip>0)then call remove_list(ind_part,ind_grid_part,ok,ip) call add_free_cond(ind_part,ok,ip) end if end do #ifndef WITHOUTMPI ! Give an array of number of gas on each cpu available to all cpus call MPI_ALLREDUCE(npart_cpu,npart_cpu_all,ncpu,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,info) #endif npart_all=sum(npart_cpu_all(1:ncpu)) if(npart_all>0) then if(myid==1) then write(*,'(A50)')'__________________________________________________' write(*,'(A,I15)')' Gas particles deleted ->',npart_all write(*,'(A50)')'__________________________________________________' endif endif npart_cpu(myid)=npart #ifndef WITHOUTMPI ! Give an array of number of gas on each cpu available to all cpus call MPI_ALLREDUCE(npart_cpu,npart_cpu_all,ncpu,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,info) #endif npart_all=sum(npart_cpu_all(1:ncpu)) if(npart_all>0) then if(myid==1) then write(*,'(A50)')'__________________________________________________' write(*,'(A,I15)')' Remaining particles ->',npart_all write(*,'(A50)')'__________________________________________________' endif endif do icpu=1,ncpu igrid=headl(icpu,ilevel) ig=0 ip=0 ! Loop over grids do jgrid=1,numbl(icpu,ilevel) npart1=numbp(igrid) ! Number of particles in the grid npart2=0 ! Count gas particles if(npart1>0)then ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) if(idp(ipart).gt.0) idp(ipart)=idp(ipart)-1 ipart=next_part ! Go to next particle end do npart_cpu(myid)=npart_cpu(myid)+npart2 endif end do end do 111 format(' Entering kill_gas_part for level ',I2) !--------------------------------------------- end subroutine /data2/mabe/MeraTest/Ramses/patch_2019_10version/init_time.f90 subroutine init_time use amr_commons use hydro_commons use pm_commons use cooling_module #ifdef grackle use grackle_parameters #endif #ifdef RT use rt_cooling_module #endif use mpi_mod implicit none integer::i,Nmodel real(kind=8)::T2_sim #ifdef grackle real(dp)::scale_nH,scale_T2,scale_l,scale_d,scale_t,scale_v logical::file_exists #ifndef WITHOUTMPI integer::info #endif #endif if(nrestart==0)then if(cosmo)then ! Get cosmological parameters from input files call init_cosmo else ! Get parameters from input files if(initfile(levelmin).ne.' '.and.filetype.eq.'grafic')then call init_file endif t=0.0 aexp=1.0 end if end if if(cosmo)then ! Allocate look-up tables n_frw=1000 allocate(aexp_frw(0:n_frw),hexp_frw(0:n_frw)) allocate(tau_frw(0:n_frw),t_frw(0:n_frw)) ! Compute Friedman model look up table if(myid==1)write(*,*)'Computing Friedman model' call friedman(dble(omega_m),dble(omega_l),dble(omega_k), & & 1d-6,dble(aexp_ini), & & aexp_frw,hexp_frw,tau_frw,t_frw,n_frw) ! Compute initial conformal time ! Find neighboring expansion factors i=1 do while(aexp_frw(i)>aexp.and.i0) then if (mod(myid-1,IOGROUPSIZE)/=0) then call MPI_RECV(dummy_io,1,MPI_INTEGER,myid-1-1,tag,& & MPI_COMM_WORLD,MPI_STATUS_IGNORE,info2) end if endif #endif INQUIRE(file=filename,exist=ok) if(.not.ok)then if(myid==1)then write(*,*)'File '//TRIM(filename)//' does not exist' end if call clean_stop end if open(10,file=filename,form='unformatted') if(myid==1)write(*,*)'Reading file '//TRIM(filename) rewind 10 read(10)n1(ilevel),n2(ilevel),n3(ilevel),dxini0 & & ,xoff10,xoff20,xoff30 & & ,astart0,omega_m0,omega_l0,h00 close(10) ! Send the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if(mod(myid,IOGROUPSIZE)/=0 .and.(myid.lt.ncpu))then dummy_io=1 call MPI_SEND(dummy_io,1,MPI_INTEGER,myid-1+1,tag, & & MPI_COMM_WORLD,info2) end if endif #endif dxini(ilevel)=dxini0 xoff1(ilevel)=xoff10 xoff2(ilevel)=xoff20 xoff3(ilevel)=xoff30 nlevelmax_part=nlevelmax_part+1 endif end do ! Check compatibility with run parameters nx_loc=icoarse_max-icoarse_min+1 ny_loc=jcoarse_max-jcoarse_min+1 nz_loc=kcoarse_max-kcoarse_min+1 if( nx_loc.ne.n1(levelmin)/2**levelmin & & .or. ny_loc.ne.n2(levelmin)/2**levelmin & & .or. nz_loc.ne.n3(levelmin)/2**levelmin) then write(*,*)'coarser grid is not compatible with initial conditions file' write(*,*)'Found n1=',n1(levelmin),& & ' n2=',n2(levelmin),& & ' n3=',n3(levelmin) write(*,*)'Expected n1=',nx_loc*2**levelmin & & ,' n2=',ny_loc*2**levelmin & & ,' n3=',nz_loc*2**levelmin call clean_stop end if ! Write initial conditions parameters if(myid==1)then do ilevel=levelmin,nlevelmax_part write(*,'(' Initial conditions for level =',I4)')ilevel write(*,'(' n1=',I4,' n2=',I4,' n3=',I4)') & & n1(ilevel),& & n2(ilevel),& & n3(ilevel) write(*,'(' dx=',1pe10.3)')dxini(ilevel) write(*,'(' xoff=',1pe10.3,' yoff=',1pe10.3,' zoff=',& & 1pe10.3)') & & xoff1(ilevel),& & xoff2(ilevel),& & xoff3(ilevel) end do end if end subroutine init_file subroutine init_cosmo use amr_commons use hydro_commons use pm_commons use gadgetreadfilemod use mpi_mod use dice_commons implicit none !------------------------------------------------------ ! Read cosmological and geometrical parameters ! in the initial condition files. ! Initial conditions are supposed to be made by ! Bertschinger's grafic version 2.0 code. !------------------------------------------------------ integer:: ilevel real(sp)::dxini0,xoff10,xoff20,xoff30,astart0,omega_m0,omega_l0,h00 character(LEN=80)::filename character(LEN=5)::nchar logical::ok TYPE(gadgetheadertype) :: gadgetheader integer::i integer,parameter::tag=1117 #ifndef WITHOUTMPI integer::dummy_io,info2 #endif if(verbose)write(*,*)'Entering init_cosmo' if(initfile(levelmin)==' ')then write(*,*)'You need to specifiy at least one level of initial condition' call clean_stop end if SELECT CASE (filetype) case ('grafic', 'ascii') ! Reading initial conditions parameters only aexp=2.0 nlevelmax_part=levelmin-1 do ilevel=levelmin,nlevelmax if(initfile(ilevel).ne.' ')then if(multiple)then call title(myid,nchar) filename=TRIM(initfile(ilevel))//'/dir_deltab/ic_deltab.'//TRIM(nchar) else filename=TRIM(initfile(ilevel))//'/ic_deltab' endif ! Wait for the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if (mod(myid-1,IOGROUPSIZE)/=0) then call MPI_RECV(dummy_io,1,MPI_INTEGER,myid-1-1,tag,& & MPI_COMM_WORLD,MPI_STATUS_IGNORE,info2) end if endif #endif INQUIRE(file=filename,exist=ok) if(.not.ok)then if(myid==1)then write(*,*)'File '//TRIM(filename)//' does not exist' end if call clean_stop end if open(10,file=filename,form='unformatted') if(myid==1)write(*,*)'Reading file '//TRIM(filename) rewind 10 read(10)n1(ilevel),n2(ilevel),n3(ilevel),dxini0 & & ,xoff10,xoff20,xoff30 & & ,astart0,omega_m0,omega_l0,h00 close(10) ! Send the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if(mod(myid,IOGROUPSIZE)/=0 .and.(myid.lt.ncpu))then dummy_io=1 call MPI_SEND(dummy_io,1,MPI_INTEGER,myid-1+1,tag, & & MPI_COMM_WORLD,info2) end if endif #endif dxini(ilevel)=dxini0 xoff1(ilevel)=xoff10 xoff2(ilevel)=xoff20 xoff3(ilevel)=xoff30 astart(ilevel)=astart0 omega_m=omega_m0 omega_l=omega_l0 h0=h00 aexp=MIN(aexp,astart(ilevel)) nlevelmax_part=nlevelmax_part+1 ! Compute SPH equivalent mass (initial gas mass resolution) mass_sph=omega_b/omega_m*0.5d0**(ndim*ilevel) endif end do ! Compute initial expansion factor if(aexp_ini.lt.1.0)then aexp=aexp_ini else aexp_ini=aexp endif ! Check compatibility with run parameters if(.not. multiple) then if( nx.ne.n1(levelmin)/2**levelmin & & .or. ny.ne.n2(levelmin)/2**levelmin & & .or. nz.ne.n3(levelmin)/2**levelmin) then write(*,*)'coarser grid is not compatible with initial conditions file' write(*,*)'Found n1=',n1(levelmin),& & ' n2=',n2(levelmin),& & ' n3=',n3(levelmin) write(*,*)'Expected n1=',nx*2**levelmin & & ,' n2=',ny*2**levelmin & & ,' n3=',nz*2**levelmin call clean_stop endif end if ! Compute box length in the initial conditions in units of h-1 Mpc boxlen_ini=dble(nx)*2**levelmin*dxini(levelmin)*(h0/100.) CASE ('gadget') if (verbose) write(*,*)'Reading in gadget format from '//TRIM(initfile(levelmin)) call gadgetreadheader(TRIM(initfile(levelmin)), 0, gadgetheader, ok) if(.not.ok) call clean_stop do i=1,6 if (i .ne. 2) then if (gadgetheader%nparttotal(i) .ne. 0) then write(*,*) 'Non DM particles present in bin ', i call clean_stop endif endif enddo if (gadgetheader%mass(2) == 0) then write(*,*) 'Particles have different masses, not supported' call clean_stop endif omega_m = gadgetheader%omega0 omega_l = gadgetheader%omegalambda h0 = gadgetheader%hubbleparam * 100d0 boxlen_ini = gadgetheader%boxsize aexp = gadgetheader%time aexp_ini = aexp ! Compute SPH equivalent mass (initial gas mass resolution) mass_sph=omega_b/omega_m*0.5d0**(ndim*levelmin) nlevelmax_part = levelmin astart(levelmin) = aexp xoff1(levelmin)=0 xoff2(levelmin)=0 xoff3(levelmin)=0 dxini(levelmin) = boxlen_ini/(nx*2**levelmin*(h0/100.0)) CASE ('dice') if (verbose) write(*,*)'Reading in gadget format from'//TRIM(initfile(levelmin))//'/'//TRIM(ic_file) call gadgetreadheader(TRIM(initfile(levelmin))//'/'//TRIM(ic_file), 0,gadgetheader, ok) if(.not.ok) call clean_stop omega_m = gadgetheader%omega0 omega_l = gadgetheader%omegalambda h0 = gadgetheader%hubbleparam * 100d0 if(gadgetheader%boxsize>0d0) then boxlen_ini = gadgetheader%boxsize/1e3 else boxlen_ini = boxlen endif aexp = gadgetheader%time aexp_ini = aexp ! Compute SPH equivalent mass (initial gas mass resolution) mass_sph=omega_b/omega_m*0.5d0**(ndim*levelmin) nlevelmax_part = levelmin astart(levelmin) = aexp xoff1(levelmin)=0 xoff2(levelmin)=0 xoff3(levelmin)=0 dxini(levelmin) = boxlen_ini/(nx*2**levelmin*(h0/100.0)) CASE DEFAULT write(*,*) 'Unsupported input format '//filetype call clean_stop END SELECT ! Write cosmological parameters if(myid==1)then write(*,'(' Cosmological parameters:')') write(*,'(' aexp=',1pe10.3,' H0=',1pe10.3,' km s-1 Mpc-1')')aexp,h0 write(*,'(' omega_m=',F7.3,' omega_l=',F7.3,' omega_b=',F7.3)')omega_m,omega_l,omega_b write(*,'(' box size=',1pe10.3,' h-1 Mpc')')boxlen_ini end if omega_k=1d0-omega_l-omega_m ! Compute linear scaling factor between aexp and astart(ilevel) do ilevel=levelmin,nlevelmax_part dfact(ilevel)=d1a(aexp)/d1a(astart(ilevel)) vfact(ilevel)=astart(ilevel)*fpeebl(astart(ilevel)) & ! Same scale factor as in grafic1 & *sqrt(omega_m/astart(ilevel)+omega_l*astart(ilevel)*astart(ilevel)+omega_k) & & /astart(ilevel)*h0 end do ! Write initial conditions parameters do ilevel=levelmin,nlevelmax_part if(myid==1)then write(*,'(' Initial conditions for level =',I4)')ilevel write(*,'(' dx=',1pe10.3,' h-1 Mpc')')dxini(ilevel)*h0/100. endif if(.not.multiple)then if(myid==1)then write(*,'(' n1=',I4,' n2=',I4,' n3=',I4)') & & n1(ilevel),& & n2(ilevel),& & n3(ilevel) write(*,'(' xoff=',1pe10.3,' yoff=',1pe10.3,' zoff=',& & 1pe10.3,' h-1 Mpc')') & & xoff1(ilevel)*h0/100.,& & xoff2(ilevel)*h0/100.,& & xoff3(ilevel)*h0/100. endif else write(*,'(' myid=',I4,' n1=',I4,' n2=',I4,' n3=',I4)') & & myid,n1(ilevel),n2(ilevel),n3(ilevel) write(*,'(' myid=',I4,' xoff=',1pe10.3,' yoff=',1pe10.3,' zoff=',& & 1pe10.3,' h-1 Mpc')') & & myid,xoff1(ilevel)*h0/100.,& & xoff2(ilevel)*h0/100.,& & xoff3(ilevel)*h0/100. endif end do ! Scale displacement in Mpc to code velocity (v=dx/dtau) ! in coarse cell units per conformal time vfact(1)=aexp*fpeebl(aexp)*sqrt(omega_m/aexp+omega_l*aexp*aexp+omega_k) ! This scale factor is different from vfact in grafic by h0/aexp contains !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc function fy(a) implicit none ! Computes the integrand real(dp)::fy real(dp)::y,a y=omega_m*(1d0/a-1d0) + omega_l*(a*a-1d0) + 1d0 fy=1d0/y**1.5d0 return end function fy !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc function d1a(a) implicit none real(dp)::d1a ! Computes the linear growing mode D1 in a Friedmann-Robertson-Walker ! universe. See Peebles LSSU sections 11 and 14. real(dp)::a,y12,y,eps eps=1.0d-6 if(a .le. 0.0d0)then write(*,*)'a=',a call clean_stop end if y=omega_m*(1d0/a-1d0) + omega_l*(a*a-1d0) + 1d0 if(y .lt. 0.0D0)then write(*,*)'y=',y call clean_stop end if y12=y**0.5d0 d1a=y12/a*rombint(eps,a,eps) return end function d1a !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc !! function ad1(d1) !! implicit none !! real(dp)::ad1 !! real(dp)::a,d1,da !! integer::niter !! ! Inverts the relation d1(a) given by function d1a(a) using !! ! Newton-Raphson. !! if (d1.eq.0.0) stop 'ad1 undefined for d1=0!' !! ! Initial guess for Newton-Raphson iteration, good for Omega near 1. !! a=1.e-7 !! niter=0 !! 10 niter=niter+1 !! da=(d1/d1a(a)-1d0)/fpeebl(a)*a !! a=a+da !! if (abs(da).gt.1.0e-8.and.niter.lt.10) go to 10 !! ad1=a !! return !! end function ad1 !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc function fpeebl(a) implicit none real(dp) :: fpeebl,a ! Computes the growth factor f=d\log D1/d\log a. real(dp) :: fact,y,eps eps=1.0d-6 y=omega_m*(1d0/a-1d0) + omega_l*(a*a-1d0) + 1d0 fact=rombint(eps,a,eps) fpeebl=(omega_l*a*a-0.5d0*omega_m/a)/y - 1d0 + a*fy(a)/fact return end function fpeebl !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc function rombint(a,b,tol) implicit none real(dp)::rombint ! ! Rombint returns the integral from a to b of f(x)dx using Romberg ! integration. The method converges provided that f(x) is continuous ! in (a,b). The function f must be double precision and must be ! declared external in the calling routine. ! tol indicates the desired relative accuracy in the integral. ! integer::maxiter=16,maxj=5 real(dp),dimension(100):: g real(dp)::a,b,tol,fourj real(dp)::h,error,gmax,g0,g1 integer::nint,i,j,k,jmax h=0.5d0*(b-a) gmax=h*(fy(a)+fy(b)) g(1)=gmax nint=1 error=1.0d20 i=0 10 i=i+1 if(.not. (i>maxiter.or.(i>5.and.abs(error)maxiter.and.abs(error)>tol) & & write(*,*) 'Rombint failed to converge; integral, error=', & & rombint,error return end function rombint end subroutine init_cosmo subroutine friedman(O_mat_0,O_vac_0,O_k_0,alpha,axp_min, & & axp_out,hexp_out,tau_out,t_out,ntable) use amr_parameters implicit none integer::ntable real(kind=8)::O_mat_0, O_vac_0, O_k_0 real(kind=8)::alpha,axp_min real(dp),dimension(0:ntable)::axp_out,hexp_out,tau_out,t_out ! ######################################################! ! This subroutine assumes that axp = 1 at z = 0 (today) ! ! and that t and tau = 0 at z = 0 (today). ! ! axp is the expansion factor, hexp the Hubble constant ! ! defined as hexp=1/axp*daxp/dtau, tau the conformal ! ! time, and t the look-back time, both in unit of 1/H0. ! ! alpha is the required accuracy and axp_min is the ! ! starting expansion factor of the look-up table. ! ! ntable is the required size of the look-up table. ! ! ######################################################! real(kind=8)::axp_tau, axp_t real(kind=8)::axp_tau_pre, axp_t_pre real(kind=8)::dadtau, dadt real(kind=8)::dtau,dt real(kind=8)::tau,t integer::nstep,nout,nskip if( (O_mat_0+O_vac_0+O_k_0) .ne. 1.0D0 )then write(*,*)'Error: non-physical cosmological constants' write(*,*)'O_mat_0,O_vac_0,O_k_0=',O_mat_0,O_vac_0,O_k_0 write(*,*)'The sum must be equal to 1.0, but ' write(*,*)'O_mat_0+O_vac_0+O_k_0=',O_mat_0+O_vac_0+O_k_0 call clean_stop end if axp_tau = 1.0D0 axp_t = 1.0D0 tau = 0.0D0 t = 0.0D0 nstep = 0 do while ( (axp_tau .ge. axp_min) .or. (axp_t .ge. axp_min) ) nstep = nstep + 1 dtau = alpha * axp_tau / dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0) axp_tau_pre = axp_tau - dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0)*dtau/2d0 axp_tau = axp_tau - dadtau(axp_tau_pre,O_mat_0,O_vac_0,O_k_0)*dtau tau = tau - dtau dt = alpha * axp_t / dadt(axp_t,O_mat_0,O_vac_0,O_k_0) axp_t_pre = axp_t - dadt(axp_t,O_mat_0,O_vac_0,O_k_0)*dt/2d0 axp_t = axp_t - dadt(axp_t_pre,O_mat_0,O_vac_0,O_k_0)*dt t = t - dt end do if(debug)then write(*,666)-t end if 666 format(' Age of the Universe (in unit of 1/H0)=',1pe10.3) nskip=nstep/ntable axp_t = 1d0 t = 0d0 axp_tau = 1d0 tau = 0d0 nstep = 0 nout=0 t_out(nout)=t tau_out(nout)=tau axp_out(nout)=axp_tau hexp_out(nout)=dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0)/axp_tau do while ( (axp_tau .ge. axp_min) .or. (axp_t .ge. axp_min) ) nstep = nstep + 1 dtau = alpha * axp_tau / dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0) axp_tau_pre = axp_tau - dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0)*dtau/2d0 axp_tau = axp_tau - dadtau(axp_tau_pre,O_mat_0,O_vac_0,O_k_0)*dtau tau = tau - dtau dt = alpha * axp_t / dadt(axp_t,O_mat_0,O_vac_0,O_k_0) axp_t_pre = axp_t - dadt(axp_t,O_mat_0,O_vac_0,O_k_0)*dt/2d0 axp_t = axp_t - dadt(axp_t_pre,O_mat_0,O_vac_0,O_k_0)*dt t = t - dt if(mod(nstep,nskip)==0)then nout=nout+1 t_out(nout)=t tau_out(nout)=tau axp_out(nout)=axp_tau hexp_out(nout)=dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0)/axp_tau end if end do t_out(ntable)=t tau_out(ntable)=tau axp_out(ntable)=axp_tau hexp_out(ntable)=dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0)/axp_tau end subroutine friedman function dadtau(axp_tau,O_mat_0,O_vac_0,O_k_0) use amr_parameters real(kind=8)::dadtau,axp_tau,O_mat_0,O_vac_0,O_k_0 dadtau = axp_tau*axp_tau*axp_tau * & & ( O_mat_0 + & & O_vac_0 * axp_tau*axp_tau*axp_tau + & & O_k_0 * axp_tau ) dadtau = sqrt(dadtau) return end function dadtau function dadt(axp_t,O_mat_0,O_vac_0,O_k_0) use amr_parameters real(kind=8)::dadt,axp_t,O_mat_0,O_vac_0,O_k_0 dadt = (1.0D0/axp_t)* & & ( O_mat_0 + & & O_vac_0 * axp_t*axp_t*axp_t + & & O_k_0 * axp_t ) dadt = sqrt(dadt) return end function dadt /data2/mabe/MeraTest/Ramses/patch_2019_10version/particle_tree.f90 !################################################################ !################################################################ !################################################################ !################################################################ subroutine init_tree use pm_commons use amr_commons use mpi_mod use dice_commons implicit none #ifndef WITHOUTMPI integer::info #endif !------------------------------------------------------ ! This subroutine build the particle linked list at the ! coarse level for ALL the particles in the box. ! This routine should be used only as initial set up for ! the particle tree. !------------------------------------------------------ integer::ipart,idim,i,nxny,ilevel integer::npart1,icpu,nx_loc logical::error real(dp),dimension(1:3)::xbound integer,dimension(1:nvector),save::ix,iy,iz integer,dimension(1:nvector),save::ind_grid,ind_part logical,dimension(1:nvector),save::ok=.true. real(dp),dimension(1:3)::skip_loc real(dp)::scale if(verbose)write(*,*)' Entering init_tree' ! Local constants nxny=nx*ny xbound(1:3)=(/dble(nx),dble(ny),dble(nz)/) nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) !---------------------------------- ! Initialize particle linked list !---------------------------------- prevp(1)=0; nextp(1)=2 do ipart=2,npartmax-1 prevp(ipart)=ipart-1 nextp(ipart)=ipart+1 end do prevp(npartmax)=npartmax-1; nextp(npartmax)=0 ! Free memory linked list headp_free=npart+1 tailp_free=npartmax numbp_free=tailp_free-headp_free+1 if(numbp_free>0)then prevp(headp_free)=0 end if nextp(tailp_free)=0 #ifndef WITHOUTMPI call MPI_ALLREDUCE(numbp_free,numbp_free_tot,1,MPI_INTEGER,MPI_MIN,& & MPI_COMM_WORLD,info) #endif #ifdef WITHOUTMPI numbp_free_tot=numbp_free #endif !-------------- ! Periodic box !-------------- do idim=1,ndim do ipart=1,npart if(xp(ipart,idim)/scale+skip_loc(idim)<0.0d0) & & xp(ipart,idim)=xp(ipart,idim)+(xbound(idim)-skip_loc(idim))*scale if(xp(ipart,idim)/scale+skip_loc(idim)>=xbound(idim)) & & xp(ipart,idim)=xp(ipart,idim)-(xbound(idim)-skip_loc(idim))*scale end do if(sink)then do ipart=1,nsink if(xsink(ipart,idim)/scale+skip_loc(idim)<0.0d0) & & xsink(ipart,idim)=xsink(ipart,idim)+(xbound(idim)-skip_loc(idim))*scale if(xsink(ipart,idim)/scale+skip_loc(idim)>=xbound(idim)) & & xsink(ipart,idim)=xsink(ipart,idim)-(xbound(idim)-skip_loc(idim))*scale end do endif end do !---------------------------------- ! Reset all linked lists at level 1 !---------------------------------- do i=1,active(1)%ngrid headp(active(1)%igrid(i))=0 tailp(active(1)%igrid(i))=0 numbp(active(1)%igrid(i))=0 end do do icpu=1,ncpu do i=1,reception(icpu,1)%ngrid headp(reception(icpu,1)%igrid(i))=0 tailp(reception(icpu,1)%igrid(i))=0 numbp(reception(icpu,1)%igrid(i))=0 end do end do !------------------------------------------------ ! Build linked list at level 1 by vector sweeps !------------------------------------------------ do ipart=1,npart,nvector npart1=min(nvector,npart-ipart+1) ! Gather particles do i=1,npart1 ind_part(i)=ipart+i-1 end do ! Compute coarse cell #if NDIM>0 do i=1,npart1 ix(i)=int(xp(ind_part(i),1)/scale+skip_loc(1)) end do #endif #if NDIM>1 do i=1,npart1 iy(i)=int(xp(ind_part(i),2)/scale+skip_loc(2)) end do #endif #if NDIM>2 do i=1,npart1 iz(i)=int(xp(ind_part(i),3)/scale+skip_loc(3)) end do #endif ! Compute level 1 grid index error=.false. do i=1,npart1 ind_grid(i)=son(1+ix(i)+nx*iy(i)+nxny*iz(i)) if(ind_grid(i)==0)error=.true. end do if(error)then write(*,*)'Error in init_tree' write(*,*)'Particles appear in unrefined regions' call clean_stop end if ! Add particle to level 1 linked list call add_list(ind_part,ind_grid,ok,npart1) end do ! destroy and recreate cloud particles to account for changes in sink ! radius, newly added sinks, etc do ilevel=levelmin-1,1,-1 call merge_tree_fine(ilevel) end do #if NDIM==3 if(sink)then call kill_entire_cloud(1) call create_cloud_from_sink endif #endif ! Sort particles down to levelmin do ilevel=1,levelmin-1 call make_tree_fine(ilevel) call kill_tree_fine(ilevel) ! Update boundary conditions for remaining particles call virtual_tree_fine(ilevel) end do end subroutine init_tree !################################################################ !################################################################ !################################################################ !################################################################ subroutine make_tree_fine(ilevel) use pm_commons use amr_commons implicit none integer::ilevel !----------------------------------------------------------------------- ! This subroutine checks if particles have moved from their parent grid ! to one of the 3**ndim neighboring sister grids. The particle is then ! disconnected from the parent grid linked list, and connected to the ! corresponding sister grid linked list. If the sister grid does ! not exist, the particle is left to its original parent grid. ! Particles must not move to a distance greater than direct neighbors ! boundaries. Otherwise an error message is issued and the code stops. !----------------------------------------------------------------------- integer::idim,nx_loc real(dp)::dx,scale real(dp),dimension(1:3)::xbound real(dp),dimension(1:3)::skip_loc integer::igrid,jgrid,ipart,jpart,next_part integer::ig,ip,npart1,icpu integer,dimension(1:nvector),save::ind_grid,ind_part,ind_grid_part if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Mesh spacing in that level dx=0.5D0**ilevel xbound(1:3)=(/dble(nx),dble(ny),dble(nz)/) nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) ! Loop over cpus do icpu=1,ncpu igrid=headl(icpu,ilevel) ig=0 ip=0 ! Loop over grids do jgrid=1,numbl(icpu,ilevel) npart1=numbp(igrid) ! Number of particles in the grid if(npart1>0)then ig=ig+1 ind_grid(ig)=igrid ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) if(ig==0)then ig=1 ind_grid(ig)=igrid end if ip=ip+1 ind_part(ip)=ipart ind_grid_part(ip)=ig ! Gather nvector particles if(ip==nvector)then call check_tree(ind_grid,ind_part,ind_grid_part,ig,ip,ilevel) ip=0 ig=0 end if ipart=next_part ! Go to next particle end do ! End loop over particles end if igrid=next(igrid) ! Go to next grid end do ! End loop over grids if(ip>0)call check_tree(ind_grid,ind_part,ind_grid_part,ig,ip,ilevel) end do ! End loop over cpus ! Periodic boundaries if(sink)then do idim=1,ndim do ipart=1,nsink if(xsink(ipart,idim)/scale+skip_loc(idim)<0.0d0) & & xsink(ipart,idim)=xsink(ipart,idim)+(xbound(idim)-skip_loc(idim))*scale if(xsink(ipart,idim)/scale+skip_loc(idim)>=xbound(idim)) & & xsink(ipart,idim)=xsink(ipart,idim)-(xbound(idim)-skip_loc(idim))*scale end do end do endif 111 format(' Entering make_tree_fine for level ',I2) end subroutine make_tree_fine !################################################################ !################################################################ !################################################################ !################################################################ subroutine check_tree(ind_grid,ind_part,ind_grid_part,ng,np,ilevel) use amr_commons use pm_commons implicit none integer::ng,np,ilevel integer,dimension(1:nvector)::ind_grid integer,dimension(1:nvector)::ind_grid_part,ind_part !----------------------------------------------------------------------- ! This routine is called by make_tree_fine. !----------------------------------------------------------------------- logical::error integer::i,j,idim,nx_loc real(dp)::dx,xxx,scale real(dp),dimension(1:3)::xbound ! Grid-based arrays integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids real(dp),dimension(1:nvector,1:ndim),save::x0 integer ,dimension(1:nvector),save::ind_father ! Particle-based arrays integer,dimension(1:nvector),save::ind_son,igrid_son integer,dimension(1:nvector),save::list1,list2 logical,dimension(1:nvector),save::ok real(dp),dimension(1:3)::skip_loc ! Mesh spacing in that level dx=0.5D0**ilevel xbound(1:3)=(/dble(nx),dble(ny),dble(nz)/) nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do i=1,ng x0(i,idim)=xg(ind_grid(i),idim)-3.0D0*dx end do end do ! Gather 27 neighboring father cells (should be present anytime !) do i=1,ng ind_father(i)=father(ind_grid(i)) end do call get3cubefather(ind_father,nbors_father_cells,nbors_father_grids,ng,ilevel) ! Compute particle position in 3-cube error=.false. ind_son(1:np)=1 ok(1:np)=.false. do idim=1,ndim do j=1,np i=floor((xp(ind_part(j),idim)/scale+skip_loc(idim)-x0(ind_grid_part(j),idim))/dx/2.0D0) if(i<0.or.i>2)error=.true. i=MAX(i,0) i=MIN(i,2) ind_son(j)=ind_son(j)+i*3**(idim-1) ! Check if particle has escaped from its parent grid ok(j)=ok(j).or.i.ne.1 end do end do if(error)then write(*,*)'Problem in check_tree at level ',ilevel write(*,*)'A particle has moved outside allowed boundaries' do idim=1,ndim do j=1,np i=floor((xp(ind_part(j),idim)/scale+skip_loc(idim)-x0(ind_grid_part(j),idim))/dx/2.0D0) if(i<0.or.i>2)then write(*,*)xp(ind_part(j),1:ndim) write(*,*)x0(ind_grid_part(j),1:ndim)*scale endif end do end do stop end if ! Compute neighboring grid index do j=1,np igrid_son(j)=son(nbors_father_cells(ind_grid_part(j),ind_son(j))) end do ! If escaped particle sits in unrefined cell, leave it to its parent grid. ! For ilevel=levelmin, this should never happen. do j=1,np if(igrid_son(j)==0)ok(j)=.false. end do ! Periodic box do idim=1,ndim do j=1,np if(ok(j))then xxx=xp(ind_part(j),idim)/scale+skip_loc(idim)-xg(igrid_son(j),idim) if(xxx> xbound(idim)/2.0)then xp(ind_part(j),idim)=xp(ind_part(j),idim)-(xbound(idim)-skip_loc(idim))*scale endif if(xxx<-xbound(idim)/2.0)then xp(ind_part(j),idim)=xp(ind_part(j),idim)+(xbound(idim)-skip_loc(idim))*scale endif endif enddo enddo ! Switch particles linked list do j=1,np if(ok(j))then list1(j)=ind_grid(ind_grid_part(j)) list2(j)=igrid_son(j) end if end do call remove_list(ind_part,list1,ok,np) call add_list(ind_part,list2,ok,np) end subroutine check_tree !################################################################ !################################################################ !################################################################ !################################################################ subroutine kill_tree_fine(ilevel) use pm_commons use amr_commons implicit none integer::ilevel !------------------------------------------------------------------------ ! This routine sorts particle between ilevel grids and their ! ilevel+1 children grids. Particles are disconnected from their parent ! grid linked list and connected to their corresponding child grid linked ! list. If the child grid does not exist, the particle is left to its ! original parent grid. !------------------------------------------------------------------------ integer::igrid,jgrid,ipart,jpart,next_part integer::i,ig,ip,npart1,icpu integer,dimension(1:nvector),save::ind_grid,ind_part,ind_grid_part if(numbtot(1,ilevel)==0)return if(ilevel==nlevelmax)return if(numbtot(1,ilevel+1)==0)return if(verbose)write(*,111)ilevel ! Reset all linked lists at level ilevel+1 do i=1,active(ilevel+1)%ngrid headp(active(ilevel+1)%igrid(i))=0 tailp(active(ilevel+1)%igrid(i))=0 numbp(active(ilevel+1)%igrid(i))=0 end do do icpu=1,ncpu do i=1,reception(icpu,ilevel+1)%ngrid headp(reception(icpu,ilevel+1)%igrid(i))=0 tailp(reception(icpu,ilevel+1)%igrid(i))=0 numbp(reception(icpu,ilevel+1)%igrid(i))=0 end do end do ! Sort particles between ilevel and ilevel+1 ! Loop over cpus do icpu=1,ncpu igrid=headl(icpu,ilevel) ig=0 ip=0 ! Loop over grids do jgrid=1,numbl(icpu,ilevel) npart1=numbp(igrid) ! Number of particles in the grid if(npart1>0)then ig=ig+1 ind_grid(ig)=igrid ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) if(ig==0)then ig=1 ind_grid(ig)=igrid end if ip=ip+1 ind_part(ip)=ipart ind_grid_part(ip)=ig if(ip==nvector)then call kill_tree(ind_grid,ind_part,ind_grid_part,ig,ip,ilevel) ip=0 ig=0 end if ipart=next_part ! Go to next particle end do ! End loop over particles end if igrid=next(igrid) ! Go to next grid end do ! End loop over grids if(ip>0)call kill_tree(ind_grid,ind_part,ind_grid_part,ig,ip,ilevel) end do ! End loop over cpus 111 format(' Entering kill_tree_fine for level ',I2) end subroutine kill_tree_fine !################################################################ !################################################################ !################################################################ !################################################################ subroutine kill_tree(ind_grid,ind_part,ind_grid_part,ng,np,ilevel) use amr_commons use pm_commons implicit none integer::ng,np,ilevel integer,dimension(1:nvector)::ind_grid integer,dimension(1:nvector)::ind_grid_part,ind_part !----------------------------------------------------------------------- ! This routine is called by subroutine kill_tree_fine. !----------------------------------------------------------------------- integer::i,j,idim,nx_loc real(dp)::dx,xxx,scale ! Grid based arrays real(dp),dimension(1:nvector,1:ndim),save::x0 ! Particle based arrays integer,dimension(1:nvector),save::igrid_son,ind_son integer,dimension(1:nvector),save::list1,list2 logical,dimension(1:nvector),save::ok real(dp),dimension(1:3)::skip_loc ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) ! Compute lower left corner of grid do idim=1,ndim do i=1,ng x0(i,idim)=xg(ind_grid(i),idim)-dx end do end do ! Select only particles within grid boundaries ok(1:np)=.true. do idim=1,ndim do j=1,np xxx=(xp(ind_part(j),idim)/scale+skip_loc(idim)-x0(ind_grid_part(j),idim))/dx ok(j)=ok(j) .and. (xxx >= 0d0 .and. xxx < 2.0d0) end do end do ! Determines in which son particles sit ind_son(1:np)=0 do idim=1,ndim do j=1,np i=int((xp(ind_part(j),idim)/scale+skip_loc(idim)-x0(ind_grid_part(j),idim))/dx) ind_son(j)=ind_son(j)+i*2**(idim-1) end do end do do j=1,np ind_son(j)=ncoarse+ind_son(j)*ngridmax+ind_grid(ind_grid_part(j)) end do ! Determine which son cell is refined igrid_son(1:np)=0 do j=1,np if(ok(j))igrid_son(j)=son(ind_son(j)) end do do j=1,np ok(j)=igrid_son(j)>0 end do ! Compute particle linked list do j=1,np if(ok(j))then list1(j)=ind_grid(ind_grid_part(j)) list2(j)=igrid_son(j) end if end do ! Remove particles from their original linked lists call remove_list(ind_part,list1,ok,np) ! Add particles to their new linked lists call add_list(ind_part,list2,ok,np) end subroutine kill_tree !################################################################ !################################################################ !################################################################ !################################################################ subroutine merge_tree_fine(ilevel) use pm_commons use amr_commons implicit none integer::ilevel !-------------------------------------------------------------------- ! This routine disconnects all particles contained in children grids ! and connects them to their parent grid linked list. !--------------------------------------------------------------- integer::igrid,iskip,icpu integer::i,ind,ncache,ngrid integer,dimension(1:nvector),save::ind_grid,ind_cell,ind_grid_son logical,dimension(1:nvector),save::ok if(numbtot(1,ilevel)==0)return if(ilevel==nlevelmax)return if(verbose)write(*,111)ilevel ! Loop over cpus do icpu=1,ncpu if(icpu==myid)then ncache=active(ilevel)%ngrid else ncache=reception(icpu,ilevel)%ngrid end if ! Loop over grids by vector sweeps do igrid=1,ncache,nvector ngrid=MIN(nvector,ncache-igrid+1) if(icpu==myid)then do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do else do i=1,ngrid ind_grid(i)=reception(icpu,ilevel)%igrid(igrid+i-1) end do end if ! Loop over children grids do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,ngrid ind_cell(i)=iskip+ind_grid(i) end do do i=1,ngrid ind_grid_son(i)=son(ind_cell(i)) end do do i=1,ngrid ok(i)=ind_grid_son(i)>0 end do do i=1,ngrid if(ok(i))then if(numbp(ind_grid_son(i))>0)then if(numbp(ind_grid(i))>0)then ! Connect son linked list at the tail of father linked list nextp(tailp(ind_grid(i)))=headp(ind_grid_son(i)) prevp(headp(ind_grid_son(i)))=tailp(ind_grid(i)) numbp(ind_grid(i))=numbp(ind_grid(i))+numbp(ind_grid_son(i)) tailp(ind_grid(i))=tailp(ind_grid_son(i)) else ! Initialize father linked list headp(ind_grid(i))=headp(ind_grid_son(i)) tailp(ind_grid(i))=tailp(ind_grid_son(i)) numbp(ind_grid(i))=numbp(ind_grid_son(i)) end if end if end if end do end do ! End loop over children end do ! End loop over grids end do ! End loop over cpus 111 format(' Entering merge_tree_fine for level ',I2) end subroutine merge_tree_fine !################################################################ !################################################################ !################################################################ !################################################################ subroutine virtual_tree_fine(ilevel) use pm_commons use amr_commons use mpi_mod use dice_commons implicit none integer::ilevel !----------------------------------------------------------------------- ! This subroutine move particles across processors boundaries. !----------------------------------------------------------------------- #ifndef WITHOUTMPI integer::ip,ipcom,npart1,next_part,ncache,ncache_tot integer::icpu,igrid,ipart,jpart integer::info,buf_count,tagf=102,tagu=102 integer::countsend,countrecv integer,dimension(MPI_STATUS_SIZE,2*ncpu)::statuses integer,dimension(2*ncpu)::reqsend,reqrecv integer,dimension(ncpu)::sendbuf,recvbuf logical::ok_free integer::particle_data_width integer,dimension(1:nvector),save::ind_part,ind_list,ind_com #endif if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel #ifdef WITHOUTMPI return #endif #ifndef WITHOUTMPI ! Count particle sitting in virtual boundaries do icpu=1,ncpu reception(icpu,ilevel)%npart=0 do igrid=1,reception(icpu,ilevel)%ngrid reception(icpu,ilevel)%npart=reception(icpu,ilevel)%npart+& & numbp(reception(icpu,ilevel)%igrid(igrid)) end do sendbuf(icpu)=reception(icpu,ilevel)%npart end do ! Calculate how many particle properties are being transferred particle_data_width = twondim+1 if(star.or.sink) then if(metal) then particle_data_width=twondim+3 else particle_data_width=twondim+2 endif endif #ifdef OUTPUT_PARTICLE_POTENTIAL particle_data_width=particle_data_width+1 #endif ! DICE patch / gas temperature if(dice_init) particle_data_width=particle_data_width+2 ! Allocate communication buffer in emission do icpu=1,ncpu ncache=reception(icpu,ilevel)%npart if(ncache>0)then ! Allocate reception buffer allocate(reception(icpu,ilevel)%fp(1:ncache,1:4)) allocate(reception(icpu,ilevel)%up(1:ncache,1:particle_data_width)) end if end do ! Gather particle in communication buffer do icpu=1,ncpu if(reception(icpu,ilevel)%npart>0)then ! Gather particles by vector sweeps ipcom=0 ip=0 do igrid=1,reception(icpu,ilevel)%ngrid npart1=numbp(reception(icpu,ilevel)%igrid(igrid)) ipart =headp(reception(icpu,ilevel)%igrid(igrid)) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) ip=ip+1 ipcom=ipcom+1 ind_com (ip)=ipcom ind_part(ip)=ipart ind_list(ip)=reception(icpu,ilevel)%igrid(igrid) reception(icpu,ilevel)%fp(ipcom,1)=igrid if(ip==nvector)then call fill_comm(ind_part,ind_com,ind_list,ip,ilevel,icpu) ip=0 end if ipart=next_part ! Go to next particle end do end do if(ip>0)call fill_comm(ind_part,ind_com,ind_list,ip,ilevel,icpu) end if end do ! Communicate virtual particle number to parent cpu call MPI_ALLTOALL(sendbuf,1,MPI_INTEGER,recvbuf,1,MPI_INTEGER,MPI_COMM_WORLD,info) ! Allocate communication buffer in reception do icpu=1,ncpu emission(icpu,ilevel)%npart=recvbuf(icpu) ncache=emission(icpu,ilevel)%npart if(ncache>0)then ! Allocate reception buffer allocate(emission(icpu,ilevel)%fp(1:ncache,1:4)) allocate(emission(icpu,ilevel)%up(1:ncache,1:particle_data_width)) end if end do ! Receive particles countrecv=0 do icpu=1,ncpu ncache=emission(icpu,ilevel)%npart if(ncache>0)then buf_count=ncache*4 countrecv=countrecv+1 #ifndef LONGINT call MPI_IRECV(emission(icpu,ilevel)%fp,buf_count, & & MPI_INTEGER,icpu-1,& & tagf,MPI_COMM_WORLD,reqrecv(countrecv),info) #else call MPI_IRECV(emission(icpu,ilevel)%fp,buf_count, & & MPI_INTEGER8,icpu-1,& & tagf,MPI_COMM_WORLD,reqrecv(countrecv),info) #endif buf_count=ncache*particle_data_width countrecv=countrecv+1 call MPI_IRECV(emission(icpu,ilevel)%up,buf_count, & & MPI_DOUBLE_PRECISION,icpu-1,& & tagu,MPI_COMM_WORLD,reqrecv(countrecv),info) end if end do ! Send particles countsend=0 do icpu=1,ncpu ncache=reception(icpu,ilevel)%npart if(ncache>0)then buf_count=ncache*4 countsend=countsend+1 #ifndef LONGINT call MPI_ISEND(reception(icpu,ilevel)%fp,buf_count, & & MPI_INTEGER,icpu-1,& & tagf,MPI_COMM_WORLD,reqsend(countsend),info) #else call MPI_ISEND(reception(icpu,ilevel)%fp,buf_count, & & MPI_INTEGER8,icpu-1,& & tagf,MPI_COMM_WORLD,reqsend(countsend),info) #endif buf_count=ncache*particle_data_width countsend=countsend+1 call MPI_ISEND(reception(icpu,ilevel)%up,buf_count, & & MPI_DOUBLE_PRECISION,icpu-1,& & tagu,MPI_COMM_WORLD,reqsend(countsend),info) end if end do ! Wait for full completion of receives call MPI_WAITALL(countrecv,reqrecv,statuses,info) ! Compute total number of newly created particles ncache_tot=0 do icpu=1,ncpu ncache_tot=ncache_tot+emission(icpu,ilevel)%npart end do ! Wait for full completion of sends call MPI_WAITALL(countsend,reqsend,statuses,info) call MPI_ALLREDUCE(numbp_free,numbp_free_tot,1,MPI_INTEGER,MPI_MIN,& & MPI_COMM_WORLD,info) ok_free=(numbp_free-ncache_tot)>=0 if(.not. ok_free)then write(*,*)'No more free memory for particles' write(*,*)'Increase npartmax' write(*,*)numbp_free,ncache_tot write(*,*)myid write(*,*)emission(1:ncpu,ilevel)%npart write(*,*)'============================' write(*,*)reception(1:ncpu,ilevel)%npart call MPI_ABORT(MPI_COMM_WORLD,1,info) end if ! Scatter new particles from communication buffer do icpu=1,ncpu ! Loop over particles by vector sweeps ncache=emission(icpu,ilevel)%npart do ipart=1,ncache,nvector npart1=min(nvector,ncache-ipart+1) do ip=1,npart1 ind_com(ip)=ipart+ip-1 end do call empty_comm(ind_com,npart1,ilevel,icpu) end do end do ! Deallocate temporary communication buffers do icpu=1,ncpu ncache=emission(icpu,ilevel)%npart if(ncache>0)then deallocate(emission(icpu,ilevel)%fp) deallocate(emission(icpu,ilevel)%up) end if ncache=reception(icpu,ilevel)%npart if(ncache>0)then deallocate(reception(icpu,ilevel)%fp) deallocate(reception(icpu,ilevel)%up) end if end do #endif 111 format(' Entering virtual_tree_fine for level ',I2) end subroutine virtual_tree_fine !################################################################ !################################################################ !################################################################ !################################################################ subroutine fill_comm(ind_part,ind_com,ind_list,np,ilevel,icpu) use pm_commons use amr_commons use dice_commons implicit none integer::np,ilevel,icpu integer,dimension(1:nvector)::ind_part,ind_com,ind_list integer::current_property integer::i,idim logical,dimension(1:nvector),save::ok=.true. ! Gather particle level and identity do i=1,np reception(icpu,ilevel)%fp(ind_com(i),2)=levelp(ind_part(i)) reception(icpu,ilevel)%fp(ind_com(i),3)=idp (ind_part(i)) reception(icpu,ilevel)%fp(ind_com(i),4)=part2int(typep(ind_part(i))) end do ! Gather particle position and velocity do idim=1,ndim do i=1,np reception(icpu,ilevel)%up(ind_com(i),idim )=xp(ind_part(i),idim) reception(icpu,ilevel)%up(ind_com(i),idim+ndim)=vp(ind_part(i),idim) end do end do current_property = twondim+1 ! Gather particle mass do i=1,np reception(icpu,ilevel)%up(ind_com(i),current_property)=mp(ind_part(i)) end do current_property = current_property+1 #ifdef OUTPUT_PARTICLE_POTENTIAL ! Gather particle potential do i=1,np reception(icpu,ilevel)%up(ind_com(i),current_property)=ptcl_phi(ind_part(i)) end do current_property = current_property+1 #endif ! Gather particle birth epoch if(star.or.sink)then do i=1,np reception(icpu,ilevel)%up(ind_com(i),current_property)=tp(ind_part(i)) end do current_property = current_property+1 if(metal)then do i=1,np reception(icpu,ilevel)%up(ind_com(i),current_property)=zp(ind_part(i)) end do current_property = current_property+1 end if end if ! DICE patch / gas temperature if(dice_init) then do i=1,np reception(icpu,ilevel)%up(ind_com(i),current_property)=up(ind_part(i)) end do current_property = current_property+1 if(cosmo) then do i=1,np reception(icpu,ilevel)%up(ind_com(i),current_property)=maskp(ind_part(i)) end do current_property = current_property+1 endif endif ! Remove particles from parent linked list call remove_list(ind_part,ind_list,ok,np) call add_free(ind_part,np) end subroutine fill_comm !################################################################ !################################################################ !################################################################ !################################################################ subroutine empty_comm(ind_com,np,ilevel,icpu) use pm_commons use amr_commons use dice_commons implicit none integer::np,icpu,ilevel integer,dimension(1:nvector)::ind_com integer::i,idim,igrid integer,dimension(1:nvector),save::ind_list,ind_part logical,dimension(1:nvector),save::ok=.true. integer::current_property ! Compute parent grid index do i=1,np igrid=int(emission(icpu,ilevel)%fp(ind_com(i),1), 4) ind_list(i)=emission(icpu,ilevel)%igrid(igrid) end do ! Add particle to parent linked list call remove_free(ind_part,np) call add_list(ind_part,ind_list,ok,np) ! Scatter particle level and identity do i=1,np levelp(ind_part(i))=int(emission(icpu,ilevel)%fp(ind_com(i),2), 4) idp (ind_part(i))=int(emission(icpu,ilevel)%fp(ind_com(i),3)) typep(ind_part(i)) = int2part(int(emission(icpu,ilevel)%fp(ind_com(i),4), 4)) end do ! Scatter particle position and velocity do idim=1,ndim do i=1,np xp(ind_part(i),idim)=emission(icpu,ilevel)%up(ind_com(i),idim ) vp(ind_part(i),idim)=emission(icpu,ilevel)%up(ind_com(i),idim+ndim) end do end do current_property = twondim+1 ! Scatter particle mass do i=1,np mp(ind_part(i))=emission(icpu,ilevel)%up(ind_com(i),current_property) end do current_property = current_property+1 #ifdef OUTPUT_PARTICLE_POTENTIAL ! Scatter particle phi do i=1,np ptcl_phi(ind_part(i))=emission(icpu,ilevel)%up(ind_com(i),current_property) end do current_property = current_property+1 #endif ! Scatter particle birth eopch if(star.or.sink)then do i=1,np tp(ind_part(i))=emission(icpu,ilevel)%up(ind_com(i),current_property) end do current_property = current_property+1 if(metal)then do i=1,np zp(ind_part(i))=emission(icpu,ilevel)%up(ind_com(i),current_property) end do current_property = current_property+1 end if end if ! DICE patch / gas temperature if(dice_init) then do i=1,np up(ind_part(i))=emission(icpu,ilevel)%up(ind_com(i),current_property) end do current_property = current_property+1 if(cosmo) then do i=1,np maskp(ind_part(i))=emission(icpu,ilevel)%up(ind_com(i),current_property) end do current_property = current_property+1 endif endif end subroutine empty_comm !################################################################ !################################################################ !################################################################ !################################################################ /data2/mabe/MeraTest/Ramses/patch_2019_10version/read_params.f90 module dice_commons use amr_commons use hydro_commons ! particle data character(len=512)::ic_file, ic_format ! misc real(dp)::IG_rho = 1.0D-5 real(dp)::IG_T2 = 1.0D7 real(dp)::IG_metal = 0.01 real(dp)::ic_scale_pos = 1.0 real(dp)::ic_scale_vel = 1.0 real(dp)::ic_scale_mass = 1.0 real(dp)::ic_scale_u = 1.0 real(dp)::ic_scale_age = 1.0 real(dp)::ic_scale_metal = 1.0 real(dp)::ic_t_restart = 0.0D0 integer::ic_mask_ivar = 0 real(dp)::ic_mask_min = 1d40 real(dp)::ic_mask_max = -1d40 integer::ic_mask_ptype = -1 integer::ic_ifout = 1 integer::ic_nfile = 1 integer,dimension(1:6)::ic_skip_type = -1 integer,dimension(1:6)::cosmo_add_gas_index = -1 real(dp),dimension(1:3)::ic_mag_const = (/ 0.0, 0.0, 0.0 /) real(dp),dimension(1:3)::ic_center = (/ 0.0, 0.0, 0.0 /) character(len=4)::ic_head_name = 'HEAD' character(len=4)::ic_pos_name = 'POS ' character(len=4)::ic_vel_name = 'VEL ' character(len=4)::ic_id_name = 'ID ' character(len=4)::ic_mass_name = 'MASS' character(len=4)::ic_u_name = 'U ' character(len=4)::ic_metal_name = 'Z ' character(len=4)::ic_age_name = 'AGE ' ! Gadget units in cgs real(dp)::gadget_scale_l = 3.085677581282D21 real(dp)::gadget_scale_v = 1.0D5 real(dp)::gadget_scale_m = 1.9891D43 real(dp)::gadget_scale_t = 1.0D6*365*24*3600 real(dp),allocatable,dimension(:)::up real(dp),allocatable,dimension(:)::maskp logical::dice_init = .false. logical::amr_struct = .false. ! magnetic integer,parameter::MAXGAL= 32 real(dp),dimension(1:MAXGAL)::ic_mag_center_x = 0.0 real(dp),dimension(1:MAXGAL)::ic_mag_center_y = 0.0 real(dp),dimension(1:MAXGAL)::ic_mag_center_z = 0.0 real(dp),dimension(1:MAXGAL)::ic_mag_axis_x = 0.0 real(dp),dimension(1:MAXGAL)::ic_mag_axis_y = 0.0 real(dp),dimension(1:MAXGAL)::ic_mag_axis_z = 1.0 real(dp),dimension(1:MAXGAL)::ic_mag_scale_R = 1.0 real(dp),dimension(1:MAXGAL)::ic_mag_scale_H = 1.0 real(dp),dimension(1:MAXGAL)::ic_mag_scale_B = 0.0 end module dice_commons subroutine read_params use amr_commons use pm_parameters use poisson_parameters use hydro_parameters use mpi_mod use dice_commons implicit none !-------------------------------------------------- ! Local variables !-------------------------------------------------- integer::i,narg,levelmax character(LEN=80)::infile, info_file character(LEN=80)::cmdarg character(LEN=5)::nchar integer(kind=8)::ngridtot=0 integer(kind=8)::nparttot=0 real(kind=8)::delta_tout=0,tend=0 real(kind=8)::delta_aout=0,aend=0 logical::nml_ok, info_ok integer,parameter::tag=1134 #ifndef WITHOUTMPI integer::dummy_io,ierr,info2 #endif !-------------------------------------------------- ! Namelist definitions !-------------------------------------------------- namelist/run_params/clumpfind,cosmo,pic,sink,lightcone,poisson,hydro,rt,verbose,debug & & ,nrestart,ncontrol,nstepmax,nsubcycle,nremap,ordering & & ,bisec_tol,static,overload,cost_weighting,aton,nrestart_quad,restart_remap & & ,static_dm,static_gas,static_stars,convert_birth_times,use_proper_time,remap_pscalar namelist/output_params/noutput,foutput,aout,tout & & ,tend,delta_tout,aend,delta_aout,gadget_output,walltime_hrs,minutes_dump namelist/amr_params/levelmin,levelmax,ngridmax,ngridtot & & ,npartmax,nparttot,nexpand,boxlen,nlevel_collapse namelist/poisson_params/epsilon,gravity_type,gravity_params & & ,cg_levelmin,cic_levelmax namelist/lightcone_params/thetay_cone,thetaz_cone,zmax_cone namelist/movie_params/levelmax_frame,nw_frame,nh_frame,ivar_frame & & ,xcentre_frame,ycentre_frame,zcentre_frame,movie_vars & & ,deltax_frame,deltay_frame,deltaz_frame,movie,zoom_only_frame & & ,imovout,imov,tstartmov,astartmov,tendmov,aendmov,proj_axis,movie_vars_txt & & ,theta_camera,phi_camera,dtheta_camera,dphi_camera,focal_camera,dist_camera,ddist_camera & & ,perspective_camera,smooth_frame,shader_frame,tstart_theta_camera,tstart_phi_camera & & ,tend_theta_camera,tend_phi_camera,method_frame,varmin_frame,varmax_frame namelist/dice_params/ ic_file,ic_nfile,ic_format,IG_rho,IG_T2,IG_metal & & ,ic_head_name,ic_pos_name,ic_vel_name,ic_id_name,ic_mass_name & & ,ic_u_name,ic_metal_name,ic_age_name & & ,gadget_scale_l, gadget_scale_v, gadget_scale_m ,gadget_scale_t & & ,ic_scale_pos,ic_scale_vel,ic_scale_mass,ic_scale_u,ic_scale_age & & ,ic_scale_metal,ic_center,ic_ifout,amr_struct,ic_t_restart,ic_mag_const & & ,ic_mag_center_x,ic_mag_center_y,ic_mag_center_z & & ,ic_mag_axis_x,ic_mag_axis_y,ic_mag_axis_z & & ,ic_mag_scale_R,ic_mag_scale_H,ic_mag_scale_B,cosmo_add_gas_index,ic_skip_type & & ,ic_mask_ivar,ic_mask_min,ic_mask_max,ic_mask_ptype ! MPI initialization #ifndef WITHOUTMPI call MPI_INIT(ierr) call MPI_COMM_RANK(MPI_COMM_WORLD,myid,ierr) call MPI_COMM_SIZE(MPI_COMM_WORLD,ncpu,ierr) myid=myid+1 ! Careful with this... #endif #ifdef WITHOUTMPI ncpu=1 myid=1 #endif !-------------------------------------------------- ! Advertise RAMSES !-------------------------------------------------- if(myid==1)then write(*,*)'_/_/_/ _/_/ _/ _/ _/_/_/ _/_/_/_/ _/_/_/ ' write(*,*)'_/ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/ ' write(*,*)'_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ ' write(*,*)'_/_/_/ _/_/_/_/ _/ _/ _/_/ _/_/_/ _/_/ ' write(*,*)'_/ _/ _/ _/ _/ _/ _/ _/ _/ ' write(*,*)'_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ ' write(*,*)'_/ _/ _/ _/ _/ _/ _/_/_/ _/_/_/_/ _/_/_/ ' write(*,*)' Version 3.0 ' write(*,*)' written by Romain Teyssier (University of Zurich) ' write(*,*)' (c) CEA 1999-2007, UZH 2008-2014 ' write(*,*)' ' write(*,'(' Working with nproc = ',I4,' for ndim = ',I1)')ncpu,ndim ! Check nvar is not too small #ifdef SOLVERhydro write(*,'(' Using solver = hydro with nvar = ',I2)')nvar if(nvar=ndim+2' write(*,'(' Please recompile with -DNVAR=',I2)')ndim+2 call clean_stop endif #endif #ifdef SOLVERmhd write(*,'(' Using solver = mhd with nvar = ',I2)')nvar if(nvar<8)then write(*,*)'You should have: nvar>=8' write(*,'(' Please recompile with -DNVAR=8')') call clean_stop endif #endif !Write I/O group size information if(IOGROUPSIZE>0.or.IOGROUPSIZECONE>0.or.IOGROUPSIZEREP>0)write(*,*)' ' if(IOGROUPSIZE>0) write(*,*)'IOGROUPSIZE=',IOGROUPSIZE if(IOGROUPSIZECONE>0) write(*,*)'IOGROUPSIZECONE=',IOGROUPSIZECONE if(IOGROUPSIZEREP>0) write(*,*)'IOGROUPSIZEREP=',IOGROUPSIZEREP if(IOGROUPSIZE>0.or.IOGROUPSIZECONE>0.or.IOGROUPSIZEREP>0)write(*,*)' ' ! Write information about git version !call write_gitinfo !Manuel ! Read namelist filename from command line argument narg = command_argument_count() IF(narg .LT. 1)THEN write(*,*)'You should type: ramses3d input.nml [nrestart]' write(*,*)'File input.nml should contain a parameter namelist' write(*,*)'nrestart is optional' call clean_stop END IF CALL getarg(1,infile) endif #ifndef WITHOUTMPI call MPI_BCAST(infile,80,MPI_CHARACTER,0,MPI_COMM_WORLD,ierr) #endif !------------------------------------------------- ! Read the namelist !------------------------------------------------- ! Wait for the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if (mod(myid-1,IOGROUPSIZE)/=0) then call MPI_RECV(dummy_io,1,MPI_INTEGER,myid-1-1,tag,& & MPI_COMM_WORLD,MPI_STATUS_IGNORE,info2) end if endif #endif namelist_file=TRIM(infile) INQUIRE(file=infile,exist=nml_ok) if(.not. nml_ok)then if(myid==1)then write(*,*)'File '//TRIM(infile)//' does not exist' endif call clean_stop end if !------------------------------------------------- ! Default passive scalar map !------------------------------------------------- #if NVAR>NDIM+2 allocate(remap_pscalar(1:nvar-(ndim+2))) do i=1,nvar-(ndim+2) remap_pscalar(i) = i+ndim+2 enddo #endif open(1,file=infile) rewind(1) read(1,NML=run_params) rewind(1) read(1,NML=output_params) rewind(1) read(1,NML=amr_params) rewind(1) read(1,NML=lightcone_params,END=83) 83 continue rewind(1) read(1,NML=movie_params,END=82) 82 continue rewind(1) read(1,NML=poisson_params,END=81) 81 continue rewind(1) read(1,NML=dice_params,END=106) 106 continue !------------------------------------------------- ! Read optional nrestart command-line argument !------------------------------------------------- if (myid==1 .and. narg == 2) then CALL getarg(2,cmdarg) read(cmdarg,*) nrestart endif if (myid==1 .and. nrestart .gt. 0) then call title(nrestart,nchar) info_file='output_'//TRIM(nchar)//'/info_'//TRIM(nchar)//'.txt' inquire(file=info_file, exist=info_ok) do while(.not. info_ok .and. nrestart .gt. 1) nrestart = nrestart - 1 call title(nrestart,nchar) info_file='output_'//TRIM(nchar)//'/info_'//TRIM(nchar)//'.txt' inquire(file=info_file, exist=info_ok) enddo endif #ifndef WITHOUTMPI call MPI_BCAST(info_ok,1,MPI_LOGICAL,0,MPI_COMM_WORLD,ierr) #endif if (nrestart .gt. 0 .and. .not. info_ok) then if (myid==1) then write(*,*) 'Error: Could not find restart file' endif call clean_stop endif #ifndef WITHOUTMPI call MPI_BCAST(nrestart,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) #endif !------------------------------------------------- ! Compute time step for outputs !------------------------------------------------- if(tend>0)then if(delta_tout==0)delta_tout=tend noutput=MIN(int(tend/delta_tout),MAXOUT) do i=1,noutput tout(i)=dble(i)*delta_tout end do else if(aend>0)then if(delta_aout==0)delta_aout=aend noutput=MIN(int(aend/delta_aout),MAXOUT) do i=1,noutput aout(i)=dble(i)*delta_aout end do endif noutput=MIN(noutput,MAXOUT) if(imovout>0) then allocate(tmovout(0:imovout)) allocate(amovout(0:imovout)) tmovout=1d100 amovout=1d100 if(tendmov>0)then do i=0,imovout tmovout(i)=(tendmov-tstartmov)*dble(i)/dble(imovout)+tstartmov enddo endif if(aendmov>0)then do i=0,imovout amovout(i)=(aendmov-astartmov)*dble(i)/dble(imovout)+astartmov enddo endif if(tendmov==0.and.aendmov==0)movie=.false. endif !-------------------------------------------------- ! Check for errors in the namelist so far !-------------------------------------------------- levelmin=MAX(levelmin,1) nlevelmax=levelmax nml_ok=.true. if(levelmin<1)then if(myid==1)write(*,*)'Error in the namelist:' if(myid==1)write(*,*)'levelmin should not be lower than 1 !!!' nml_ok=.false. end if if(nlevelmax1)verbose=.false. if(sink.and.(.not.pic))then pic=.true. endif !if(clumpfind.and.(.not.pic))then ! pic=.true. !endif !if(pic.and.(.not.poisson))then ! poisson=.true. !endif call read_hydro_params(nml_ok) #ifdef RT call rt_read_hydro_params() #endif #if NDIM==3 if (sink)call read_sink_params if (clumpfind .or. sink)call read_clumpfind_params #endif if (movie)call set_movie_vars close(1) ! Send the token #ifndef WITHOUTMPI if(IOGROUPSIZE>0) then if(mod(myid,IOGROUPSIZE)/=0 .and.(myid.lt.ncpu))then dummy_io=1 call MPI_SEND(dummy_io,1,MPI_INTEGER,myid-1+1,tag, & & MPI_COMM_WORLD,info2) end if endif #endif !----------------- ! Max size checks !----------------- if(nlevelmax>MAXLEVEL)then write(*,*) 'Error: nlevelmax>MAXLEVEL' call clean_stop end if if(nregion>MAXREGION)then write(*,*) 'Error: nregion>MAXREGION' call clean_stop end if !----------------------------------- ! Rearrange level dependent arrays !----------------------------------- do i=nlevelmax,levelmin,-1 nexpand (i)=nexpand (i-levelmin+1) nsubcycle (i)=nsubcycle (i-levelmin+1) r_refine (i)=r_refine (i-levelmin+1) a_refine (i)=a_refine (i-levelmin+1) b_refine (i)=b_refine (i-levelmin+1) x_refine (i)=x_refine (i-levelmin+1) y_refine (i)=y_refine (i-levelmin+1) z_refine (i)=z_refine (i-levelmin+1) m_refine (i)=m_refine (i-levelmin+1) exp_refine(i)=exp_refine(i-levelmin+1) initfile (i)=initfile (i-levelmin+1) end do do i=1,levelmin-1 nexpand (i)= 1 nsubcycle (i)= 1 r_refine (i)=-1.0 a_refine (i)= 1.0 b_refine (i)= 1.0 x_refine (i)= 0.0 y_refine (i)= 0.0 z_refine (i)= 0.0 m_refine (i)=-1.0 exp_refine(i)= 2.0 initfile (i)= ' ' end do if(.not.cosmo)then use_proper_time=.false. convert_birth_times=.false. endif if(.not. nml_ok)then if(myid==1)write(*,*)'Too many errors in the namelist' if(myid==1)write(*,*)'Aborting...' call clean_stop end if #ifndef WITHOUTMPI call MPI_BARRIER(MPI_COMM_WORLD,ierr) #endif end subroutine read_params /data2/mabe/MeraTest/Ramses/patch_2019_10version/rho_fine.f90 !############################################################################## !############################################################################## !############################################################################## !############################################################################## subroutine rho_fine(ilevel,icount) use amr_commons use pm_commons use hydro_commons use poisson_commons use cooling_module use mpi_mod use dice_commons implicit none #ifndef WITHOUTMPI integer::info real(kind=8),dimension(1:ndim+1)::multipole_in,multipole_out #endif integer::ilevel,icount !------------------------------------------------------------------ ! This routine computes the density field at level ilevel using ! the CIC scheme. Particles that are not entirely in ! level ilevel contribute also to the level density field ! (boundary particles) using buffer grids. ! Array flag1, flag2 and phi are used as temporary work space. ! Array rho and cpu_map2 are stored with: ! - rho containing the Poisson source term ! - cpu_map2 containing the refinement map due to particle ! number density criterion (quasi Lagrangian mesh). !------------------------------------------------------------------ integer::iskip,icpu,ind,i,nx_loc,ibound real(dp)::dx,d_scale,scale,dx_loc,scalar if(.not. poisson)return if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=icoarse_max-icoarse_min+1 scale=boxlen/dble(nx_loc) dx_loc=dx*scale if(ilevel==levelmin)multipole=0d0 !------------------------------------------------------- ! Initialize rho to analytical and baryon density field !------------------------------------------------------- if(dice_init.and.amr_struct) then if(hydro)call multipole_from_current_level(ilevel) call cic_from_multipole(ilevel) ! Update boundaries call make_virtual_reverse_dp(rho(1),ilevel) call make_virtual_fine_dp (rho(1),ilevel) else if(ilevel==levelmin.or.icount>1)then do i=nlevelmax,ilevel,-1 ! Compute mass multipole if(hydro)call multipole_fine(i) ! Perform TSC using pseudo-particle #ifdef TSC if (ndim==3)then call tsc_from_multipole(i) else write(*,*)'TSC not supported for ndim neq 3' call clean_stop end if #else ! Perform CIC using pseudo-particle call cic_from_multipole(i) #endif ! Update boundaries call make_virtual_reverse_dp(rho(1),i) call make_virtual_fine_dp (rho(1),i) end do end if endif !-------------------------- ! Initialize fields to zero !-------------------------- do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid phi(active(ilevel)%igrid(i)+iskip)=0.0D0 end do if(ilevel==cic_levelmax)then do i=1,active(ilevel)%ngrid rho_top(active(ilevel)%igrid(i)+iskip)=0.0D0 end do endif end do if(cic_levelmax>0.and.ilevel>cic_levelmax)then do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid rho_top(active(ilevel)%igrid(i)+iskip)=rho_top(father(active(ilevel)%igrid(i))) rho(active(ilevel)%igrid(i)+iskip)=rho(active(ilevel)%igrid(i)+iskip)+ & & rho_top(active(ilevel)%igrid(i)+iskip) end do end do endif !------------------------------------------------------------------------- ! Initialize 'number density' field to baryon number density in array phi. !------------------------------------------------------------------------- if(m_refine(ilevel)>-1.0d0)then d_scale=max(mass_sph/dx_loc**ndim,smallr) do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax if(hydro)then if(ivar_refine>0)then do i=1,active(ilevel)%ngrid scalar=uold(active(ilevel)%igrid(i)+iskip,ivar_refine) & & /max(uold(active(ilevel)%igrid(i)+iskip,1),smallr) if(scalar>var_cut_refine)then phi(active(ilevel)%igrid(i)+iskip)= & & rho(active(ilevel)%igrid(i)+iskip)/d_scale endif end do else do i=1,active(ilevel)%ngrid phi(active(ilevel)%igrid(i)+iskip)= & & rho(active(ilevel)%igrid(i)+iskip)/d_scale end do endif endif end do endif !------------------------------------------------------- ! Initialize rho and phi to zero in virtual boundaries !------------------------------------------------------- do icpu=1,ncpu do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,reception(icpu,ilevel)%ngrid rho(reception(icpu,ilevel)%igrid(i)+iskip)=0.0D0 phi(reception(icpu,ilevel)%igrid(i)+iskip)=0.0D0 end do if(ilevel==cic_levelmax)then do i=1,reception(icpu,ilevel)%ngrid rho_top(reception(icpu,ilevel)%igrid(i)+iskip)=0.0D0 end do endif end do end do !--------------------------------------------------------- ! Compute particle contribution to density field !--------------------------------------------------------- ! Compute density due to current level particles if(pic)then call rho_from_current_level(ilevel) end if ! Update boudaries call make_virtual_reverse_dp(rho(1),ilevel) call make_virtual_fine_dp (rho(1),ilevel) if(ilevel==cic_levelmax)then call make_virtual_reverse_dp(rho_top(1),ilevel) endif if(cic_levelmax>0.and.ilevel>=cic_levelmax)then call make_virtual_fine_dp (rho_top(1),ilevel) endif if(m_refine(ilevel)>-1.0d0)then call make_virtual_reverse_dp(phi(1),ilevel) call make_virtual_fine_dp (phi(1),ilevel) endif !-------------------------------------------------------------- ! Compute multipole contribution from all cpus and set rho_tot !-------------------------------------------------------------- #ifndef WITHOUTMPI if(ilevel==levelmin)then multipole_in=multipole call MPI_ALLREDUCE(multipole_in,multipole_out,ndim+1,MPI_DOUBLE_PRECISION,MPI_SUM,MPI_COMM_WORLD,info) multipole=multipole_out endif #endif if(nboundary==0)then rho_tot=multipole(1)/scale**ndim if(debug)write(*,*)'rho_average=',rho_tot else rho_tot=0d0 endif !---------------------------------------------------- ! Reset rho and phi in physical boundaries !---------------------------------------------------- do ibound=1,nboundary do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,boundary(ibound,ilevel)%ngrid phi(boundary(ibound,ilevel)%igrid(i)+iskip)=0.0 rho(boundary(ibound,ilevel)%igrid(i)+iskip)=0.0 end do end do end do !----------------------------------------- ! Compute quasi Lagrangian refinement map !----------------------------------------- if(m_refine(ilevel)>-1.0d0)then do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid if(phi(active(ilevel)%igrid(i)+iskip)>=m_refine(ilevel))then cpu_map2(active(ilevel)%igrid(i)+iskip)=1 else cpu_map2(active(ilevel)%igrid(i)+iskip)=0 end if end do end do ! Update boundaries call make_virtual_fine_int(cpu_map2(1),ilevel) end if !! do ind=1,twotondim !! iskip=ncoarse+(ind-1)*ngridmax !! do i=1,active(ilevel)%ngrid !! print*,rho(active(ilevel)%igrid(i)+iskip),rho_tot !! end do !! end do 111 format(' Entering rho_fine for level ',I2) end subroutine rho_fine !############################################################################## !############################################################################## !############################################################################## !############################################################################## subroutine rho_from_current_level(ilevel) use amr_commons use pm_commons use hydro_commons use poisson_commons implicit none integer::ilevel !------------------------------------------------------------------ ! This routine computes the density field at level ilevel using ! the CIC scheme from particles that are not entirely in ! level ilevel (boundary particles). ! Arrays flag1 and flag2 are used as temporary work space. !------------------------------------------------------------------ integer::igrid,jgrid,ipart,jpart,idim,icpu integer::i,ig,ip,npart1 real(dp)::dx integer,dimension(1:nvector),save::ind_grid,ind_cell integer,dimension(1:nvector),save::ind_part,ind_grid_part real(dp),dimension(1:nvector,1:ndim),save::x0 ! Mesh spacing in that level dx=0.5D0**ilevel ! Loop over cpus do icpu=1,ncpu ! Loop over grids igrid=headl(icpu,ilevel) ig=0 ip=0 do jgrid=1,numbl(icpu,ilevel) npart1=numbp(igrid) ! Number of particles in the grid if(npart1>0)then ig=ig+1 ind_grid(ig)=igrid ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 if(ig==0)then ig=1 ind_grid(ig)=igrid end if ip=ip+1 ind_part(ip)=ipart ind_grid_part(ip)=ig if(ip==nvector)then ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do i=1,ig x0(i,idim)=xg(ind_grid(i),idim)-3.0D0*dx end do end do do i=1,ig ind_cell(i)=father(ind_grid(i)) end do #ifdef TSC call tsc_amr(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) #else call cic_amr(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) #endif ip=0 ig=0 end if ipart=nextp(ipart) ! Go to next particle end do ! End loop over particles end if igrid=next(igrid) ! Go to next grid end do ! End loop over grids if(ip>0)then ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do i=1,ig x0(i,idim)=xg(ind_grid(i),idim)-3.0D0*dx end do end do do i=1,ig ind_cell(i)=father(ind_grid(i)) end do #ifdef TSC call tsc_amr(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) #else call cic_amr(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) #endif end if end do ! End loop over cpus end subroutine rho_from_current_level subroutine multipole_from_current_level(ilevel) use amr_commons use pm_commons use hydro_commons use poisson_commons implicit none integer::ilevel !------------------------------------------------------------------ ! This routine computes the density field at level ilevel using ! the CIC scheme from particles that are not entirely in ! level ilevel (boundary particles). ! Arrays flag1 and flag2 are used as temporary work space. !------------------------------------------------------------------ integer::igrid,jgrid,ipart,jpart,idim,icpu,ind,iskip,ibound integer::j,ig,ip,npart1,npart2,next_part real(dp)::dx integer,dimension(1:nvector),save::ind_grid,ind_cell integer,dimension(1:nvector),save::ind_part,ind_grid_part real(dp),dimension(1:nvector,1:ndim),save::x0 !!!!!!!!!!!!!!!!!!!!!!!!!!! integer ::nx_loc real(dp),dimension(1:twotondim,1:3)::xc integer ::ix,iy,iz real(kind=8)::dx_loc,scale,vol_loc real(dp),dimension(1:3)::skip_loc ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc=dx_loc**ndim do ind=1,twotondim iz=(ind-1)/4 iy=(ind-1-4*iz)/2 ix=(ind-1-2*iy-4*iz) if(ndim>0)xc(ind,1)=(dble(ix)-0.5D0)*dx if(ndim>1)xc(ind,2)=(dble(iy)-0.5D0)*dx if(ndim>2)xc(ind,3)=(dble(iz)-0.5D0)*dx end do !!!!!!!!!!!!!!!!!!!!!!!!!!! if(verbose)write(*,111)ilevel ! Mesh spacing in that level dx=0.5D0**ilevel ! Initialize unew field to zero do icpu=1,ncpu do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do idim=1,ndim+1 do j=1,reception(icpu,ilevel)%ngrid unew(reception(icpu,ilevel)%igrid(j)+iskip,idim)=0.0D0 end do end do end do end do do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do idim=1,ndim+1 do j=1,active(ilevel)%ngrid unew(active(ilevel)%igrid(j)+iskip,idim)=0.0D0 end do end do end do ! Reset unew in physical boundaries do ibound=1,nboundary do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do idim=1,ndim+1 do j=1,boundary(ibound,ilevel)%ngrid unew(boundary(ibound,ilevel)%igrid(j)+iskip,idim)=0.0 end do end do end do end do ! Loop over cpus do icpu=1,ncpu ! Loop over grids igrid=headl(icpu,ilevel) ig=0 ip=0 do jgrid=1,numbl(icpu,ilevel) npart1=numbp(igrid) ! Number of particles in the grid npart2=0 ! Count gas particles if(npart1>0)then ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) if(idp(ipart).eq.1)then npart2=npart2+1 endif ipart=next_part ! Go to next particle end do endif if(npart2>0)then ig=ig+1 ind_grid(ig)=igrid ipart=headp(igrid) ! Loop over particles do jpart=1,npart1 ! Save next particle <--- Very important !!! next_part=nextp(ipart) ! Select only gas particles if(idp(ipart).eq.1)then if(ig==0)then ig=1 ind_grid(ig)=igrid end if ip=ip+1 ind_part(ip)=ipart ind_grid_part(ip)=ig endif if(ip==nvector)then ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do j=1,ig x0(j,idim)=xg(ind_grid(j),idim)-3.0D0*dx end do end do do j=1,ig ind_cell(j)=father(ind_grid(j)) end do call ngp_amr_gas(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) ip=0 ig=0 end if ipart=next_part ! Go to next particle end do ! End loop over particles end if igrid=next(igrid) ! Go to next grid end do ! End loop over grids if(ip>0)then ! Lower left corner of 3x3x3 grid-cube do idim=1,ndim do j=1,ig x0(j,idim)=xg(ind_grid(j),idim)-3.0D0*dx end do end do do j=1,ig ind_cell(j)=father(ind_grid(j)) end do call ngp_amr_gas(ind_cell,ind_part,ind_grid_part,x0,ig,ip,ilevel) end if end do ! End loop over cpus ! Update boundaries do idim=1,ndim+1 call make_virtual_reverse_dp(unew(1,idim),ilevel) call make_virtual_fine_dp(unew(1,idim),ilevel) end do ! Check for over-refinement do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do j=1,active(ilevel)%ngrid if(unew(active(ilevel)%igrid(j)+iskip,1)==0d0) then unew(active(ilevel)%igrid(j)+iskip,1)=smallr*vol_loc do idim=1,ndim unew(active(ilevel)%igrid(j)+iskip,idim+1)=(xg(active(ilevel)%igrid(j),idim)+xc(ind,idim)-skip_loc(idim))*scale & & *unew(active(ilevel)%igrid(j)+iskip,1) end do endif end do end do do idim=1,ndim+1 call make_virtual_fine_dp(unew(1,idim),ilevel) end do 111 format(' Entering multipole_from_current_level for level',i2) end subroutine multipole_from_current_level !############################################################################## !############################################################################## !############################################################################## !############################################################################## subroutine cic_amr(ind_cell,ind_part,ind_grid_part,x0,ng,np,ilevel) use amr_commons use pm_commons use poisson_commons use dice_commons use hydro_commons, ONLY: mass_sph implicit none integer::ng,np,ilevel integer ,dimension(1:nvector)::ind_cell,ind_grid_part,ind_part real(dp),dimension(1:nvector,1:ndim)::x0 !------------------------------------------------------------------ ! This routine computes the density field at level ilevel using ! the CIC scheme. Only cells that are in level ilevel ! are updated by the input particle list. !------------------------------------------------------------------ logical::error integer::j,ind,idim,nx_loc real(dp)::dx,dx_loc,scale,vol_loc ! Grid-based arrays integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids ! Particle-based arrays logical ,dimension(1:nvector),save::ok real(dp),dimension(1:nvector),save::mmm real(dp),dimension(1:nvector),save::ttt=0d0 ! Save type type(part_t),dimension(1:nvector),save::fam real(dp),dimension(1:nvector),save::vol2 real(dp),dimension(1:nvector,1:ndim),save::x,dd,dg integer ,dimension(1:nvector,1:ndim),save::ig,id,igg,igd,icg,icd real(dp),dimension(1:nvector,1:twotondim),save::vol integer ,dimension(1:nvector,1:twotondim),save::igrid,icell,indp,kg real(dp),dimension(1:3)::skip_loc ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc=dx_loc**ndim ! Gather neighboring father cells (should be present anytime !) call get3cubefather(ind_cell,nbors_father_cells,nbors_father_grids,ng,ilevel) ! Rescale particle position at level ilevel do idim=1,ndim do j=1,np x(j,idim)=xp(ind_part(j),idim)/scale+skip_loc(idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)-x0(ind_grid_part(j),idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/dx end do end do ! Gather particle mass and family do j=1,np fam(j) = typep(ind_part(j)) if (is_tracer(fam(j))) then mmm(j)=0.0d0 else mmm(j)=mp(ind_part(j)) end if end do ! FIXME: should use mmm instead of mp, but gives different binary output ! for no reason that I can think of if(ilevel==levelmin)then do j=1,np multipole(1)=multipole(1)+mp(ind_part(j)) ! multipole(1)=multipole(1)+mmm(j) end do do idim=1,ndim do j=1,np multipole(idim+1)=multipole(idim+1)+mp(ind_part(j))*xp(ind_part(j),idim) ! multipole(idim+1)=multipole(idim+1)+mmm(j)*xp(ind_part(j),idim) end do end do end if ! Gather particle birth epoch if(star)then do j=1,np ttt(j)=tp(ind_part(j)) end do endif ! Check for illegal moves error=.false. do idim=1,ndim do j=1,np if(x(j,idim)<0.5D0.or.x(j,idim)>5.5D0)error=.true. end do end do if(error)then write(*,*)'problem in cic' do idim=1,ndim do j=1,np if(x(j,idim)<0.5D0.or.x(j,idim)>5.5D0)then write(*,*)x(j,1:ndim) endif end do end do stop end if ! CIC at level ilevel (dd: right cloud boundary; dg: left cloud boundary) do idim=1,ndim do j=1,np dd(j,idim)=x(j,idim)+0.5D0 id(j,idim)=int(dd(j,idim)) dd(j,idim)=dd(j,idim)-id(j,idim) dg(j,idim)=1.0D0-dd(j,idim) ig(j,idim)=id(j,idim)-1 end do end do ! Compute cloud volumes #if NDIM==1 do j=1,np vol(j,1)=dg(j,1) vol(j,2)=dd(j,1) end do #endif #if NDIM==2 do j=1,np vol(j,1)=dg(j,1)*dg(j,2) vol(j,2)=dd(j,1)*dg(j,2) vol(j,3)=dg(j,1)*dd(j,2) vol(j,4)=dd(j,1)*dd(j,2) end do #endif #if NDIM==3 do j=1,np vol(j,1)=dg(j,1)*dg(j,2)*dg(j,3) vol(j,2)=dd(j,1)*dg(j,2)*dg(j,3) vol(j,3)=dg(j,1)*dd(j,2)*dg(j,3) vol(j,4)=dd(j,1)*dd(j,2)*dg(j,3) vol(j,5)=dg(j,1)*dg(j,2)*dd(j,3) vol(j,6)=dd(j,1)*dg(j,2)*dd(j,3) vol(j,7)=dg(j,1)*dd(j,2)*dd(j,3) vol(j,8)=dd(j,1)*dd(j,2)*dd(j,3) end do #endif ! Compute parent grids do idim=1,ndim do j=1,np igg(j,idim)=ig(j,idim)/2 igd(j,idim)=id(j,idim)/2 end do end do #if NDIM==1 do j=1,np kg(j,1)=1+igg(j,1) kg(j,2)=1+igd(j,1) end do #endif #if NDIM==2 do j=1,np kg(j,1)=1+igg(j,1)+3*igg(j,2) kg(j,2)=1+igd(j,1)+3*igg(j,2) kg(j,3)=1+igg(j,1)+3*igd(j,2) kg(j,4)=1+igd(j,1)+3*igd(j,2) end do #endif #if NDIM==3 do j=1,np kg(j,1)=1+igg(j,1)+3*igg(j,2)+9*igg(j,3) kg(j,2)=1+igd(j,1)+3*igg(j,2)+9*igg(j,3) kg(j,3)=1+igg(j,1)+3*igd(j,2)+9*igg(j,3) kg(j,4)=1+igd(j,1)+3*igd(j,2)+9*igg(j,3) kg(j,5)=1+igg(j,1)+3*igg(j,2)+9*igd(j,3) kg(j,6)=1+igd(j,1)+3*igg(j,2)+9*igd(j,3) kg(j,7)=1+igg(j,1)+3*igd(j,2)+9*igd(j,3) kg(j,8)=1+igd(j,1)+3*igd(j,2)+9*igd(j,3) end do #endif do ind=1,twotondim do j=1,np igrid(j,ind)=son(nbors_father_cells(ind_grid_part(j),kg(j,ind))) end do end do ! Compute parent cell position do idim=1,ndim do j=1,np icg(j,idim)=ig(j,idim)-2*igg(j,idim) icd(j,idim)=id(j,idim)-2*igd(j,idim) end do end do #if NDIM==1 do j=1,np icell(j,1)=1+icg(j,1) icell(j,2)=1+icd(j,1) end do #endif #if NDIM==2 do j=1,np icell(j,1)=1+icg(j,1)+2*icg(j,2) icell(j,2)=1+icd(j,1)+2*icg(j,2) icell(j,3)=1+icg(j,1)+2*icd(j,2) icell(j,4)=1+icd(j,1)+2*icd(j,2) end do #endif #if NDIM==3 do j=1,np icell(j,1)=1+icg(j,1)+2*icg(j,2)+4*icg(j,3) icell(j,2)=1+icd(j,1)+2*icg(j,2)+4*icg(j,3) icell(j,3)=1+icg(j,1)+2*icd(j,2)+4*icg(j,3) icell(j,4)=1+icd(j,1)+2*icd(j,2)+4*icg(j,3) icell(j,5)=1+icg(j,1)+2*icg(j,2)+4*icd(j,3) icell(j,6)=1+icd(j,1)+2*icg(j,2)+4*icd(j,3) icell(j,7)=1+icg(j,1)+2*icd(j,2)+4*icd(j,3) icell(j,8)=1+icd(j,1)+2*icd(j,2)+4*icd(j,3) end do #endif ! Compute parent cell adress do ind=1,twotondim do j=1,np indp(j,ind)=ncoarse+(icell(j,ind)-1)*ngridmax+igrid(j,ind) end do end do ! Update mass density and number density fields do ind=1,twotondim do j=1,np ok(j)=(igrid(j,ind)>0).and.is_not_tracer(fam(j)) if(dice_init) ok(j)=ok(j).and.(idp(ind_part(j)).ne.1) end do do j=1,np vol2(j)=mmm(j)*vol(j,ind)/vol_loc end do if(cic_levelmax==0.or.ilevel<=cic_levelmax)then do j=1,np if(ok(j))then rho(indp(j,ind))=rho(indp(j,ind))+vol2(j) end if end do else if(ilevel>cic_levelmax)then do j=1,np ! check for non-DM (and non-tracer) if ( ok(j) .and. is_not_DM(fam(j)) ) then rho(indp(j,ind))=rho(indp(j,ind))+vol2(j) end if end do endif if(ilevel==cic_levelmax)then do j=1,np ! check for DM if ( ok(j) .and. is_DM(fam(j)) ) then rho_top(indp(j,ind))=rho_top(indp(j,ind))+vol2(j) end if end do endif do j=1,np vol2(j)=vol(j,ind) end do ! Remove test particles for static runs if(static)then do j=1,np ok(j)=ok(j).and.mmm(j)>0.0 end do endif ! Keep only DM particle with a mass below the mass cut if(mass_cut_refine>0.0)then do j=1,np if ( is_DM(fam(j)) ) then ok(j)=ok(j) .and. mmm(j) < mass_cut_refine endif end do endif ! Rescale the mass by mass_sph for baryon particles if(star)then do j=1,np if ( is_not_DM(fam(j)) ) then vol2(j) = vol2(j)*mmm(j)/mass_sph endif end do endif if(cic_levelmax==0.or.ilevel=cic_levelmax)then do j=1,np if ( ok(j) .and. is_not_DM(fam(j)) ) then phi(indp(j,ind))=phi(indp(j,ind))+vol2(j) end if end do endif ! Always refine sinks to the maximum level ! by setting particle number density above m_refine(ilevel) if(sink_refine)then do j=1,np if ( is_cloud(fam(j)) ) then ! if (direct_force_sink(-1*idp(ind_part(j))))then phi(indp(j,ind))=phi(indp(j,ind))+m_refine(ilevel) ! endif end if end do end if end do end subroutine cic_amr !########################################################### !########################################################### !########################################################### !########################################################### subroutine multipole_fine(ilevel) use amr_commons use hydro_commons use poisson_commons use mpi_mod implicit none integer::ilevel !------------------------------------------------------------------- ! This routine compute array rho (source term for Poisson equation) ! by first reseting array rho to zero, then ! by affecting the gas density to leaf cells, and finally ! by performing a restriction operation for split cells. ! For pure particle runs, the restriction is not necessary and the ! routine only set rho to zero. On the other hand, for the Multigrid ! solver, the restriction is necessary in any case. !------------------------------------------------------------------- integer ::ind,i,ncache,igrid,ngrid,iskip,nx_loc integer ::idim,nleaf,nsplit,ix,iy,iz,iskip_son,ind_son,ind_grid_son,ind_cell_son integer,dimension(1:nvector),save::ind_grid,ind_cell,ind_leaf,ind_split real(dp),dimension(1:nvector,1:ndim),save::xx real(dp),dimension(1:nvector),save::dd real(kind=8)::dx,dx_loc,scale,vol_loc,mm real(dp),dimension(1:3)::skip_loc real(dp),dimension(1:twotondim,1:3)::xc if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc=dx_loc**ndim do ind=1,twotondim iz=(ind-1)/4 iy=(ind-1-4*iz)/2 ix=(ind-1-2*iy-4*iz) if(ndim>0)xc(ind,1)=(dble(ix)-0.5D0)*dx if(ndim>1)xc(ind,2)=(dble(iy)-0.5D0)*dx if(ndim>2)xc(ind,3)=(dble(iz)-0.5D0)*dx end do ! Initialize fields to zero do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid unew(active(ilevel)%igrid(i)+iskip,1)=0.0D0 end do do idim=1,ndim do i=1,active(ilevel)%ngrid unew(active(ilevel)%igrid(i)+iskip,idim+1)=0.0D0 end do end do end do ! Compute mass multipoles in each cell ncache=active(ilevel)%ngrid do igrid=1,ncache,nvector ngrid=MIN(nvector,ncache-igrid+1) do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do ! Loop over cells do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax ! Gather cell indices do i=1,ngrid ind_cell(i)=ind_grid(i)+iskip end do ! Gather leaf cells and compute cell centers nleaf=0 do i=1,ngrid if(son(ind_cell(i))==0)then nleaf=nleaf+1 ind_leaf(nleaf)=ind_cell(i) do idim=1,ndim xx(nleaf,idim)=(xg(ind_grid(i),idim)+xc(ind,idim)-skip_loc(idim))*scale end do end if end do ! Compute gas multipole for leaf cells only if(hydro)then do i=1,nleaf mm=max(uold(ind_leaf(i),1),smallr)*vol_loc unew(ind_leaf(i),1)=unew(ind_leaf(i),1)+mm end do do idim=1,ndim do i=1,nleaf mm=max(uold(ind_leaf(i),1),smallr)*vol_loc unew(ind_leaf(i),idim+1)=unew(ind_leaf(i),idim+1)+mm*xx(i,idim) end do end do endif ! Add analytical density profile for leaf cells only if(gravity_type < 0)then ! Call user defined routine rho_ana call rho_ana(xx,dd,dx_loc,nleaf) ! Scatter results to array phi do i=1,nleaf unew(ind_leaf(i),1)=unew(ind_leaf(i),1)+dd(i)*vol_loc end do do idim=1,ndim do i=1,nleaf mm=dd(i)*vol_loc unew(ind_leaf(i),idim+1)=unew(ind_leaf(i),idim+1)+mm*xx(i,idim) end do end do end if ! Gather split cells nsplit=0 do i=1,ngrid if(son(ind_cell(i))>0)then nsplit=nsplit+1 ind_split(nsplit)=ind_cell(i) end if end do ! Add children multipoles do ind_son=1,twotondim iskip_son=ncoarse+(ind_son-1)*ngridmax do i=1,nsplit ind_grid_son=son(ind_split(i)) ind_cell_son=iskip_son+ind_grid_son unew(ind_split(i),1)=unew(ind_split(i),1)+unew(ind_cell_son,1) end do do idim=1,ndim do i=1,nsplit ind_grid_son=son(ind_split(i)) ind_cell_son=iskip_son+ind_grid_son unew(ind_split(i),idim+1)=unew(ind_split(i),idim+1)+unew(ind_cell_son,idim+1) end do end do end do end do enddo ! Update boundaries do idim=1,ndim+1 call make_virtual_fine_dp(unew(1,idim),ilevel) end do 111 format(' Entering multipole_fine for level',i2) end subroutine multipole_fine !########################################################### !########################################################### !########################################################### !########################################################### subroutine ngp_amr_gas(ind_cell,ind_part,ind_grid_part,x0,ng,np,ilevel) use amr_commons use pm_commons use hydro_commons use poisson_commons implicit none integer::ng,np,ilevel integer ,dimension(1:nvector)::ind_cell,ind_grid_part,ind_part real(dp),dimension(1:nvector,1:ndim)::x0 !------------------------------------------------------------------ ! This routine computes the density field at level ilevel using ! the CIC scheme. Only cells that are in level ilevel ! are updated by the input particle list. !------------------------------------------------------------------ integer::j,idim,nx_loc real(dp)::dx,dx_loc,scale ! Grid-based arrays integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids ! Particle-based arrays logical ,dimension(1:nvector),save::ok real(dp),dimension(1:nvector,1:ndim),save::x integer ,dimension(1:nvector,1:ndim),save::id,igd,icd integer ,dimension(1:nvector),save::igrid,icell,indp,kg real(dp),dimension(1:3)::skip_loc real(dp),dimension(1:nvector),save::vol_loc ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc(1:nvector)=dx_loc**ndim call get3cubefather(ind_cell,nbors_father_cells,nbors_father_grids,ng,ilevel) ! Rescale position at level ilevel do idim=1,ndim do j=1,np x(j,idim)=xp(ind_part(j),idim)/scale+skip_loc(idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)-x0(ind_grid_part(j),idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/dx end do end do ! NGP at level ilevel do idim=1,ndim do j=1,np id(j,idim)=x(j,idim) end do end do ! Compute parent grids do idim=1,ndim do j=1,np igd(j,idim)=id(j,idim)/2 end do end do do j=1,np kg(j)=1+igd(j,1)+3*igd(j,2)+9*igd(j,3) end do do j=1,np igrid(j)=son(nbors_father_cells(ind_grid_part(j),kg(j))) end do ! Check if particles are entirely in level ilevel ok(1:np)=.true. do j=1,np ok(j)=ok(j).and.igrid(j)>0 end do ! Compute parent cell position do idim=1,ndim do j=1,np if(ok(j)) then icd(j,idim)=id(j,idim)-2*igd(j,idim) endif end do end do do j=1,np if(ok(j)) then icell(j)=1+icd(j,1)+2*icd(j,2)+4*icd(j,3) endif end do ! Compute parent cell adresses do j=1,np if(ok(j))then indp(j)=ncoarse+(icell(j)-1)*ngridmax+igrid(j) else indp(j) = nbors_father_cells(ind_grid_part(j),kg(j)) end if end do if(hydro)then do j=1,np unew(indp(j),1)=unew(indp(j),1)+mp(ind_part(j)) end do do idim=1,ndim do j=1,np unew(indp(j),idim+1)=unew(indp(j),idim+1)+mp(ind_part(j))*xp(ind_part(j),idim) end do end do endif end subroutine ngp_amr_gas !########################################################### !########################################################### !########################################################### !########################################################### subroutine cic_from_multipole(ilevel) use amr_commons use hydro_commons use poisson_commons use mpi_mod implicit none integer::ilevel !------------------------------------------------------------------- ! This routine compute array rho (source term for Poisson equation) ! by first reseting array rho to zero, then ! by affecting the gas density to leaf cells, and finally ! by performing a restriction operation for split cells. ! For pure particle runs, the restriction is not necessary and the ! routine only set rho to zero. On the other hand, for the Multigrid ! solver, the restriction is necessary in any case. !------------------------------------------------------------------- integer::ind,i,icpu,ncache,ngrid,iskip,ibound,igrid integer,dimension(1:nvector),save::ind_grid if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Initialize density field to zero do icpu=1,ncpu do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,reception(icpu,ilevel)%ngrid rho(reception(icpu,ilevel)%igrid(i)+iskip)=0.0D0 end do end do end do do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid rho(active(ilevel)%igrid(i)+iskip)=0.0D0 end do end do ! Reset rho in physical boundaries do ibound=1,nboundary do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,boundary(ibound,ilevel)%ngrid rho(boundary(ibound,ilevel)%igrid(i)+iskip)=0.0 end do end do end do if(hydro)then ! Perform a restriction over split cells (ilevel+1) ncache=active(ilevel)%ngrid do igrid=1,ncache,nvector ! Gather nvector grids ngrid=MIN(nvector,ncache-igrid+1) do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do call cic_cell(ind_grid,ngrid,ilevel) end do end if 111 format(' Entering cic_from_multipole for level',i2) end subroutine cic_from_multipole !########################################################### !########################################################### !########################################################### !########################################################### subroutine cic_cell(ind_grid,ngrid,ilevel) use amr_commons use poisson_commons use hydro_commons, ONLY: unew implicit none integer::ngrid,ilevel integer,dimension(1:nvector)::ind_grid ! ! integer::i,j,idim,ind_cell_son,iskip_son,np,ind_son,nx_loc,ind integer ,dimension(1:nvector),save::ind_cell integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids ! Particle-based arrays logical ,dimension(1:nvector),save::ok real(dp),dimension(1:nvector),save::mmm real(dp),dimension(1:nvector),save::vol2 real(dp),dimension(1:nvector,1:ndim),save::x,dd,dg integer ,dimension(1:nvector,1:ndim),save::ig,id,igg,igd,icg,icd real(dp),dimension(1:nvector,1:twotondim),save::vol integer ,dimension(1:nvector,1:twotondim),save::igrid,icell,indp,kg real(dp),dimension(1:3)::skip_loc real(kind=8)::dx,dx_loc,scale,vol_loc logical::error ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc=dx_loc**ndim np=ngrid ! Compute father cell index do i=1,ngrid ind_cell(i)=father(ind_grid(i)) end do ! Gather 3x3x3 neighboring parent cells call get3cubefather(ind_cell,nbors_father_cells,nbors_father_grids,ngrid,ilevel) ! Loop over grid cells do ind_son=1,twotondim iskip_son=ncoarse+(ind_son-1)*ngridmax ! Compute pseudo particle (centre of mass) position do idim=1,ndim do j=1,np ind_cell_son=iskip_son+ind_grid(j) x(j,idim)=unew(ind_cell_son,idim+1)/unew(ind_cell_son,1) end do end do ! Compute total multipole if(ilevel==levelmin)then do idim=1,ndim+1 do j=1,np ind_cell_son=iskip_son+ind_grid(j) multipole(idim)=multipole(idim)+unew(ind_cell_son,idim) end do end do endif ! Rescale particle position at level ilevel do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/scale+skip_loc(idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)-(xg(ind_grid(j),idim)-3d0*dx) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/dx end do end do ! Gather particle mass do j=1,np ind_cell_son=iskip_son+ind_grid(j) mmm(j)=unew(ind_cell_son,1) end do ! CIC at level ilevel (dd: right cloud boundary; dg: left cloud boundary) do idim=1,ndim do j=1,np dd(j,idim)=x(j,idim)+0.5D0 id(j,idim)=int(dd(j,idim)) dd(j,idim)=dd(j,idim)-id(j,idim) dg(j,idim)=1.0D0-dd(j,idim) ig(j,idim)=id(j,idim)-1 end do end do ! Check for illegal moves error=.false. do idim=1,ndim do j=1,np if(x(j,idim)<0.5D0.or.x(j,idim)>5.5D0)error=.true. end do end do if(error)then write(*,*)'problem in cic' do idim=1,ndim do j=1,np if(x(j,idim)<0.5D0.or.x(j,idim)>5.5D0)then write(*,*)x(j,1:ndim) endif end do end do stop end if ! Compute cloud volumes #if NDIM==1 do j=1,np vol(j,1)=dg(j,1) vol(j,2)=dd(j,1) end do #endif #if NDIM==2 do j=1,np vol(j,1)=dg(j,1)*dg(j,2) vol(j,2)=dd(j,1)*dg(j,2) vol(j,3)=dg(j,1)*dd(j,2) vol(j,4)=dd(j,1)*dd(j,2) end do #endif #if NDIM==3 do j=1,np vol(j,1)=dg(j,1)*dg(j,2)*dg(j,3) vol(j,2)=dd(j,1)*dg(j,2)*dg(j,3) vol(j,3)=dg(j,1)*dd(j,2)*dg(j,3) vol(j,4)=dd(j,1)*dd(j,2)*dg(j,3) vol(j,5)=dg(j,1)*dg(j,2)*dd(j,3) vol(j,6)=dd(j,1)*dg(j,2)*dd(j,3) vol(j,7)=dg(j,1)*dd(j,2)*dd(j,3) vol(j,8)=dd(j,1)*dd(j,2)*dd(j,3) end do #endif ! Compute parent grids do idim=1,ndim do j=1,np igg(j,idim)=ig(j,idim)/2 igd(j,idim)=id(j,idim)/2 end do end do #if NDIM==1 do j=1,np kg(j,1)=1+igg(j,1) kg(j,2)=1+igd(j,1) end do #endif #if NDIM==2 do j=1,np kg(j,1)=1+igg(j,1)+3*igg(j,2) kg(j,2)=1+igd(j,1)+3*igg(j,2) kg(j,3)=1+igg(j,1)+3*igd(j,2) kg(j,4)=1+igd(j,1)+3*igd(j,2) end do #endif #if NDIM==3 do j=1,np kg(j,1)=1+igg(j,1)+3*igg(j,2)+9*igg(j,3) kg(j,2)=1+igd(j,1)+3*igg(j,2)+9*igg(j,3) kg(j,3)=1+igg(j,1)+3*igd(j,2)+9*igg(j,3) kg(j,4)=1+igd(j,1)+3*igd(j,2)+9*igg(j,3) kg(j,5)=1+igg(j,1)+3*igg(j,2)+9*igd(j,3) kg(j,6)=1+igd(j,1)+3*igg(j,2)+9*igd(j,3) kg(j,7)=1+igg(j,1)+3*igd(j,2)+9*igd(j,3) kg(j,8)=1+igd(j,1)+3*igd(j,2)+9*igd(j,3) end do #endif do ind=1,twotondim do j=1,np igrid(j,ind)=son(nbors_father_cells(j,kg(j,ind))) end do end do ! Compute parent cell position do idim=1,ndim do j=1,np icg(j,idim)=ig(j,idim)-2*igg(j,idim) icd(j,idim)=id(j,idim)-2*igd(j,idim) end do end do #if NDIM==1 do j=1,np icell(j,1)=1+icg(j,1) icell(j,2)=1+icd(j,1) end do #endif #if NDIM==2 do j=1,np icell(j,1)=1+icg(j,1)+2*icg(j,2) icell(j,2)=1+icd(j,1)+2*icg(j,2) icell(j,3)=1+icg(j,1)+2*icd(j,2) icell(j,4)=1+icd(j,1)+2*icd(j,2) end do #endif #if NDIM==3 do j=1,np icell(j,1)=1+icg(j,1)+2*icg(j,2)+4*icg(j,3) icell(j,2)=1+icd(j,1)+2*icg(j,2)+4*icg(j,3) icell(j,3)=1+icg(j,1)+2*icd(j,2)+4*icg(j,3) icell(j,4)=1+icd(j,1)+2*icd(j,2)+4*icg(j,3) icell(j,5)=1+icg(j,1)+2*icg(j,2)+4*icd(j,3) icell(j,6)=1+icd(j,1)+2*icg(j,2)+4*icd(j,3) icell(j,7)=1+icg(j,1)+2*icd(j,2)+4*icd(j,3) icell(j,8)=1+icd(j,1)+2*icd(j,2)+4*icd(j,3) end do #endif ! Compute parent cell adress do ind=1,twotondim do j=1,np indp(j,ind)=ncoarse+(icell(j,ind)-1)*ngridmax+igrid(j,ind) end do end do ! Update mass density and number density fields do ind=1,twotondim do j=1,np ok(j)=igrid(j,ind)>0 end do do j=1,np vol2(j)=mmm(j)*vol(j,ind)/vol_loc end do do j=1,np if(ok(j))then rho(indp(j,ind))=rho(indp(j,ind))+vol2(j) end if end do end do end do ! End loop over grid cells end subroutine cic_cell !############################################################################## !############################################################################## !############################################################################## !############################################################################## #if NDIM==3 subroutine tsc_amr(ind_cell,ind_part,ind_grid_part,x0,ng,np,ilevel) use amr_commons use amr_parameters use pm_commons use poisson_commons use hydro_commons, ONLY: mass_sph implicit none integer::ng,np,ilevel integer ,dimension(1:nvector)::ind_cell,ind_grid_part,ind_part real(dp),dimension(1:nvector,1:ndim)::x0 !------------------------------------------------------------------ ! This routine computes the density field at level ilevel using ! the TSC scheme. Only cells that are in level ilevel ! are updated by the input particle list. !------------------------------------------------------------------ integer::j,ind,idim,nx_loc real(dp)::dx,dx_loc,scale,vol_loc ! Grid-based arrays integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids ! Particle-based arrays logical ,dimension(1:nvector),save::ok,abandoned real(dp),dimension(1:nvector),save::mmm real(dp),dimension(1:nvector),save::ttt=0d0 type(part_t),dimension(1:nvector),save::fam real(dp),dimension(1:nvector),save::vol2 real(dp),dimension(1:nvector,1:ndim),save::x,cl,cr,cc,wl,wr,wc integer ,dimension(1:nvector,1:ndim),save::igl,igr,igc,icl,icr,icc real(dp),dimension(1:nvector,1:threetondim),save::vol integer ,dimension(1:nvector,1:threetondim),save::igrid,icell,indp,kg real(dp),dimension(1:3)::skip_loc if (ndim .ne. 3)then write(*,*)'TSC not supported for ndim neq 3' call clean_stop end if ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc=dx_loc**ndim ! Gather neighboring father cells (should be present at anytime!) call get3cubefather(ind_cell,nbors_father_cells,nbors_father_grids,ng,ilevel) ! Rescale particle position at level ilevel do idim=1,ndim do j=1,np x(j,idim)=xp(ind_part(j),idim)/scale+skip_loc(idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)-x0(ind_grid_part(j),idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/dx end do end do ! Gather particle mass & type do j=1,np fam(j) = typep(ind_part(j)) if (is_tracer(fam(j))) then mmm(j)=0. else mmm(j)=mp(ind_part(j)) end if end do if(ilevel==levelmin)then do j=1,np multipole(1)=multipole(1)+mmm(j) end do do idim=1,ndim do j=1,np multipole(idim+1)=multipole(idim+1)+mmm(j)*xp(ind_part(j),idim) end do end do end if ! Gather particle birth epoch if(star)then do j=1,np ttt(j)=tp(ind_part(j)) end do endif ! Check for illegal moves abandoned(1:np)=.false. do idim=1,ndim do j=1,np if(x(j,idim)<1.0D0.or.x(j,idim)>5.0D0) abandoned(j)=.true. end do end do ! TSC at level ilevel; a particle contributes ! to three cells in each dimension ! cl: position of leftmost cell centre ! cc: position of central cell centre ! cr: position of rightmost cell centre ! wl: weighting function for leftmost cell ! wc: weighting function for central cell ! wr: weighting function for rightmost cell do idim=1,ndim do j=1,np if(.not.abandoned(j)) then cl(j,idim)=dble(int(x(j,idim)))-0.5D0 cc(j,idim)=dble(int(x(j,idim)))+0.5D0 cr(j,idim)=dble(int(x(j,idim)))+1.5D0 wl(j,idim)=0.50D0*(1.5D0-abs(x(j,idim)-cl(j,idim)))**2 wc(j,idim)=0.75D0- (x(j,idim)-cc(j,idim)) **2 wr(j,idim)=0.50D0*(1.5D0-abs(x(j,idim)-cr(j,idim)))**2 end if end do end do ! Compute cloud volumes do j=1,np if(.not.abandoned(j)) then vol(j,1 )=wl(j,1)*wl(j,2)*wl(j,3) vol(j,2 )=wc(j,1)*wl(j,2)*wl(j,3) vol(j,3 )=wr(j,1)*wl(j,2)*wl(j,3) vol(j,4 )=wl(j,1)*wc(j,2)*wl(j,3) vol(j,5 )=wc(j,1)*wc(j,2)*wl(j,3) vol(j,6 )=wr(j,1)*wc(j,2)*wl(j,3) vol(j,7 )=wl(j,1)*wr(j,2)*wl(j,3) vol(j,8 )=wc(j,1)*wr(j,2)*wl(j,3) vol(j,9 )=wr(j,1)*wr(j,2)*wl(j,3) vol(j,10)=wl(j,1)*wl(j,2)*wc(j,3) vol(j,11)=wc(j,1)*wl(j,2)*wc(j,3) vol(j,12)=wr(j,1)*wl(j,2)*wc(j,3) vol(j,13)=wl(j,1)*wc(j,2)*wc(j,3) vol(j,14)=wc(j,1)*wc(j,2)*wc(j,3) vol(j,15)=wr(j,1)*wc(j,2)*wc(j,3) vol(j,16)=wl(j,1)*wr(j,2)*wc(j,3) vol(j,17)=wc(j,1)*wr(j,2)*wc(j,3) vol(j,18)=wr(j,1)*wr(j,2)*wc(j,3) vol(j,19)=wl(j,1)*wl(j,2)*wr(j,3) vol(j,20)=wc(j,1)*wl(j,2)*wr(j,3) vol(j,21)=wr(j,1)*wl(j,2)*wr(j,3) vol(j,22)=wl(j,1)*wc(j,2)*wr(j,3) vol(j,23)=wc(j,1)*wc(j,2)*wr(j,3) vol(j,24)=wr(j,1)*wc(j,2)*wr(j,3) vol(j,25)=wl(j,1)*wr(j,2)*wr(j,3) vol(j,26)=wc(j,1)*wr(j,2)*wr(j,3) vol(j,27)=wr(j,1)*wr(j,2)*wr(j,3) end if end do ! Compute parent grids do idim=1,ndim do j=1,np if(.not.abandoned(j)) then igl(j,idim)=(int(cl(j,idim)))/2 igc(j,idim)=(int(cc(j,idim)))/2 igr(j,idim)=(int(cr(j,idim)))/2 end if end do end do do j=1,np if(.not.abandoned(j)) then kg(j,1 )=1+igl(j,1)+3*igl(j,2)+9*igl(j,3) kg(j,2 )=1+igc(j,1)+3*igl(j,2)+9*igl(j,3) kg(j,3 )=1+igr(j,1)+3*igl(j,2)+9*igl(j,3) kg(j,4 )=1+igl(j,1)+3*igc(j,2)+9*igl(j,3) kg(j,5 )=1+igc(j,1)+3*igc(j,2)+9*igl(j,3) kg(j,6 )=1+igr(j,1)+3*igc(j,2)+9*igl(j,3) kg(j,7 )=1+igl(j,1)+3*igr(j,2)+9*igl(j,3) kg(j,8 )=1+igc(j,1)+3*igr(j,2)+9*igl(j,3) kg(j,9 )=1+igr(j,1)+3*igr(j,2)+9*igl(j,3) kg(j,10)=1+igl(j,1)+3*igl(j,2)+9*igc(j,3) kg(j,11)=1+igc(j,1)+3*igl(j,2)+9*igc(j,3) kg(j,12)=1+igr(j,1)+3*igl(j,2)+9*igc(j,3) kg(j,13)=1+igl(j,1)+3*igc(j,2)+9*igc(j,3) kg(j,14)=1+igc(j,1)+3*igc(j,2)+9*igc(j,3) kg(j,15)=1+igr(j,1)+3*igc(j,2)+9*igc(j,3) kg(j,16)=1+igl(j,1)+3*igr(j,2)+9*igc(j,3) kg(j,17)=1+igc(j,1)+3*igr(j,2)+9*igc(j,3) kg(j,18)=1+igr(j,1)+3*igr(j,2)+9*igc(j,3) kg(j,19)=1+igl(j,1)+3*igl(j,2)+9*igr(j,3) kg(j,20)=1+igc(j,1)+3*igl(j,2)+9*igr(j,3) kg(j,21)=1+igr(j,1)+3*igl(j,2)+9*igr(j,3) kg(j,22)=1+igl(j,1)+3*igc(j,2)+9*igr(j,3) kg(j,23)=1+igc(j,1)+3*igc(j,2)+9*igr(j,3) kg(j,24)=1+igr(j,1)+3*igc(j,2)+9*igr(j,3) kg(j,25)=1+igl(j,1)+3*igr(j,2)+9*igr(j,3) kg(j,26)=1+igc(j,1)+3*igr(j,2)+9*igr(j,3) kg(j,27)=1+igr(j,1)+3*igr(j,2)+9*igr(j,3) end if end do do ind=1,threetondim do j=1,np igrid(j,ind)=son(nbors_father_cells(ind_grid_part(j),kg(j,ind))) end do end do ! Compute parent cell position do idim=1,ndim do j=1,np if(.not.abandoned(j)) then icl(j,idim)=int(cl(j,idim))-2*igl(j,idim) icc(j,idim)=int(cc(j,idim))-2*igc(j,idim) icr(j,idim)=int(cr(j,idim))-2*igr(j,idim) end if end do end do do j=1,np if(.not.abandoned(j)) then icell(j,1 )=1+icl(j,1)+2*icl(j,2)+4*icl(j,3) icell(j,2 )=1+icc(j,1)+2*icl(j,2)+4*icl(j,3) icell(j,3 )=1+icr(j,1)+2*icl(j,2)+4*icl(j,3) icell(j,4 )=1+icl(j,1)+2*icc(j,2)+4*icl(j,3) icell(j,5 )=1+icc(j,1)+2*icc(j,2)+4*icl(j,3) icell(j,6 )=1+icr(j,1)+2*icc(j,2)+4*icl(j,3) icell(j,7 )=1+icl(j,1)+2*icr(j,2)+4*icl(j,3) icell(j,8 )=1+icc(j,1)+2*icr(j,2)+4*icl(j,3) icell(j,9 )=1+icr(j,1)+2*icr(j,2)+4*icl(j,3) icell(j,10)=1+icl(j,1)+2*icl(j,2)+4*icc(j,3) icell(j,11)=1+icc(j,1)+2*icl(j,2)+4*icc(j,3) icell(j,12)=1+icr(j,1)+2*icl(j,2)+4*icc(j,3) icell(j,13)=1+icl(j,1)+2*icc(j,2)+4*icc(j,3) icell(j,14)=1+icc(j,1)+2*icc(j,2)+4*icc(j,3) icell(j,15)=1+icr(j,1)+2*icc(j,2)+4*icc(j,3) icell(j,16)=1+icl(j,1)+2*icr(j,2)+4*icc(j,3) icell(j,17)=1+icc(j,1)+2*icr(j,2)+4*icc(j,3) icell(j,18)=1+icr(j,1)+2*icr(j,2)+4*icc(j,3) icell(j,19)=1+icl(j,1)+2*icl(j,2)+4*icr(j,3) icell(j,20)=1+icc(j,1)+2*icl(j,2)+4*icr(j,3) icell(j,21)=1+icr(j,1)+2*icl(j,2)+4*icr(j,3) icell(j,22)=1+icl(j,1)+2*icc(j,2)+4*icr(j,3) icell(j,23)=1+icc(j,1)+2*icc(j,2)+4*icr(j,3) icell(j,24)=1+icr(j,1)+2*icc(j,2)+4*icr(j,3) icell(j,25)=1+icl(j,1)+2*icr(j,2)+4*icr(j,3) icell(j,26)=1+icc(j,1)+2*icr(j,2)+4*icr(j,3) icell(j,27)=1+icr(j,1)+2*icr(j,2)+4*icr(j,3) end if end do ! Compute parent cell adress do ind=1,threetondim do j=1,np if(.not.abandoned(j)) then indp(j,ind)=ncoarse+(icell(j,ind)-1)*ngridmax+igrid(j,ind) end if end do end do ! Update mass density and number density fields do ind=1,threetondim do j=1,np if(.not.abandoned(j)) then ok(j)=igrid(j,ind)>0 end if end do do j=1,np if(.not.abandoned(j)) then vol2(j)=mmm(j)*vol(j,ind)/vol_loc end if end do if(cic_levelmax==0.or.ilevel<=cic_levelmax) then do j=1,np if(ok(j).and.(.not.abandoned(j))) then rho(indp(j,ind))=rho(indp(j,ind))+vol2(j) end if end do else if(ilevel>cic_levelmax) then do j=1,np if ( ok(j) .and. is_not_DM(fam(j)) .and. (.not.abandoned(j)) ) then rho(indp(j,ind))=rho(indp(j,ind))+vol2(j) end if end do endif if(ilevel==cic_levelmax)then do j=1,np if ( ok(j) .and. is_DM(fam(j)) .and. (.not.abandoned(j)) ) then rho_top(indp(j,ind))=rho_top(indp(j,ind))+vol2(j) end if end do endif do j=1,np if(.not.abandoned(j)) then vol2(j)=vol(j,ind) end if end do ! Remove test particles for static runs if(static) then do j=1,np if(.not.abandoned(j)) then ok(j)=ok(j).and.(mmm(j)>0.0) end if end do endif ! Remove massive dark matter particle if(mass_cut_refine>0.0) then do j=1,np if ( is_DM(fam(j)) .and. (.not.abandoned(j)) ) then ok(j)=ok(j).and.mmm(j)=cic_levelmax) then do j=1,np if ( ok(j) .and. is_not_DM(fam(j)) .and. (.not.abandoned(j)) ) then phi(indp(j,ind))=phi(indp(j,ind))+vol2(j) end if end do endif end do end subroutine tsc_amr #endif !########################################################### !########################################################### !########################################################### !########################################################### #if NDIM==3 subroutine tsc_from_multipole(ilevel) use amr_commons use hydro_commons use poisson_commons use mpi_mod implicit none integer::ilevel !------------------------------------------------------------------- ! This routine compute array rho (source term for Poisson equation) ! by first reseting array rho to zero, then ! by affecting the gas density to leaf cells, and finally ! by performing a restriction operation for split cells. ! For pure particle runs, the restriction is not necessary and the ! routine only set rho to zero. On the other hand, for the Multigrid ! solver, the restriction is necessary in any case. !------------------------------------------------------------------- integer::ind,i,icpu,ncache,ngrid,iskip,ibound integer::igrid integer,dimension(1:nvector),save::ind_grid if(numbtot(1,ilevel)==0)return if(verbose)write(*,111)ilevel ! Initialize density field to zero do icpu=1,ncpu do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,reception(icpu,ilevel)%ngrid rho(reception(icpu,ilevel)%igrid(i)+iskip)=0.0D0 end do end do end do do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,active(ilevel)%ngrid rho(active(ilevel)%igrid(i)+iskip)=0.0D0 end do end do ! Reset rho in physical boundaries do ibound=1,nboundary do ind=1,twotondim iskip=ncoarse+(ind-1)*ngridmax do i=1,boundary(ibound,ilevel)%ngrid rho(boundary(ibound,ilevel)%igrid(i)+iskip)=0.0 end do end do end do if(hydro)then ! Perform a restriction over split cells (ilevel+1) ncache=active(ilevel)%ngrid do igrid=1,ncache,nvector ! Gather nvector grids ngrid=MIN(nvector,ncache-igrid+1) do i=1,ngrid ind_grid(i)=active(ilevel)%igrid(igrid+i-1) end do call tsc_cell(ind_grid,ngrid,ilevel) end do end if 111 format(' Entering tsc_from_multipole for level',i2) end subroutine tsc_from_multipole #endif !########################################################### !########################################################### !########################################################### !########################################################### #if NDIM==3 subroutine tsc_cell(ind_grid,ngrid,ilevel) use amr_commons use poisson_commons use hydro_commons, ONLY: unew implicit none integer::ngrid,ilevel integer,dimension(1:nvector)::ind_grid ! ! integer::i,j,idim,ind_cell_son,iskip_son,np,ind_son,nx_loc,ind integer ,dimension(1:nvector),save::ind_cell integer ,dimension(1:nvector,1:threetondim),save::nbors_father_cells integer ,dimension(1:nvector,1:twotondim),save::nbors_father_grids ! Particle-based arrays logical ,dimension(1:nvector),save::ok real(dp),dimension(1:nvector),save::mmm real(dp),dimension(1:nvector),save::vol2 real(dp),dimension(1:nvector,1:ndim),save::x,cl,cr,cc,wl,wr,wc integer ,dimension(1:nvector,1:ndim),save::igl,igr,igc,icl,icr,icc real(dp),dimension(1:nvector,1:threetondim),save::vol integer ,dimension(1:nvector,1:threetondim),save::igrid,icell,indp,kg real(dp),dimension(1:3)::skip_loc real(kind=8)::dx,dx_loc,scale,vol_loc logical::error ! Mesh spacing in that level dx=0.5D0**ilevel nx_loc=(icoarse_max-icoarse_min+1) skip_loc=(/0.0d0,0.0d0,0.0d0/) if(ndim>0)skip_loc(1)=dble(icoarse_min) if(ndim>1)skip_loc(2)=dble(jcoarse_min) if(ndim>2)skip_loc(3)=dble(kcoarse_min) scale=boxlen/dble(nx_loc) dx_loc=dx*scale vol_loc=dx_loc**ndim np=ngrid ! Compute father cell index do i=1,ngrid ind_cell(i)=father(ind_grid(i)) end do ! Gather 3x3x3 neighboring parent cells call get3cubefather(ind_cell,nbors_father_cells,nbors_father_grids,ngrid,ilevel) ! Loop over grid cells do ind_son=1,twotondim iskip_son=ncoarse+(ind_son-1)*ngridmax ! Compute pseudo particle (centre of mass) position do idim=1,ndim do j=1,np ind_cell_son=iskip_son+ind_grid(j) x(j,idim)=unew(ind_cell_son,idim+1)/unew(ind_cell_son,1) end do end do ! Compute total multipole if(ilevel==levelmin)then do idim=1,ndim+1 do j=1,np ind_cell_son=iskip_son+ind_grid(j) multipole(idim)=multipole(idim)+unew(ind_cell_son,idim) end do end do endif ! Rescale particle position at level ilevel do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/scale+skip_loc(idim) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)-(xg(ind_grid(j),idim)-3d0*dx) end do end do do idim=1,ndim do j=1,np x(j,idim)=x(j,idim)/dx end do end do ! Gather particle mass do j=1,np ind_cell_son=iskip_son+ind_grid(j) mmm(j)=unew(ind_cell_son,1) end do ! TSC at level ilevel; a particle contributes ! to three cells in each dimension ! cl: position of leftmost cell centre ! cc: position of central cell centre ! cr: position of rightmost cell centre ! wl: weighting function for leftmost cell ! wc: weighting function for central cell ! wr: weighting function for rightmost cell do idim=1,ndim do j=1,np cl(j,idim)=dble(int(x(j,idim)))-0.5D0 cc(j,idim)=dble(int(x(j,idim)))+0.5D0 cr(j,idim)=dble(int(x(j,idim)))+1.5D0 wl(j,idim)=0.50D0*(1.5D0-abs(x(j,idim)-cl(j,idim)))**2 wc(j,idim)=0.75D0- (x(j,idim)-cc(j,idim)) **2 wr(j,idim)=0.50D0*(1.5D0-abs(x(j,idim)-cr(j,idim)))**2 end do end do ! Check for illegal moves error=.false. do idim=1,ndim do j=1,np if(x(j,idim)<1.0D0.or.x(j,idim)>5.0D0)error=.true. end do end do if(error)then write(*,*)'problem in tsc_cell' do idim=1,ndim do j=1,np if(x(j,idim)<1.0D0.or.x(j,idim)>5.0D0)then write(*,*)x(j,1:ndim) endif end do end do stop end if ! Compute cloud volumes do j=1,np vol(j,1 )=wl(j,1)*wl(j,2)*wl(j,3) vol(j,2 )=wc(j,1)*wl(j,2)*wl(j,3) vol(j,3 )=wr(j,1)*wl(j,2)*wl(j,3) vol(j,4 )=wl(j,1)*wc(j,2)*wl(j,3) vol(j,5 )=wc(j,1)*wc(j,2)*wl(j,3) vol(j,6 )=wr(j,1)*wc(j,2)*wl(j,3) vol(j,7 )=wl(j,1)*wr(j,2)*wl(j,3) vol(j,8 )=wc(j,1)*wr(j,2)*wl(j,3) vol(j,9 )=wr(j,1)*wr(j,2)*wl(j,3) vol(j,10)=wl(j,1)*wl(j,2)*wc(j,3) vol(j,11)=wc(j,1)*wl(j,2)*wc(j,3) vol(j,12)=wr(j,1)*wl(j,2)*wc(j,3) vol(j,13)=wl(j,1)*wc(j,2)*wc(j,3) vol(j,14)=wc(j,1)*wc(j,2)*wc(j,3) vol(j,15)=wr(j,1)*wc(j,2)*wc(j,3) vol(j,16)=wl(j,1)*wr(j,2)*wc(j,3) vol(j,17)=wc(j,1)*wr(j,2)*wc(j,3) vol(j,18)=wr(j,1)*wr(j,2)*wc(j,3) vol(j,19)=wl(j,1)*wl(j,2)*wr(j,3) vol(j,20)=wc(j,1)*wl(j,2)*wr(j,3) vol(j,21)=wr(j,1)*wl(j,2)*wr(j,3) vol(j,22)=wl(j,1)*wc(j,2)*wr(j,3) vol(j,23)=wc(j,1)*wc(j,2)*wr(j,3) vol(j,24)=wr(j,1)*wc(j,2)*wr(j,3) vol(j,25)=wl(j,1)*wr(j,2)*wr(j,3) vol(j,26)=wc(j,1)*wr(j,2)*wr(j,3) vol(j,27)=wr(j,1)*wr(j,2)*wr(j,3) end do ! Compute parent grids do idim=1,ndim do j=1,np igl(j,idim)=(int(cl(j,idim)))/2 igc(j,idim)=(int(cc(j,idim)))/2 igr(j,idim)=(int(cr(j,idim)))/2 end do end do do j=1,np kg(j,1 )=1+igl(j,1)+3*igl(j,2)+9*igl(j,3) kg(j,2 )=1+igc(j,1)+3*igl(j,2)+9*igl(j,3) kg(j,3 )=1+igr(j,1)+3*igl(j,2)+9*igl(j,3) kg(j,4 )=1+igl(j,1)+3*igc(j,2)+9*igl(j,3) kg(j,5 )=1+igc(j,1)+3*igc(j,2)+9*igl(j,3) kg(j,6 )=1+igr(j,1)+3*igc(j,2)+9*igl(j,3) kg(j,7 )=1+igl(j,1)+3*igr(j,2)+9*igl(j,3) kg(j,8 )=1+igc(j,1)+3*igr(j,2)+9*igl(j,3) kg(j,9 )=1+igr(j,1)+3*igr(j,2)+9*igl(j,3) kg(j,10)=1+igl(j,1)+3*igl(j,2)+9*igc(j,3) kg(j,11)=1+igc(j,1)+3*igl(j,2)+9*igc(j,3) kg(j,12)=1+igr(j,1)+3*igl(j,2)+9*igc(j,3) kg(j,13)=1+igl(j,1)+3*igc(j,2)+9*igc(j,3) kg(j,14)=1+igc(j,1)+3*igc(j,2)+9*igc(j,3) kg(j,15)=1+igr(j,1)+3*igc(j,2)+9*igc(j,3) kg(j,16)=1+igl(j,1)+3*igr(j,2)+9*igc(j,3) kg(j,17)=1+igc(j,1)+3*igr(j,2)+9*igc(j,3) kg(j,18)=1+igr(j,1)+3*igr(j,2)+9*igc(j,3) kg(j,19)=1+igl(j,1)+3*igl(j,2)+9*igr(j,3) kg(j,20)=1+igc(j,1)+3*igl(j,2)+9*igr(j,3) kg(j,21)=1+igr(j,1)+3*igl(j,2)+9*igr(j,3) kg(j,22)=1+igl(j,1)+3*igc(j,2)+9*igr(j,3) kg(j,23)=1+igc(j,1)+3*igc(j,2)+9*igr(j,3) kg(j,24)=1+igr(j,1)+3*igc(j,2)+9*igr(j,3) kg(j,25)=1+igl(j,1)+3*igr(j,2)+9*igr(j,3) kg(j,26)=1+igc(j,1)+3*igr(j,2)+9*igr(j,3) kg(j,27)=1+igr(j,1)+3*igr(j,2)+9*igr(j,3) end do do ind=1,threetondim do j=1,np igrid(j,ind)=son(nbors_father_cells(j,kg(j,ind))) end do end do ! Compute parent cell position do idim=1,ndim do j=1,np icl(j,idim)=int(cl(j,idim))-2*igl(j,idim) icc(j,idim)=int(cc(j,idim))-2*igc(j,idim) icr(j,idim)=int(cr(j,idim))-2*igr(j,idim) end do end do do j=1,np icell(j,1 )=1+icl(j,1)+2*icl(j,2)+4*icl(j,3) icell(j,2 )=1+icc(j,1)+2*icl(j,2)+4*icl(j,3) icell(j,3 )=1+icr(j,1)+2*icl(j,2)+4*icl(j,3) icell(j,4 )=1+icl(j,1)+2*icc(j,2)+4*icl(j,3) icell(j,5 )=1+icc(j,1)+2*icc(j,2)+4*icl(j,3) icell(j,6 )=1+icr(j,1)+2*icc(j,2)+4*icl(j,3) icell(j,7 )=1+icl(j,1)+2*icr(j,2)+4*icl(j,3) icell(j,8 )=1+icc(j,1)+2*icr(j,2)+4*icl(j,3) icell(j,9 )=1+icr(j,1)+2*icr(j,2)+4*icl(j,3) icell(j,10)=1+icl(j,1)+2*icl(j,2)+4*icc(j,3) icell(j,11)=1+icc(j,1)+2*icl(j,2)+4*icc(j,3) icell(j,12)=1+icr(j,1)+2*icl(j,2)+4*icc(j,3) icell(j,13)=1+icl(j,1)+2*icc(j,2)+4*icc(j,3) icell(j,14)=1+icc(j,1)+2*icc(j,2)+4*icc(j,3) icell(j,15)=1+icr(j,1)+2*icc(j,2)+4*icc(j,3) icell(j,16)=1+icl(j,1)+2*icr(j,2)+4*icc(j,3) icell(j,17)=1+icc(j,1)+2*icr(j,2)+4*icc(j,3) icell(j,18)=1+icr(j,1)+2*icr(j,2)+4*icc(j,3) icell(j,19)=1+icl(j,1)+2*icl(j,2)+4*icr(j,3) icell(j,20)=1+icc(j,1)+2*icl(j,2)+4*icr(j,3) icell(j,21)=1+icr(j,1)+2*icl(j,2)+4*icr(j,3) icell(j,22)=1+icl(j,1)+2*icc(j,2)+4*icr(j,3) icell(j,23)=1+icc(j,1)+2*icc(j,2)+4*icr(j,3) icell(j,24)=1+icr(j,1)+2*icc(j,2)+4*icr(j,3) icell(j,25)=1+icl(j,1)+2*icr(j,2)+4*icr(j,3) icell(j,26)=1+icc(j,1)+2*icr(j,2)+4*icr(j,3) icell(j,27)=1+icr(j,1)+2*icr(j,2)+4*icr(j,3) end do ! Compute parent cell adress do ind=1,threetondim do j=1,np indp(j,ind)=ncoarse+(icell(j,ind)-1)*ngridmax+igrid(j,ind) end do end do ! Update mass density and number density fields do ind=1,twotondim do j=1,np ok(j)=igrid(j,ind)>0 end do do j=1,np vol2(j)=mmm(j)*vol(j,ind)/vol_loc end do do j=1,np if(ok(j))then rho(indp(j,ind))=rho(indp(j,ind))+vol2(j) end if end do end do end do ! End loop over grid cells end subroutine tsc_cell #endif !########################################################### !########################################################### !########################################################### !########################################################### Memory used: 1.0 Bytes flag1: true Memory used: 1.0 KB flag2: true Memory used: 1.0 MB flag3: true Memory used: 1.0 GB flag4: true Memory used: 1.0 TB flag5: true [Mera]: Get a list of all exported Mera types and functions: =============================================================== 81-element Vector{Symbol}: Symbol("@apply") Symbol("@filter") Symbol("@where") :ArgumentsType :ClumpDataType :CompilationInfoType :ContainMassDataSetType :DataMapsType :DataSetType :DescriptorType :FileNamesType :GravDataType :GridInfoType :Histogram2DMapType :HydroDataType :HydroMapsType :HydroPartType :InfoType :MaskArrayAbstractType :MaskArrayType :MaskType :Mera :PartDataType :PartInfoType :PartMapsType :PhysicalUnitsType :PhysicalUnitsType001 :ScalesType :ScalesType001 :amroverview :average_mweighted :average_velocity :bell :bulk_velocity :center_of_mass :checkoutputs :checksimulations :com :construct_datatype :convertdata :createpath :createscales :dataoverview :export_vtk :getclumps :getextent :getgravity :gethydro :getinfo :getmass :getparticles :getpositions :gettime :getunit :getvar :getvelocities :humanize :infodata :loaddata :makefile :msum :namelist :notifyme :patchfile :printtime :projection :savedata :shellregion :showprogress :showprogress_mode :storageoverview :subregion :timerfile :usedmemory :verbose :verbose_mode :viewallfields :viewdata :viewfields :viewmodule :wstat -------------------------------------- [ Info: getinfo: -------------------------------------- [Mera]: 2025-07-04T17:23:55.874 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:23:55.880 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:23:55.884 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false namelist-file: false timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= -------------------------------------- [ Info: info overview: -------------------------------------- output = 1 path = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ fnames ==> subfields: (:output, :info, :amr, :hydro, :hydro_descriptor, :gravity, :particles, :part_descriptor, :rt, :rt_descriptor, :rt_descriptor_v0, :clumps, :timer, :header, :namelist, :compilation, :makefile, :patchfile) simcode = RAMSES mtime = 2025-07-04T17:23:54.602 ctime = 2025-07-04T17:23:54.602 ncpu = 4 ndim = 3 levelmin = 6 levelmax = 6 boxlen = 100.0 time = 0.0 aexp = 1.0 H0 = 1.0 omega_m = 1.0 omega_l = 0.0 omega_k = 0.0 omega_b = 0.045 unit_l = 3.085677581282e21 unit_d = 6.77025430198932e-23 unit_m = 1.9890999999999996e42 unit_v = 6.559266058737735e6 unit_t = 4.70430312423675e14 gamma = 1.6667 hydro = true nvarh = 6 nvarp = 8 nvarrt = 0 variable_list = [:rho, :vx, :vy, :vz, :p, :var6] gravity_variable_list = [:epot, :ax, :ay, :az] particles_variable_list = [:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals] rt_variable_list = Symbol[] clumps_variable_list = Symbol[] sinks_variable_list = Symbol[] descriptor ==> subfields: (:hversion, :hydro, :htypes, :usehydro, :hydrofile, :pversion, :particles, :ptypes, :useparticles, :particlesfile, :gravity, :usegravity, :gravityfile, :rtversion, :rt, :rtPhotonGroups, :usert, :rtfile, :clumps, :useclumps, :clumpsfile, :sinks, :usesinks, :sinksfile) amr = true gravity = true particles = true rt = false clumps = false sinks = false namelist = true namelist_content ==> dictionary: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") headerfile = true makefile = true files_content ==> subfields: (:makefile, :timerfile, :patchfile) timerfile = true compilationfile = true patchfile = true Narraysize = 0 scale ==> subfields: (:Mpc, :kpc, :pc, :mpc, :ly, :Au, :km, :m, :cm, :mm, :μm, :Mpc3, :kpc3, :pc3, :mpc3, :ly3, :Au3, :km3, :m3, :cm3, :mm3, :μm3, :Msol_pc3, :Msun_pc3, :g_cm3, :Msol_pc2, :Msun_pc2, :g_cm2, :Gyr, :Myr, :yr, :s, :ms, :Msol, :Msun, :Mearth, :Mjupiter, :g, :km_s, :m_s, :cm_s, :nH, :erg, :g_cms2, :T_mu, :K_mu, :T, :K, :Ba, :g_cm_s2, :p_kB, :K_cm3) grid_info ==> subfields: (:ngridmax, :nstep_coarse, :nx, :ny, :nz, :nlevelmax, :nboundary, :ngrid_current, :bound_key, :cpu_read) part_info ==> subfields: (:eta_sn, :age_sn, :f_w, :Npart, :Ndm, :Nstars, :Nsinks, :Ncloud, :Ndebris, :Nother, :Nundefined, :other_tracer1, :debris_tracer, :cloud_tracer, :star_tracer, :other_tracer2, :gas_tracer) compilation ==> subfields: (:compile_date, :patch_dir, :remote_repo, :local_branch, :last_commit) constants ==> subfields: (:Au, :Mpc, :kpc, :pc, :mpc, :ly, :Msol, :Msun, :Mearth, :Mjupiter, :Rsol, :Rsun, :me, :mp, :mn, :mH, :amu, :NA, :c, :G, :kB, :Gyr, :Myr, :yr) output = 1 path = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ fnames ==> subfields: (:output, :info, :amr, :hydro, :hydro_descriptor, :gravity, :particles, :part_descriptor, :rt, :rt_descriptor, :rt_descriptor_v0, :clumps, :timer, :header, :namelist, :compilation, :makefile, :patchfile) simcode = RAMSES mtime = 2025-07-04T17:23:54.602 ctime = 2025-07-04T17:23:54.602 ncpu = 4 ndim = 3 levelmin = 6 levelmax = 6 boxlen = 100.0 time = 0.0 aexp = 1.0 H0 = 1.0 omega_m = 1.0 omega_l = 0.0 omega_k = 0.0 omega_b = 0.045 unit_l = 3.085677581282e21 unit_d = 6.77025430198932e-23 unit_m = 1.9890999999999996e42 unit_v = 6.559266058737735e6 unit_t = 4.70430312423675e14 gamma = 1.6667 hydro = true nvarh = 6 nvarp = 8 nvarrt = 0 variable_list = [:rho, :vx, :vy, :vz, :p, :var6] gravity_variable_list = [:epot, :ax, :ay, :az] particles_variable_list = [:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals] rt_variable_list = Symbol[] clumps_variable_list = Symbol[] sinks_variable_list = Symbol[] descriptor ==> subfields: (:hversion, :hydro, :htypes, :usehydro, :hydrofile, :pversion, :particles, :ptypes, :useparticles, :particlesfile, :gravity, :usegravity, :gravityfile, :rtversion, :rt, :rtPhotonGroups, :usert, :rtfile, :clumps, :useclumps, :clumpsfile, :sinks, :usesinks, :sinksfile) amr = true gravity = true particles = true rt = false clumps = false sinks = false namelist = true namelist_content ==> dictionary: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") headerfile = true makefile = true files_content ==> subfields: (:makefile, :timerfile, :patchfile) timerfile = true compilationfile = true patchfile = true Narraysize = 0 scale ==> subfields: (:Mpc, :kpc, :pc, :mpc, :ly, :Au, :km, :m, :cm, :mm, :μm, :Mpc3, :kpc3, :pc3, :mpc3, :ly3, :Au3, :km3, :m3, :cm3, :mm3, :μm3, :Msol_pc3, :Msun_pc3, :g_cm3, :Msol_pc2, :Msun_pc2, :g_cm2, :Gyr, :Myr, :yr, :s, :ms, :Msol, :Msun, :Mearth, :Mjupiter, :g, :km_s, :m_s, :cm_s, :nH, :erg, :g_cms2, :T_mu, :K_mu, :T, :K, :Ba, :g_cm_s2, :p_kB, :K_cm3) grid_info ==> subfields: (:ngridmax, :nstep_coarse, :nx, :ny, :nz, :nlevelmax, :nboundary, :ngrid_current, :bound_key, :cpu_read) part_info ==> subfields: (:eta_sn, :age_sn, :f_w, :Npart, :Ndm, :Nstars, :Nsinks, :Ncloud, :Ndebris, :Nother, :Nundefined, :other_tracer1, :debris_tracer, :cloud_tracer, :star_tracer, :other_tracer2, :gas_tracer) compilation ==> subfields: (:compile_date, :patch_dir, :remote_repo, :local_branch, :last_commit) constants ==> subfields: (:Au, :Mpc, :kpc, :pc, :mpc, :ly, :Msol, :Msun, :Mearth, :Mjupiter, :Rsol, :Rsun, :me, :mp, :mn, :mH, :amu, :NA, :c, :G, :kB, :Gyr, :Myr, :yr) [Mera]: Fields to scale from user/code units to selected units ======================================================================= Mpc = 0.0010000000000006482 kpc = 1.0000000000006481 pc = 1000.0000000006482 mpc = 1.0000000000006482e6 ly = 3261.5637769461323 Au = 2.0626480623310105e23 km = 3.0856775812820004e16 m = 3.085677581282e19 cm = 3.085677581282e21 mm = 3.085677581282e22 μm = 3.085677581282e25 Mpc3 = 1.0000000000019446e-9 kpc3 = 1.0000000000019444 pc3 = 1.0000000000019448e9 mpc3 = 1.0000000000019446e18 ly3 = 3.469585750743794e10 Au3 = 8.775571306099254e69 km3 = 2.9379989454983075e49 m3 = 2.9379989454983063e58 cm3 = 2.9379989454983065e64 mm3 = 2.937998945498306e67 μm3 = 2.937998945498306e76 Msol_pc3 = 0.9999999999980551 Msun_pc3 = 0.9999999999980551 g_cm3 = 6.77025430198932e-23 Msol_pc2 = 999.9999999987034 Msun_pc2 = 999.9999999987034 g_cm2 = 0.20890821919226463 Gyr = 0.014907037050462488 Myr = 14.907037050462488 yr = 1.4907037050462488e7 s = 4.70430312423675e14 ms = 4.70430312423675e17 Msol = 9.999999999999998e8 Msun = 9.999999999999998e8 Mearth = 3.330598439436053e14 Mjupiter = 1.0479261167570186e12 g = 1.9890999999999996e42 km_s = 65.59266058737735 m_s = 65592.66058737735 cm_s = 6.559266058737735e6 nH = 30.996344997059538 erg = 8.557898117221824e55 g_cms2 = 2.9128322630389308e-9 T_mu = 517302.3151964531 K_mu = 517302.3151964531 T = 680660.9410479647 K = 680660.9410479647 Ba = 2.9128322630389304e-9 g_cm_s2 = 2.9128322630389304e-9 p_kB = 2.1098001354745913e7 K_cm3 = 2.1098001354745913e7 [Mera]: Constants given in cgs units ========================================= Au = 0.01495978707 Mpc = 3.08567758128e24 kpc = 3.08567758128e21 pc = 3.08567758128e18 mpc = 3.08567758128e15 ly = 9.4607304725808e17 Msol = 1.9891e33 Msun = 1.9891e33 Mearth = 5.9722e27 Mjupiter = 1.89813e30 Rsol = 6.96e10 Rsun = 6.96e10 me = 9.1093897e-28 mp = 1.6726231e-24 mn = 1.6749286e-24 mH = 1.66e-24 amu = 1.6605402e-24 NA = 6.0221367e23 c = 2.99792458e10 G = 6.67259e-8 kB = 1.38062e-16 Gyr = 3.15576e16 Myr = 3.15576e13 yr = 3.15576e7 [Mera]: Paths and file-names ================================= output = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001 info = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/info_00001.txt amr = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/amr_00001. hydro = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/hydro_00001. hydro_descriptor = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/hydro_file_descriptor.txt gravity = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/grav_00001. particles = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/part_00001. part_descriptor = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/part_file_descriptor.txt rt = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/rt_00001. rt_descriptor = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/rt_file_descriptor.txt rt_descriptor_v0 = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/info_rt_00001.txt clumps = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/clump_00001. timer = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/timer_00001.txt header = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/header_00001.txt namelist = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/namelist.txt compilation = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/compilation.txt makefile = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/makefile.txt patchfile = /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/output_00001/patches.txt [Mera]: Descriptor overview ================================= hversion = 1 hydro = [:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity] htypes = ["d", "d", "d", "d", "d", "d"] usehydro = false hydrofile = true pversion = 1 particles = [:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity] ptypes = ["d", "d", "d", "d", "d", "d", "d", "i", "i", "b", "b", "d", "d"] useparticles = false particlesfile = true gravity = [:epot, :ax, :ay, :az] usegravity = false gravityfile = false rtversion = 0 rt = Dict{Any, Any}() rtPhotonGroups = Dict{Any, Any}() usert = false rtfile = false clumps = Symbol[] useclumps = false clumpsfile = false sinks = Symbol[] usesinks = false sinksfile = false [Mera]: Namelist file content ================================= &UNITS_PARAMS units_length = 0.308567758128200E+22 ! kpc units_density = 0.677025430198932E-22 ! 1e9 Msol/kpc^3 units_time = 0.470430312423675E+15 ! G &HYDRO_PARAMS slope_type =3 gamma =1.6667 riemann ='hllc' courant_factor =0.8 smallr =1e-11 &DICE_PARAMS ic_u_name ='U ' ! Name of the internal energy datablock (Gadget2 format only) amr_struct =.false. ! Reproduce the AMR structure of the Gadget2 file resulting from a ramses to gadget conversion ic_metal_name ='Z ' ! Name of the metallicity datablock (Gadget2 format only) gadget_scale_l =3.085677581282D21 ! Gadget file length unit ic_mag_center_y =0.0 ! y-coordinate of the magnetic field symmetry center ic_vel_name ='VEL ' ! Name of the velocity vector datablock (Gadget2 format only) ic_mag_axis_x =0.0 ! Magnetic field normal vector x-component ic_scale_vel =1.0 ! Scaling factor for the velocity vector ic_head_name ='HEAD' ! Name of the Header datablock (Gadget2 format only) ic_skip_type = -1 ! Skip specific particle type ic_mag_center_z =0.0 ! z-coordinate of the magnetic field symmetry center ic_scale_metal =1.0 ! Scaling factor for the metallicity ic_format ='Gadget2' ! Format of the initial conditions. 'Gadget1' or 'Gadget2' ic_scale_u =1.0 ! Scaling factor for the internal energy ic_center =0.0,0.0,0.0 ! Shift center parameter. ICs are automatically shifted with boxlen/2 ic_mass_name ='MASS' ! Name of the mass datablock (Gadget2 format only) ic_age_name ='AGE ' ! Name of the particle age datablock (Gadget2 format only) gadget_scale_v =1.0D5 ! Gadget file velocity unit ic_mag_axis_z =1.0 ! Magnetic field normal vector z-component ic_nfile =1 ! If greater than one, look for files with name matching ic_file//'.n' IG_rho =1.0D-6 ! Intergalactic gas density ic_mag_scale_B =0.0 ! Foreground toroidal magnetic field value ic_mag_const =0.0,0.0,0.0 ! Background magnetic field value for x,y,z component IG_T2 =1.0D6 ! Intergalactic gas temperature ic_mag_axis_y =0.0 ! Magnetic field normal vector y-component gadget_scale_t =3.15360e+13 ! Gadget file time unit ic_id_name ='ID ' ! Name of the particle identifier datablock (Gadget2 format only) cosmo_add_gas_index = -1 ! Gas particle type index for cosmo runs ic_scale_age =1.0 ! Scaling factor for the particles age ic_file ='mera_spiral.g2' ! Name of the initial conditions file ic_mag_scale_R =1.0 ! Toroidal magnetic field scalelength IG_metal =1.0D-4 ! Intergalactic gas metallicity ic_scale_pos =1.0 ! Scaling factor for the position vector ic_mag_scale_H =1.0 ! Toroidal magnetic field scaleheight ic_scale_mass =1.0 ! Scaling factor for the mass ic_pos_name ='POS ' ! Name of the position vector datablock (Gadget2 format only) gadget_scale_m =1.9891D43 ! Gadget file mass unit ic_ifout =1 ! Change ramses output index for restarts ic_mag_center_x =0.0 ! x-coordinate of the magnetic field symmetry center &INIT_PARAMS initfile(1) ='./' !initfile(1) ='./' filetype ='dice' &REFINE_PARAMS interpol_var =1 !primitive interpol_type =2 !0 m_refine =20,20,20,20,20,20,20,20,20,20 mass_sph = 1.000276597482903e-6 ! 1e3 Msol !interpol_var =0 !conservatives &BOUNDARY_PARAMS jbound_min = 0, 0,-1,+1,-1,-1 ibound_max =-1,+1,+1,+1,+1,+1 jbound_max = 0, 0,-1,+1,+1,+1 kbound_max = 0, 0, 0, 0,-1,+1 ibound_min =-1,+1,-1,-1,-1,-1 bound_type = 2, 2, 2, 2, 2, 2 !2 kbound_min = 0, 0, 0, 0,-1,+1 no_inflow =.true. nboundary = 6 &AMR_PARAMS npartmax = 500000 levelmin =6 !3 nexpand =1 boxlen =100. !kpc levelmax =6 !7 ngridmax = 100000 &FEEDBACK_PARAMS f_ek =0. !t_diss = 1. !Myr eta_sn =0.2 t_sne =10. !10. !Myr !delayed_cooling =.true. &CLUMPFIND_PARAMS density_threshold =3 ivar_clump =1 &OUTPUT_PARAMS tend =10 !Final time of the simulation delta_tout =0.1 !Time increment between outputs &POISSON_PARAMS gravity_type =-3 &SF_PARAMS T2_star = 1e4 n_star = 1 m_star = 1. ! in units mass_sph eps_star = 0.02 !2% &COOLING_PARAMS metal =.true. cooling =.true. z_ave =1. &RUN_PARAMS pic =.true. poisson =.true. clumpfind =true nremap =5 !10 ncontrol =1 !frequency of screen output verbose =.false. nrestart =0 hydro =.true. nsubcycle =20*2 [Mera]: Grid overview ============================ ngridmax = 100000 nstep_coarse = 0 nx = 3 ny = 3 nz = 3 nlevelmax = 6 nboundary = 6 ngrid_current = 13349 bound_key ==> length(5) cpu_read ==> length(5) [Mera]: Particle overview =============================== eta_sn = 0.0 age_sn = 0.6708241192497574 f_w = 0.0 Npart = 0 Ndm = 39970 Nstars = 5500 Nsinks = 0 Ncloud = 0 Ndebris = 0 Nother = 0 Nundefined = 0 other_tracer1 = 0 debris_tracer = 0 cloud_tracer = 0 star_tracer = 0 other_tracer2 = 0 gas_tracer = 0 [Mera]: Compilation file overview ======================================== compile_date = patch_dir = remote_repo = local_branch = last_commit = [Mera]: Makefile content ================================= ############################################################################# # If you have problems with this makefile, contact Romain.Teyssier@gmail.com ############################################################################# # Compilation time parameters NVECTOR = 64 #32 NDIM = 3 NPRE = 8 NVAR = 6 NENER = 0 SOLVER = hydro #PATCH = /data1/mabe/MeraTest/Ramses/patch_uniform_density PATCH = /data2/mabe/MeraTest/Ramses/patch_2019_10version GRACKLE = 0 EXEC = ramses_mera_spiral#ramses_mera_udensity # Set to one to use 'include "mpif.h"' instead of more recent "use mpi" OLD_MPI_SUPPORT = 0 ############################################################################# #GITBRANCH = $(shell git rev-parse --abbrev-ref HEAD) #GITHASH = $(shell git log --pretty=format:'%H' -n 1) #GITREMOTE = $(shell git config --get branch.$(GITBRANCH).remote) #GITREPO = $(shell git config --get remote.$(GITREMOTE).url) #BUILDDATE = $(shell date +"%D-%T") DEFINES = -DNVECTOR=$(NVECTOR) -DNDIM=$(NDIM) -DNPRE=$(NPRE) -DNENER=$(NENER) -DNVAR=$(NVAR) \ -DSOLVER$(SOLVER) ifeq ($(GRACKLE),1) DEFINES += -Dgrackle endif ifeq ($(OLD_MPI_SUPPORT),1) DEFINES += -DMPI_OLD endif ############################################################################# # Fortran compiler options and directives # --- No MPI, gfortran ------------------------------- ###F90 = gfortran -O3 -frecord-marker=4 -fbacktrace -ffree-line-length-none -g -fimplicit-none ###FFLAGS = -x f95-cpp-input $(DEFINES) -DWITHOUTMPI # --- No MPI, tau ---------------------------------- #F90 = tau_f90.sh -optKeepFiles -optPreProcess -optCPPOpts=$(DEFINES) -DWITHOUTMPI # --- No MPI, pgf90 ---------------------------------- #F90 = pgf90 #FFLAGS = -Mpreprocess $(DEFINES) -DWITHOUTMPI # --- No MPI, xlf ------------------------------------ #F90 = xlf #FFLAGS = -WF,-DNDIM=$(NDIM),-DNPRE=$(NPRE),-DNVAR=$(NVAR),-DSOLVER$(SOLVER),-DWITHOUTMPI -qfree=f90 -qsuffix=f=f90 -qsuffix=cpp=f90 # --- No MPI, f90 ------------------------------------ #F90 = f90 #FFLAGS = -cpp $(DEFINES) -DWITHOUTMPI # --- No MPI, ifort ---------------------------------- #F90 = ifort #FFLAGS = -cpp $(DEFINES) -DWITHOUTMPI # --- MPI, gfortran syntax ------------------------------ F90 = mpif90 -frecord-marker=4 -O3 -ffree-line-length-none -g -fbacktrace -fbounds-check -Wall FFLAGS = -x f95-cpp-input $(DEFINES) # --- MPI, gfortran DEBUG syntax ------------------------------ #F90 = mpif90 -frecord-marker=4 -ffree-line-length-none -fbacktrace -g -O -fbounds-check -Wuninitialized -Wall #FFLAGS = -x f95-cpp-input -ffpe-trap=zero,underflow,overflow,invalid -finit-real=nan $(DEFINES) # --- MPI, pgf90 syntax ------------------------------ #F90 = mpif90 -O3 #FFLAGS = -Mpreprocess $(DEFINES) # --- MPI, ifort syntax ------------------------------ #F90 = mpiifort #f90 #FFLAGS = -cpp -Ofast -free $(DEFINES) -DNOSYSTEM # -Ofast -free # --- MPI, ifort syntax, additional checks ----------- #F90 = mpif90 #FFLAGS = -warn all -O0 -g -traceback -fpe0 -ftrapuv -check bounds -cpp $(DEFINES) -DNOSYSTEM # --- MPI, cray syntax, high optimisation ----------- # --- NOTE: 03 is slower, hfp3 is too aggresive #F90 = ftn #FFLAGS = -eZ $(DEFINES) -DCRAY -O2 -hfp2 -g # --- MPI, ifort syntax ------------------------------ #F90 = ftn #FFLAGS = -xAVX -g -traceback -fpp -fast $(DEFINES) -DNOSYSTEM #-DRT # --- MPI, ifort syntax, additional checks ----------- #F90 = ftn #FFLAGS = -O3 -g -traceback -fpe0 -ftrapuv -cpp $(DEFINES) -DNOSYSTEM #-DRT ############################################################################# MOD = mod ############################################################################# # MPI librairies LIBMPI = #LIBMPI = -lfmpi -lmpi -lelan # --- CUDA libraries, for Titane --- LIBCUDA = -L/opt/cuda/lib -lm -lcuda -lcudart ifeq ($(GRACKLE),1) # Add include and library install path for grackle and hdf5 here LIBS_GRACKLE = -L$(HOME)/local/lib -lgrackle -lhdf5 -lz -lgfortran -ldl LIBS_OBJ = -I$(HOME)/local/include -DCONFIG_BFLOAT_8 -DH5_USE_16_API -fPIC endif LIBS = $(LIBMPI) $(LIBS_GRACKLE) ############################################################################# # Sources directories are searched in this exact order VPATH = $(shell [ -z $(PATCH) ] || find $(PATCH) -type d):../$(SOLVER):../aton:../hydro:../pm:../poisson:../amr:../io ############################################################################# # All objects MODOBJ = mpi_mod.o amr_parameters.o amr_commons.o random.o pm_parameters.o pm_commons.o poisson_parameters.o dump_utils.o constants.o ifeq ($(GRACKLE),1) MODOBJ += grackle_parameters.o endif MODOBJ += poisson_commons.o hydro_parameters.o hydro_commons.o cooling_module.o bisection.o sparse_mat.o \ clfind_commons.o gadgetreadfile.o write_makefile.o write_patch.o #write_makefile.o write_patch.o write_gitinfo.o AMROBJ = read_params.o init_amr.o init_time.o init_refine.o adaptive_loop.o amr_step.o update_time.o \ output_amr.o flag_utils.o physical_boundaries.o virtual_boundaries.o refine_utils.o nbors_utils.o \ hilbert.o load_balance.o title.o sort.o cooling_fine.o units.o light_cone.o memory.o \ end.o movie.o # Particle-Mesh objects PMOBJ = init_part.o output_part.o rho_fine.o synchro_fine.o move_fine.o newdt_fine.o particle_tree.o \ add_list.o remove_list.o star_formation.o sink_particle.o feedback.o clump_finder.o clump_merger.o \ flag_formation_sites.o init_sink.o output_sink.o # Poisson solver objects POISSONOBJ = init_poisson.o phi_fine_cg.o interpol_phi.o force_fine.o multigrid_coarse.o multigrid_fine_commons.o \ multigrid_fine_fine.o multigrid_fine_coarse.o gravana.o boundary_potential.o rho_ana.o output_poisson.o # Hydro objects HYDROOBJ = init_hydro.o init_flow_fine.o write_screen.o output_hydro.o courant_fine.o godunov_fine.o \ uplmde.o umuscl.o interpol_hydro.o godunov_utils.o condinit.o hydro_flag.o hydro_boundary.o \ boundana.o read_hydro_params.o synchro_hydro_fine.o # Patch objects sinclude $(PATCH)/Makefile # All objects AMRLIB =$(AMROBJ) $(HYDROOBJ) $(PMOBJ) $(POISSONOBJ) # ATON objects ATON_MODOBJ = timing.o radiation_commons.o rad_step.o ATON_OBJ = observe.o init_radiation.o rad_init.o rad_boundary.o rad_stars.o rad_backup.o ../aton/atonlib/libaton.a ############################################################################# ramses: $(MODOBJ) $(AMRLIB) ramses.o $(F90) $(MODOBJ) $(AMRLIB) ramses.o -o $(EXEC)$(NDIM)d $(LIBS) rm write_makefile.f90 rm write_patch.f90 ramses_aton: $(MODOBJ) $(ATON_MODOBJ) $(AMRLIB) $(ATON_OBJ) ramses.o $(F90) $(MODOBJ) $(ATON_MODOBJ) $(AMRLIB) $(ATON_OBJ) ramses.o -o $(EXEC)$(NDIM)d $(LIBS) $(LIBCUDA) rm write_makefile.f90 rm write_patch.f90 ############################################################################# #write_gitinfo.o: FORCE # $(F90) $(FFLAGS) -DPATCH=\'$(PATCH)\' -DGITBRANCH=\'$(GITBRANCH)\' -DGITHASH=\'"$(GITHASH)"\' \ -DGITREPO=\'$(GITREPO)\' -DBUILDDATE=\'"$(BUILDDATE)"\' -c ../amr/write_gitinfo.f90 -o $@ write_makefile.o: FORCE ../utils/scripts/cr_write_makefile.sh $(MAKEFILE_LIST) $(F90) $(FFLAGS) -c write_makefile.f90 -o $@ write_patch.o: FORCE ../utils/scripts/cr_write_patch.sh $(PATCH) $(F90) $(FFLAGS) -c write_patch.f90 -o $@ %.o:%.F $(F90) $(FFLAGS) -c $^ -o $@ $(LIBS_OBJ) %.o:%.f90 $(F90) $(FFLAGS) -c $^ -o $@ $(LIBS_OBJ) FORCE: ############################################################################# clean: rm -f *.o *.$(MOD) *.i ############################################################################# [Mera]: Timer-file content ================================= -------------------------------------------------------------------- minimum average maximum standard dev std/av % rmn rmx TIMER 0.000 0.000 0.000 0.000 0.421 0.3 1 4 coarse levels 0.001 0.001 0.001 0.000 0.017 99.7 1 4 particles 0.001 100.0 TOTAL [Mera]: List of files-content ================================= (:makefile, :timerfile, :patchfile) -------------------------------------- [ Info: hydro data inspection: -------------------------------------- [Mera]: 2025-07-04T17:23:56.161 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:23:56.165 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :18.000962257385254 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:57.032 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:23:57.036 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :18.000962257385254 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:23:57.822 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:23:57.826 Key vars=(:cx, :cy, :cz) Using var(s)=(1,) = (:rho,) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :8.000537872314453 MB ------------------------------------------------------- Ncol_flag1 = true [Mera]: Get hydro data: 2025-07-04T17:23:59.187 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2) = (:rho, :vx) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :10.000622749328613 MB ------------------------------------------------------- Ncol_flag2 = true [Mera]: Get hydro data: 2025-07-04T17:24:01.215 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5) = (:rho, :vx, :vy, :vz, :p) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :16.000877380371094 MB ------------------------------------------------------- Ncol_flag3 = true [Mera]: 2025-07-04T17:24:02.772 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:24:02.776 Key vars=(:cx, :cy, :cz) Using var(s)=(-1, 1) = (:cpu, :rho) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :10.000622749328613 MB ------------------------------------------------------- flag1: CPU numbers loaded = true [Mera]: Get hydro data: 2025-07-04T17:24:04.380 Key vars=(:cx, :cy, :cz) Using var(s)=(-1, 1, 2, 3, 4, 5, 6) = (:cpu, :rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :20.001047134399414 MB ------------------------------------------------------- flag2: CPU numbers loaded = true [Mera]: 2025-07-04T17:24:06.123 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:24:06.127 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :18.000962257385254 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:24:06.950 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:24:06.954 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :18.000962257385254 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:24:07.718 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:24:07.723 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :18.000962257385254 MB ------------------------------------------------------- min-rho: 3.2272343687298494e-8 [Mera]: 2025-07-04T17:24:08.513 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:24:08.517 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :18.000962257385254 MB ------------------------------------------------------- min-p: 1.0e-7 [Mera]: 2025-07-04T17:24:09.857 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:24:09.860 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :18.000962257385254 MB ------------------------------------------------------- data ==> JuliaDB table: (:cx, :cy, :cz, :rho, :vx, :vy, :vz, :p, :var6) info ==> subfields: (:output, :path, :fnames, :simcode, :mtime, :ctime, :ncpu, :ndim, :levelmin, :levelmax, :boxlen, :time, :aexp, :H0, :omega_m, :omega_l, :omega_k, :omega_b, :unit_l, :unit_d, :unit_m, :unit_v, :unit_t, :gamma, :hydro, :nvarh, :nvarp, :nvarrt, :variable_list, :gravity_variable_list, :particles_variable_list, :rt_variable_list, :clumps_variable_list, :sinks_variable_list, :descriptor, :amr, :gravity, :particles, :rt, :clumps, :sinks, :namelist, :namelist_content, :headerfile, :makefile, :files_content, :timerfile, :compilationfile, :patchfile, :Narraysize, :scale, :grid_info, :part_info, :compilation, :constants) lmin = 6 lmax = 6 boxlen = 100.0 ranges = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0] selected_hydrovars = [1, 2, 3, 4, 5, 6] smallr = 0.0 smallc = 0.0 scale ==> subfields: (:Mpc, :kpc, :pc, :mpc, :ly, :Au, :km, :m, :cm, :mm, :μm, :Mpc3, :kpc3, :pc3, :mpc3, :ly3, :Au3, :km3, :m3, :cm3, :mm3, :μm3, :Msol_pc3, :Msun_pc3, :g_cm3, :Msol_pc2, :Msun_pc2, :g_cm2, :Gyr, :Myr, :yr, :s, :ms, :Msol, :Msun, :Mearth, :Mjupiter, :g, :km_s, :m_s, :cm_s, :nH, :erg, :g_cms2, :T_mu, :K_mu, :T, :K, :Ba, :g_cm_s2, :p_kB, :K_cm3) [Mera]: 2025-07-04T17:24:10.530 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:24:10.533 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:24:10.537 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :18.000962257385254 MB ------------------------------------------------------- Calculating... hydro data inspection: Error During Test at /home/pkgeval/.julia/packages/Mera/y3DCP/test/general.jl:260 Test threw exception Expression: hydro_dataoverview(output, path) FieldError: type Core.TypeName has no field `mt`, available fields: `name`, `module`, `singletonname`, `names`, `atomicfields`, `constfields`, `wrapper`, `Typeofwrapper`, `cache`, `linearcache`, `partial`, `hash`, `max_args`, `n_uninitialized`, `flags`, `cache_entry_count`, `max_methods`, `constprop_heuristic` Stacktrace: [1] getproperty(x::Core.TypeName, f::Symbol) @ Base ./Base_compiler.jl:57 [2] nicename(f::Function) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:576 [3] (::IndexedTables.var"#init_funcs##0#init_funcs##1")(g::Function) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:598 [4] map @ ./tuple.jl:360 [inlined] [5] init_funcs(f::Tuple{typeof(min), typeof(max)}, isvec::Bool) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:587 [6] init_inputs(f::Tuple{typeof(min), typeof(max)}, input::Vector{Float64}, isvec::Bool) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:615 [7] _reduce_select(f::Tuple{typeof(min), typeof(max)}, t::IndexedTable{StructArrays.StructVector{@NamedTuple{cx::Int64, cy::Int64, cz::Int64, rho::Float64, vx::Float64, vy::Float64, vz::Float64, p::Float64, var6::Float64}, @NamedTuple{cx::Vector{Int64}, cy::Vector{Int64}, cz::Vector{Int64}, rho::Vector{Float64}, vx::Vector{Float64}, vy::Vector{Float64}, vz::Vector{Float64}, p::Vector{Float64}, var6::Vector{Float64}}, Int64}}, select::Symbol) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/reduce.jl:37 [8] reduce(f::Tuple{typeof(min), typeof(max)}, t::IndexedTable{StructArrays.StructVector{@NamedTuple{cx::Int64, cy::Int64, cz::Int64, rho::Float64, vx::Float64, vy::Float64, vz::Float64, p::Float64, var6::Float64}, @NamedTuple{cx::Vector{Int64}, cy::Vector{Int64}, cz::Vector{Int64}, rho::Vector{Float64}, vx::Vector{Float64}, vy::Vector{Float64}, vz::Vector{Float64}, p::Vector{Float64}, var6::Vector{Float64}}, Int64}}; select::Symbol, kws::@Kwargs{}) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/reduce.jl:33 [9] macro expansion @ ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:508 [inlined] [10] macro expansion @ ~/.julia/packages/ProgressMeter/kniaW/src/ProgressMeter.jl:1021 [inlined] [11] dataoverview(dataobject::HydroDataType; verbose::Bool) @ Mera ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:487 [12] dataoverview @ ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:452 [inlined] [13] hydro_dataoverview(output::Int64, path::String) @ Main ~/.julia/packages/Mera/y3DCP/test/inspection/01_hydro_inspection.jl:127 [14] eval_test_function(func::Any, args::Any, kwargs::Any, quoted_func::Union{Expr, Symbol}, source::LineNumberNode, negate::Bool) @ Test /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:384 [15] top-level scope @ ~/.julia/packages/Mera/y3DCP/test/general.jl:246 [16] macro expansion @ /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:1855 [inlined] [17] macro expansion @ ~/.julia/packages/Mera/y3DCP/test/general.jl:260 [inlined] [18] macro expansion @ /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:738 [inlined] [Mera]: 2025-07-04T17:24:12.157 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:24:12.160 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :18.000962257385254 MB ------------------------------------------------------- -------------------------------------- [ Info: hydro selected ranges: -------------------------------------- [Mera]: 2025-07-04T17:24:12.691 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= -------------------------------------- [ Info: particle data inspection: -------------------------------------- [Mera]: 2025-07-04T17:24:12.708 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:24:12.711 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :3.3836135864257812 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:24:16.356 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:24:16.359 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :3.3836135864257812 MB ------------------------------------------------------- loaded particles: 45470 information from getinfo: 45470 [Mera]: 2025-07-04T17:24:16.781 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:24:16.784 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :3.3836135864257812 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:24:17.226 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:24:17.229 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(4,) = (:mass,) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :1.648646354675293 MB ------------------------------------------------------- Ncol_flag1 = true [Mera]: Get particle data: 2025-07-04T17:24:18.330 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(4, 8) = (:mass, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :1.9956398010253906 MB ------------------------------------------------------- Ncol_flag2 = true [Mera]: 2025-07-04T17:24:19.407 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:24:19.410 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(-1, 4) = (:cpu, :mass) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :1.9956550598144531 MB ------------------------------------------------------- flag1: CPU numbers loaded = true [Mera]: Get particle data: 2025-07-04T17:24:20.583 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(-1, 1, 2, 3, 4, 5, 6, 7, 8) = (:cpu, :vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :3.7306222915649414 MB ------------------------------------------------------- flag2: CPU numbers loaded = true [Mera]: 2025-07-04T17:24:21.814 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:24:21.817 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :3.3836135864257812 MB ------------------------------------------------------- data ==> JuliaDB table: (:x, :y, :z, :id, :family, :tag, :vx, :vy, :vz, :mass, :birth, :metals) info ==> subfields: (:output, :path, :fnames, :simcode, :mtime, :ctime, :ncpu, :ndim, :levelmin, :levelmax, :boxlen, :time, :aexp, :H0, :omega_m, :omega_l, :omega_k, :omega_b, :unit_l, :unit_d, :unit_m, :unit_v, :unit_t, :gamma, :hydro, :nvarh, :nvarp, :nvarrt, :variable_list, :gravity_variable_list, :particles_variable_list, :rt_variable_list, :clumps_variable_list, :sinks_variable_list, :descriptor, :amr, :gravity, :particles, :rt, :clumps, :sinks, :namelist, :namelist_content, :headerfile, :makefile, :files_content, :timerfile, :compilationfile, :patchfile, :Narraysize, :scale, :grid_info, :part_info, :compilation, :constants) lmin = 6 lmax = 6 boxlen = 100.0 ranges = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0] selected_partvars = [:x, :y, :z, :id, :family, :tag, :vx, :vy, :vz, :mass, :birth, :metals] scale ==> subfields: (:Mpc, :kpc, :pc, :mpc, :ly, :Au, :km, :m, :cm, :mm, :μm, :Mpc3, :kpc3, :pc3, :mpc3, :ly3, :Au3, :km3, :m3, :cm3, :mm3, :μm3, :Msol_pc3, :Msun_pc3, :g_cm3, :Msol_pc2, :Msun_pc2, :g_cm2, :Gyr, :Myr, :yr, :s, :ms, :Msol, :Msun, :Mearth, :Mjupiter, :g, :km_s, :m_s, :cm_s, :nH, :erg, :g_cms2, :T_mu, :K_mu, :T, :K, :Ba, :g_cm_s2, :p_kB, :K_cm3) [Mera]: 2025-07-04T17:24:22.381 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:24:22.384 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:24:22.387 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :3.3836135864257812 MB ------------------------------------------------------- Calculating... particle data inspection: Error During Test at /home/pkgeval/.julia/packages/Mera/y3DCP/test/general.jl:291 Test threw exception Expression: particles_dataoverview(output, path) FieldError: type Core.TypeName has no field `mt`, available fields: `name`, `module`, `singletonname`, `names`, `atomicfields`, `constfields`, `wrapper`, `Typeofwrapper`, `cache`, `linearcache`, `partial`, `hash`, `max_args`, `n_uninitialized`, `flags`, `cache_entry_count`, `max_methods`, `constprop_heuristic` Stacktrace: [1] getproperty(x::Core.TypeName, f::Symbol) @ Base ./Base_compiler.jl:57 [2] nicename(f::Function) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:576 [3] (::IndexedTables.var"#init_funcs##0#init_funcs##1")(g::Function) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:598 [4] map @ ./tuple.jl:360 [inlined] [5] init_funcs(f::Tuple{typeof(min), typeof(max)}, isvec::Bool) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:587 [6] init_inputs(f::Tuple{typeof(min), typeof(max)}, input::Vector{Float64}, isvec::Bool) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:615 [7] _reduce_select(f::Tuple{typeof(min), typeof(max)}, t::IndexedTable{StructArrays.StructVector{@NamedTuple{x::Float64, y::Float64, z::Float64, id::Int32, family::Int8, tag::Int8, vx::Float64, vy::Float64, vz::Float64, mass::Float64, birth::Float64, metals::Float64}, @NamedTuple{x::Vector{Float64}, y::Vector{Float64}, z::Vector{Float64}, id::Vector{Int32}, family::Vector{Int8}, tag::Vector{Int8}, vx::Vector{Float64}, vy::Vector{Float64}, vz::Vector{Float64}, mass::Vector{Float64}, birth::Vector{Float64}, metals::Vector{Float64}}, Int64}}, select::Symbol) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/reduce.jl:37 [8] reduce(f::Tuple{typeof(min), typeof(max)}, t::IndexedTable{StructArrays.StructVector{@NamedTuple{x::Float64, y::Float64, z::Float64, id::Int32, family::Int8, tag::Int8, vx::Float64, vy::Float64, vz::Float64, mass::Float64, birth::Float64, metals::Float64}, @NamedTuple{x::Vector{Float64}, y::Vector{Float64}, z::Vector{Float64}, id::Vector{Int32}, family::Vector{Int8}, tag::Vector{Int8}, vx::Vector{Float64}, vy::Vector{Float64}, vz::Vector{Float64}, mass::Vector{Float64}, birth::Vector{Float64}, metals::Vector{Float64}}, Int64}}; select::Symbol, kws::@Kwargs{}) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/reduce.jl:33 [9] dataoverview(dataobject::PartDataType; verbose::Bool) @ Mera ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:738 [10] dataoverview @ ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:698 [inlined] [11] particles_dataoverview(output::Int64, path::String) @ Main ~/.julia/packages/Mera/y3DCP/test/inspection/01_particle_inspection.jl:91 [12] eval_test_function(func::Any, args::Any, kwargs::Any, quoted_func::Union{Expr, Symbol}, source::LineNumberNode, negate::Bool) @ Test /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:384 [13] top-level scope @ ~/.julia/packages/Mera/y3DCP/test/general.jl:274 [14] macro expansion @ /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:1855 [inlined] [15] macro expansion @ ~/.julia/packages/Mera/y3DCP/test/general.jl:291 [inlined] [16] macro expansion @ /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:738 [inlined] [Mera]: 2025-07-04T17:24:23.436 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:24:23.439 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :3.3836135864257812 MB ------------------------------------------------------- -------------------------------------- [ Info: particle selected ranges: -------------------------------------- [Mera]: 2025-07-04T17:24:23.859 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:24:23.862 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :3.3836135864257812 MB ------------------------------------------------------- [Mera]: Get particle data: 2025-07-04T17:24:24.290 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Found 3.533000e+04 particles Memory used for data table :2.62933349609375 MB ------------------------------------------------------- code unit ranges: true -flag01 different data true -flag03 [Mera]: Get particle data: 2025-07-04T17:24:25.309 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Found 3.533000e+04 particles Memory used for data table :2.62933349609375 MB ------------------------------------------------------- ranges relative to a given center gives same data: true -flag4 [Mera]: Get particle data: 2025-07-04T17:24:25.742 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Found 3.533000e+04 particles Memory used for data table :2.62933349609375 MB ------------------------------------------------------- ranges given in physical units gives same data: true -flag5 [Mera]: Get particle data: 2025-07-04T17:24:26.162 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] ymin::ymax: 0.2 :: 0.8 ==> 20.0 [kpc] :: 80.0 [kpc] zmin::zmax: 0.4 :: 0.6 ==> 40.0 [kpc] :: 60.0 [kpc] Found 3.533000e+04 particles Memory used for data table :2.62933349609375 MB ------------------------------------------------------- :bc call in center argument gives same data: true -flag6 -------------------------------------- [ Info: gravity data inspection: -------------------------------------- [Mera]: 2025-07-04T17:24:26.632 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:24:26.635 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :14.000792503356934 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:24:27.837 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:24:27.840 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :14.000792503356934 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:24:28.385 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:24:28.388 Key vars=(:cx, :cy, :cz) Using var(s)=(1,) = (:epot,) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :8.000537872314453 MB ------------------------------------------------------- Ncol_flag1 = true [Mera]: Get gravity data: 2025-07-04T17:24:29.381 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2) = (:epot, :ax) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :10.000622749328613 MB ------------------------------------------------------- Ncol_flag2 = true [Mera]: 2025-07-04T17:24:30.450 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:24:30.453 Key vars=(:cx, :cy, :cz) Using var(s)=(-1, 1) = (:cpu, :epot) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :10.000622749328613 MB ------------------------------------------------------- Ncol_flag1 = true [Mera]: Get gravity data: 2025-07-04T17:24:31.585 Key vars=(:cx, :cy, :cz) Using var(s)=(-1, 1, 2, 3, 4) = (:cpu, :epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :16.000877380371094 MB ------------------------------------------------------- Ncol_flag2 = true [Mera]: 2025-07-04T17:24:32.773 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:24:32.776 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :14.000792503356934 MB ------------------------------------------------------- data ==> JuliaDB table: (:cx, :cy, :cz, :epot, :ax, :ay, :az) info ==> subfields: (:output, :path, :fnames, :simcode, :mtime, :ctime, :ncpu, :ndim, :levelmin, :levelmax, :boxlen, :time, :aexp, :H0, :omega_m, :omega_l, :omega_k, :omega_b, :unit_l, :unit_d, :unit_m, :unit_v, :unit_t, :gamma, :hydro, :nvarh, :nvarp, :nvarrt, :variable_list, :gravity_variable_list, :particles_variable_list, :rt_variable_list, :clumps_variable_list, :sinks_variable_list, :descriptor, :amr, :gravity, :particles, :rt, :clumps, :sinks, :namelist, :namelist_content, :headerfile, :makefile, :files_content, :timerfile, :compilationfile, :patchfile, :Narraysize, :scale, :grid_info, :part_info, :compilation, :constants) lmin = 6 lmax = 6 boxlen = 100.0 ranges = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0] selected_gravvars = [1, 2, 3, 4] scale ==> subfields: (:Mpc, :kpc, :pc, :mpc, :ly, :Au, :km, :m, :cm, :mm, :μm, :Mpc3, :kpc3, :pc3, :mpc3, :ly3, :Au3, :km3, :m3, :cm3, :mm3, :μm3, :Msol_pc3, :Msun_pc3, :g_cm3, :Msol_pc2, :Msun_pc2, :g_cm2, :Gyr, :Myr, :yr, :s, :ms, :Msol, :Msun, :Mearth, :Mjupiter, :g, :km_s, :m_s, :cm_s, :nH, :erg, :g_cms2, :T_mu, :K_mu, :T, :K, :Ba, :g_cm_s2, :p_kB, :K_cm3) [Mera]: 2025-07-04T17:24:33.414 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:24:33.417 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:24:33.420 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :14.000792503356934 MB ------------------------------------------------------- Calculating... gravity data inspection: Error During Test at /home/pkgeval/.julia/packages/Mera/y3DCP/test/general.jl:313 Test threw exception Expression: gravity_dataoverview(output, path) FieldError: type Core.TypeName has no field `mt`, available fields: `name`, `module`, `singletonname`, `names`, `atomicfields`, `constfields`, `wrapper`, `Typeofwrapper`, `cache`, `linearcache`, `partial`, `hash`, `max_args`, `n_uninitialized`, `flags`, `cache_entry_count`, `max_methods`, `constprop_heuristic` Stacktrace: [1] getproperty(x::Core.TypeName, f::Symbol) @ Base ./Base_compiler.jl:57 [2] nicename(f::Function) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:576 [3] (::IndexedTables.var"#init_funcs##0#init_funcs##1")(g::Function) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:598 [4] map @ ./tuple.jl:360 [inlined] [5] init_funcs(f::Tuple{typeof(min), typeof(max)}, isvec::Bool) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:587 [6] init_inputs(f::Tuple{typeof(min), typeof(max)}, input::Vector{Float64}, isvec::Bool) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/columns.jl:615 [7] _reduce_select(f::Tuple{typeof(min), typeof(max)}, t::IndexedTable{StructArrays.StructVector{@NamedTuple{cx::Int64, cy::Int64, cz::Int64, epot::Float64, ax::Float64, ay::Float64, az::Float64}, @NamedTuple{cx::Vector{Int64}, cy::Vector{Int64}, cz::Vector{Int64}, epot::Vector{Float64}, ax::Vector{Float64}, ay::Vector{Float64}, az::Vector{Float64}}, Int64}}, select::Symbol) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/reduce.jl:37 [8] reduce(f::Tuple{typeof(min), typeof(max)}, t::IndexedTable{StructArrays.StructVector{@NamedTuple{cx::Int64, cy::Int64, cz::Int64, epot::Float64, ax::Float64, ay::Float64, az::Float64}, @NamedTuple{cx::Vector{Int64}, cy::Vector{Int64}, cz::Vector{Int64}, epot::Vector{Float64}, ax::Vector{Float64}, ay::Vector{Float64}, az::Vector{Float64}}, Int64}}; select::Symbol, kws::@Kwargs{}) @ IndexedTables ~/.julia/packages/IndexedTables/jCk1w/src/reduce.jl:33 [9] macro expansion @ ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:616 [inlined] [10] macro expansion @ ~/.julia/packages/ProgressMeter/kniaW/src/ProgressMeter.jl:1021 [inlined] [11] dataoverview(dataobject::GravDataType; verbose::Bool) @ Mera ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:595 [12] dataoverview @ ~/.julia/packages/Mera/y3DCP/src/functions/overview.jl:560 [inlined] [13] gravity_dataoverview(output::Int64, path::String) @ Main ~/.julia/packages/Mera/y3DCP/test/inspection/01_gravity_inspection.jl:85 [14] eval_test_function(func::Any, args::Any, kwargs::Any, quoted_func::Union{Expr, Symbol}, source::LineNumberNode, negate::Bool) @ Test /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:384 [15] top-level scope @ ~/.julia/packages/Mera/y3DCP/test/general.jl:305 [16] macro expansion @ /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:1855 [inlined] [17] macro expansion @ ~/.julia/packages/Mera/y3DCP/test/general.jl:313 [inlined] [18] macro expansion @ /opt/julia/share/julia/stdlib/v1.13/Test/src/Test.jl:738 [inlined] [Mera]: 2025-07-04T17:24:34.986 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get gravity data: 2025-07-04T17:24:34.989 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :14.000792503356934 MB ------------------------------------------------------- -------------------------------------- [ Info: gravity selected ranges: -------------------------------------- [Mera]: 2025-07-04T17:24:35.522 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= -------------------------------------- [ Info: getvar hydro: -------------------------------------- Predefined vars that can be calculated for each cell/particle: ---------------------------------------------------------------- =============================[gas]:============================= -all the non derived hydro vars- :cpu, :level, :rho, :cx, :cy, :cz, :vx, :vy, :vz, :p, var6,... -derived hydro vars- :x, :y, :z :mass, :cellsize, :volume, :freefall_time :cs, :mach, :machx, :machy, :machz, :jeanslength, :jeansnumber :T, :Temp, :Temperature with p/rho :h, :hx, :hy, :hz (specific angular momentum) ==========================[particles]:========================== -all the non derived particle vars- :cpu, :level, :id, :family, :tag :x, :y, :z, :vx, :vy, :vz, :mass, :birth, :metal.... -derived particle vars- :age ===========================[gravity]:=========================== -all the non derived gravity vars- :cpu, :level, cx, cy, cz, :epot, :ax, :ay, :az -derived gravity vars- :x, :y, :z :cellsize, :volume ===========================[clumps]:=========================== :peak_x or :x, :peak_y or :y, :peak_z or :z :v, :ekin,... =====================[gas or particles]:======================= :v, :ekin related to a given center: --------------------------- :r_cylinder, :r_sphere (radial components) :ϕ :vr_cylinder :vϕ_cylinder ---------------------------------------------------------------- -------------------------------------- [ Info: getvar particles: -------------------------------------- -------------------------------------- [ Info: projection hydro: -------------------------------------- Predefined vars for projections: ------------------------------------------------ =====================[gas]:===================== -all the non derived hydro vars- :cpu, :level, :rho, :cx, :cy, :cz, :vx, :vy, :vz, :p, var6,... further possibilities: :rho, :density, :ρ -derived hydro vars- :x, :y, :z :sd or :Σ or :surfacedensity :mass, :cellsize, :freefall_time :cs, :mach, :machx, :machy, :machz, :jeanslength, :jeansnumber :t, :Temp, :Temperature with p/rho ==================[particles]:================== all the non derived vars: :cpu, :level, :id, :family, :tag :x, :y, :z, :vx, :vy, :vz, :mass, :birth, :metal.... -derived particle vars- :age ==============[gas or particles]:=============== :v, :ekin squared => :vx2, :vy2, :vz2 velocity dispersion => σx, σy, σz, σ related to a given center: --------------------------- :vr_cylinder, vr_sphere (radial components) :vϕ_cylinder, :vθ squared => :vr_cylinder2, :vϕ_cylinder2 velocity dispersion => σr_cylinder, σϕ_cylinder 2d maps (not projected) => :r_cylinder, :ϕ ------------------------------------------------ [Mera]: 2025-07-04T17:24:48.484 center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Selected var(s)=(:mass, :sd) Weighting = :mass Effective resolution: 2048^2 Map size: 2048 x 2048 Pixel size: 48.828 [pc] Simulation min.: 1.563 [kpc] [Mera]: 2025-07-04T17:24:50.438 center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Selected var(s)=(:mass, :sd) Weighting = :mass Effective resolution: 2048^2 Map size: 2048 x 2048 Pixel size: 48.828 [pc] Simulation min.: 1.563 [kpc] -------------------------------------- [ Info: projection particle/stars: -------------------------------------- [Mera]: 2025-07-04T17:24:56.561 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Effective resolution: 64^2 Pixel size: 1.563 [kpc] Simulation min.: 1.563 [kpc] :mask provided by function [Mera]: 2025-07-04T17:25:01.800 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Effective resolution: 64^2 Pixel size: 1.563 [kpc] Simulation min.: 1.563 [kpc] :mask provided by function [Mera]: 2025-07-04T17:25:04.809 center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Effective resolution: 32^2 Pixel size: 3.125 [kpc] Simulation min.: 1.563 [kpc] :mask provided by function [Mera]: 2025-07-04T17:25:05.240 center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Effective resolution: 2048^2 Pixel size: 48.828 [pc] Simulation min.: 1.563 [kpc] :mask provided by function [Mera]: 2025-07-04T17:25:05.775 center: [0.5, 0.5, 0.5] ==> [50.0 [kpc] :: 50.0 [kpc] :: 50.0 [kpc]] domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Effective resolution: 2048^2 Pixel size: 48.828 [pc] Simulation min.: 1.563 [kpc] :mask provided by function -------------------------------------- [ Info: Write/Read MERA files: -------------------------------------- [Mera]: 2025-07-04T17:25:07.249 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:25:07.253 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :18.000962257385254 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:07.795 Create file: output_00001.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: hydro - Data variables: (:cx, :cy, :cz, :rho, :vx, :vy, :vz, :p, :var6) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x8a, 0xa2], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ----------------------------------- Memory size: 18.407 MB (uncompressed) Total file size: 1.314 MB ----------------------------------- [Mera]: 2025-07-04T17:25:08.477 Mera-file output_00001.jld2 contains: Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x8a, 0xa2], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 18.406519889831543 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 1.314 MB ----------------------------------- flag1: hydro in jld2 file? true [Mera]: 2025-07-04T17:25:08.487 Create file: output_00001.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: hydro - Data variables: (:cx, :cy, :cz, :rho, :vx, :vy, :vz, :p, :var6) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ----------------------------------- Memory size: 18.407 MB (uncompressed) Total file size: 1.314 MB ----------------------------------- [Mera]: 2025-07-04T17:25:08.871 Create file: output_00001.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: hydro - Data variables: (:cx, :cy, :cz, :rho, :vx, :vy, :vz, :p, :var6) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ----------------------------------- Memory size: 18.407 MB (uncompressed) Total file size: 1.314 MB ----------------------------------- [Mera]: 2025-07-04T17:25:09.782 Mera-file output_00001.jld2 contains: Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 18.406519889831543 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 1.314 MB ----------------------------------- flag2: hydro in jld2 file? true [Mera]: Get particle data: 2025-07-04T17:25:09.792 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :3.3836135864257812 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:10.206 Create file: output_00001.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: particles - Data variables: (:x, :y, :z, :id, :family, :tag, :vx, :vy, :vz, :mass, :birth, :metals) ----------------------------------- I/O mode: append - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0xd0, 0x5e, 0x74, 0x1b, 0xd4, 0x72, 0x00, 0x00, 0x90, 0x74, 0x17, 0x68, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ----------------------------------- Memory size: 3.789 MB (uncompressed) Total file size: 4.585 MB ----------------------------------- [Mera]: Get gravity data: 2025-07-04T17:25:11.320 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :14.000792503356934 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:12.018 Create file: output_00001.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: gravity - Data variables: (:cx, :cy, :cz, :epot, :ax, :ay, :az) ----------------------------------- I/O mode: append - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ----------------------------------- Memory size: 14.406 MB (uncompressed) Total file size: 6.37 MB ----------------------------------- [Mera]: 2025-07-04T17:25:13.481 Mera-file output_00001.jld2 contains: Datatype: particles merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0xd0, 0x5e, 0x74, 0x1b, 0xd4, 0x72, 0x00, 0x00, 0x90, 0x74, 0x17, 0x68, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 3.789407730102539 MB (uncompressed) Datatype: gravity merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 14.40633487701416 MB (uncompressed) Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 18.406519889831543 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 6.37 MB ----------------------------------- flag3: hydro in jld2 file? true flag4: gravity in jld2 file? true flag5: particles in jld2 file? true [Mera]: 2025-07-04T17:25:13.519 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:25:13.523 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :18.000962257385254 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:14.375 Open Mera-file output_00001.jld2: [Mera]: 2025-07-04T17:25:14.375 Use datatype: hydro Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:25:14.531 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :18.403544425964355 MB ------------------------------------------------------- flag1: data load hydro: true [Mera]: Get particle data: 2025-07-04T17:25:15.142 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :3.3836135864257812 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:15.792 Open Mera-file output_00001.jld2: [Mera]: 2025-07-04T17:25:15.792 Use datatype: particles Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:25:15.922 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :3.786226272583008 MB ------------------------------------------------------- flag2: data load particles: true [Mera]: Get gravity data: 2025-07-04T17:25:15.966 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :14.000792503356934 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:16.805 Open Mera-file output_00001.jld2: [Mera]: 2025-07-04T17:25:16.805 Use datatype: gravity Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:25:17.607 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :14.40334415435791 MB ------------------------------------------------------- flag3: data load gravity: true [Mera]: 2025-07-04T17:25:18.077 Open Mera-file output_00001.jld2: [Mera]: 2025-07-04T17:25:18.077 Use datatype: hydro Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:25:18.140 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :18.403544425964355 MB ------------------------------------------------------- flag4: data load hydro: true [Mera]: 2025-07-04T17:25:18.180 Open Mera-file output_00001.jld2: [Mera]: 2025-07-04T17:25:18.180 Use datatype: hydro Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:25:18.233 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :18.403544425964355 MB ------------------------------------------------------- flag5: data load hydro: true [Mera]: 2025-07-04T17:25:18.272 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:25:18.276 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :3.3836135864257812 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:18.839 Create file: output_00001.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: particles - Data variables: (:x, :y, :z, :id, :family, :tag, :vx, :vy, :vz, :mass, :birth, :metals) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x50, 0x6e, 0x0c, 0x1c, 0xd4, 0x72, 0x00, 0x00, 0x90, 0x74, 0x17, 0x68, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ----------------------------------- Memory size: 3.789 MB (uncompressed) Total file size: 3.288 MB ----------------------------------- [Mera]: 2025-07-04T17:25:19.204 Mera-file output_00001.jld2 contains: Datatype: particles merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x50, 0x6e, 0x0c, 0x1c, 0xd4, 0x72, 0x00, 0x00, 0x90, 0x74, 0x17, 0x68, 0xd4, 0x72, 0x00, 0x00, 0x10, 0x74, 0x17], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 3.789407730102539 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 3.288 MB ----------------------------------- [Mera]: Get gravity data: 2025-07-04T17:25:19.220 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :14.000792503356934 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:19.956 Create file: output_00001.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: gravity - Data variables: (:cx, :cy, :cz, :epot, :ax, :ay, :az) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x6f, 0x6c, 0x28, 0x6a, 0x2c, 0x31, 0x29, 0x3d, 0x64, 0x67, 0x28, 0x6a, 0x2c], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ----------------------------------- Memory size: 14.406 MB (uncompressed) Total file size: 1.803 MB ----------------------------------- [Mera]: 2025-07-04T17:25:20.173 Mera-file output_00001.jld2 contains: Datatype: gravity merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x6f, 0x6c, 0x28, 0x6a, 0x2c, 0x31, 0x29, 0x3d, 0x64, 0x67, 0x28, 0x6a, 0x2c], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 14.40633487701416 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 1.803 MB ----------------------------------- flag1: particles in jld2 file? true flag1a: no hydro in jld2 file? true flag2: gravity in jld2 file? true flag2a: no hydro in jld2 file? true [Mera]: 2025-07-04T17:25:20.187 Requested datatypes: [:hydro] [Mera]: 2025-07-04T17:25:20.187 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] reading/writing lmax: 6 of 6 ----------------------------------- Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00], false) ----------------------------------- - hydro [Mera]: Get hydro data: 2025-07-04T17:25:20.196 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :18.000962257385254 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:21.005 Create file: output_00001.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: hydro - Data variables: (:cx, :cy, :cz, :rho, :vx, :vy, :vz, :p, :var6) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ----------------------------------- Memory size: 18.407 MB (uncompressed) Total file size: 1.314 MB ----------------------------------- Total datasize: - total folder: 47.342 MB - selected: 28.163 MB - used: 18.407 MB - new on disc: 1.314 MB [Mera]: 2025-07-04T17:25:21.171 Mera-file output_00001.jld2 contains: Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 18.406519889831543 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 1.314 MB ----------------------------------- [Mera]: 2025-07-04T17:25:21.198 Mera-file output_00001.jld2 contains: Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 18.406519889831543 MB (uncompressed) ----------------------------------- convert stat: true ----------------------------------- Total file size: 1.335 MB ----------------------------------- flag1: hydro in jld2 file? true flag1a: particles not in jld2 file? true [Mera]: 2025-07-04T17:25:21.215 Requested datatypes: [:hydro] [Mera]: 2025-07-04T17:25:21.215 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] reading/writing lmax: 6 of 6 ----------------------------------- Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00], false) ----------------------------------- - hydro [Mera]: Get hydro data: 2025-07-04T17:25:21.224 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :18.000962257385254 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:22.796 Create file: output_00001.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: hydro - Data variables: (:cx, :cy, :cz, :rho, :vx, :vy, :vz, :p, :var6) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ----------------------------------- Memory size: 18.407 MB (uncompressed) Total file size: 1.314 MB ----------------------------------- Total datasize: - total folder: 47.342 MB - selected: 28.163 MB - used: 18.407 MB - new on disc: 1.314 MB [Mera]: 2025-07-04T17:25:22.937 Mera-file output_00001.jld2 contains: Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 18.406519889831543 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 1.314 MB ----------------------------------- [Mera]: 2025-07-04T17:25:22.964 Mera-file output_00001.jld2 contains: Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 18.406519889831543 MB (uncompressed) ----------------------------------- convert stat: true ----------------------------------- Total file size: 1.335 MB ----------------------------------- flag2: hydro in jld2 file? true flag2a: particles not in jld2 file? true [Mera]: 2025-07-04T17:25:22.983 Requested datatypes: [:hydro, :gravity, :particles, :clumps] [Mera]: 2025-07-04T17:25:22.983 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] reading/writing lmax: 6 of 6 ----------------------------------- Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00], false) ----------------------------------- - hydro [Mera]: Get hydro data: 2025-07-04T17:25:22.992 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :18.000962257385254 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:23.839 Create file: output_00001.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: hydro - Data variables: (:cx, :cy, :cz, :rho, :vx, :vy, :vz, :p, :var6) ----------------------------------- I/O mode: write - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ----------------------------------- Memory size: 18.407 MB (uncompressed) Total file size: 1.314 MB ----------------------------------- - gravity [Mera]: Get gravity data: 2025-07-04T17:25:24.180 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :14.000792503356934 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:24.984 Create file: output_00001.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: gravity - Data variables: (:cx, :cy, :cz, :epot, :ax, :ay, :az) ----------------------------------- I/O mode: append - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ----------------------------------- Memory size: 14.406 MB (uncompressed) Total file size: 3.099 MB ----------------------------------- - particles [Mera]: Get particle data: 2025-07-04T17:25:25.157 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :3.3836135864257812 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:25.843 Create file: output_00001.jld2 Directory: /home/pkgeval/.julia/packages/Mera/y3DCP/test/./simulations/ ----------------------------------- merafile_version: 1.0 - Simulation code: RAMSES ----------------------------------- DataType: particles - Data variables: (:x, :y, :z, :id, :family, :tag, :vx, :vy, :vz, :mass, :birth, :metals) ----------------------------------- I/O mode: append - Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00], false) ----------------------------------- JLD2 0.5.13 CodecZlib 0.7.8 CodecBzip2 0.8.5 Mera 1.7.0 CodecLz4 0.4.6 Overview of the used disc space for output: [1] ------------------------------------------------------ Folder: 47.34 MB <1.82 MB>/file AMR-Files: 8.31 MB <2.08 MB>/file Hydro-Files: 19.85 MB <3.97 MB>/file Gravity-Files: 13.24 MB <3.31 MB>/file Particle-Files: 3.56 MB <728.45 KB>/file mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ----------------------------------- Memory size: 3.789 MB (uncompressed) Total file size: 6.37 MB ----------------------------------- Total datasize: - total folder: 47.342 MB - selected: 44.957 MB - used: 36.602 MB - new on disc: 6.37 MB [Mera]: 2025-07-04T17:25:26.004 Mera-file output_00001.jld2 contains: Datatype: particles merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 3.789407730102539 MB (uncompressed) Datatype: gravity merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 14.40633487701416 MB (uncompressed) Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 18.406519889831543 MB (uncompressed) ----------------------------------- convert stat: false ----------------------------------- Total file size: 6.37 MB ----------------------------------- [Mera]: 2025-07-04T17:25:26.065 Mera-file output_00001.jld2 contains: Datatype: particles merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 3.789407730102539 MB (uncompressed) Datatype: gravity merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 14.40633487701416 MB (uncompressed) Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 18.406519889831543 MB (uncompressed) ----------------------------------- convert stat: true ----------------------------------- Total file size: 6.405 MB ----------------------------------- flag3: hydro in jld2 file? true flag4: gravity in jld2 file? true flag5: particles in jld2 file? true [Mera]: 2025-07-04T17:25:26.115 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:25:26.120 Use datatype: hydro Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:25:26.130 Use datatype: hydro Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:25:26.140 Use datatype: hydro Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:25:26.149 Use datatype: hydro Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:25:26.159 Use datatype: particles Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:25:26.169 Use datatype: gravity Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: 2025-07-04T17:25:26.181 Mera-file output_00001.jld2 contains: ├─📂 hydro │ ├─🔢 data │ ├─🔢 info │ └─📂 information │ ├─🔢 compression │ ├─🔢 comments │ ├─🔢 storage │ ├─🔢 memory │ └─📂 versions │ ├─🔢 merafile_version │ ├─🔢 JLD2compatible_versions │ ├─🔢 JLD2 │ ├─🔢 CodecZlib │ ├─🔢 CodecBzip2 │ ├─🔢 Mera │ └─🔢 CodecLz4 ├─📂 gravity │ ├─🔢 data │ ├─🔢 info │ └─📂 information │ ├─🔢 compression │ ├─🔢 comments │ ├─🔢 storage │ ├─🔢 memory │ └─📂 versions │ ├─🔢 merafile_version │ ├─🔢 JLD2compatible_versions │ ├─🔢 JLD2 │ ├─🔢 CodecZlib │ ├─🔢 CodecBzip2 │ ├─🔢 Mera │ └─🔢 CodecLz4 ├─📂 particles │ ├─🔢 data │ ├─🔢 info │ └─📂 information │ ├─🔢 compression │ ├─🔢 comments │ ├─🔢 storage │ ├─🔢 memory │ └─📂 versions │ ├─🔢 merafile_version │ ├─🔢 JLD2compatible_versions │ ├─🔢 JLD2 │ ├─🔢 CodecZlib │ ├─🔢 CodecBzip2 │ ├─🔢 Mera │ └─🔢 CodecLz4 └─🔢 convertstat Datatype: particles merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 3.789407730102539 MB (uncompressed) Datatype: gravity merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 14.40633487701416 MB (uncompressed) Datatype: hydro merafile_version: 1.0 Compression: CodecLz4.LZ4FrameCompressor(Ptr{CodecLz4.LZ4F_cctx}(0x0000000000000000), Base.RefValue{CodecLz4.LZ4F_preferences_t}(CodecLz4.LZ4F_preferences_t(CodecLz4.LZ4F_frameInfo_t(0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000000000000, 0x00000000, 0x00000000), 0, 0x00000000, (0x00000000, 0x00000000, 0x00000000, 0x00000000))), UInt8[0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00], false) merafile_version: 1.0 CodecLz4: VersionNumber[v"0.4.6"] JLD2: VersionNumber[v"0.5.13"] CodecZlib: VersionNumber[v"0.7.8"] Mera: VersionNumber[v"1.7.0"] JLD2compatible_versions: (lower = v"0.1.0", upper = v"0.3.0") CodecBzip2: VersionNumber[v"0.8.5"] ------------------------- Memory: 18.406519889831543 MB (uncompressed) ----------------------------------- convert stat: true ----------------------------------- Total file size: 6.405 MB ----------------------------------- [Mera]: 2025-07-04T17:25:26.232 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:25:26.237 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4, 5, 6) = (:rho, :vx, :vy, :vz, :p, :var6) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :18.000962257385254 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:27.056 Open Mera-file output_00001.jld2: [Mera]: 2025-07-04T17:25:27.056 Use datatype: hydro Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:25:27.113 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :18.403544425964355 MB ------------------------------------------------------- flag1: data load hydro: true [Mera]: Get particle data: 2025-07-04T17:25:27.167 Key vars=(:level, :x, :y, :z, :id, :family, :tag) Using var(s)=(1, 2, 3, 4, 7, 8) = (:vx, :vy, :vz, :mass, :birth, :metallicity) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Found 4.547000e+04 particles Memory used for data table :3.3836135864257812 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:27.805 Open Mera-file output_00001.jld2: [Mera]: 2025-07-04T17:25:27.805 Use datatype: particles Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:25:27.836 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :3.786226272583008 MB ------------------------------------------------------- flag2: data load particles: true [Mera]: Get gravity data: 2025-07-04T17:25:27.880 Key vars=(:cx, :cy, :cz) Using var(s)=(1, 2, 3, 4) = (:epot, :ax, :ay, :az) domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Reading data... Memory used for data table :14.000792503356934 MB ------------------------------------------------------- [Mera]: 2025-07-04T17:25:29.416 Open Mera-file output_00001.jld2: [Mera]: 2025-07-04T17:25:29.416 Use datatype: gravity Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:25:29.454 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :14.40334415435791 MB ------------------------------------------------------- flag3: data load gravity: true [Mera]: 2025-07-04T17:25:29.504 Open Mera-file output_00001.jld2: [Mera]: 2025-07-04T17:25:29.504 Use datatype: hydro Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:25:29.556 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :18.403544425964355 MB ------------------------------------------------------- flag4: data load hydro: true [Mera]: 2025-07-04T17:25:29.607 Open Mera-file output_00001.jld2: [Mera]: 2025-07-04T17:25:29.607 Use datatype: hydro Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&UNITS_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&HYDRO_PARAMS", "&SF_PARAMS", "&DICE_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] [Mera]: 2025-07-04T17:25:29.700 domain: xmin::xmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] ymin::ymax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] zmin::zmax: 0.0 :: 1.0 ==> 0.0 [kpc] :: 100.0 [kpc] Memory used for data table :18.403544425964355 MB ------------------------------------------------------- flag5: data load hydro: true -------------------------------------- [ Info: data types: -------------------------------------- [Mera]: 2025-07-04T17:25:29.763 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get hydro data: 2025-07-04T17:25:29.768 [Mera]: 2025-07-04T17:25:29.771 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ------------------------------------------------------- gravity: true gravity-variables: (:epot, :ax, :ay, :az) ------------------------------------------------------- particles: true - Nstars: 5.500000e+03 - Ndm: 3.997000e+04 particle-variables: 8 --> (:vx, :vy, :vz, :mass, :family, :tag, :birth, :metals) particle-descriptor: (:position_x, :position_y, :position_z, :velocity_x, :velocity_y, :velocity_z, :mass, :identity, :levelp, :family, :tag, :birth_time, :metallicity) ------------------------------------------------------- rt: false clumps: false ------------------------------------------------------- namelist-file: ("&UNITS_PARAMS", "&HYDRO_PARAMS", "&DICE_PARAMS", "&INIT_PARAMS", "&REFINE_PARAMS", "&BOUNDARY_PARAMS", "&AMR_PARAMS", "&FEEDBACK_PARAMS", "&CLUMPFIND_PARAMS", "&OUTPUT_PARAMS", "&POISSON_PARAMS", "&SF_PARAMS", "&COOLING_PARAMS", "&RUN_PARAMS") ------------------------------------------------------- timer-file: true compilation-file: true makefile: true patchfile: true ======================================================= [Mera]: Get particle data: 2025-07-04T17:25:29.776 [Mera]: 2025-07-04T17:25:29.779 Code: RAMSES output [1] summary: mtime: 2025-07-04T17:23:54.602 ctime: 2025-07-04T17:23:54.602 ======================================================= simulation time: 0.0 [x] boxlen: 100.0 [kpc] ncpu: 4 ndim: 3 ------------------------------------------------------- amr: true level of uniform grid: 6 --> cellsize(s): 1.56 [kpc] ------------------------------------------------------- hydro: true hydro-variables: 6 --> (:rho, :vx, :vy, :vz, :p, :var6) hydro-descriptor: (:density, :velocity_x, :velocity_y, :velocity_z, :pressure, :metallicity) γ: 1.6667 ----------------------------------------------------- PkgEval terminated after 862.53s: test log exceeded the size limit