Skip to content

Commit bab8eb1

Browse files
committed
Pypi version 7.0.8.4.15rc1. This version contains the direct solver.
1 parent a060f8c commit bab8eb1

File tree

9 files changed

+191
-62
lines changed

9 files changed

+191
-62
lines changed

MANIFEST

+13-7
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ a.out
2121
convertor
2222
forthonf2c.h
2323
localrules.py
24+
localrules.pyc
2425
mppl.h
2526
pck
2627
setup.py
@@ -51,13 +52,6 @@ api/forthonf2c.h
5152
api/inelrates.m
5253
api/pck
5354
api/sputt.m
54-
bbb/.#bbb.v.7.10
55-
bbb/.#bbb.v.7.11
56-
bbb/.#bbb.v.7.13
57-
bbb/.#bbb.v.7.14
58-
bbb/.#bbb.v.7.19
59-
bbb/.#bbb.v.7.9
60-
bbb/.#geometry.m.7.6
6155
bbb/.odesolve.m.swp
6256
bbb/Package
6357
bbb/PackageMake
@@ -74,6 +68,7 @@ bbb/geometry.m
7468
bbb/griddubl.m
7569
bbb/lsodefix
7670
bbb/oderhs.m
71+
bbb/oderhs.m.sav
7772
bbb/odesetup.m
7873
bbb/odesolve.m
7974
bbb/pck
@@ -137,11 +132,14 @@ jupyter/PyUedge.ipynb
137132
jupyter/README
138133
jupyter/aeqdsk
139134
jupyter/case_setup.py
135+
jupyter/case_setup2.py
136+
jupyter/case_setup2.pyc
140137
jupyter/d3d.hdf5
141138
jupyter/d3d.pdb
142139
jupyter/gridue
143140
jupyter/junk.tris
144141
jupyter/neqdsk
142+
jupyter/rdd3d_cfdupg.8x4.hdf5
145143
jupyter/.ipynb_checkpoints/PyUedge-checkpoint.ipynb
146144
pyscripts/.#rdinitdt.py.7.0
147145
pyscripts/.#uedge_lists.py.7.2
@@ -159,10 +157,12 @@ pyscripts/bbb.dat
159157
pyscripts/cdf4.py
160158
pyscripts/com.dat
161159
pyscripts/convert.py
160+
pyscripts/convert.pyc
162161
pyscripts/convert1.py
163162
pyscripts/convertvsh5.py
164163
pyscripts/double.py
165164
pyscripts/filelists.py
165+
pyscripts/filelists.pyc
166166
pyscripts/flx.dat
167167
pyscripts/grd.dat
168168
pyscripts/hdf5.py
@@ -202,15 +202,20 @@ pyscripts/contrib/reconv.py
202202
pyscripts/contrib/ue_animate.py
203203
pyscripts/contrib/ue_plot.py
204204
pyscripts/contrib/utils.py
205+
pytests/README
205206
pytests/__init__.py
206207
pytests/__init__.pyc
207208
pytests/uedge_test.py
208209
pytests/uedge_test.pyc
209210
pytests/level_1/dotest.py
210211
pytests/level_1/template.py
211212
pytests/level_1/pyres/template.res
213+
pytests/level_2/aeqdsk
214+
pytests/level_2/aeqdskd3d
212215
pytests/level_2/dotest.py
213216
pytests/level_2/gridue
217+
pytests/level_2/neqdsk
218+
pytests/level_2/neqdskd3d
214219
pytests/level_2/rdd3d_cfdupg_8x4.py
215220
pytests/level_2/data/aeqdskd3d
216221
pytests/level_2/data/d3d_cfdupg.h5
@@ -227,6 +232,7 @@ svr/PackageMake
227232
svr/daspk.m
228233
svr/daux1.f
229234
svr/nksol.m
235+
svr/nksol.m.sav
230236
svr/pck
231237
svr/petsc-uedge.F90
232238
svr/svr.pack

PKG-INFO

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 1.1
22
Name: uedge
3-
Version: 7.0.8.4.14
3+
Version: 7.0.8.4.15rc1
44
Summary: 2D Fluid simulation of plasma and neutrals in magnetic fusion devices
55
Home-page: UNKNOWN
66
Author: Bill Meyer

bbb/oderhs.m

100644100755
File mode changed.

jupyter/PyUedge.ipynb

+92-44
Large diffs are not rendered by default.

localrules.pyc

151 Bytes
Binary file not shown.

pyscripts/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '7.0.8.4.14'
1+
__version__ = '7.0.8.4.15rc1'

pyscripts/uedgeplots.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
from uedge import *
1111
from numpy import sin, cos
1212
from scipy import spatial
13-
from scipy.misc import bytescale
13+
from skimage.util import img_as_ubyte as bytescale
14+
1415

1516
# This file defines a function to plot the UEDGE mesh, and # then calls the function to plot the entire mesh.
1617
# To use this file in a simple way, give the following ands:
@@ -222,7 +223,7 @@ def mkdensityfile(filename, ival, renmin=None, renmax=None, samples=[500, 500, 5
222223
val[:, -1] = 0
223224
vf = np.append(val.ravel(), [renmin])
224225
#dens = bytescale(np.average(vf[i],axis=1,weights=1./d),cmin=renmin,cmax=renmax)
225-
dens = bytescale(vf[i], cmin=renmin, cmax=renmax)
226+
dens = bytescale(vf[i] - renmin)
226227
file.write(dens)
227228
file.close()
228229

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from Forthon.compilers import FCompiler
1111
import getopt
1212

13-
version='7.0.8.4.14'
13+
version='7.0.8.4.15rc1'
1414

1515
try:
1616
os.environ['PATH'] += os.pathsep + site.USER_BASE + '/bin'

svr/nksol.m

100644100755
+80-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
c
2-
c $Id: nksol.m,v 7.1 2019/10/14 22:59:29 meyer8 Exp $
2+
c $Id: nksol.m,v 7.2 2020/02/12 18:35:18 meyer8 Exp $
33
c
44

55
c!include "../mppl.h"
@@ -811,7 +811,9 @@ ccc write(*,*) 'epsmch = ', epsmch
811811
c-----------------------------------------------------------------------
812812
c initialize parameters. check for illegal input.
813813
c-----------------------------------------------------------------------
814-
if ( (iabs(mf) .lt. 1) .or. (iabs(mf) .gt. 3) ) then
814+
815+
c:MVU 15-jan-2020 if ( (iabs(mf) .lt. 1) .or. (iabs(mf) .gt. 3) ) then
816+
if ( (iabs(mf) .lt. 1) .or. (iabs(mf) .gt. 4) ) then
815817
c illegal value of method flag mf.
816818
iterm = -1
817819
ierr = 10
@@ -832,9 +834,21 @@ call errgen(ierr,zero,zero,0,0)
832834
elseif (mf .eq. -1) then
833835
methn = 0
834836
methk = 2
835-
elseif (mf .ge. 2) then
837+
ccc MVU: 15-jan-2020
838+
c elseif (mf .ge. 2) then
839+
c methn = 2
840+
c methk = mf - 1
841+
elseif (mf .eq. 2) then
842+
methn = 2
843+
methk = 1
844+
elseif (mf .eq. 3) then
836845
methn = 2
837-
methk = mf - 1
846+
methk = 2
847+
elseif (mf .eq. 4) then
848+
c........ using direct solver
849+
methn = 2
850+
methk = 3
851+
ccc MVU: 15-jan-2020
838852
elseif (mf .le. -2) then
839853
methn = 0
840854
methk = -mf - 1
@@ -920,6 +934,10 @@ call errgen(ierr,rwork(i),zero,i,0)
920934
lenk = 1 + 3*n + 3 + n*mmax + n + mmax**2
921935
else if (methk .eq. 2) then
922936
lenk = 1 + 3*n + 3 + n*mmax + n + 2 + 2*mmax*(mmax+1) + mmax
937+
ccc MVU: 15-jan-2020
938+
else if (methk .eq. 3) then
939+
lenk = 1 + 3*n + 3 + n*mmax + n + 2 + 2*mmax*(mmax+1) + mmax
940+
ccc MVU: 15-jan-2020
923941
endif
924942
lenwm = lenk + lenwmp
925943
if (lenwmp .ne. 0) then
@@ -1565,6 +1583,9 @@ dimension u(*), savf(n), su(n), sf(n), wm(lenwm), iwm(leniwm),
15651583
c methods used so far:
15661584
c 1. methk = 1 ------> spiom
15671585
c 2. methk = 2 ------> gmres
1586+
ccc MVU: 15-jan-2020
1587+
c 3. methk = 3 ------> direct
1588+
ccc MVU: 15-jan-2020
15681589
c-----------------------------------------------------------------------
15691590
integer i, ib, iflag, ihes, iv, miom
15701591
real bnrm
@@ -1578,7 +1599,7 @@ dimension u(*), savf(n), su(n), sf(n), wm(lenwm), iwm(leniwm),
15781599
save
15791600
c
15801601
iersl = 0
1581-
go to (100,200), methk
1602+
go to (100,200,300), methk
15821603
c-----------------------------------------------------------------------
15831604
c use the spiom algorithm to solve the linear system j*x = -f.
15841605
c-----------------------------------------------------------------------
@@ -1628,6 +1649,56 @@ call scopy (mmax, wm(ib), 1, wm(ihes), 1)
16281649
iwm(1) = mgmr
16291650
endif
16301651
return
1652+
1653+
ccc MVU: 15-jan-2020
1654+
c-----------------------------------------------------------------------
1655+
c use the direct algorithm to solve the linear system j*x = -f.
1656+
c-----------------------------------------------------------------------
1657+
300 continue
1658+
mmaxp1 = mmax + 1
1659+
iv = 3
1660+
ib = iv + n*mmax
1661+
ihes = ib + n + 1
1662+
ihsv = ihes + mmax*(mmaxp1+1) + 1
1663+
iwk = ihsv + mmax*mmaxp1
1664+
iq = iwk + n
1665+
do 310 i = 1,n
1666+
310 wm(i+ib-1) = x(i)
1667+
1668+
ccc - this is direct solver
1669+
do i=1,n
1670+
x(i)=x(i)*sf(i)/su(i)
1671+
enddo
1672+
call psol(n, u, savf, su, sf, f, jac, wm(iwk), wm(locwmp),
1673+
* iwm(locimp), x, iflag)
1674+
npsl = 1
1675+
bnrm = 0.
1676+
mgmr = 1
1677+
rhom = 0.
1678+
1679+
ccc - this way mfnksol=4 would identically match mfnksol=3
1680+
c$$$ call spigmr (n, u, savf, wm(ib), su, sf, mmax, mmaxp1, kmp,
1681+
c$$$ * eps, f, jac, psol, npsl, x, wm(iv), wm(ihes), wm(iq),
1682+
c$$$ * wm(ihsv), mgmr, wm(locwmp), iwm(locimp), wm(iwk), methn,
1683+
c$$$ * bnrm, ipflg, iflag, rhom)
1684+
1685+
nni = nni + 1
1686+
nli = nli + mgmr
1687+
nps = nps + npsl
1688+
if (iflag .ne. 0) ncfl = ncfl + 1
1689+
if (iflag .ge. 2) iersl = 1
1690+
if (iflag .lt. 0) iersl = -1
1691+
if (iersl .eq. 0) then
1692+
call scopy (mmax, wm(ib), 1, wm(ihes), 1)
1693+
wm(1) = bnrm
1694+
iwm(1) = mgmr
1695+
endif
1696+
return
1697+
ccc MVU: 15-jan-2020
1698+
1699+
1700+
1701+
16311702
c----------------------- end of subroutine solpk -----------------------
16321703
end
16331704
subroutine spiom (n, u, savf, b, su, sf, mmax, iomp, eps,
@@ -3186,6 +3257,9 @@ call cnstrt (n, u, p, icnstr, tau, rlx, iret, ivar)
31863257
slpi = -two*f1nrm*ratio
31873258
CCC should an adjf1 be used for f1nrm above??
31883259
if (methk .eq. 2) slpi = slpi + rhom*rhom*ratio
3260+
ccc MVU: 15-jan-2020
3261+
if (methk .eq. 3) slpi = slpi + rhom*rhom*ratio
3262+
ccc MVU: 15-jan-2020
31893263
call slngth(n, u, p, su, rlngth)
31903264
rlmin = stptol/rlngth
31913265
rl = one
@@ -3368,7 +3442,7 @@ subroutine errgen (ierr, v1, v2, i1, i2)
33683442
c-----------------------------------------------------------------------
33693443
9000 format(//
33703444
* ' nksol --- illegal value for mf. mf must be between '
3371-
*/' 1 and 3, or between -3 and -1.'
3445+
*/' 1 and 4, or between -3 and -1.'
33723446
*)
33733447
9010 format(//
33743448
* ' nksol --- illegal value for mdif. mdif must either 0 or 1. '

0 commit comments

Comments
 (0)