Hello,
I was trying to create a global variable and use it in a subroutine, but I didn't succeed... I really appreciate if someone could help me. Here is what I did.
The global variable I would like to create is called
FLUDPT_VASE.
1. Modify subroutine "
declarations_sisyphe". Added the following line:
TYPE(BIEF_OBJ), TARGET :: FLUDPT_VASE
2. Modify subroutine "
interface_sisyphe_suspension". I added "
FLUDPT_VASE" as an additional argument to subroutine "
suspension_depot". So that part becomes
!==============================!
SUBROUTINE SUSPENSION_DEPOT !
! **************************** !
&(TOB,HN, NPOIN, HMIN,XWC,VITCD,
& ZERO,KARMAN,FDM,FD90,XMVE, T1,T2,ZREF,FLUDPT,FLUDPT_VASE,DEBUG,
& SEDCO,CSTAEQ)
USE BIEF
IMPLICIT NONE
TYPE (BIEF_OBJ), INTENT(IN) :: HN, TOB, CSTAEQ
INTEGER, INTENT(IN) :: NPOIN,DEBUG
LOGICAL, INTENT(IN) :: SEDCO
DOUBLE PRECISION, INTENT(IN) :: HMIN
DOUBLE PRECISION, INTENT(IN) :: FDM,FD90,XWC
DOUBLE PRECISION, INTENT(IN) :: VITCD
DOUBLE PRECISION, INTENT(IN) :: ZERO, KARMAN,XMVE
TYPE (BIEF_OBJ), INTENT(INOUT) :: T1,T2
TYPE (BIEF_OBJ), INTENT(IN) :: ZREF
TYPE (BIEF_OBJ), INTENT(INOUT) :: FLUDPT,FLUDPT_VASE
!----------------------------------------------------------------!
END SUBROUTINE SUSPENSION_DEPOT
!================================================================!
3. Modify subroutine "
suspension_computation". The lines I modified are:
USE DECLARATIONS_SISYPHE, ONLY : FLULIM,FLUDPT_VASE
and
CALL SUSPENSION_DEPOT(TOB,HN,NPOIN,HMIN,XWC,VITCD,ZERO,KARMAN,
& FDM,FD90,XMVE,T1,T2,ZREF,FLUDPT,FLUDPT_VASE,DEBUG,SEDCO,CSTAEQ)
4. Modify subroutine "suspension_depot" like I did in step 2.
I recompiled the whole program and it didn't give errors. But I can't use FLUDPT_VASE while running simulations. I got "
forrtl: severe (157): Program Exception - access violation". It seems that
FLUDPT_VASE doesn't exist.
I want to have a global variable like
FLUER_VASE that can be used in subroutine "
suspension_computation" and "
suspension_depot". How can I make this work?
Kind regards,
Qilong