File ComponentImpl.hpp
↰ Parent directory (GridKit/Model/EMT)
Definition of the EMT component base class.
Definition (GridKit/Model/EMT/ComponentImpl.hpp)
Detailed Description
Luke Lowery (lukel@tamu.edu)
Local values of a component, in order:
internal variables,
size_entries, variablevstarting atlocal(v)external values: those of each terminal, then those of each input
Local residuals of a component, in order:
those of the internal variables
external residuals: those of each terminal, then those of each output
variable_indices_ maps each local value to its system variable, and residual_indices_ each local residual to its system residual.
Kernels of a model take (y, yp, w, wp, f):
y,yp: internal values and derivatives, indexed bylocal(v)w,wp: external values and derivatives, indexed byterminalOffset(t) + korinputOffset(i) + kf: the block the kernel writes.internalResidualwrites the internal residuals.externalResidual, of a model with terminals, writes what the model adds at its terminals, indexed byterminalOffset(t) + k.
A model with outputs provides output(o, y, yp, w, wp, g), which writes the entries of output o to g, from its first. An output is evaluated with the residual only when it is connected, and otherwise only by evaluateOutputs, for a monitor.
A model forwards tagDifferentiable, evaluateOutputs if it has outputs, and evaluateResidual and evaluateJacobian if it is not linear, to this class from the file that instantiates it. A linear model forwards neither, since this class evaluates both from the partials that tagDifferentiable stores. A model that is linear but for a term in time forwards evaluateResidual only.
The scalar type T of a kernel is ScalarT for the residual and a dependency-tracking variable for the partials.
A component adds to the system residual, so the system zeroes the residual before evaluating its components.
Includes
GridKit/Model/EMT/Component.hpp(File Component.hpp)algorithmconceptsformatnewnumericstdexceptutility