wiki:src

Version 27 (modified by trac, 12 years ago) ( diff )

Subroutine src(Info)


Defined in:

contrib/astro/physics/i_src.f90

Inputs:

NodeInfo Info

Description:

Manages the task of integrating source terms for all cells in a given grid specified by argument, Info. For an overview of how AstroBEAR handles source terms, follow this link. This subroutine is called by the subroutine afterfixup which is found in the module Problem. Following is an outline of the steps taken by src:

1.) Initialize those quantities common to the current grid needed for integration.
2.) Check for cylindrical symmetry if the number of problem dimensions is 2. Take needed actions based on choice of symmetry axis.
3.) Check if problem is an 8wave calculation and set l8wave accordingly.
4.) Begin loop over grid cells.
5.) Cycle if child-grid source terms have already been computed and restricted.
6,) In certain cases, cycle if user-coded ApplySrc subroutines return .FALSE..
7.) Initialize the cell's CELLINFO structure.
8.) Set the local current time to zero.
9.) Run a protection check on initial cell data.
10.) call derivatives subroutine to acquire initial value of source term.
11.) Run a number of tests to determine the best choice for scaling the field variables.
12.) If MHD, calculate formula(\nabla\cdot{\mathbf B}).
13.) Use results from call to derivatives and from the scaling determination, to estimate initial source integration time-step.
14.) If not using Strang splitting, and the time-step evaluated is larger than one-half the conservative-update time-step, replace with one-half of the conservative time-step.
15.) Begin time-stepping DO-loop.
16.) If the current iteration is not the first iteration, rescale the data.
17.) If the current stepsize is large enough that it can overshoot the integration upper-limit, reset to a value that will integrate the source term to the upper-limit.
18.) Call the Stiff subroutine.
19.) Check to see if the upper-limit of integration has been reached, update the field values and exit loop if it has.
20.) Carry out various diagnostic tests and stop with error messages if tests fail.
21.) End time-stepping loop.
22.) If time-stepping loop does not yield a successful source integration, print error message and stop.
23.) End loop over grid cells.

Called In:

contrib/astro/problem.f90
lib/MUCSLbear.f90
lib/compactbear.f90
lib/wavebear.f90
lib/classicbear.f90

Modules Used:

cool

Includes:

contrib/astro/physics/i_i_ODEs.f90

Note: See TracWiki for help on using the wiki.