MPI-AMRVAC 3.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
Loading...
Searching...
No Matches
amrvac.t
Go to the documentation of this file.
1!> AMRVAC solves a set of hyperbolic equations
2!> \f$\vec{u}_t + \nabla_x \cdot \vec{f}(\vec{u}) = \vec{s}\f$
3!> using adaptive mesh refinement.
4program amrvac
5
10 use mod_usr
17 use mod_advance, only: process
19 use mod_convert, only: init_convert
20 use mod_physics
27
28
29 double precision :: time0, time_in
30 logical,save :: part_file_exists=.false.
31
32
33 call comm_start()
34
35 time0 = mpi_wtime()
36 time_advance = .false.
37 time_bc = zero
38
39 ! read command line arguments first
40 call read_arguments()
41
42 ! init_convert is called before usr_init as user might associate a convert method
43 call init_convert()
44 !> eos_init is called prior to physics module
45 call eos_init()
46 ! the user_init routine should load a physics module
47 call usr_init()
48
49 call eos_finalise() !> finalise the EoS dispatch (tables, pointers) for the loaded physics
50
51 !> The EoS dispatch is now complete. Wire it into the two lower-level modules
52 !> that must call the EoS but cannot depend on mod_eos (hence these pointers).
53 !> Both are set only when there is real work to do and guarded at the call site:
54 !> - the ghost-cell update refreshes Te/ne on boundary cells, which only the
55 !> LTE EoS needs (FI's update_eos is a no-op);
56 !> - the physics layer binds the EoS into its source terms (thermal
57 !> conduction / cooling / radiation fluid objects), set only by physics
58 !> modules that have an EoS hook.
59 if (eos%eos_type == 'LTE') update_eos_4_bc => eos%update_eos
61
62 call initialize_amrvac() !> Grid bounds are set up here (ixG^D_ etc)
63
64 if (restart_from_file /= undefined) then
65 ! restart from previous file or dat file conversion
66 ! get input data from previous AMRVAC run
67
68 ! read in dat file
69 call read_snapshot()
70
71 ! rewrite it=0 snapshot when restart from it=0 state
72 if(it==0.and.itsave(1,2)==0) snapshotnext=snapshotnext-1
73
74 if (reset_time) then
75 ! reset it and global time to original value
76 it = it_init
78 ! reset snapshot number
80 end if
81
82 if (reset_it) then
83 ! reset it to original value
84 it = it_init
85 end if
86
87 ! allow user to read extra data before filling boundary condition
88 if (associated(usr_process_grid) .or. &
89 associated(usr_process_global)) then
91 end if
92
93 ! modify initial condition
94 if (firstprocess) then
95 ! update ghost cells for all need-boundary variables before modification
96 call getbc(global_time,0.d0,ps,1,nwflux+nwaux)
97 call modify_ic
98 end if
99
100 ! select active grids
101 call selectgrids
102
103 ! update ghost cells for all need-boundary variables
104 call getbc(global_time,0.d0,ps,1,nwflux+nwaux)
105
106 ! reset AMR grid
107 if (reset_grid) then
108 call settree
109 else
110 ! set up boundary flux conservation arrays
111 if (levmax>levmin) call allocatebflux
112 end if
113
114 ! all blocks refined to the same level for output
115 if(convert .and. level_io>0 .or. level_io_min.ne.1 .or. level_io_max.ne.nlevelshi) &
117
118 {^nooned
119 ! improve initial condition after restart and modification
121 }
122
124
125 if(use_particles) then
126 call read_particles_snapshot(part_file_exists)
127 call init_gridvars()
128 if (.not. part_file_exists) call particles_create()
129 if(convert) then
130 call handle_particles()
131 call finish_gridvars()
132 call time_spent_on_particles()
133 call comm_finalize
134 stop
135 end if
136 end if
137
138 if(convert) then
139 if (npe/=1.and.(.not.(index(convert_type,'mpi')>=1)) &
140 .and. convert_type .ne. 'user') &
141 call mpistop("non-mpi conversion only uses 1 cpu")
142 if(mype==0.and.level_io>0) write(unitterm,*)'reset tree to fixed level=',level_io
143
144 !here requires -1 snapshot
146
147 if(associated(phys_special_advance)) then
148 ! e.g. calculate MF velocity from magnetic field
150 end if
151
153 call comm_finalize
154 stop
155 end if
156
157 else
158
159 ! form and initialize all grids at level one
160 call initlevelone
161
162 ! set up and initialize finer level grids, if needed
163 call settree
164
166
167 ! improve initial condition
169
170 ! select active grids
171 call selectgrids
172
173 if (use_particles) then
174 call init_gridvars()
175 call particles_create()
176 end if
177
178 end if
179
180 ! initialize something base on tree information
182
183 ! Populate the additional w state eos variables (if needed)
185
186 if (mype==0) then
187 print*,'-------------------------------------------------------------------------------'
188 write(*,'(a,f17.3,a)')' Startup phase took : ',mpi_wtime()-time0,' sec'
189 print*,'-------------------------------------------------------------------------------'
190 end if
191
192 ! an interface to allow user to do special things before the main loop
193 if (associated(usr_before_main_loop)) &
195
196 ! do time integration of all grids on all levels
197 call timeintegration()
198
199 if (mype==0) then
200 time0=mpi_wtime()-time0
201 print*,'-------------------------------------------------------------------------------'
202 write(*,'(a,f17.3,a,f17.3,a)')' Finished AMRVAC in : ',time0,' sec', dble(npe)*time0/3.6d3,' core hour'
203 print*,'-------------------------------------------------------------------------------'
204 end if
205
206 call comm_finalize
207
208contains
209
210 subroutine timeintegration()
211 use mod_timing
212 use mod_source, only: time_sts_total
214 use mod_forest, only: nleafs_active
219 use mod_dt, only: setdt
220
221
222 double precision :: time_last_print, time_write0, time_write, time_before_advance, dt_loop
223 integer(kind=8) ncells_update
224 integer :: level, ifile, ncells_block, igrid, iigrid
225 logical :: crashall
226
227 time_in=mpi_wtime()
228 time_last_print = -bigdouble
229
231
232 do ifile=nfile,1,-1
233 if(resume_previous_run) then
234 tsavelast(ifile)=aint((global_time+smalldouble)/dtsave(ifile))*dtsave(ifile)
235 itsavelast(ifile)=it/ditsave(ifile)*ditsave(ifile)
236 else
238 itsavelast(ifile)=it
239 end if
240 end do
241
242 ! the next two are used to keep track of the performance during runtime:
244 timelast=mpi_wtime()
245
246 ! ------ start of integration loop. ------------------
247 if (mype==0) then
248 write(*, '(A,ES9.2,A)') ' Start integrating, print status every ', &
249 time_between_print, ' seconds'
250 write(*, '(A4,A10,A12,A12,A12,A14)') ' #', 'it', 'time', 'dt', 'wc-time(s)', 'active_grids'
251 end if
252
253 timeloop0=mpi_wtime()
254 time_bc=0.d0
255 time_write=0.d0
256 ncells_block={(ixghi^d-2*nghostcells)*}
257 ncells_update=0
258 dt_loop=0.d0
259
260 time_advance=.true.
261
262 ! Pre-compute column mass before first advance so escape probability
263 ! is active from the very first timestep (avoids IC transient)
265
266 ! Open timing breakdown log if requested via savelist
267 if (write_timing_log .and. .not. timing_log_opened .and. mype==0) then
268 if (global_time > 1.0d-10) then
269 open(timing_unit,file=trim(base_filename)//'timing.log', &
270 status='unknown',position='append',action='write')
271 write(timing_unit,'(a,es12.5)') '# --- restart at t = ', global_time
272 else
273 open(timing_unit,file=trim(base_filename)//'timing.log', &
274 status='replace',action='write')
275 write(timing_unit,'(a)') '# MAIN: it t nleafs setdt advance tc' &
276 //' eos_hydro eos_tc regrid save process adv-tc'
277 end if
278 timing_log_opened = .true.
279 end if
280
281 time_evol : do
282
283 time_before_advance=mpi_wtime()
284 ! set time step
285 call setdt()
286
287 ! Optionally call a user method that can modify the grid variables at the
288 ! beginning of a time step
289 if (associated(usr_process_grid) .or. &
290 associated(usr_process_global)) then
292 end if
293
294 ! Check if output needs to be written
295 do ifile=nfile,1,-1
296 save_file(ifile) = timetosave(ifile)
297 end do
298
299 timeio0=mpi_wtime()
300
301 if (timeio0 - time_last_print > time_between_print) then
302 time_last_print = timeio0
303 if (mype == 0) then
304 write(*, '(A4,I10,ES12.4,ES12.4,ES12.4,I14)') " #", &
306 end if
307 end if
308
309 ! output data
310 if (any(save_file)) then
311 if(associated(usr_modify_output)) then
312 ! Users can modify or set variables before output is written
313 do iigrid=1,igridstail; igrid=igrids(iigrid);
314 ^d&dxlevel(^d)=rnode(rpdx^d_,igrid);
315 block=>ps(igrid)
316 call usr_modify_output(ixg^ll,ixm^ll,global_time,ps(igrid)%w,ps(igrid)%x)
317 end do
318 end if
319 time_write=0.d0
320 do ifile=nfile,1,-1
321 if (save_file(ifile)) then
322 time_write0=mpi_wtime()
323 call saveamrfile(ifile)
324 time_write=time_write+mpi_wtime()-time_write0
325 end if
326 end do
327 end if
328
329 ! output a snapshot when user write a file named 'savenow' in the same
330 ! folder as the executable amrvac
331 if (mype==0) inquire(file='savenow',exist=save_now)
332 if (npe>1) call mpi_bcast(save_now,1,mpi_logical,0,icomm,ierrmpi)
333
334 if (save_now) then
335 if(mype==0) write(*,'(a,i7,a,i7,a,es12.4)') ' save a snapshot No.',&
336 snapshotnext,' at it=',it,' global_time=',global_time
337 call saveamrfile(1)
338 call saveamrfile(2)
339 call mpi_file_delete('savenow',mpi_info_null,ierrmpi)
340 end if
341 timeio_tot=timeio_tot+mpi_wtime()-timeio0
342
343 pass_wall_time=mpi_wtime()-time0+dt_loop+4.d0*time_write >=wall_time_max
344
345 ! exit time loop if time is up
346 if (it>=it_max .or. global_time>=time_max .or. pass_wall_time .or. final_dt_exit) exit time_evol
347
348 ! Pre-compute column mass for escape probability cooling modification
350
351 ! solving equations
352 tw_tmp=mpi_wtime()
353 call advance(it)
354 tw_advance=mpi_wtime()-tw_tmp
355
356 ! if met unphysical values, output the last good status and stop the run
357 call mpi_allreduce(crash,crashall,1,mpi_logical,mpi_lor,icomm,ierrmpi)
358 if (crashall) then
359 call saveamrfile(1)
360 call saveamrfile(2)
361 if(mype==0) write(*,*) "Error: small value encountered, run crash."
362 call mpi_abort(icomm, iigrid, ierrmpi)
363 end if
364
365 ! Optionally call a user method that can modify the grid variables at the
366 ! end of a time step: this is for two-way coupling to PIC, e.g.
367 if (associated(usr_process_adv_grid) .or. &
368 associated(usr_process_adv_global)) then
370 end if
371
372 ! update time variables
373 it = it + 1
375
376 ! update AMR mesh and tree (upstream-style: mod-based regrid)
377 timegr0=mpi_wtime()
378 if (mod(it,ditregrid)==0 .and. refine_max_level>1 .and. .not.(fixgrid())) call resettree
379 tw_regrid=mpi_wtime()-timegr0
381
382 ! write main-loop timing to user timing log
390 if (mype==0 .and. timing_log_opened .and. &
391 mod(it, timing_log_interval)==0) then
392 write(timing_unit,'(a,i8,1x,es12.5,1x,i6,1x,9(f10.4,1x))') &
393 ' MAIN ', it, global_time, nleafs_active, &
396 call flush(timing_unit)
397 end if
398
399 if(it>9000000)then
401 itsavelast(:)=0
402 end if
403
404 ! count updated cells
405 ncells_update=ncells_update+ncells_block*nleafs_active
406
407 ! time lapses in one loop
408 dt_loop=mpi_wtime()-time_before_advance
409 end do time_evol
410
411 if(use_particles) then
412 call write_particle_output()
413 call finish_gridvars()
414 end if
415
416 time_advance=.false.
417
418 timeloop=mpi_wtime()-timeloop0
419
420 if (mype==0) then
421 write(*,'(a,f12.3,a)')' Total timeloop took : ',timeloop,' sec'
422 write(*,'(a,f12.3,a)')' Time spent on AMR : ',timegr_tot,' sec'
423 write(*,'(a,f12.2,a)')' Percentage: ',100.0*timegr_tot/timeloop,' %'
424 write(*,'(a,f12.3,a)')' Time spent on IO in loop : ',timeio_tot,' sec'
425 write(*,'(a,f12.2,a)')' Percentage: ',100.0*timeio_tot/timeloop,' %'
426 write(*,'(a,f12.3,a)')' Time spent on ghost cells : ',time_bc,' sec'
427 write(*,'(a,f12.2,a)')' Percentage: ',100.0*time_bc/timeloop,' %'
429 write(*,'(a,f12.3,a)')' Time spent on eos : ',timeeos_tot,' sec'
430 write(*,'(a,f12.2,a)')' Percentage: ',100.0*timeeos_tot/timeloop,' %'
431 write(*,'(a,f12.3,a)')' - update_eos : ',timeeos_update,' sec'
432 write(*,'(a,f12.3,a)')' - T_from_eint (TC) : ',timeeos_tfromei,' sec'
433 write(*,'(a,f12.3,a)')' - csound2 : ',timeeos_csound,' sec'
434 write(*,'(a,f12.3,a)')' - cons/prim conversion : ',timeeos_conv,' sec'
435 write(*,'(a,f12.3,a)')' - get_pthermal : ',timeeos_pthermal,' sec'
436 write(*,'(a,f12.3,a)')' Time spent on WB transform : ',time_wb_transform,' sec'
437 write(*,'(a,f12.3,a)')' Time spent on WB inverse+C : ',time_wb_inverse,' sec'
438 write(*,'(a,f12.3,a)')' Time spent on reconstruction:',time_wb_recon,' sec'
439 write(*,'(a,f12.3,a)')' Time spent on computing : ',timeloop-timeio_tot-timeeos_tot-timegr_tot-time_bc,' sec'
440 write(*,'(a,f12.2,a)')' Percentage: ',100.0*(timeloop-timeio_tot-timeeos_tot-timegr_tot-time_bc)/timeloop,' %'
441 write(*,'(a,es12.3 )')' Cells updated / proc / sec : ',dble(ncells_update)*dble(nstep)/dble(npe)/timeloop
442 end if
443
444 ! output end state
445 timeio0=mpi_wtime()
446 do ifile=nfile,1,-1
447 if(itsavelast(ifile)<it) call saveamrfile(ifile)
448 end do
449 if (mype==0) call mpi_file_close(log_fh,ierrmpi)
450 timeio_tot=timeio_tot+(mpi_wtime()-timeio0)
451
452 if (mype==0) then
453 write(*,'(a,f12.3,a)')' Total time spent on IO : ',timeio_tot,' sec'
454 write(*,'(a,f12.3,a)')' Total timeintegration took : ',mpi_wtime()-time_in,' sec'
455 write(*, '(A4,I10,ES12.3,ES12.3,ES12.3)') " #", &
457 end if
458
459 {#IFDEF RAY
460 call time_spent_on_rays
461 }
462
463 if(use_particles) call time_spent_on_particles
464
465 if (use_multigrid) call mg_timers_show(mg)
466 end subroutine timeintegration
467
468 !> Save times are defined by either tsave(isavet(ifile),ifile) or
469 !> itsave(isaveit(ifile),ifile) or dtsave(ifile) or ditsave(ifile)
470 !> tsavestart(ifile) determines first start time. This only affects
471 !> read out times determined by dtsave(ifiles).
472 !> Other conditions may be included.
473 logical function timetosave(ifile)
475
476 integer:: ifile
477 logical:: oksave
478
479 oksave=.false.
480 if (it==itsave(isaveit(ifile),ifile)) then
481 oksave=.true.
482 isaveit(ifile)=isaveit(ifile)+1
483 end if
484 if (it==itsavelast(ifile)+ditsave(ifile)) oksave=.true.
485
486 if (global_time>=tsave(isavet(ifile),ifile).and.global_time-dt<tsave(isavet(ifile),ifile)) then
487 oksave=.true.
488 isavet(ifile)=isavet(ifile)+1
489 end if
490
491 if(global_time>=tsavestart(ifile)-smalldouble)then
492 if (global_time>=tsavelast(ifile)+dtsave(ifile)-smalldouble)then
493 oksave=.true.
494 n_saves(ifile) = n_saves(ifile) + 1
495 endif
496 endif
497
498 if (oksave) then
499 tsavelast(ifile) =global_time
500 itsavelast(ifile)=it
501 end if
502 timetosave=oksave
503
504 return
505 end function timetosave
506
507 !> Return true if the AMR grid should not be adapted any more. This is
508 !> controlled by tfixgrid or itfixgrid. Other conditions may be included.
509 logical function fixgrid()
511
512 fixgrid= (global_time>=tfixgrid .or. it>=itfixgrid)
513 end function fixgrid
514
515end program amrvac
program amrvac
AMRVAC solves a set of hyperbolic equations using adaptive mesh refinement.
Definition amrvac.t:4
subroutine timeintegration()
eos_init is called prior to physics module
Definition amrvac.t:211
Module containing all the time stepping schemes.
Definition mod_advance.t:2
subroutine, public process_advanced(iit, qt)
process_advanced is user entry in time loop, just after advance allows to modify solution,...
subroutine, public advance(iit)
Advance all the grids over one time step, including all sources.
Definition mod_advance.t:23
subroutine, public process(iit, qt)
process is a user entry in time loop, before output and advance allows to modify solution,...
subroutine, public resettree
reset AMR and (de)allocate boundary flux storage at level changes
subroutine, public resettree_convert
Force the tree to desired level(s) from level_io(_min/_max) used for conversion to vtk output.
subroutine, public settree
Build up AMR.
subroutine, public comm_start
Initialize the MPI environment.
subroutine, public comm_finalize
Finalize (or shutdown) the MPI environment.
subroutine, public mpistop(message)
Exit MPI-AMRVAC with an error message.
subroutine generate_plotfile
subroutine init_convert()
Definition mod_convert.t:32
Definition mod_dt.t:1
subroutine, public setdt()
setdt - set dt for all levels between levmin and levmax. dtpar>0 --> use fixed dtpar for all level dt...
Definition mod_dt.t:11
Equation of state for AMRVAC, handled through a single eos_container object.
Definition mod_eos.t:30
subroutine, public eos_init()
Phase 'create' (before units are known): allocate the EoS object, read its &eos_list parameters,...
Definition mod_eos.t:235
subroutine, public eos_finalise()
Phase 'commit' (after units are known): finalise the dispatch for the loaded physics – wire the metho...
Definition mod_eos.t:265
subroutine, public prepare_eos_w_fields()
Definition mod_eos.t:283
Module for escape probability radiative cooling modification.
subroutine, public escape_prob_compute_colmass()
Compute column mass from the corona toward the footpoints and scatter to wextra. Called once per time...
Module for flux conservation near refinement boundaries.
subroutine, public allocatebflux
Module with basic grid data structures.
Definition mod_forest.t:2
integer nleafs_active
Definition mod_forest.t:78
update ghost cells of all blocks including physical boundaries
subroutine getbc(time, qdt, psb, nwstart, nwbc)
do update ghost cells of all blocks including physical boundaries
procedure(update_eos_bc_sub), pointer update_eos_4_bc
This module contains definitions of global parameters and variables and some generic functions/subrou...
double precision, dimension(nfile) tsavelast
type(state), pointer block
Block pointer for using one block and its previous state.
integer nstep
How many sub-steps the time integrator takes.
integer it_max
Stop the simulation after this many time steps have been taken.
logical reset_it
If true, reset iteration count to 0.
integer ixghi
Upper index of grid block arrays.
logical, dimension(nfile) save_file
whether or not to save an output file
logical resume_previous_run
If true, restart a previous run from the latest snapshot.
double precision global_time
The global simulation time.
integer, dimension(nsavehi, nfile) itsave
Save output of type N on iterations itsave(:, N)
double precision time_max
End time for the simulation.
double precision time_init
Start time for the simulation.
logical firstprocess
If true, call initonegrid_usr upon restarting.
integer snapshotini
Resume from the snapshot with this index.
integer it
Number of time steps taken.
integer it_init
initial iteration count
integer ditregrid
Reconstruct the AMR grid once every ditregrid iteration(s)
character(len=std_len) convert_type
Which format to use when converting.
integer itfixgrid
Fix the AMR grid after this many time steps.
integer, parameter nlevelshi
The maximum number of levels in the grid refinement.
logical phys_escape_prob
Use escape probability for radiative cooling modification.
logical use_particles
Use particles module or not.
integer icomm
The MPI communicator.
logical reset_time
If true, reset iteration count and global_time to original values, and start writing snapshots at ind...
integer mype
The rank of the current MPI task.
integer, dimension(1:nfile) n_saves
Number of saved files of each type.
double precision, dimension(nfile) tsavestart
Start of read out (not counting specified read outs)
integer, dimension(nfile) ditsave
Repeatedly save output of type N when ditsave(N) time steps have passed.
double precision dt
global time step
double precision wall_time_max
Ending wall time (in hours) for the simulation.
integer ierrmpi
A global MPI error return code.
logical autoconvert
If true, already convert to output format during the run.
double precision, dimension(:), allocatable, parameter d
integer slowsteps
If > 1, then in the first slowsteps-1 time steps dt is reduced by a factor .
integer snapshotnext
IO: snapshot and collapsed views output numbers/labels.
integer npe
The number of MPI tasks.
integer, dimension(nfile) itsavelast
double precision time_between_print
to monitor timeintegration loop at given wall-clock time intervals
integer, parameter unitterm
Unit for standard output.
double precision, dimension(nfile) dtsave
Repeatedly save output of type N when dtsave(N) simulation time has passed.
logical time_advance
do time evolving
character(len=std_len) restart_from_file
If not 'unavailable', resume from snapshot with this base file name.
double precision, dimension(:,:), allocatable rnode
Corner coordinates.
integer, parameter filelog_
Constant indicating log output.
integer, parameter fileout_
Constant indicating regular output.
double precision time_bc
accumulated wall-clock time spent on boundary conditions
double precision tfixgrid
Fix the AMR grid after this time.
integer nghostcells
Number of ghost cells surrounding a grid.
character(len= *), parameter undefined
double precision, dimension(nsavehi, nfile) tsave
Save output of type N on times tsave(:, N)
logical convert
If true and restart_from_file is given, convert snapshots to other file formats.
logical reset_grid
If true, rebuild the AMR grid upon restarting.
logical crash
Save a snapshot before crash a run met unphysical values.
double precision, dimension(^nd) dxlevel
store unstretched cell size of current level
logical use_multigrid
Use multigrid (only available in 2D and 3D)
character(len=std_len) base_filename
Base file name for simulation output, which will be followed by a number.
integer refine_max_level
Maximal number of AMR levels.
integer, parameter nfile
Number of output methods.
logical pass_wall_time
If true, wall time is up, modify snapshotnext for later overwrite.
logical final_dt_exit
Force timeloop exit when final dt < dtmin.
integer, dimension(nfile) isaveit
integer, dimension(nfile) isavet
integer log_fh
MPI file handle for logfile.
subroutine, public improve_initial_condition()
improve initial condition after initialization
subroutine, public initlevelone
Generate and initialize all grids at the coarsest level (level one)
subroutine, public modify_ic
modify initial condition
This module handles the initialization of various components of amrvac.
subroutine, public initialize_amrvac()
Initialize amrvac: read par files and initialize variables.
logical save_now
whether a manually inserted snapshot is saved
Module for reading input and writing output.
subroutine saveamrfile(ifile)
subroutine read_arguments()
Read the command line arguments passed to amrvac.
subroutine read_snapshot
Routine to read in snapshots (.dat files). When it cannot recognize the file version,...
Module to couple the octree-mg library to AMRVAC. This file uses the VACPP preprocessor,...
type(mg_t) mg
Data structure containing the multigrid tree.
subroutine mg_setup_multigrid()
Setup multigrid for usage.
Module containing all the particle routines.
subroutine particles_create()
Create initial particles.
This module defines the procedures of a physics module. It contains function pointers for the various...
Definition mod_physics.t:4
procedure(sub_check_params), pointer phys_bind_eos_to_source
Definition mod_physics.t:53
procedure(sub_special_advance), pointer phys_special_advance
Definition mod_physics.t:75
subroutine, public selectgrids
Module for handling split source terms (split from the fluxes)
Definition mod_source.t:2
double precision, save, public time_sts_total
Definition mod_source.t:14
double precision tw_eos_hydro_prev
Definition mod_timing.t:25
double precision time_wb_inverse
Definition mod_timing.t:16
double precision tw_process
Definition mod_timing.t:23
double precision tw_advance
Definition mod_timing.t:21
double precision tw_regrid
Definition mod_timing.t:22
integer timing_log_interval
Write timing log every N iterations (default 10)
Definition mod_timing.t:34
integer ittimelast
Definition mod_timing.t:28
double precision timegr_tot
Definition mod_timing.t:9
double precision time_htc_total
Definition mod_timing.t:27
double precision tw_save
Definition mod_timing.t:22
double precision timeio_tot
Definition mod_timing.t:8
double precision time_in
Definition mod_timing.t:8
double precision tw_eos_tc
Definition mod_timing.t:26
double precision tw_eos_hydro
Definition mod_timing.t:25
double precision tw_tmp
Definition mod_timing.t:24
double precision time_wb_recon
Definition mod_timing.t:17
double precision timelast
Definition mod_timing.t:20
double precision timeeos_update
Definition mod_timing.t:11
integer, parameter timing_unit
Definition mod_timing.t:29
double precision tw_setdt
Definition mod_timing.t:21
logical write_timing_log
Enable writing of detailed timing breakdown log (set via savelist)
Definition mod_timing.t:32
double precision timeeos_pthermal
Definition mod_timing.t:14
double precision timeio0
Definition mod_timing.t:8
double precision timeloop
Definition mod_timing.t:9
double precision timeloop0
Definition mod_timing.t:9
double precision tw_tc_total
Definition mod_timing.t:23
double precision tw_tc_prev
Definition mod_timing.t:24
double precision timeeos_tot
Definition mod_timing.t:10
double precision timeeos_conv
Definition mod_timing.t:13
double precision time_wb_transform
Definition mod_timing.t:16
double precision timeeos_csound
Definition mod_timing.t:12
double precision tw_eos_tc_prev
Definition mod_timing.t:26
logical timing_log_opened
Definition mod_timing.t:30
double precision timeeos_tfromei
Definition mod_timing.t:15
double precision timegr0
Definition mod_timing.t:9
subroutine, public initialize_trac_after_settree
Definition mod_trac.t:873
Module with all the methods that users can customize in AMRVAC.
procedure(process_grid), pointer usr_process_grid
procedure(process_adv_grid), pointer usr_process_adv_grid
procedure(sub_modify_io), pointer usr_modify_output
procedure(p_no_args), pointer usr_before_main_loop
procedure(process_global), pointer usr_process_global
procedure(process_adv_global), pointer usr_process_adv_global
This is a template for a new user problem of mhd.
subroutine usr_init()
This routine should set user methods, and activate the physics module.