Skip to content

Commit

Permalink
Moves comnfe to Cvd pkg
Browse files Browse the repository at this point in the history
Nksol did not recognize Com packages in Basis build
#@NoTests @nowheel
  • Loading branch information
holm10 committed Jan 14, 2025
1 parent f7172fa commit 90ce6b1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
1 change: 1 addition & 0 deletions bbb/bbb.v
Original file line number Diff line number Diff line change
Expand Up @@ -3237,6 +3237,7 @@ ifexmain integer /0/ #scalar to indicate if subroutine allocate
#=0 means it is not.
exmain_aborted logical /.false./ # Set to .true. in Python version on control-C abort
iallcall integer /0/ #flag to signal first call to allocate
comnfe integer /0/ # Number of NK iterations for time-step

***** RZ_cell_info:
# RZ grid-cell center and face locations
Expand Down
3 changes: 0 additions & 3 deletions com/com.v
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,3 @@ tanh_multi(i:integer,a:real,j:integer,b:real,fname:string,d:real) subroutine
# Common flags used by UEDGE
iprint integer /1/ # Flag controlling whether to be verbose or not
***** Svrstatus:
# Parameters indicating the solver status
comnfe integer /0/ # Number of NK iterations for time-step
4 changes: 2 additions & 2 deletions ppp/omp_parallel.F90
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,8 @@ subroutine OMPPandf1Rhs(neq,time,yl,yldot)
use Dim,only:ny
use Selec, only:yinc,xrinc,xlinc
Use Grid,only:ijactot
Use Svrstatus, only: comnfe

Use Cdv, only: comnfe
integer yinc_bkp,xrinc_bkp,xlinc_bkp,iv,tid
integer,intent(in)::neq
real,intent(in)::yl(*)
Expand Down
19 changes: 9 additions & 10 deletions svr/nksol.m
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,6 @@ dimension icnstr(n)
real zero,one,two,three
logical mxtkn
Use(Cdv)
Use(Svrstatus) # comnfe
cpetsc external gettime
cpetsc real gettime,sec4
c+pnb
Expand Down Expand Up @@ -1204,6 +1203,7 @@ c norm(f) asymptotes from above to a finite value
c in some direction, or stepmx is too small.
c
c-----------------------------------------------------------------------
Use(Cdv)
implicit none
integer n, iret, iter, itermx, ncscmx, iterm, locwmp, locimp
integer iersl, kmp, mmax, methn, methk, ipflg, mfdif, nfe, nje
Expand All @@ -1217,7 +1217,6 @@ dimension u(*),unew(n),savf(n),su(n),sf(n),wk(n)
c nks001 common block.
c-----------------------------------------------------------------------
real eps, sqteta, rhom
Use(Svrstatus) # comnfe
common /nks001/ eps, rhom, sqteta, locwmp, locimp, iersl, kmp,
* mmax, methn, methk, ipflg, mfdif, nfe, nje, nni,
* nli, npe, nps, ncfl, nbcf
Expand Down Expand Up @@ -1467,6 +1466,7 @@ subroutine model(n, wm, lenwm, iwm, leniwm, u, savf, x, f, jac,
c and the nonlinear iteration is halted.
c
c-----------------------------------------------------------------------
Use(Cdv)
implicit none
integer n, lenwm, leniwm, locwmp, locimp, iersl, kmp, mmax
integer methn, methk, ipflg, mfdif, nfe, nje, nni, nli, npe
Expand All @@ -1481,7 +1481,6 @@ dimension u(*), savf(n), su(n), sf(n)
c nks001 common block.
c-----------------------------------------------------------------------
real eps, sqteta, rhom
Use(Svrstatus) # comnfe
common /nks001/ eps, rhom, sqteta, locwmp, locimp, iersl, kmp,
* mmax, methn, methk, ipflg, mfdif, nfe, nje, nni,
* nli, npe, nps, ncfl, nbcf
Expand Down Expand Up @@ -1538,6 +1537,7 @@ call solpk (n,wm,lenwm,iwm,leniwm,u,savf,x,su,sf,f,jac,psol)
end
subroutine solpk (n, wm, lenwm, iwm, leniwm, u, savf, x, su, sf,
* f, jac, psol)
Use(Cdv)
implicit none
integer lenwm, leniwm, locwmp, locimp, iersl, kmp, mmax
integer methn, methk, ipflg, mfdif, nfe, nje, nni, nli, npe
Expand Down Expand Up @@ -1605,7 +1605,6 @@ dimension u(*), savf(n), su(n), sf(n), wm(lenwm), iwm(leniwm),
c nks001 common block.
c-----------------------------------------------------------------------
real eps, sqteta, rhom
Use(Svrstatus) # comnfe
common /nks001/ eps, rhom, sqteta, locwmp, locimp, iersl, kmp,
* mmax, methn, methk, ipflg, mfdif, nfe, nje, nni,
* nli, npe, nps, ncfl, nbcf
Expand Down Expand Up @@ -1914,6 +1913,7 @@ call psol (n, u, savf, su, sf, f, jac, wk, wmp, iwmp, x, ier)
end
subroutine atv (n, u, savf, v, su, sf, ftem, f, jac, psol, z,
* vtem, wmp, iwmp, ier, npsl)
Use(Cdv)
implicit none
integer iwmp, ier, npsl, locwmp, locimp, iersl, kmp, mmax
integer methn, methk, ipflg, mfdif, nfe, nje, nni, nli, npe
Expand Down Expand Up @@ -1971,7 +1971,6 @@ c f(u) = 0.
c nks001 common block.
c-----------------------------------------------------------------------
real delt, sqteta, rhom
Use(Svrstatus) # comnfe
common /nks001/ delt, rhom, sqteta, locwmp, locimp, iersl, kmp,
* mmax, methn, methk, ipflg, mfdif, nfe, nje, nni,
* nli, npe, nps, ncfl, nbcf
Expand Down Expand Up @@ -2632,6 +2631,7 @@ c norm() denotes the euclidean norm.
c failure causes the nonlinear iteration to halt.
c
c-----------------------------------------------------------------------
Use(Cdv)
implicit none
integer n, lenwm, iwm, leniwm, iret, locwmp, locimp, iersl
integer kmp, mmax, methn, methk, ipflg, mfdif, nfe, nje, nni
Expand All @@ -2647,7 +2647,6 @@ dimension u(*), uprev(n), unew(n), savf(n), fprev(n), su(n), sf(n)
integer icflag, icnstr, ivio, ivar
dimension icnstr(n)
logical mxtkn, dog1, nwttkn
Use(Svrstatus) # comnfe
c-----------------------------------------------------------------------
c nks001 common block.
c-----------------------------------------------------------------------
Expand Down Expand Up @@ -2730,6 +2729,7 @@ subroutine dogstp (m, mp1, mmaxp1, ygm, ycp, beta, hes, tau, ynew,
* stepmx, dog1, nwttkn, cpl, gml, n, v, xnew,
* xnewl, wk, wmp, iwmp, u, su, sf, savf, f, jac,
* psol)
Use(Cdv)
implicit none
integer m, mp1, mmaxp1, n, iwmp, locwmp, locimp, iersl, kmp
integer mmax, methn, methk, ipflg, mfdif, nfe, nje, nni, nli
Expand All @@ -2741,7 +2741,6 @@ dimension ygm(m), ycp(m), hes(mmaxp1,m), ynew(mp1), xnew(n),
* v(n,m), wk(n), wmp(*), iwmp(*), u(*), su(n), sf(n),
* savf(n)
logical dog1, nwttkn
Use(Svrstatus) # comnfe
c-----------------------------------------------------------------------
c this is subroutine dogstp, which computes the dogleg step for a
c given trust region size tau.
Expand Down Expand Up @@ -2913,6 +2912,7 @@ subroutine trgupd (m, mp1, mmaxp1, n, np1, u, savf, f1nrm, x, xl,
* ynew, su, sf, nwttkn, stepmx, beta, hes,
* stptol, mxtkn, tau, uprev, fprev, f1prv, upls,
* f1pls, wk, ivio, iret, f)
Use(Cdv)
implicit none
integer m, mp1, mmaxp1, n, np1, ivio, iret, locwmp, locimp
integer iersl, kmp, mmax, methn, methk, ipflg, mfdif, nfe, nje
Expand All @@ -2923,7 +2923,6 @@ subroutine trgupd (m, mp1, mmaxp1, n, np1, u, savf, f1nrm, x, xl,
* wk, savf
dimension u(*), x(n), ynew(m), savf(n), su(n), sf(n),
* hes(mmaxp1,m), uprev(n), fprev(n), upls(n), wk(np1)
Use(Svrstatus) # comnfe
c-----------------------------------------------------------------------
c this is the real version of subroutine trgupd, which determines
c if the x(tau) returned by dogstp satisfies
Expand Down Expand Up @@ -3210,6 +3209,7 @@ c norm() denotes the euclidean norm.
c the beta-condition could not be met on this call.
c
c-----------------------------------------------------------------------
Use(Cdv)
implicit none
integer n, iret, icflag, icnstr, locwmp, locimp, iersl, kmp
integer mmax, methn, methk, ipflg, mfdif, nfe, nje, nni, nli
Expand All @@ -3225,7 +3225,6 @@ c norm() denotes the euclidean norm.
dimension savf(n),u(*),unew(n),p(n),su(n),sf(n),icnstr(n)
real pt1,pt1trl,pt99,one,two,alpha,acond,mcond,bcond
logical mxtkn
Use(Svrstatus) # comnfe
c-----------------------------------------------------------------------
c nks001 common block.
c-----------------------------------------------------------------------
Expand Down Expand Up @@ -3864,6 +3863,7 @@ c norm() denotes the euclidean norm.
c maximum length stepmx.
c
c-----------------------------------------------------------------------
Use(Cdv)
implicit none
integer n, iret, icflag, icnstr, locwmp, locimp, iersl, kmp
integer mmax, methn, methk, ipflg, mfdif, nfe, nje, nni, nli
Expand All @@ -3877,7 +3877,6 @@ c norm() denotes the euclidean norm.
dimension savf(n),u(*),unew(n),p(n),su(n),sf(n),icnstr(n)
real pt99,one,two
logical mxtkn
Use(Svrstatus) # comnfe
c-----------------------------------------------------------------------
c nks001 common block.
c-----------------------------------------------------------------------
Expand Down

0 comments on commit 90ce6b1

Please sign in to comment.