arithmetic/src/misc/functional/functional.tmpl


%
%  Quake functions to instantiate operations on generic functionals
%  and their derivatives.
%

readonly proc Functional (nm, field, rimpl, msolve) is
  local basic  = nm & "Functional"
  local rfield  = field & rimpl
  local rtrans  = field & "Trans"
  local vfield  = field & "Vector"
  local vecsup  = field & "VectorSupport"
  local vtrans  = field & "VectorTrans"
  local mfield  = field & "MatrixFast"
  local funcder = field & "FunctionalDeriv2"
  local msolve  = field & "Matrix" & msolve
  build_generic_intf (basic, "Functional", [rfield,         vfield,                 funcder], VISIBLE)
  build_generic_impl (basic, "Functional", [rfield, rtrans, vfield, vtrans, mfield, funcder, msolve])
end

readonly proc FunctionalDeriv2 (nm, field, rimpl) is
  local basic  = nm & "FunctionalDeriv2"
  local vfield = nm & "Vector"
  local vrep   = nm & "VectorRep"
  local mfield = nm & "MatrixFast"
  local rfield = field & rimpl
  build_generic_intf (basic, "FunctionalDeriv2", [rfield, vfield, mfield], VISIBLE)
  build_generic_impl (basic, "FunctionalDeriv2", [rfield, vfield, mfield])
end