Local(FloatHiPtr) J; /* current set of Jacobian vals */ Local(FloatHiPtr) H; /* current set of Hessian vals */ Local(FloatHiPtr) D3; /* current set of third-order dervals */ Local(Int2) Der2num; /* number of 2nd order derivatives */ Local(Int2) Der3num; /* number of 3nd order derivatives */ Local(void) CopyToX(Vector x); Local(void) CopyToP(Vector x); /**************************************************************************/ /* Assign values to the Jacobian matrix of RHS using symbolic derivatives */ Local(void) SymJac(Vector x, Matrix Jac) { int i,j,nactive; CopyToX(x); CopyToP(x); J=stagenData->Der1(NULL,NULL,NULL,X,P,&zero); /* U U_S U_SS S P T */ nactive=staFunc->GetVectorDim(x)-nphase; for (i=0; ik) Swap(j,k); if (j>l) Swap(j,l); if (k>l) Swap(k,l); return Der3Elem(i,j,k,l); }