Skip to content

Commit a31e61d

Browse files
committed
whitespace fixes
1 parent 99411d5 commit a31e61d

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

examples/cvode_Roberts_simplified.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ function f(t, y, ydot)
88
ydot[2] = -ydot[1] - ydot[3]
99
return Sundials.CV_SUCCESS
1010
end
11+
1112
t = [0.0; 4 * logspace(-1., 7., 9)]
1213
res = Sundials.cvode(f, [1.0, 0.0, 0.0], t)

examples/ida_Cable.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ G_J = map(i -> CoordInterpGrid(t, vec(J[:,i]), 0.0, InterpQuadratic),1:xsteps)
5353
##
5454

5555
function cableres(t, u, up, r)
56-
5756
r[:] = u ## Initialize r to u, to take care of boundary equations.
5857

5958
## Loop over segments; set res = up - (central difference).
@@ -70,7 +69,6 @@ end
7069

7170

7271
function initial()
73-
7472
u = zeros(xsteps)
7573

7674
u[2:xsteps-2] = -60.0 ## initial value -60 mV
@@ -86,7 +84,6 @@ function initial()
8684
up[:] = -1.0 * r
8785

8886
return (u,up,id)
89-
9087
end
9188

9289
nvector = Sundials.nvector

examples/ida_Heat2D.jl

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,16 @@ const bval = 0.1
3636
## central differencing on the interior points, and includes algebraic
3737
## equations for the boundary values.
3838
##
39-
## So for each interior point, the residual component has the form
40-
## r_i = u'_i - (central difference)_i
41-
## while for each boundary point, it is r_i = u_i.
39+
## So for each interior point, the residual component has the form
40+
## r_i = u'_i - (central difference)_i
41+
## while for each boundary point, it is r_i = u_i.
4242
##
4343

4444
function heatres(t, u, up, r)
45-
4645
r[:] = u ## Initialize r to u, to take care of boundary equations.
47-
46+
4847
## Loop over interior points; set res = up - (central difference).
4948
for j = 2:(MGRID-2)
50-
5149
offset = MGRID * j
5250
for i = 2:(MGRID-2)
5351
loc = offset + i
@@ -62,10 +60,9 @@ end
6260

6361

6462
function initial()
65-
6663
mm = MGRID
6764
mm1 = mm - 1
68-
65+
6966
u = zeros(NEQ)
7067
id = ones(NEQ)
7168

@@ -85,7 +82,7 @@ function initial()
8582

8683
heatres(0.0, u, up, r)
8784

88-
## Copy -res into up to get correct interior initial up values.
85+
## Copy -res into up to get correct interior initial up values.
8986
up[:] = -1.0 * r
9087

9188
## Finally, set values of u, up, and id at boundary points.
@@ -103,7 +100,6 @@ function initial()
103100

104101
constraints = ones(NEQ)
105102
return (u,up,id,constraints)
106-
107103
end
108104

109105
nvector = Sundials.nvector

0 commit comments

Comments
 (0)