-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed dependancy on ClassicalOrthogonalPolynomials too heavy and of…
…ten resulting in dep errros
- Loading branch information
1 parent
2a8cec0
commit 19099e8
Showing
6 changed files
with
89 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" | ||
DiscreteStructureFactor | ||
Represents the structure factor between two types of particles. The particles could be the same or different species. | ||
""" | ||
struct DiscreteStructureFactor{Dim} | ||
"the wavenumber" | ||
k::Vector{Float64} | ||
"the vector of the radial structure factor" | ||
S::Vector{Float64} | ||
"the minimal distance between the two species" | ||
minimal_distance::Float64 | ||
"the average number of particles divided by the volume containing the centre of the particles" | ||
number_density::Float64 | ||
|
||
function DiscreteStructureFactor{Dim}(k::AbstractVector, S::AbstractVector, minimal_distance::Float64, number_density::Float64; | ||
tol::AbstractFloat = 1e-3 | ||
) where Dim | ||
if !isempty(S) && size(S) != size(k) | ||
@error "the size of vector of wavenumbers `k` (currently $(size(k))) should be the same as the size of the structure factor vector `S` (currently $(size(S)))." | ||
end | ||
new{Dim}(k,S,minimal_distance,number_density) | ||
end | ||
end | ||
|
||
function DiscreteStructureFactor(Dim::Int, k::AbstractVector, S::AbstractVector; | ||
number_density::AbstractFloat = 0.0, | ||
minimal_distance::AbstractFloat = 0.0 | ||
) | ||
DiscreteStructureFactor{Dim}(r,g,minimal_distance,number_density) | ||
end | ||
|
||
# function DiscreteStructureFactor(pair::DiscretePairCorrelation{2}) | ||
|
||
# DiscreteStructureFactor{2}(r,g,minimal_distance,number_density) | ||
# end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
using ParticleCorrelations | ||
using Test | ||
using Test, Statistics | ||
|
||
include("pair-correlations.jl") | ||
include("radial-symmetry.jl") |