FEATool  v1.6
Finite Element Analysis Toolbox
 All Files Functions Pages
assemblenjac.m File Reference


ASSEMBLENJAC Assembly of defect and Newton Jacobian.

[ D, J ] = ASSEMBLENJAC( U, PROB, VARARGIN ) Evaluates defect with solution vector U and optionally assembles the nonlinear Jacobian matrix. Accepts optional propery value pairs in VARARGIN.

Input       Value/[Size]           Description
u           vector [n_u,1]         Solution vector
prob        struct                 Problem definition struct
jac         struct {}              Analytic Jacobian form and coefficients
numjac      scalar {0}             Compute numeric Jacbian (warning! very slow)
du          scalar {1e-8}          Magnitude of numerical differentiation shift
icub        scalar {2}             Numerical integration rule
n_cmax      scalar {50000}         Max number of cells to assemble
                                   for at once (to limit memory consumption)
Output      Value/[Size]           Description
d           vector [n_u,1]         Defect vector, d := f(u) - A(u)*u
J           sparse [n_u,n_u]       Assembled Jacobian matrix (optional output)
See also