@@ -820,11 +820,15 @@ class AbstractModel {
820820 * @param h Heaviside vector
821821 * @param tcl total abundances for conservation laws
822822 * @param spl spline value vector
823+ * @param include_static Whether to (re-)evaluate only dynamic expressions
824+ * (false) or also static expressions (true).
825+ * Dynamic expressions are those that depend directly or indirectly on time,
826+ * static expressions are those that don't.
823827 */
824828 virtual void
825829 fw (realtype* w, realtype const t, realtype const * x, realtype const * p,
826830 realtype const * k, realtype const * h, realtype const * tcl,
827- realtype const * spl);
831+ realtype const * spl, bool include_static = true );
828832
829833 /* *
830834 * @brief Model-specific sparse implementation of dwdp
@@ -840,12 +844,16 @@ class AbstractModel {
840844 * @param spl spline value vector
841845 * @param sspl sensitivities of spline values vector w.r.t. parameters \f$ p
842846 * \f$
847+ * @param include_static Whether to (re-)evaluate only dynamic expressions
848+ * (false) or also static expressions (true).
849+ * Dynamic expressions are those that depend directly or indirectly on time,
850+ * static expressions are those that don't.
843851 */
844852 virtual void fdwdp (
845853 realtype* dwdp, realtype const t, realtype const * x, realtype const * p,
846854 realtype const * k, realtype const * h, realtype const * w,
847855 realtype const * tcl, realtype const * stcl, realtype const * spl,
848- realtype const * sspl
856+ realtype const * sspl, bool include_static = true
849857 );
850858
851859 /* *
@@ -860,28 +868,6 @@ class AbstractModel {
860868 */
861869 virtual void fdwdp_rowvals (SUNMatrixWrapper& dwdp);
862870
863- /* *
864- * @brief Model-specific sensitivity implementation of dwdp
865- * @param dwdp Recurring terms in xdot, parameter derivative
866- * @param t timepoint
867- * @param x vector with the states
868- * @param p parameter vector
869- * @param k constants vector
870- * @param h Heaviside vector
871- * @param w vector with helper variables
872- * @param tcl total abundances for conservation laws
873- * @param stcl sensitivities of total abundances for conservation laws
874- * @param spl spline value vector
875- * @param sspl sensitivities of spline values vector
876- * @param ip sensitivity parameter index
877- */
878- virtual void fdwdp (
879- realtype* dwdp, realtype const t, realtype const * x, realtype const * p,
880- realtype const * k, realtype const * h, realtype const * w,
881- realtype const * tcl, realtype const * stcl, realtype const * spl,
882- realtype const * sspl, int ip
883- );
884-
885871 /* *
886872 * @brief Model-specific implementation of dwdx, data part
887873 * @param dwdx Recurring terms in xdot, state derivative
@@ -893,11 +879,15 @@ class AbstractModel {
893879 * @param w vector with helper variables
894880 * @param tcl total abundances for conservation laws
895881 * @param spl spline value vector
882+ * @param include_static Whether to (re-)evaluate only dynamic expressions
883+ * (false) or also static expressions (true).
884+ * Dynamic expressions are those that depend directly or indirectly on time,
885+ * static expressions are those that don't.
896886 */
897887 virtual void fdwdx (
898888 realtype* dwdx, realtype const t, realtype const * x, realtype const * p,
899889 realtype const * k, realtype const * h, realtype const * w,
900- realtype const * tcl, realtype const * spl
890+ realtype const * tcl, realtype const * spl, bool include_static = true
901891 );
902892
903893 /* *
@@ -922,11 +912,15 @@ class AbstractModel {
922912 * @param h Heaviside vector
923913 * @param w vector with helper variables
924914 * @param tcl Total abundances for conservation laws
915+ * @param include_static Whether to (re-)evaluate only dynamic expressions
916+ * (false) or also static expressions (true).
917+ * Dynamic expressions are those that depend directly or indirectly on time,
918+ * static expressions are those that don't.
925919 */
926920 virtual void fdwdw (
927921 realtype* dwdw, realtype t, realtype const * x, realtype const * p,
928922 realtype const * k, realtype const * h, realtype const * w,
929- realtype const * tcl
923+ realtype const * tcl, bool include_static = true
930924 );
931925
932926 /* *
0 commit comments