From 0b8426dd0c31216f73693e3e5f87d647677011c6 Mon Sep 17 00:00:00 2001 From: Emmanuel Branlard Date: Tue, 15 Mar 2022 13:57:47 -0600 Subject: [PATCH] HD: always allocating A,B,C (Closes #1046) --- modules/hydrodyn/src/HydroDyn.f90 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/hydrodyn/src/HydroDyn.f90 b/modules/hydrodyn/src/HydroDyn.f90 index 5b0e990a3b..93a110ba83 100644 --- a/modules/hydrodyn/src/HydroDyn.f90 +++ b/modules/hydrodyn/src/HydroDyn.f90 @@ -2579,8 +2579,6 @@ SUBROUTINE HD_JacobianPInput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrM ! For the case where either RdtnMod=0 and ExtcnMod=0 and hence %SS_Rdtn data or %SS_Exctn data is not valid then we do not have states, so simply return ! The key here is to never allocate the dXdu and related state Jacobian arrays because then the glue-code will behave properly - if ( p%totalStates == 0 ) return - ! Calculate the partial derivative of the continuous state functions (X) with respect to the inputs (u) here: ! allocate dXdu if necessary @@ -2753,8 +2751,6 @@ SUBROUTINE HD_JacobianPContState( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrStat = ErrID_None ErrMsg = '' - if ( p%totalStates == 0 ) return - ! Calculate the partial derivative of the output functions (Y) with respect to the continuous states (x) here: