-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #273 from dynamicslab/parametric_library
Parametric library
- Loading branch information
Showing
104 changed files
with
7,728 additions
and
524 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
examples/17_parameterized_pattern_formation/data/auto/c.cycle_even
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
dat='cycle_even.dat' | ||
NDIM= 4, IPS = 9, IRS = 0, ILP = 1 | ||
PAR={1:-1,11:50.26548245743669} | ||
ICP = [1,11,2,3,4] | ||
NTST= 256, NCOL= 4, IAD = 1, ISP = 2, ISW = 1, IPLT= 0, NBC= 0, NINT= 0 | ||
NMX= 1000, NPR= 1, MXBF= 0, IID = 2, ITMX= 10, ITNW= 7, NWTN= 3, JAC= 0 | ||
EPSL= 1e-05, EPSU = 1e-05, EPSS = 1e-05 | ||
DS = 0.001, DSMIN=1e-10, DSMAX= 1e-2, IADS= 1 | ||
NPAR = 15, THL = {}, THU = {2:0,3:0,4:0} | ||
UZR = {1: [-1,0.1,2.5,5,7.5,10.0]} | ||
RL0=-5.0 | ||
RL1=10.1 | ||
A1=0.8 | ||
IEQUIB = 0 | ||
IREV = [0,1,0,1] |
15 changes: 15 additions & 0 deletions
15
examples/17_parameterized_pattern_formation/data/auto/c.cycle_odd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
dat='cycle_odd.dat' | ||
NDIM= 4, IPS = 9, IRS = 0, ILP = 1 | ||
PAR={1:-1,11:50.26548245743669} | ||
ICP = [1,11,2,3,4] | ||
NTST= 256, NCOL= 4, IAD = 1, ISP = 2, ISW = 1, IPLT= 0, NBC= 0, NINT= 0 | ||
NMX= 1000, NPR= 1, MXBF= 0, IID = 2, ITMX= 10, ITNW= 7, NWTN= 3, JAC= 0 | ||
EPSL= 1e-05, EPSU = 1e-05, EPSS = 1e-05 | ||
DS = 0.001, DSMIN=1e-10, DSMAX= 1e-2, IADS= 1 | ||
NPAR = 15, THL = {}, THU = {2:0,3:0,4:0} | ||
UZR = {1: [-1,0.1,2.5,5,7.5,10.0]} | ||
RL0=-5.0 | ||
RL1=1.0 | ||
A1=0.8 | ||
IEQUIB = 0 | ||
IREV = [1,0,1,0] |
12 changes: 12 additions & 0 deletions
12
examples/17_parameterized_pattern_formation/data/auto/c.periodic_E
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
dat='periodic.dat' | ||
NDIM= 4, IPS = 4, IRS = 0, ILP = 1 | ||
ICP = [1,11,2,3,4] | ||
PAR={1:-1,11:6.283185307179586} | ||
NTST= 35, NCOL= 4, IAD = 1, ISP = 1, ISW = 1, IPLT= 0, NBC= 4, NINT= 0 | ||
NMX= 1000, NPR= 1, MXBF= 0, IID = 2, ITMX= 10, ITNW= 7, NWTN= 3, JAC= 0 | ||
EPSL= 1e-07, EPSU = 1e-07, EPSS = 1e-05 | ||
DS = 1e-6, DSMIN=1e-20, DSMAX= 1e-2, IADS= 1 | ||
NPAR = 4, THL = {}, THU = {2:0,3:0,4:0} | ||
UZR = {1: [-1,0,2.5,5,7.5,10.0]} | ||
RL0=-2.0 | ||
RL1=10.1 |
10 changes: 10 additions & 0 deletions
10
examples/17_parameterized_pattern_formation/data/auto/c.steady_E
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
NDIM= 4, IPS = 1, IRS = 0, ILP = 1 | ||
ICP = [1,11,2,3,4] | ||
NTST= 35, NCOL= 4, IAD = 1, ISP = 2, ISW = 1, IPLT= 0, NBC= 0, NINT= 0 | ||
NMX= 1000, NPR= 20, MXBF= 0, IID = 2, ITMX= 10, ITNW= 7, NWTN= 3, JAC= 1 | ||
EPSL= 1e-07, EPSU = 1e-07, EPSS = 1e-05 | ||
DS = 0.01, DSMIN=0.0001, DSMAX= 0.05, IADS= 1 | ||
NPAR = 15, THL = {}, THU = {2:0,3:0,4:0} | ||
UZR = {1: [0.0,2.5,5,7.5,10.0]} | ||
RL0=-0.1 | ||
RL1=10.1 |
141 changes: 141 additions & 0 deletions
141
examples/17_parameterized_pattern_formation/data/auto/cycle_even.dat
Large diffs are not rendered by default.
Oops, something went wrong.
141 changes: 141 additions & 0 deletions
141
examples/17_parameterized_pattern_formation/data/auto/cycle_odd.dat
Large diffs are not rendered by default.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
examples/17_parameterized_pattern_formation/data/auto/even.auto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import numpy as np | ||
import os | ||
|
||
even=run('snaking_E',c='cycle_even') | ||
sols=[] | ||
pars=[] | ||
for i in range(len(even[0])): | ||
u=even(i+1)['U(1)'] | ||
t=even(i+1)['t'] | ||
e=even(i+1)['PAR(1)'] | ||
r=even(i+1)['PAR(2)'] | ||
b=even(i+1)['PAR(3)'] | ||
c=even(i+1)['PAR(4)'] | ||
T=even(i+1)['PAR(11)'] | ||
norm=even(i+1)['L2-NORM'] | ||
sols=sols+[np.vstack([t,u]).T] | ||
pars=pars+[[e,r,b,c,T,norm]] | ||
|
||
np.save('even_sols.npy',sols) | ||
np.save('even_pars.npy',pars) | ||
cl() |
Binary file added
BIN
+176 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/stable_0.npy
Binary file not shown.
Binary file added
BIN
+656 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/stable_1.npy
Binary file not shown.
Binary file added
BIN
+704 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/stable_2.npy
Binary file not shown.
Binary file added
BIN
+720 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/stable_3.npy
Binary file not shown.
Binary file added
BIN
+736 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/stable_4.npy
Binary file not shown.
Binary file added
BIN
+752 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/stable_5.npy
Binary file not shown.
Binary file added
BIN
+768 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/stable_6.npy
Binary file not shown.
Binary file added
BIN
+800 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/stable_7.npy
Binary file not shown.
Binary file added
BIN
+800 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/stable_8.npy
Binary file not shown.
Binary file added
BIN
+496 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/stable_9.npy
Binary file not shown.
Binary file added
BIN
+1.16 KB
examples/17_parameterized_pattern_formation/data/auto/even/unstable_0.npy
Binary file not shown.
Binary file added
BIN
+944 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/unstable_1.npy
Binary file not shown.
Binary file added
BIN
+608 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/unstable_2.npy
Binary file not shown.
Binary file added
BIN
+592 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/unstable_3.npy
Binary file not shown.
Binary file added
BIN
+608 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/unstable_4.npy
Binary file not shown.
Binary file added
BIN
+608 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/unstable_5.npy
Binary file not shown.
Binary file added
BIN
+624 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/unstable_6.npy
Binary file not shown.
Binary file added
BIN
+624 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/unstable_7.npy
Binary file not shown.
Binary file added
BIN
+640 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/unstable_8.npy
Binary file not shown.
Binary file added
BIN
+656 Bytes
examples/17_parameterized_pattern_formation/data/auto/even/unstable_9.npy
Binary file not shown.
Binary file not shown.
Binary file not shown.
21 changes: 21 additions & 0 deletions
21
examples/17_parameterized_pattern_formation/data/auto/odd.auto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import numpy as np | ||
import os | ||
|
||
odd=run('snaking_E',c='cycle_odd') | ||
sols=[] | ||
pars=[] | ||
for i in range(len(odd[0])): | ||
u=odd(i+1)['U(1)'] | ||
t=odd(i+1)['t'] | ||
e=odd(i+1)['PAR(1)'] | ||
r=odd(i+1)['PAR(2)'] | ||
b=odd(i+1)['PAR(3)'] | ||
c=odd(i+1)['PAR(4)'] | ||
T=odd(i+1)['PAR(11)'] | ||
norm=odd(i+1)['L2-NORM'] | ||
sols=sols+[np.vstack([t,u]).T] | ||
pars=pars+[[e,r,b,c,T,norm]] | ||
|
||
np.save('odd_sols.npy',sols) | ||
np.save('odd_pars.npy',pars) | ||
cl() |
Binary file added
BIN
+512 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/stable_0.npy
Binary file not shown.
Binary file added
BIN
+688 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/stable_1.npy
Binary file not shown.
Binary file added
BIN
+672 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/stable_2.npy
Binary file not shown.
Binary file added
BIN
+704 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/stable_3.npy
Binary file not shown.
Binary file added
BIN
+688 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/stable_4.npy
Binary file not shown.
Binary file added
BIN
+720 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/stable_5.npy
Binary file not shown.
Binary file added
BIN
+736 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/stable_6.npy
Binary file not shown.
Binary file added
BIN
+784 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/stable_7.npy
Binary file not shown.
Binary file added
BIN
+640 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/stable_8.npy
Binary file not shown.
Binary file added
BIN
+1.8 KB
examples/17_parameterized_pattern_formation/data/auto/odd/unstable_0.npy
Binary file not shown.
Binary file added
BIN
+624 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/unstable_1.npy
Binary file not shown.
Binary file added
BIN
+592 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/unstable_2.npy
Binary file not shown.
Binary file added
BIN
+592 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/unstable_3.npy
Binary file not shown.
Binary file added
BIN
+608 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/unstable_4.npy
Binary file not shown.
Binary file added
BIN
+608 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/unstable_5.npy
Binary file not shown.
Binary file added
BIN
+624 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/unstable_6.npy
Binary file not shown.
Binary file added
BIN
+624 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/unstable_7.npy
Binary file not shown.
Binary file added
BIN
+656 Bytes
examples/17_parameterized_pattern_formation/data/auto/odd/unstable_8.npy
Binary file not shown.
Binary file not shown.
Binary file not shown.
21 changes: 21 additions & 0 deletions
21
examples/17_parameterized_pattern_formation/data/auto/periodic.auto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import numpy as np | ||
import os | ||
|
||
periodic=run('snaking_E_T',c='periodic_E') | ||
sols=[] | ||
pars=[] | ||
for i in range(len(periodic[0])): | ||
u=periodic(i+1)['U(1)'] | ||
t=periodic(i+1)['t'] | ||
e=periodic(i+1)['PAR(1)'] | ||
r=periodic(i+1)['PAR(2)'] | ||
b=periodic(i+1)['PAR(3)'] | ||
c=periodic(i+1)['PAR(4)'] | ||
T=periodic(i+1)['PAR(11)'] | ||
norm=periodic(i+1)['L2-NORM'] | ||
sols=sols+[np.vstack([t,u]).T] | ||
pars=pars+[[e,r,b,c,T,norm]] | ||
|
||
np.save('periodic_sols.npy',sols) | ||
np.save('periodic_pars.npy',pars) | ||
cl() |
141 changes: 141 additions & 0 deletions
141
examples/17_parameterized_pattern_formation/data/auto/periodic.dat
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+3.02 KB
examples/17_parameterized_pattern_formation/data/auto/periodic/stable_0.npy
Binary file not shown.
Binary file added
BIN
+4.27 KB
examples/17_parameterized_pattern_formation/data/auto/periodic/unstable_0.npy
Binary file not shown.
Binary file added
BIN
+21.2 KB
examples/17_parameterized_pattern_formation/data/auto/periodic_pars.npy
Binary file not shown.
Binary file added
BIN
+992 KB
examples/17_parameterized_pattern_formation/data/auto/periodic_sols.npy
Binary file not shown.
160 changes: 160 additions & 0 deletions
160
examples/17_parameterized_pattern_formation/data/auto/snaking_E.f90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
!---------------------------------------------------------------------- | ||
!---------------------------------------------------------------------- | ||
! cir : Homoclinic Bifurcation in an Electronic Circuit | ||
! (the same equations as in demo tor) | ||
!---------------------------------------------------------------------- | ||
!---------------------------------------------------------------------- | ||
|
||
SUBROUTINE FUNC(NDIM,U,ICP,PAR,IJAC,F,DFDU,DFDP) | ||
! ---------- ---- | ||
|
||
IMPLICIT NONE | ||
INTEGER, INTENT(IN) :: NDIM, ICP(*), IJAC | ||
DOUBLE PRECISION, INTENT(IN) :: U(NDIM), PAR(*) | ||
DOUBLE PRECISION, INTENT(OUT) :: F(NDIM) | ||
DOUBLE PRECISION, INTENT(INOUT) :: DFDU(NDIM,NDIM), DFDP(NDIM,*) | ||
|
||
DOUBLE PRECISION E | ||
DOUBLE PRECISION P | ||
DOUBLE PRECISION R | ||
DOUBLE PRECISION B | ||
DOUBLE PRECISION C | ||
DOUBLE PRECISION DRDE | ||
DOUBLE PRECISION DBDE | ||
DOUBLE PRECISION DCDE | ||
|
||
E=PAR(1) | ||
P=2 | ||
R=-6.9142484373744839e-01-7.3260087859986806e-02*E-2.7462906764622484e-03*E*E | ||
B=1.7910887544563148e+00-3.0554994266613233e-01*E-2.4878961651300643e-02*E*E | ||
C=7.5841639153560658e-01+5.5761858956235276e-02*E+5.1480291789433611e-03*E*E | ||
DRDE=-7.3260087859986806e-02-2.7462906764622484e-03*E*2 | ||
DBDE=-3.0554994266613233e-01-2.4878961651300643e-02*E*2 | ||
DCDE=5.5761858956235276e-02+5.1480291789433611e-03*E*2 | ||
|
||
F(1)= U(2) | ||
F(2)= U(3) | ||
F(3)= U(4) | ||
F(4)= R*U(1)-P*U(3)-U(1)+B*U(1)**3-C*U(1)**5 | ||
|
||
IF(IJAC.EQ.0)RETURN | ||
|
||
DFDU(1,1)=0.0d0 | ||
DFDU(1,2)=1.0d0 | ||
DFDU(1,3)=0.0d0 | ||
DFDU(1,4)=0.0d0 | ||
|
||
DFDU(2,1)=0.0d0 | ||
DFDU(2,2)=0.0d0 | ||
DFDU(2,3)=1.0d0 | ||
DFDU(2,4)=0.0d0 | ||
|
||
DFDU(3,1)=0.0d0 | ||
DFDU(3,2)=0.0d0 | ||
DFDU(3,3)=0.0d0 | ||
DFDU(3,4)=1.0d0 | ||
|
||
DFDU(4,1)=R-1.0d0+3.0d0*B*U(1)**2-5.0d0*C*U(1)**4 | ||
DFDU(4,2)=0.0d0 | ||
DFDU(4,3)=-P | ||
DFDU(4,4)=0.0d0 | ||
|
||
IF(IJAC.EQ.1)RETURN | ||
|
||
! *Parameter derivatives | ||
DFDP(1,1)=0.0d0 | ||
DFDP(2,1)=0.0d0 | ||
DFDP(3,1)=0.0d0 | ||
DFDP(4,1)=U(1)*DRDE+U(1)**3*DBDE-U(1)**5*DCDE | ||
|
||
END SUBROUTINE FUNC | ||
|
||
SUBROUTINE STPNT(NDIM,U,PAR,T) | ||
! ---------- ----- | ||
|
||
IMPLICIT NONE | ||
INTEGER, INTENT(IN) :: NDIM | ||
DOUBLE PRECISION, INTENT(INOUT) :: U(NDIM),PAR(*) | ||
DOUBLE PRECISION, INTENT(IN) :: T | ||
|
||
!---------------------------------------------------------------------- | ||
! Problem parameters (only PAR(1-9) are available to the user) : | ||
|
||
U(1)=0.0 | ||
U(2)=0.0 | ||
U(3)=0.0 | ||
U(4)=0.0 | ||
PAR(1)=0.0 ! E | ||
|
||
!---------------------------------------------------------------------- | ||
! If IEQUIB >0 put initial equilibrium in PAR(11+i), i=1,...,NDIM : | ||
|
||
PAR(12) = 0.0 | ||
PAR(13) = 0.0 | ||
PAR(14) = 0.0 | ||
PAR(15) = 0.0 | ||
|
||
|
||
END SUBROUTINE STPNT | ||
|
||
SUBROUTINE PVLS(NDIM,U,PAR) | ||
! ---------- ---- | ||
|
||
IMPLICIT NONE | ||
INTEGER, INTENT(IN) :: NDIM | ||
DOUBLE PRECISION, INTENT(IN) :: U(NDIM) | ||
DOUBLE PRECISION, INTENT(INOUT) :: PAR(*) | ||
! Homoclinic bifurcations COMMON block needed here : | ||
COMMON /BLHOM/ ITWIST,ISTART,IEQUIB,NFIXED,NPSI,NUNSTAB,NSTAB,NREV | ||
INTEGER ITWIST,ISTART,IEQUIB,NFIXED,NPSI,NUNSTAB,NSTAB,NREV | ||
INTEGER I | ||
|
||
DOUBLE PRECISION E | ||
DOUBLE PRECISION P | ||
DOUBLE PRECISION R | ||
DOUBLE PRECISION B | ||
DOUBLE PRECISION C | ||
|
||
E=PAR(1) | ||
P=2 | ||
R=-6.9142484373744839e-01-7.3260087859986806e-02*E-2.7462906764622484e-03*E*E | ||
B=1.7910887544563148e+00-3.0554994266613233e-01*E-2.4878961651300643e-02*E*E | ||
C=7.5841639153560658e-01+5.5761858956235276e-02*E+5.1480291789433611e-03*E*E | ||
|
||
PAR(2)=R | ||
PAR(3)=B | ||
PAR(4)=C | ||
|
||
! If IEQUIB =0 put analytic equilibrium in PAR(11+i), i=1..NDIM | ||
|
||
IF(IEQUIB.EQ.0)THEN | ||
DO I=1,NDIM | ||
PAR(11+I)= 0.0 | ||
ENDDO | ||
ENDIF | ||
|
||
END SUBROUTINE PVLS | ||
|
||
!---------------------------------------------------------------------- | ||
SUBROUTINE BCND(NDIM,PAR,ICP,NBC,U0,U1,FB,IJAC,DBC) | ||
! ---------- ---- | ||
|
||
IMPLICIT NONE | ||
INTEGER, INTENT(IN) :: NDIM,ICP(*),NBC,IJAC | ||
DOUBLE PRECISION, INTENT(IN) :: PAR(*),U0(NDIM),U1(NDIM) | ||
DOUBLE PRECISION, INTENT(OUT) :: FB(NBC) | ||
DOUBLE PRECISION, INTENT(INOUT) :: DBC(NBC,*) | ||
|
||
FB(1)=U0(1) | ||
FB(2)=U1(1) | ||
FB(3)=U0(3) | ||
FB(4)=U1(3) | ||
|
||
END SUBROUTINE BCND | ||
!---------------------------------------------------------------------- | ||
|
||
SUBROUTINE ICND | ||
END SUBROUTINE ICND | ||
|
||
SUBROUTINE FOPT | ||
END SUBROUTINE FOPT |
Oops, something went wrong.