GitHub Actions - Workflows |
---|
Julia package repository to resolve Time-Independent Schrödinger equation by (F)init (E)lement (M)ethod. This is an implementation of Gridap package for unidimensional and bidimensional grids.
Project carried out in my PhD studies of Physics at:
- Faculty of Mathematics, Astronomy, Physics and Computation (FaMAF)
- The Enrique Gaviola Institute of Physics (IFEG)
->> The package is under construction <<-
First we need to clone package from GitHub repository as follow
@prompt$: cd ~/my_directory/
@my_directory$: git clone https://github.com/mendzmartin/FEMTISE.jl.git
This will download a folder called FEMTISE.jl
, it is important to keep the .jl
extension in the repository name. And, in case we have already cloned the repository, we must update it by running git pull
.
@prompt$: mkdir ~/my_folder
@prompt$: cd ~/my_folder
@my_folder$: julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.9.0 (2023-05-07)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> Ctrl+]
(@v1.9) pkg>
(@v1.9) pkg> activate .
(@my_folder) pkg> instantiate()
(@my_folder) pkg> dev ~/my_directory/FEMTISE.jl
(@my_folder) pkg> add Revise
julia> exit()
then build Julia code with following structure:
module MyModule
using Pkg
Pkg.activate("./")
Pkg.instantiate()
using FEMTISE
using Revise
#=
... ...
code block where we use function
from FEMTISE package
... ....
=#
end
Then we save de Julia code below name MyModule.jl
. After that, we can run the code doing this
@my_directory$: julia MyModule.jl
Also, if we have activated multi-thread configuration we can use the next command to activate parallelism:
@my_directory$: julia -t 4 MyModule.jl
where we have specified 4 threads as parallelization.
We can also run the package directly from Julia REPL by opening the terminal Ctrl+Alt+T
inside the package folder and typing the following commands inside the terminal:
@prompt$: cd my_directory/FEMTISE.jl/
@FEMTISE.jl$: julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.9.0 (2023-05-07)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> Ctrl+]
(@v1.9) pkg>
(@v1.9) pkg> activate .
(@my_folder) pkg> instantiate()
(@my_folder) pkg> dev ~/my_directory/FEMTISE.jl
(@my_folder) pkg> add Revise
julia> using FEMTISE
julia> using Revise
and then we can, for example, access Julia's help mode to ask for specific package functions such as the following:
julia> Shift+?
help?> space_coord
search: space_coord
if dimension=="1D" ⇒ dom=(x₁,x₂); Δr=Δx; n=nx
if dimension=="2d" ⇒ dom=(x₁,x₂,y₁,y₂); Δr=(Δx,Δy); n=(nx,ny)
See some use examples in test folder where you can find some uses of FEMTISE
package's functions.
Here you can see some plots from Package's simulations eg.:
Unidimensional Symmetric Finit Kronig-Penney | |
---|---|
Unidimensional Quantum Harmonic Oscillator | Bidimensional Isotropic Quantum Harmonic Oscillator |
---|---|
Unidimensional Morse Potential: Morse parameter vs Eigen energies |
Unidimensional Finit Well Potential: Depth potential vs Eigen energies |
---|---|
Please, contact the project administrator Méndez Martín for any improve suggestion or questions about package use.