Skip to content

Commit

Permalink
Add constants.f90
Browse files Browse the repository at this point in the history
  • Loading branch information
pecchia committed Nov 3, 2020
1 parent 4427caf commit 3ec4e55
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
*.o
*.mod
*.f90~
#Makefile#
test
4 changes: 1 addition & 3 deletions caotic_pendulum.f90
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
module caotic_pendulum
use precision
use constants
use functions
use solvers
implicit none

real(dp), parameter :: pi = 3.14159265358979323846264338327_dp
real(dp), parameter :: eps = 1.d-10

contains

subroutine solve(Nstep, Nperiods, x0, v0)
Expand Down
7 changes: 7 additions & 0 deletions constants.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module constants
use precision

real(dp), parameter :: pi = acos(-1.0_dp)
real(dp), parameter :: eps = 1.d-10

end module constants
2 changes: 2 additions & 0 deletions make.dep
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
caotic_pendulum.o: precision.o
caotic_pendulum.o: constants.o
caotic_pendulum.o: functions.o
caotic_pendulum.o: solvers.o
constants.o: precision.o
functions.o: precision.o
functions.o: precision.o
solvers.o: precision.o
Expand Down
2 changes: 1 addition & 1 deletion test.f90
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
program test
use precision
use constants
use functions
use solvers
implicit none

real(dp), parameter :: pi = acos(-1.0_dp)
real(dp) :: err, t, dt, x0, v0, Qmin, Qmax, dQ, AA, BB, xex
real(dp), allocatable :: u(:), u0(:), param(:)
integer :: i, j, k, NQ, Nstep, Ncicli, num_args, funit ! funit = file unit
Expand Down

0 comments on commit 3ec4e55

Please sign in to comment.