Skip to content

Commit 10c520c

Browse files
Merge pull request #54 from ysimillides/master
version 1.0 changes
2 parents 0a9a7ec + a94a644 commit 10c520c

13 files changed

+23
-23
lines changed

.travis.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ language: julia
33
os:
44
- linux
55
julia:
6-
- 0.7
7-
- nightly
6+
- 1.0
87

98
dist: trusty
109

@@ -15,13 +14,13 @@ services:
1514

1615
before_install:
1716
- echo "**** pulling Docker image"
18-
- docker pull ysimillides/fenics-julia-docker:v0.7
17+
- docker pull ysimillides/fenics-julia-docker:v1.0
1918
- chmod +x travis_docker_test_script.sh
2019
notifications:
2120
email: false
2221
script:
2322
- echo "**** running Docker"
24-
- docker run --env-file travis_docker_env.list -t -a STDOUT -a STDIN -a STDERR -v $PWD:/mnt ysimillides/fenics-julia-docker:v0.7 /mnt/travis_docker_test_script.sh $TRAVIS_JULIA_VERSION
23+
- docker run --env-file travis_docker_env.list -t -a STDOUT -a STDIN -a STDERR -v $PWD:/mnt ysimillides/fenics-julia-docker:v1.0 /mnt/travis_docker_test_script.sh $TRAVIS_JULIA_VERSION
2524
after_success:
2625
# push coverage results to Coveralls, .cov files were copied back by script above
2726
- echo "**** submitting coverage information"

REQUIRE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
julia 0.7-beta2
1+
julia 1.0
22
PyCall
33
Requires
44
ProgressMeter

src/FEniCS.jl

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
__precompile__(false)
12
module FEniCS
23
using PyCall
34
using Requires

src/jfem.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ len(U::Union{Expression,FeFunction}) = length(U.pyobject)
9090

9191
interpolate(solution1::FeFunction,solution2::Expression) = FeFunction(fenicspycall(solution1,:interpolate,solution2.pyobject))
9292

93-
93+
Expression(x::FEniCS.Expression) = convert(Expression,x)
9494
export Expression,Identity,inner,grad, nabla_grad, nabla_div,div, outer,dot,cross, tr, sqrt, sym, len, interpolate
9595
export
9696

test/acoustic.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ using PyCall
55
c = 5000
66
#problem variables, have been scaled down for faster test solution
77
dt = 0.00004;
8-
t = 0;
8+
global t = 0;
99
T = 0.0004;
1010

1111
mesh = RectangleMesh(Point([-2., -2.]),Point([2., 2.]),40,40)
@@ -51,7 +51,7 @@ while t <= T
5151
solve(A, vector(u), b)
5252
assign(u0,u1)
5353
assign(u1,u)
54-
t +=dt
54+
global t +=dt
5555
#fenics.plot(u.pyobject,title="Acoustic wave Equation")#,mode="auto")
5656

5757
end

test/acoustic_new_assemble.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ using PyCall
66
c = 5000
77
#problem variables
88
dt = 0.000004;
9-
t = 0;
9+
global t = 0;
1010
T = 0.004;
1111

1212
mesh = RectangleMesh(Point([-2., -2.]),Point([2., 2.]),40,40)
@@ -49,7 +49,7 @@ while t <= T
4949
lvsolve(a,L,u,bcs_dir) #linear variational solver
5050
assign(u0,u1)
5151
assign(u1,u)
52-
t +=dt
52+
global t +=dt
5353
end
5454
println("Acoustic problem finished")
5555
true

test/tutorial3.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ F = u*v*dx + dt*dot(grad(u), grad(v))*dx - (u_n + dt*f)*v*dx
2323
a, L = lhs(F),rhs(F)
2424

2525
u=FeFunction(V)
26-
t = 0
26+
global t = 0
2727

2828
for n = 0:(num_steps-1)
29-
t=t+dt
29+
global t=t+dt
3030
u_D.pyobject[:t]=t
3131
lvsolve(a,L,u,bc)
3232
u_e= interpolate(u_D,V)

test/tutorial4.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ a, L = lhs(F), rhs(F)
3434

3535
# Time-stepping
3636
u=FeFunction(V)
37-
t = 0
37+
global t = 0
3838
#fig = PyPlot.figure()
3939
for n = 0:(num_steps-1)
4040
# Update current time
41-
t += dt
41+
global t += dt
4242

4343
# Compute solution
4444
lvsolve(a,L,u,bc)

test/tutorial5.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ V = FunctionSpace(mesh, "P", 1)
88
u_code = "x[0]+2*x[1]+1"
99
f_code = "-10*x[0]-20*x[1]-10"
1010

11-
calc(var) = 1+var^2
11+
calc(var) = 1+var*var
1212

1313
u_D = Expression(u_code, degree=2)
1414
bc = DirichletBC(V, u_D, "on_boundary")

test/tutorial7.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ A3 = assemble(a3)
7070
[apply(bc,A2) for bc in bcp]
7171

7272
# Time-stepping
73-
t = 0
73+
global t = 0
7474
for n = 0:(num_steps-1)
7575

7676
# Update current time
77-
t =t + dt
77+
global t += dt
7878

7979
# Step 1: Tentative velocity step
8080
b1 = assemble(L1)

test/tutorial8.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ File("navier_stokes_cylinder/cylinder.xml.gz",mesh)
104104

105105

106106

107-
t = 0
107+
global t = 0
108108
#@showprogress 1 "Solving..." for n=0:num_steps #for native julia progress
109109
for n =0:(num_steps-1)
110110

111111
# Update current time
112-
t += dt
112+
global t += dt
113113

114114
# Step 1: Tentative velocity step
115115
b1 = assemble(L1)

test/tutorial9.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ vtkfile_u_2 = File("reaction_system/u_2.pvd")
7474
vtkfile_u_3 = File("reaction_system/u_3.pvd")
7575

7676
# Time-stepping
77-
t = 0
77+
global t = 0
7878
for n=0:num_steps
7979

8080
# Update current time
81-
t += dt
81+
global t += dt
8282

8383
# Read velocity from file
8484
retrieve(timeseries_w,vector(w),t)

travis_docker_test_script.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ cd /mnt && if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
99

1010
# run tests
1111
#julia -e "Pkg.clone(\"https://github.com/JuliaPy/PyCall.jl\"); ENV[\"PYTHON\"] = \"/usr/bin/python3\"; Pkg.build(\"PyCall\")"
12-
julia -e "Pkg.clone(\"/mnt/\", \"$PKGNAME\"); Pkg.build(\"$PKGNAME\"); Pkg.test(\"$PKGNAME\"; coverage=true)"
12+
julia -e "import Pkg; Pkg.clone(\"/mnt/\", \"$PKGNAME\"); Pkg.build(\"$PKGNAME\"); Pkg.test(\"$PKGNAME\"; coverage=true)"
1313
TEST_EXIT=$? # return with this
1414

1515
# save coverage results back to host
16-
PKGDIR=`julia -e "print(Pkg.dir(\"$PKGNAME\"))"`
16+
PKGDIR=`julia -e "import Pkg; print(Pkg.dir(\"$PKGNAME\"))"`
1717
rsync --no-o --no-g --no-perms -mav --include="*/" --include="*.cov" --exclude="*" $PKGDIR/ /mnt/
1818
exit $TEST_EXIT

0 commit comments

Comments
 (0)