Skip to content

Commit

Permalink
adding function's documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mendzmartin committed Jul 15, 2024
1 parent 6c2886f commit 58281a3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 31 deletions.
61 changes: 32 additions & 29 deletions test/test_default_eigen_problem/DefaultEigenProblem.jl
Original file line number Diff line number Diff line change
@@ -1,31 +1,3 @@
#= ++++++++++++++++++++
README
This module defines the default eigenvalue problem for the quantum harmonic oscillator 1D,
quantum harmonic oscillator 2D, Kronig-Penney 1D, and finite well potential 1D.
# Set atomic unit system
const Bohr_radius_meter=5.29177210903e−11; # [m]
const Angstrom_to_meter=1e−10; # [m/Å]
const Angstrom_to_au=Angstrom_to_meter*(1.0/Bohr_radius_meter); # [au/Å]
const Nanometer_to_au=(1e-9)*(1.0/Angstrom_to_meter)*Angstrom_to_au; # [au/nm]
const Electronvolt_to_au=0.036749405469679; # [au/Ev]
set type of default potential could be the next
- Quantum Harmonic Oscillator 1D
- type_potential="qho_1d"
- default values -> L=30.0,Δx=0.1,sigma=0.0
- Quantum Harmonic Oscillator 2D
- type_potential="qho_2d"
- default values -> L=30.0,nx=ny=100,sigma=0.0
- Finit Kronig-Penney 1D
- type_potential="kronig_penney_1d"
- default values -> L=30.0,Δx=0.1,sigma=V₀
- Finit Well Potential 1D
- type_potential="finite_well_1d"
- default values -> L=30.0,Δx=0.1,sigma=V₀
++++++++++++++++++++ =#

module DefaultEigenProblem

using Pkg
Expand Down Expand Up @@ -61,4 +33,35 @@ end

ϵ,ϕ = default_solver_eigen_problem(type_potential,params)

end
end

#=
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
README
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This module defines the default eigenvalue problem for the quantum harmonic oscillator 1D,
quantum harmonic oscillator 2D, Kronig-Penney 1D, and finite well potential 1D.
# Set atomic unit system
const Bohr_radius_meter=5.29177210903e−11; # [m]
const Angstrom_to_meter=1e−10; # [m/Å]
const Angstrom_to_au=Angstrom_to_meter*(1.0/Bohr_radius_meter); # [au/Å]
const Nanometer_to_au=(1e-9)*(1.0/Angstrom_to_meter)*Angstrom_to_au; # [au/nm]
const Electronvolt_to_au=0.036749405469679; # [au/Ev]
set type of default potential could be the next
- Quantum Harmonic Oscillator 1D
- type_potential="qho_1d"
- default values -> L=30.0,Δx=0.1,sigma=0.0
- Quantum Harmonic Oscillator 2D
- type_potential="qho_2d"
- default values -> L=30.0,nx=ny=100,sigma=0.0
- Finit Kronig-Penney 1D
- type_potential="kronig_penney_1d"
- default values -> L=30.0,Δx=0.1,sigma=V₀
- Finit Well Potential 1D
- type_potential="finite_well_1d"
- default values -> L=30.0,Δx=0.1,sigma=V₀
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=#
3 changes: 1 addition & 2 deletions test/test_default_eigen_problem/miscellaneous_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function default_potential_sturm_liouville(type_potential::String,params::Tuple)
return p,q,r;
end

export default_solver_eigen_problem
"""
default_solver_eigen_problem(type_potential,params)
Expand All @@ -57,9 +58,7 @@ end
- `ϵ::Array{ComplexF64}`: eigenvalues
- `ϕ::Array{Array{ComplexF64,1},1}`: eigenvectors
"""
export default_solver_eigen_problem
function default_solver_eigen_problem(type_potential::String,params::Tuple)

if type_potential=="qho_1d"
L,Δx,ω,x₁,nev,sigma=params
params_sturm_liouville=(ω,x₁)
Expand Down

0 comments on commit 58281a3

Please sign in to comment.