PROPHET Flux Routine Arguments

(as defined in prophet/src/PDE/Casmbly/pdeterms.h)

Flux Routine Signature:

int flux_name (arglist) argdescrip { function code }

Details of arglist/argdescrip macros:

Argument Description
int *path Specifies type of processing to do on each call to the routine: positive does set-up; negative does clean-up... FT_CONFIG: for a Prophet solve or bias command
FT_DT: for each time step
FT_OUTER: for each outer (Gauss-Seidel) loop
FT_NEWTON: for each inner (Newton) loop
FT_REGION: for each region
FT_COLOR: for each color (if grid coloring is used)
FT_RUN: compute the flux (FT_RUN=0; there is no -FT_RUN)
int *imtx whether to compute flux (RHS) and/or its derivative (Jacobian): *imtx = 01: compute flux (RHS) only
*imtx = 10: compute flux derivative (Jacobian) only
*imtx = 11: compute both flux and its derivative
int *ireg Current region or interface information: Volume geoterm (div, nodal, etc.): *ireg = region index
Interface geoterm (constraint): ireg[0] = -1; ireg[1] = 2; ireg[2] = region A index; ireg[3] = region B index; ireg[4] = 1
Boundary geoterm (dirichlet): ireg[0] = interface index; ireg[1] = number of regions involved (should be 2); mabs(ireg[2])-1 = index of region A; mabs(ireg[3])-1 = index of region B; ireg[4] = pdeterm->between[ii]
int *nn number of nodes to work on (in current region/interface/boundary)
int *dim space dimension of operator (only used for operators involving gradients)
int *nsol number of output fields (equations) affected by this PDE term (flux routine)
int *msol index of each affected output field (equation) in the global list
int *ndep number of input fields supplied to this PDE term (flux routine)
int *mdep index of each supplied input field in the global list
real *coord coordinates of the grid points (not implemented)
real *sol the input field nodal values: sol _(ndep, nn)
real *gradsol input field gradient nodal values: gradsol __(ndep, dim, nn)
real *f output flux nodal values (to be computed by flux routine): f __(nsol, dim, nn)
real *df FT_CONFIG: tell Prophet how output fluxes depend on input fields: df _(ndep, nsol)
df(i,j) = 0: (default) all output fluxes depend on all input fields
df(i,j) = 1: output flux j depends only on value of field i; not gradient
df(i,j) = 2: output flux j depends only on gradient of field i; not value
df(i,j) = 3: output flux j depends on both value and gradient of field i
FT_RUN: derivatives of the output fluxes w.r.t. the input fields: df ___(ndep, nsol, dim, nn)
real *dgf derivative of the output fluxes w.r.t. the input field gradients: dgf ____(ndep, nsol, dim, dim, nn)