anchor.diff:  SUBROUTINE ModName_CalcContStateDeriv( t, u, p, x, xd, z, OtherState, m, dxdt, ErrStat, ErrMsg )
   !..................................................................................................................................
   
  -      REAL(DbKi),                        INTENT(IN   )  :: t           !< Current simulation time in seconds
  -      TYPE(ModName_InputType),           INTENT(IN   )  :: u           !< Inputs at t
  -      TYPE(ModName_ParameterType),       INTENT(IN   )  :: p           !< Parameters
  -      TYPE(ModName_ContinuousStateType), INTENT(IN   )  :: x           !< Continuous states at t
  -      TYPE(ModName_DiscreteStateType),   INTENT(IN   )  :: xd          !< Discrete states at t
  -      TYPE(ModName_ConstraintStateType), INTENT(IN   )  :: z           !< Constraint states at t
  -      TYPE(ModName_OtherStateType),      INTENT(IN   )  :: OtherState  !< Other states at t
  -      TYPE(ModName_MiscVarType),         INTENT(INOUT)  :: m           !< Misc variables for optimization (not copied in glue code)
  -      TYPE(ModName_ContinuousStateType), INTENT(  OUT)  :: dxdt        !< Continuous state derivatives at t
  -      INTEGER(IntKi),                    INTENT(  OUT)  :: ErrStat     !< Error status of the operation
  -      CHARACTER(*),                      INTENT(  OUT)  :: ErrMsg      !< Error message if ErrStat /= ErrID_None
  -
  -
  -         ! Initialize ErrStat
  -
  -      ErrStat = ErrID_None
  -      ErrMsg  = ""
  -
  -
  -         ! Compute the first time derivatives of the continuous states here:
  -
  -      dxdt%DummyContState = 0.0_ReKi
  -
  +   REAL(DbKi),                        INTENT(IN   )  :: t           !< Current simulation time in seconds
  +   TYPE(ModName_InputType),           INTENT(IN   )  :: u           !< Inputs at t
  +   TYPE(ModName_ParameterType),       INTENT(IN   )  :: p           !< Parameters
  +   TYPE(ModName_ContinuousStateType), INTENT(IN   )  :: x           !< Continuous states at t
  +   TYPE(ModName_DiscreteStateType),   INTENT(IN   )  :: xd          !< Discrete states at t
  +   TYPE(ModName_ConstraintStateType), INTENT(IN   )  :: z           !< Constraint states at t
  +   TYPE(ModName_OtherStateType),      INTENT(IN   )  :: OtherState  !< Other states at t
  +   TYPE(ModName_MiscVarType),         INTENT(INOUT)  :: m           !< Misc variables for optimization (not copied in glue code)
  +   TYPE(ModName_ContinuousStateType), INTENT(  OUT)  :: dxdt        !< Continuous state derivatives at t
  +   INTEGER(IntKi),                    INTENT(  OUT)  :: ErrStat     !< Error status of the operation
  +   CHARACTER(*),                      INTENT(  OUT)  :: ErrMsg      !< Error message if ErrStat /= ErrID_None
  +
  +
  +      ! Initialize ErrStat
  +
  +   ErrStat = ErrID_None
  +   ErrMsg  = ""
  +
  +
  +      ! Compute the first time derivatives of the continuous states here:
  +
  +   dxdt%DummyContState = 0.0_ReKi
   
   END SUBROUTINE ModName_CalcContStateDeriv
   !----------------------------------------------------------------------------------------------------------------------------------
  
positive.code: SUBROUTINE ModName_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg )
  !..................................................................................................................................
  
        REAL(DbKi),                        INTENT(IN   )  :: t           !< Current simulation time in seconds
        TYPE(ModName_InputType),           INTENT(IN   )  :: u           !< Inputs at t
        TYPE(ModName_ParameterType),       INTENT(IN   )  :: p           !< Parameters
        TYPE(ModName_ContinuousStateType), INTENT(IN   )  :: x           !< Continuous states at t
        TYPE(ModName_DiscreteStateType),   INTENT(IN   )  :: xd          !< Discrete states at t
        TYPE(ModName_ConstraintStateType), INTENT(IN   )  :: z           !< Constraint states at t
        TYPE(ModName_OtherStateType),      INTENT(IN   )  :: OtherState  !< Other states at t
        TYPE(ModName_MiscVarType),         INTENT(INOUT)  :: m           !< Misc variables for optimization (not copied in glue code)
        TYPE(ModName_OutputType),          INTENT(INOUT)  :: y           !< Outputs computed at t (Input only so that mesh con-
                                                                         !!   nectivity information does not have to be recalculated)
        INTEGER(IntKi),                    INTENT(  OUT)  :: ErrStat     !< Error status of the operation
        CHARACTER(*),                      INTENT(  OUT)  :: ErrMsg      !< Error message if ErrStat /= ErrID_None
  
  
           ! Initialize ErrStat
  
        ErrStat = ErrID_None
        ErrMsg  = ""
  
  
           ! Compute outputs here:
        y%DummyOutput    = 2.0_ReKi
  
        y%WriteOutput(1) = REAL(t,ReKi)
        y%WriteOutput(2) = 1.0_ReKi
  
  
  END SUBROUTINE ModName_CalcOutput
  
negative.code: SUBROUTINE ModName_CalcConstrStateResidual( t, u, p, x, xd, z, OtherState, m, Z_residual, ErrStat, ErrMsg )
  !..................................................................................................................................
  
     REAL(DbKi),                        INTENT(IN   )  :: t           !< Current simulation time in seconds
     TYPE(ModName_InputType),           INTENT(IN   )  :: u           !< Inputs at t
     TYPE(ModName_ParameterType),       INTENT(IN   )  :: p           !< Parameters
     TYPE(ModName_ContinuousStateType), INTENT(IN   )  :: x           !< Continuous states at t
     TYPE(ModName_DiscreteStateType),   INTENT(IN   )  :: xd          !< Discrete states at t
     TYPE(ModName_ConstraintStateType), INTENT(IN   )  :: z           !< Constraint states at t (possibly a guess)
     TYPE(ModName_OtherStateType),      INTENT(IN   )  :: OtherState  !< Other states at t
     TYPE(ModName_MiscVarType),         INTENT(INOUT)  :: m           !< Misc variables for optimization (not copied in glue code)
     TYPE(ModName_ConstraintStateType), INTENT(  OUT)  :: Z_residual  !< Residual of the constraint state functions using
                                                                       !!     the input values described above
     INTEGER(IntKi),                    INTENT(  OUT)  :: ErrStat     !< Error status of the operation
     CHARACTER(*),                      INTENT(  OUT)  :: ErrMsg      !< Error message if ErrStat /= ErrID_None
  
  
        ! Initialize ErrStat
  
     ErrStat = ErrID_None
     ErrMsg  = ""
  
  
        ! Solve for the residual of the constraint state functions here:
  
     Z_residual%DummyConstrState = 0.0_ReKi
  
  END SUBROUTINE ModName_CalcConstrStateResidual
  !----------------------------------------------------------------------------------------------------------------------------------
  