Skip to content

Commit

Permalink
Initial add of examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
llnl-fesp committed Jul 13, 2023
1 parent 97767b6 commit 62584a7
Show file tree
Hide file tree
Showing 9 changed files with 1,158 additions and 3 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Flora Equilibrium and Stability Code

This requires gfortran. It's been tested with Gfortran 11.2. It does use a compiler directive that needs a gfortran compiler >4.8.5. The floor has not been determined.

To build:

This requires gfortran. It requires some compiler switches not available in gforran < 10. It's been tested with 10.0.1, 11.2, 11.3, and 12.2.

pip install forthon<br>
python setup.py build install

Expand All @@ -22,7 +23,16 @@ glr.varlist()

Because of the way the external objects are created a dir(glr) will not reveal the variable names.

## Release
Running:

There are a couple of cases in the examples directory. Run with:

python test1.py <br>
python test2.py <br>

Compare with test1_ref.log and test2_ref.log. These logs are very old, compare for general agreement only.

# Release

Flora is released under an LGPL license. For more details see the
NOTICE and LICENSE files.
Expand Down
154 changes: 154 additions & 0 deletions examples/in_300ks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
#
# Namelist2bas version @[#]$RCSfile: main.c,glr.v $ $Revision: 1.20 $
# Report bugs to [email protected]
#
#
# Beginning of namelist: $noplot
#

from flora import *
#
# End of namelist: $noplot
#
#
# Beginning of namelist: $now1
#
glr.fi1 = 1
glr.fizx = 1
glr.fjrx = -1
glr.fj1 = 0
glr.bias = 0.25
glr.mm = 1
glr.ndiag = 60
glr.fu = 0.5
glr.fv = 0.5
glr.fpsi = 0.5
glr.fz = 0.5
glr.nen = 5
###aname = [ "passing ", "only ", "flr ", "stm50b" ]
### aname = [ "pfudg1.9", "only ", "flr ", "colde-6" ]
glr.sf6 = 1
glr.sf8 = 1
glr.ex0 = 1
glr.ex1 = 0
glr.nmax = 800
glr.lmax = 4
glr.kzs = 1
#
# End of namelist: $now1
#
#
# Beginning of namelist: $curve
#
glr.betrap = 0
glr.ncenter = 4e+11
glr.nsloshin = 4e11
glr.noshinks=4e11
glr.betpas1 = 0.0000
glr.ppas2 = 0.98
glr.ppas3 = 0.96
glr.dpas1 = 0
glr.d1trap = 100000
glr.betslsh = .25
glr.betslsks= .25
glr.betslse = 0
glr.betcent = .10
glr.betcene = 0
glr.cold = 0.01
glr.dip = 0
glr.z3rel = 0.94
glr.psihrel = 1.6
glr.dpsihrel = 0.03
glr.psi0rel = 0.5
glr.rw1 = 11.99
glr.rw = 12
glr.rp1 = 2.
glr.rp1ks=100.
##glr.p2floor = 0.04
glr.p2floor=0.
glr.betring = 0
glr.psi3rel = 1.05
glr.p2wide = 0.2
glr.long = 1
glr.fring = 0.5
##glr.p2flag = 0.04
glr.p2flag = 0.00
glr.pe10 = 0
glr.p2ewide = 0.1
glr.psi0erel = 0.65
glr.ypot = 1
#
# End of namelist: $curve
#
#
# Beginning of namelist: $field
#
glr.phicen = 0
glr.phiplg = 0

glr.ltrans = 0.1
glr.ztrans = 1.2
### glr.bceng = 1000
glr.bceng=0.
glr.pfudge = 0
##glr.bmx1 = 3200
glr.bmx1 = 4000
glr.bmx2 = 4000
###glr.bmx3 = 6000
glr.bmx3=4000
glr.z1c = 34.2
glr.z2c = 99.5
glr.z3c = 160

glr.ncoil = 2
glr.ass[0]=25.71
glr.ass[1]=25.71
glr.als[0]=12.
glr.als[1]=10.

glr.dt = 3e-9
glr.betslsh=.3;glr.betslsks=3.e-4
glr.betcent=1.e-7;glr.betcene=1.e-7
glr.rp1=2.
glr.rp1ks=100.
glr.pfudge=0.;glr.pfudgeks=1.9
glr.noshinks=4e5;glr.betslsks=0.;glr.cold=1.e-8;glr.betslsh=.01;
glr.doflat=True;glr.alfrigid=4.;glr.psi0rel=1.;glr.doxrlin=False;glr.doxrtanh=True
glr.doflat=False;glr.psi0rel=0.25;glr.p2wide=.9
glr.doxrlin=False;glr.doxrtanh=True

glr.exbratio=0.
glr.dt=1.e-7;glr.lmax=1;glr.nmax=3000
##check prev run glr.dt=5.e-7 600step with glr.dt=1e-7 3000step
#glr.betcent=1.e-4;glr.betcene=1.e-4
glr.betcent=1.e-128;glr.betcene=1.e-12

##glr.noshinks=4.e11; glr.betslsks=1.e-5 ##old dr8ks
##glr.noshinks=4.e9; glr.betslsks=.7e-3 ##old dr8ks
##glr.noshinks=4.e9; glr.betslsks=18.7668 << equiv old .7e-3 for new normaliz glr.betslsks
##[glr.bmn2/glr.bvac[150]]**2 = 2.68097D+04 use 2.6810e4 as conversion factor

glr.noshinks=4.e10; glr.betslsks=2.6810e0 ## equiv old glr.betslsks=1.e-4
glr.noshinks=4.e10;glr.betslsks=3.e0
glr.alfrigid=999.;glr.sf6=0;glr.sf8=0;glr.lmax=0
glr.dorzzlb=False
glr.cold=1e-6;glr.alfcold=.001;glr.dt=3.e-7
glr.betslsh=1.e-6
glr.pfudgeks=1.99

glr.noshinks=4e7;glr.betslsks=0.
glr.kplotm=2
glr.rp1ks=20.;glr.rpxks=30.
##glr.rp1ks=100.;glr.rpxks=250.
###glr.zmax=300.;ibvmax1=19;ibvmax2=51

###glr.zmax=500.;ibvmax1=12;ibvmax2=31
glr.zmax=300.
##glr.betslsks=3.e-4
glr.betslsks=30.; glr.betslsh=0.1
###glr.betslsks=glr.betslsks*1.12719
###ibksinit=68 no longer used
#
# End of namelist: $field
#

85 changes: 85 additions & 0 deletions examples/in_iter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
from flora import *
glr.alfcold =0.001
glr.alfrigid =999
glr.als =[12,10,0]
glr.ass =25.71
glr.bceng =0
glr.betcene =1e-12
glr.betcent =1e-128
glr.betpas1 =0.0000
glr.betrap =0
glr.betring =0
glr.betslse =0
glr.betslsh =0.1
glr.betslsks =30
glr.bias =0.25
glr.bmx1 =4000
glr.bmx2 =4000
glr.bmx3 =4000
glr.cold =1e-6
glr.d1trap =100000
glr.dip =0
glr.doflat =False
glr.dorzzlb =False
glr.doxrlin =False
glr.doxrtanh =True
glr.dpas1 =0
glr.dpsihrel =0.03
glr.dt =3e-7
glr.ex0 =1
glr.ex1 =0
glr.exbratio =0
glr.fi1 =1
glr.fizx =1
glr.fj1 =0
glr.fjrx =-1
glr.fpsi =0.5
glr.fring =0.5
glr.fu =0.5
glr.fv =0.5
glr.fz =0.5
#ibvmax1 =19
#ibvmax2 =51
#kin =23
glr.kplotm =2
glr.kzs =1
glr.lmax =0
glr.long =1
glr.ltrans =0.1
glr.mm =1
glr.ncenter =4e+11
glr.ncoil =2
glr.ndiag =60
glr.nen =5
glr.nmax =3000
glr.noshinks =4e7
glr.nsloshin =4e11
glr.p2ewide =0.1
glr.p2flag =0.00
glr.p2floor =0
glr.p2wide =0.9
glr.pe10 =0
glr.pfudge =0
glr.pfudgeks =1.99
glr.phicen =0
glr.phiplg =0
glr.ppas2 =0.98
glr.ppas3 =0.96
glr.psi0erel =0.65
glr.psi0rel =0.25
glr.psi3rel =1.05
glr.psihrel =1.6
glr.rp1 =2
glr.rp1ks =20
glr.rpxks =30
glr.rw1 =11.99
glr.rw =12
glr.sf6 =0
glr.sf8 =0
glr.ypot =1
glr.z1c =34.2
glr.z2c =99.5
glr.z3c =160
glr.z3rel =0.94
glr.zmax =300
glr.ztrans =1.2
Loading

0 comments on commit 62584a7

Please sign in to comment.