commit b38a2a68b693a8ec9a23ee7871b21b723224df39
parent 8d9d1a1c3cc244bb6bd388396763dfe93efa9f63
Author: Anders Damsgaard <andersd@riseup.net>
Date: Fri, 28 Apr 2017 15:14:50 -0400
add missing exclamation marks to function exports
Diffstat:
7 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/src/contact_search.jl b/src/contact_search.jl
@@ -1,5 +1,5 @@
## Contact mapping
-export findContacts
+export findContacts!
"""
Top-level function to perform an inter-ice floe contact search, based on ice
floe linear positions and contact radii.
@@ -33,7 +33,7 @@ function findOverlap(simulation::Simulation, i::Integer, j::Integer,
simulation.ice_floes[j].contact_radius)
end
-export findContactsAllToAll
+export findContactsAllToAll!
"""
Perform an O(n^2) all-to-all contact search between all ice floes in the
`simulation` object. Contacts between fixed ice floes are ignored.
diff --git a/src/grid.jl b/src/grid.jl
@@ -28,7 +28,7 @@ function bilinearInterpolation(field::Array{Float64, 4},
field[i-1, j-1, k, it]*(1. - x_tilde))*(1. - y_tilde)
end
-export sortIceFloesInOceanGrid
+export sortIceFloesInOceanGrid!
"""
Find ice-floe positions in ocean grid, based on their center positions.
"""
diff --git a/src/interaction.jl b/src/interaction.jl
@@ -1,6 +1,6 @@
## Interaction functions
-export interact
+export interact!
"""
Resolve mechanical interaction between all particle pairs.
"""
@@ -15,7 +15,7 @@ function interact!(simulation::Simulation)
end
end
-export interactIceFloes
+export interactIceFloes!
"""
Resolve an grain-to-grain interaction using a prescibed contact law. This
function adds the compressive force of the interaction to the ice floe
diff --git a/src/ocean.jl b/src/ocean.jl
@@ -239,7 +239,7 @@ function createRegularOceanGrid(n::Array{Int, 1},
u, v, h, e)
end
-export addOceanDrag
+export addOceanDrag!
"""
Add Stokes-type drag from velocity difference between ocean and all ice floes.
"""
@@ -255,7 +255,7 @@ function addOceanDrag!(simulation::Simulation)
end
end
-export applyOceanDragToIceFloe
+export applyOceanDragToIceFloe!
"""
Add Stokes-type drag from velocity difference between ocean and a single ice
floe.
diff --git a/src/simulation.jl b/src/simulation.jl
@@ -44,7 +44,7 @@ function createSimulation(;id::String="unnamed",
ocean)
end
-export run
+export run!
"""
run!(simulation[,
verbose::Bool = true,
@@ -133,7 +133,7 @@ function run!(simulation::Simulation;
end
end
-export addIceFloe
+export addIceFloe!
"Add an `icefloe` to the `simulation` object. If `verbose` is true, a short
confirmation message will be printed to stdout`."
function addIceFloe!(simulation::Simulation,
@@ -147,7 +147,7 @@ function addIceFloe!(simulation::Simulation,
end
end
-export removeIceFloe
+export removeIceFloe!
"Remove ice floe with index `i` from the `simulation` object."
function removeIceFloe!(simulation::Simulation, i::Integer)
if i < 1
@@ -157,7 +157,7 @@ function removeIceFloe!(simulation::Simulation, i::Integer)
delete!(simulation.ice_floes, i)
end
-export zeroForcesAndTorques
+export zeroForcesAndTorques!
"Sets the `force` and `torque` values of all ice floes to zero."
function zeroForcesAndTorques!(simulation::Simulation)
for icefloe in simulation.ice_floes
diff --git a/src/temporal.jl b/src/temporal.jl
@@ -1,4 +1,4 @@
-export setTotalTime
+export setTotalTime!
"""
setTotalTime!(simulation::Simulation, t::float)
@@ -12,7 +12,7 @@ function setTotalTime!(simulation::Simulation, t::float)
simulation.time_total = t
end
-export setCurrentTime
+export setCurrentTime!
"""
setCurrentTime!(simulation::Simulation, t::float)
@@ -26,7 +26,7 @@ function setCurrentTime!(simulation::Simulation, t::float)
simulation.time = t
end
-export incrementCurrentTime
+export incrementCurrentTime!
"""
incrementCurrentTime!(simulation::Simulation, t::float)
@@ -40,7 +40,7 @@ function incrementCurrentTime!(simulation::Simulation, t::float)
simulation.time += t
end
-export setOutputFileInterval
+export setOutputFileInterval!
"""
setOutputFileInterval!(simulation::Simulation, t::float)
@@ -54,7 +54,7 @@ function setOutputFileInterval!(simulation::Simulation, t::float; verbose=true)
simulation.file_time_step = t
end
-export disableOutputFiles
+export disableOutputFiles!
"Disables the write of output files to disk during a simulation."
function disableOutputFiles!(simulation::Simulation)
simulation.file_time_step = 0.0
@@ -111,7 +111,7 @@ function findLargestIceFloeStiffness(simulation::Simulation)
return k_n_max, k_t_max, i_n_max, i_t_max
end
-export setTimeStep
+export setTimeStep!
"""
Find the computational time step length suitable given the grain radii, contact
stiffnesses, and grain density. Uses the scheme by Radjaii et al. 2011.
diff --git a/src/temporal_integration.jl b/src/temporal_integration.jl
@@ -1,4 +1,4 @@
-export updateIceFloeKinematics
+export updateIceFloeKinematics!
"""
updateIceFloeKinematics!(simulation::Simulation[,
method::String = "Three-term Taylor"])
@@ -21,24 +21,24 @@ function updateIceFloeKinematics!(simulation::Simulation;
if method == "Two-term Taylor"
for ice_floe in simulation.ice_floes
- updateIceFloeKinematicsTwoTermTaylor(ice_floe, simulation)
+ updateIceFloeKinematicsTwoTermTaylor!(ice_floe, simulation)
end
elseif method == "Three-term Taylor"
for ice_floe in simulation.ice_floes
- updateIceFloeKinematicsThreeTermTaylor(ice_floe, simulation)
+ updateIceFloeKinematicsThreeTermTaylor!(ice_floe, simulation)
end
else
error("Unknown integration method '$method'")
end
end
-export updateIceFloeKinematicsTwoTermTaylor
+export updateIceFloeKinematicsTwoTermTaylor!
"""
Use a two-term Taylor expansion for integrating the kinematic degrees of freedom
for an `icefloe`.
"""
-function updateIceFloeKinematicsTwoTermTaylor(icefloe::IceFloeCylindrical,
- simulation::Simulation)
+function updateIceFloeKinematicsTwoTermTaylor!(icefloe::IceFloeCylindrical,
+ simulation::Simulation)
icefloe.lin_acc = icefloe.force/icefloe.mass
icefloe.ang_acc = icefloe.torque/icefloe.moment_of_inertia
@@ -60,13 +60,13 @@ function updateIceFloeKinematicsTwoTermTaylor(icefloe::IceFloeCylindrical,
icefloe.ang_vel += icefloe.ang_acc * simulation.time_step
end
-export updateIceFloeKinematicsThreeTermTaylor
+export updateIceFloeKinematicsThreeTermTaylor!
"""
Use a three-term Taylor expansion for integrating the kinematic degrees of
freedom for an `icefloe`.
"""
-function updateIceFloeKinematicsThreeTermTaylor(icefloe::IceFloeCylindrical,
- simulation::Simulation)
+function updateIceFloeKinematicsThreeTermTaylor!(icefloe::IceFloeCylindrical,
+ simulation::Simulation)
if simulation.time_iteration == 0
lin_acc_0 = zeros(2)