mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 11:53:32 +01:00
Added example and bin/irpf90. irpman needs to be written
Version:1.1.14
This commit is contained in:
parent
50cfddd824
commit
8d36c357ae
12
bin/irpf90
Executable file
12
bin/irpf90
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
wd = os.path.abspath(os.path.dirname(__file__))
|
||||
wd += "/../src/"
|
||||
sys.path.append(wd)
|
||||
for p in sys.path:
|
||||
print p
|
||||
|
||||
import irpf90
|
10
bin/irpman
Executable file
10
bin/irpman
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
wd = os.path.abspath(os.path.dirname(__file__))
|
||||
wd += "/../src/"
|
||||
sys.path.append(wd)
|
||||
|
||||
import irpman
|
12
example/Makefile
Normal file
12
example/Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
IRPF90 = irpf90 #-a -d
|
||||
FC = gfortran
|
||||
FCFLAGS= -ffree-line-length-none -O2
|
||||
|
||||
SRC=
|
||||
OBJ=
|
||||
LIB=
|
||||
|
||||
include irpf90.make
|
||||
|
||||
irpf90.make: $(wildcard *.irp.f)
|
||||
$(IRPF90)
|
16
example/input.irp.f
Normal file
16
example/input.irp.f
Normal file
@ -0,0 +1,16 @@
|
||||
BEGIN_PROVIDER [ integer, d1 ]
|
||||
&BEGIN_PROVIDER [ integer, d2 ]
|
||||
&BEGIN_PROVIDER [ integer, d3 ]
|
||||
&BEGIN_PROVIDER [ integer, d4 ]
|
||||
&BEGIN_PROVIDER [ integer, d5 ]
|
||||
|
||||
BEGIN_SHELL [ /usr/bin/python ]
|
||||
for i in range(1,6):
|
||||
print " print *, 'd%d'"%(i,)
|
||||
print " read(*,*) d%d"%(i,)
|
||||
if i > 1:
|
||||
print " ASSERT ( d%d > d%d )"%(i,i-1)
|
||||
END_SHELL
|
||||
|
||||
END_PROVIDER
|
||||
|
13
example/irp_example1.irp.f
Normal file
13
example/irp_example1.irp.f
Normal file
@ -0,0 +1,13 @@
|
||||
program irp_example1
|
||||
BEGIN_SHELL [ /bin/bash ]
|
||||
echo print *, \'Compiled by `whoami` on `date`\'
|
||||
echo print *, \'$FC $FCFLAGS\'
|
||||
echo print *, \'$IRPF90\'
|
||||
END_SHELL
|
||||
call run
|
||||
|
||||
end
|
||||
|
||||
subroutine run
|
||||
print *, 't = ', t
|
||||
end
|
7
example/irp_example2.irp.f
Normal file
7
example/irp_example2.irp.f
Normal file
@ -0,0 +1,7 @@
|
||||
program irp_example2
|
||||
print *, "Example 2"
|
||||
print *, 't = ', t
|
||||
|
||||
! IRP_WRITE t
|
||||
|
||||
end
|
27
example/uvwt.irp.f
Normal file
27
example/uvwt.irp.f
Normal file
@ -0,0 +1,27 @@
|
||||
BEGIN_PROVIDER [ integer, t ]
|
||||
t = u1+v+4
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [integer,w]
|
||||
w = d5+3
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer, v ]
|
||||
v = u2+w+2
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer, u1 ]
|
||||
integer :: fu
|
||||
u1 = fu(d1,d2)
|
||||
PROVIDE u2
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer, u2 ]
|
||||
integer :: fu
|
||||
u2 = fu(d3,d4)
|
||||
END_PROVIDER
|
||||
|
||||
integer function fu(x,y)
|
||||
integer :: x,y
|
||||
fu = x+y+1
|
||||
end function
|
@ -1 +1 @@
|
||||
version = "1.1.13"
|
||||
version = "1.1.14"
|
||||
|
Loading…
Reference in New Issue
Block a user