Skip to content

Commit 9472057

Browse files
committed
Add editorconfig and enfore on all files
1 parent 8926b0b commit 9472057

File tree

10 files changed

+28
-16
lines changed

10 files changed

+28
-16
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424

2525
## [StatisticalMoments](moments/README.md)
2626
- How to extract statistical information from a batch of simulations, in this
27-
case: mean, standard deviation, skew and kurtosis (also known as moments).
27+
case: mean, standard deviation, skew and kurtosis (also known as moments).

example/box_size/box_size.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function box_size_convergence(m=4, volfrac = 0.05,
66

77
listener_position = [-10.0,0.0]
88
bigshape = TimeOfFlight(listener_position,maximum(times))
9-
9+
1010
seed = MersenneTwister(1).seed
1111
allparticles = random_particles(volfrac, radius, bigshape; seed = seed)
1212

example/random_particles_in_circle/specify_shape.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ using MultipleScattering
22

33
k_arr = collect(linspace(0.1,1.0,10))
44

5-
# You can also pick your own shape, an generate random particles inside it
5+
# You can also pick your own shape, an generate random particles inside it
66
# with a certain radius ands volume fraction
77
radius = 0.5
88
volfrac = 0.2

example/shapes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Shapes
22

33
## Existing shapes
4-
The package provides 3 built in basic shapes to put your random particles in,
4+
The package provides 3 built in basic shapes to put your random particles in,
55
you can plot them using:
66
```julia
77
using MultipleScattering

example/shapes/shape.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# # Shapes
22

33
# ## Existing shapes
4-
# The package provides 3 built in basic shapes to put your random particles in,
4+
# The package provides 3 built in basic shapes to put your random particles in,
55
# you can plot them using:
66

77
using MultipleScattering

src/MultipleScattering.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
module MultipleScattering
22

3-
export Shape, Circle, Rectangle, TimeOfFlight, TimeOfFlightFromPoint, volume,
3+
export Shape, Circle, Rectangle, TimeOfFlight, TimeOfFlightFromPoint, volume,
44
inside, bounding_box, name, boundary_functions,
55
Particle, volume, array_of_particles, random_particles, random_particles!, isequal,
66
mean_radius, std_radius,
77
FrequencySimulation, calculate_volfrac, generate_responses!,
88
StatisticalMoments,
9-
TimeSimulation, frequency_to_time, time_to_frequency, ω_to_t, t_to_ω,
9+
TimeSimulation, frequency_to_time, time_to_frequency, ω_to_t, t_to_ω,
1010
delta_freq_impulse, get_gaussian_freq_impulse
1111

1212

src/domain/random_particles.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const MAX_ATTEMPTS_TO_FIT_PARTICLE = 2000
22

33
"""
4-
Generate a non-overlapping Vector of N random particles of radius r that fit
4+
Generate a non-overlapping Vector of N random particles of radius r that fit
55
inside the shape passed in
66
"""
77
function random_particles{T}(volfrac::Number, a::T, shape::Shape;
@@ -16,7 +16,7 @@ function random_particles{T}(volfrac::Number, a::T, shape::Shape;
1616
end
1717

1818
"""
19-
Generate a non-overlapping Vector of N random particles of radius r that fit
19+
Generate a non-overlapping Vector of N random particles of radius r that fit
2020
inside the shape passed in
2121
"""
2222
function random_particles{T}(N::Int, a::T, shape::Shape = Rectangle(0.1, a, N);
@@ -29,7 +29,7 @@ function random_particles{T}(N::Int, a::T, shape::Shape = Rectangle(0.1, a, N);
2929
end
3030

3131
"""
32-
Place N non-overlapping random particles that fit inside the shape passed in.
32+
Place N non-overlapping random particles that fit inside the shape passed in.
3333
Modifies the particles Vector.
3434
"""
3535
function random_particles!{T}(particles::Vector{Particle{T}}, shape::Shape;
@@ -44,15 +44,15 @@ function random_particles!{T}(particles::Vector{Particle{T}}, shape::Shape;
4444
bounds = bounding_box(shape)
4545
topright = bounds.topright
4646
bottomleft = bounds.bottomleft
47-
47+
4848
@printf("""\n
4949
Generating %d randomly positioned particles
5050
Mean radius: %0.5g
5151
Total particle volume: %0.5g
52-
Inside %s of volume: %0.5g
53-
Particle volume fraction: %0.5g
52+
Inside %s of volume: %0.5g
53+
Particle volume fraction: %0.5g
5454
Bounding box volume: %0.5g
55-
""", N, mean_radius(particles), volume(particles), name(shape),
55+
""", N, mean_radius(particles), volume(particles), name(shape),
5656
volume(shape), volume(particles)/volume(shape), volume(bounds)
5757
)
5858

src/domain/shape.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ function bounding_box{T}(shape::TimeOfFlight{T})
137137
t = shape.time
138138
l = shape.listener_position
139139
x_max = max(t/2 + l[1], zero(T))
140-
return Rectangle([ zero(T), l[2] - sqrt(t^2 + 2t*l[1]) ],
140+
return Rectangle([ zero(T), l[2] - sqrt(t^2 + 2t*l[1]) ],
141141
[ x_max, l[2] + sqrt(t^2 + 2t*l[1]) ])
142142
end
143143

test/shapetests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484
timeofflight = TimeOfFlightFromPoint([-1.0,0.0],3.0)
8585
plot!(timeofflight)
86-
86+
8787
@test true
8888
end
8989
end

0 commit comments

Comments
 (0)