:orphan: .. _file_GridKit_Model_EMT_ComponentImpl.hpp: File ComponentImpl.hpp ====================== |exhale_lsh| :ref:`Parent directory ` (``GridKit/Model/EMT``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 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, variable ``v`` starting at ``local(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 by ``local(v)`` - ``w``, ``wp``: external values and derivatives, indexed by ``terminalOffset(t) + k`` or ``inputOffset(i) + k`` - ``f``: the block the kernel writes. ``internalResidual`` writes the internal residuals. ``externalResidual``, of a model with terminals, writes what the model adds at its terminals, indexed by ``terminalOffset(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`` (:ref:`file_GridKit_Model_EMT_Component.hpp`) - ``algorithm`` - ``concepts`` - ``format`` - ``new`` - ``numeric`` - ``stdexcept`` - ``utility`` Included By ----------- - :ref:`file_GridKit_Model_EMT_Bus_BusImpl.hpp` - :ref:`file_GridKit_Model_EMT_Component_Line_LineLumped_LineLumpedImpl.hpp` - :ref:`file_GridKit_Model_EMT_Component_Load_LoadZ_LoadZImpl.hpp` - :ref:`file_GridKit_Model_EMT_Component_Source_VoltageSource_VoltageSourceImpl.hpp` - :ref:`file_GridKit_Model_EMT_ComponentDependencyTracking.hpp` - :ref:`file_GridKit_Model_EMT_ComponentEnzyme.hpp` - :ref:`file_GridKit_Model_EMT_Operators_Rational_VectorFit_VectorFitImpl.hpp` - :ref:`file_GridKit_Model_EMT_Operators_Reference_Pll_PllImpl.hpp` - :ref:`file_GridKit_Model_EMT_Operators_Reference_Pmu_PmuImpl.hpp` - :ref:`file_GridKit_Model_EMT_Operators_Reference_Signal_SignalImpl.hpp` - :ref:`file_GridKit_Model_EMT_SystemModelImpl.hpp` Namespaces ---------- - :ref:`namespace_GridKit` - :ref:`namespace_GridKit__EMT`