57 TYPE(t_region
) :: region
59 INTEGER,
INTENT(IN) :: ireg
62 INTEGER :: icont, ilev
65 CHARACTER(CHRLEN) :: rcsidentstring
67 INTEGER :: errorflag, kdnend, naiv, narv, ncont, ncv, ndv, npclsmax, ntv
69 TYPE(t_level
),
POINTER :: plevel
70 TYPE(t_plag),
POINTER :: pplag
75 rcsidentstring =
'$RCSfile: PLAG_AllocateMemoryPost.F90,v $ $Revision: 1.5 $'
77 global => region%global
80 'PLAG_AllocateMemoryPost.F90' )
82 IF ( global%myProcid == masterproc .AND. &
83 global%verbLevel > verbose_none )
THEN
84 WRITE(stdout,
'(A,3X,A)') solver_name,
'Allocating memory for PLAG...'
89 DO ilev=1,region%nGridLevels
91 plevel => region%levels(ilev)
92 pplag => region%levels(ilev)%plag
96 npclsmax = region%plagInput%nPclsMax
97 ncont = region%plagInput%nCont
100 print*,
' PLAG_AllocateMemoryPost: nPclsMax = ',npclsmax
104 pplag%nCv = cv_plag_last + ncont
105 pplag%nDv = dv_plag_last + ncont
106 pplag%nTv = tv_plag_last
107 pplag%nAiv = aiv_plag_last
108 pplag%nArv = arv_plag_last
117 IF ( global%myProcid == masterproc .AND. &
118 global%verbLevel > verbose_none )
THEN
119 WRITE(stdout,1015)
' nPclsMax',npclsmax
120 WRITE(stdout,1010)
' nCont ',ncont
121 WRITE(stdout,1010)
' nAiv ',naiv
122 WRITE(stdout,1010)
' nArv ',narv
123 WRITE(stdout,1010)
' nCv ',ncv
124 WRITE(stdout,1010)
' nDv ',ndv
125 WRITE(stdout,1010)
' nTv ',ntv
130 ALLOCATE( pplag%aiv(naiv,npclsmax),stat=errorflag )
131 global%error = errorflag
132 IF (global%error /= err_none)
THEN
133 CALL
errorstop( global, err_allocate,__line__ ,
'pPlag%aiv' )
136 ALLOCATE( pplag%arv(narv,npclsmax),stat=errorflag )
137 global%error = errorflag
138 IF (global%error /= err_none)
THEN
139 CALL
errorstop( global, err_allocate,__line__ ,
'pPlag%arv' )
142 ALLOCATE( pplag%cv (ncv,npclsmax),stat=errorflag )
143 global%error = errorflag
144 IF (global%error /= err_none)
THEN
145 CALL
errorstop( global, err_allocate,__line__ ,
'pPlag%cv' )
148 ALLOCATE( pplag%dv (ndv,npclsmax),stat=errorflag )
149 global%error = errorflag
150 IF (global%error /= err_none)
THEN
151 CALL
errorstop( global, err_allocate,__line__ ,
'pPlag%dv' )
154 ALLOCATE( pplag%tv (ntv,npclsmax),stat=errorflag )
155 global%error = errorflag
156 IF (global%error /= err_none)
THEN
157 CALL
errorstop( global, err_allocate,__line__ ,
'pPlag%tv' )
162 ALLOCATE( pplag%cvPlagMass(ncont),stat=errorflag )
163 global%error = errorflag
164 IF (global%error /= err_none)
THEN
165 CALL
errorstop( global, err_allocate,__line__ ,
'pPlag%cvPlagMass' )
168 ALLOCATE( pplag%dvPlagVolu(ncont),stat=errorflag )
169 global%error = errorflag
170 IF (global%error /= err_none)
THEN
171 CALL
errorstop( global, err_allocate,__line__ ,
'pPlag%dvPlagVolu' )
175 pplag%cvPlagMass(icont) = cv_plag_last +icont
176 pplag%dvPlagVolu(icont) = dv_plag_last +icont
183 IF ( global%myProcid == masterproc .AND. &
184 global%verbLevel > verbose_none )
THEN
185 WRITE(stdout,
'(A,3X,A)') solver_name,
'Allocating memory for PLAG done...'
190 1010
FORMAT(
a,
' = ',i2)
191 1015
FORMAT(
a,
' = ',i7)
subroutine registerfunction(global, funName, fileName)
subroutine plag_allocatememorypost(region, iReg)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)