Installation Guide

Here are the installation instructions for package LinearElasticity. If you have trouble installing it, please refer to our Troubleshooting page for more information.

Install Julia

First, you should install Julia. We recommend downloading it from its official website. Please follow the detailed instructions on its website if you have to build Julia from source. Some computing centers provide preinstalled Julia. Please contact your administrator for more information in that case. Here's some additional information on how to set up Julia on HPC systems.

If you have Homebrew installed, open Terminal.app and type

brew install julia

to install it as a formula.

If you are also using macOS and want to install it as a prebuilt binary app, type

brew install --cask julia

instead.

If you want to install multiple Julia versions in the same operating system, a recommended way is to use a version manager such as juliaup. First, install juliaup. Then, run

juliaup add release
juliaup default release

to configure the julia command to start the latest stable version of Julia (this is also the default value).

There is a short video introduction to juliaup made by its authors.

Which version should I pick?

You can install the "Current stable release" or the "Long-term support (LTS) release".

  • The "Current stable release" is the latest release of Julia. It has access to newer features, and is likely faster.
  • The "Long-term support release" is an older version of Julia that has continued to receive bug and security fixes. However, it may not have the latest features or performance improvements.

For most users, you should install the "Current stable release", and whenever Julia releases a new version of the current stable release, you should update your version of Julia. Note that any code you write on one version of the current stable release will continue to work on all subsequent releases.

For users in restricted software environments (e.g., your enterprise IT controls what software you can install), you may be better off installing the long-term support release because you will not have to update Julia as frequently.

Versions higher than v1.3, especially v1.6, are strongly recommended. This package may not work on v1.0 and below. Since the Julia team has set v1.6 as the LTS release, we will gradually drop support for versions below v1.6.

Julia and Julia packages support multiple operating systems and CPU architectures; check this table to see if it can be installed on your machine. For Mac computers with M-series processors, this package and its dependencies may not work. Please install the Intel-compatible version of Julia (for macOS x86-64) if any platform-related error occurs.

Install LinearElasticity

Now I am using macOS as a standard platform to explain the following steps:

  1. Open Terminal.app, and type julia to start an interactive session (known as the REPL).

  2. Run the following commands and wait for them to finish:

    julia> using Pkg
    
    julia> Pkg.update()
    
    julia> Pkg.add("LinearElasticity")
  3. Run

    julia> using LinearElasticity

    and have fun!

  4. While using, please keep this Julia session alive. Restarting might cost some time.

If you want to install the latest in-development (probably buggy) version of LinearElasticity, type

julia> using Pkg
julia> Pkg.update() Updating registry at `~/.julia/registries/General.toml` No Changes to `~/work/LinearElasticity.jl/LinearElasticity.jl/docs/build/developers/Project.toml` No Changes to `~/work/LinearElasticity.jl/LinearElasticity.jl/docs/build/developers/Manifest.toml`
julia> pkg"add https://github.com/MineralsCloud/LinearElasticity.jl"┌ Warning: The Pkg REPL mode is intended for interactive use only, and should not be used from scripts. It is recommended to use the functional API instead. └ @ Pkg.REPLMode /opt/hostedtoolcache/julia/1.9.3/x64/share/julia/stdlib/v1.9/Pkg/src/REPLMode/REPLMode.jl:382 Cloning git-repo `https://github.com/MineralsCloud/LinearElasticity.jl` Updating git-repo `https://github.com/MineralsCloud/LinearElasticity.jl` Resolving package versions... Updating `~/work/LinearElasticity.jl/LinearElasticity.jl/docs/build/developers/Project.toml` [8b390c8a] ~ LinearElasticity v0.7.0 ⇒ v0.7.0 `https://github.com/MineralsCloud/LinearElasticity.jl#main` Updating `~/work/LinearElasticity.jl/LinearElasticity.jl/docs/build/developers/Manifest.toml` [47edcb42] + ADTypes v0.2.3 [79e6a3ab] + Adapt v3.6.2 [1b8a1bdb] + AnonymousEnums v0.1.1 [4fba245c] + ArrayInterface v7.4.11 [30b0a656] + ArrayInterfaceCore v0.1.29 [62783981] + BitTwiddlingConvenienceFunctions v0.1.5 [2a0fbf3d] + CPUSummary v0.2.4 [d360d2e6] + ChainRulesCore v1.16.0 [fb6a15b2] + CloseOpenIntervals v0.1.12 [861a8166] - Combinatorics v1.0.2 [38540f10] + CommonSolve v0.2.4 [150eb455] - CoordinateTransformations v0.6.3 [5a653867] - Counters v0.3.3 [adafc99b] + CpuId v0.3.1 [3bff3928] - Crystallography v0.5.1 ⌃ [93b1d1cd] ↑ CrystallographyBase v0.5.2 ⇒ v0.11.0 [9a962f9c] + DataAPI v1.15.0 [e2d170a0] + DataValueInterfaces v1.0.0 [b7d42ee7] + Einsum v0.4.1 [4e289a0a] + EnumX v1.0.4 [e2ba6199] + ExprTools v0.1.10 [29a986be] + FastLapackInterface v2.0.0 [1a297f60] + FillArrays v1.6.1 [069b7b12] + FunctionWrappers v1.1.3 [77dc65aa] + FunctionWrappersWrappers v0.1.3 [d9f16b24] - Functors v0.2.8 [46192b85] + GPUArraysCore v0.1.5 [3e5b6fbb] + HostCPUFeatures v0.1.16 [615f187c] + IfElse v0.1.1 [82899510] + IteratorInterfaceExtensions v1.0.0 [ef3ab10e] + KLU v0.4.1 [ba0b0d4f] + Krylov v0.9.4 [10f19ff3] + LayoutPointers v0.1.14 [50d2b5c4] + Lazy v0.15.1 [8b390c8a] ~ LinearElasticity v0.7.0 ⇒ v0.7.0 `https://github.com/MineralsCloud/LinearElasticity.jl#main` [c9ccf908] + LinearElasticityBase v0.3.0 [7ed4a6bd] + LinearSolve v2.5.1 [bdcacae8] + LoopVectorization v0.12.165 [d8e11817] - MLStyle v0.4.17 [d125e4d3] + ManualMemory v0.1.8 [c116f080] + Mendeleev v1.0.0 [6fe1bfb0] + OffsetArrays v1.12.10 [7b2266bf] - PeriodicTable v1.1.4 [f517fe37] + Polyester v0.7.5 [1d0040c9] + PolyesterWeave v0.2.1 [3cdcf5f2] + RecipesBase v1.3.4 [731186ca] + RecursiveArrayTools v2.38.10 [f2c3362d] + RecursiveFactorization v0.2.20 [189a3867] + Reexport v1.2.2 [ae029012] + Requires v1.3.0 [7e49a35a] + RuntimeGeneratedFunctions v0.5.12 [94e857df] + SIMDTypes v0.1.0 [476501e8] + SLEEFPirates v0.6.39 [0bca4576] + SciMLBase v1.97.1 [c0aeaf25] + SciMLOperators v0.3.6 [efcf1570] + Setfield v1.1.1 [66db9d55] + SnoopPrecompile v1.0.3 [e56a9233] + Sparspak v0.3.9 [f761d5c5] - Spglib v0.5.3 [aedffcd0] + Static v0.8.8 [0d7ed370] + StaticArrayInterface v1.4.1 [7792a7ef] + StrideArraysCore v0.4.17 [6ec83bb0] + StructEquality v2.1.0 [4093c41a] - StructHelpers v0.1.5 [2efcf032] + SymbolicIndexingInterface v0.2.2 [3783bdb8] + TableTraits v1.0.1 [bd369af6] + Tables v1.10.1 [8290d209] + ThreadingUtilities v0.5.2 [d5829a12] + TriangularSolve v0.1.19 [410a4b4d] + Tricks v0.1.7 [781d530d] + TruncatedStacktraces v1.4.0 [a7773ee8] + UnitfulAtomic v1.0.0 [3d5dd08c] + VectorizationBase v0.21.64 [700de1a5] + ZygoteRules v0.2.3 [1d63c593] - LLVMOpenMP_jll v15.0.4+0 [ac4a9f1e] - spglib_jll v1.16.5+0 [8ba89e20] + Distributed [9fa8497b] + Future [4607b0f0] + SuiteSparse Info Packages marked with ⌃ have new versions available and may be upgradable. Precompiling project... LinearElasticity 1 dependency successfully precompiled in 5 seconds. 120 already precompiled. 1 dependency precompiled but a different version is currently loaded. Restart julia to access the new version

in the second step above.

Update LinearElasticity

Please watch our GitHub repository for new releases. Once we release a new version, you can update LinearElasticity by typing

julia> using Pkg
julia> Pkg.update("LinearElasticity") Updating registry at `~/.julia/registries/General.toml` Updating git-repo `https://github.com/MineralsCloud/LinearElasticity.jl` No Changes to `~/work/LinearElasticity.jl/LinearElasticity.jl/docs/build/developers/Project.toml` No Changes to `~/work/LinearElasticity.jl/LinearElasticity.jl/docs/build/developers/Manifest.toml`
julia> Pkg.gc() Active manifest files: 4 found Active artifact files: 3 found Active scratchspaces: 0 found Deleted no artifacts, repos, packages or scratchspaces

in the Julia REPL.

Uninstall and reinstall LinearElasticity

Sometimes errors may occur if the package is not properly installed. In this case, you may want to uninstall and reinstall the package. Here is how to do that:

  1. To uninstall, in a Julia session, run

    julia> using Pkg
    
    julia> Pkg.rm("LinearElasticity")
    
    julia> Pkg.gc()
  2. Press ctrl+d to quit the current session. Start a new Julia session and reinstall LinearElasticity.