Skip to content

Commit

Permalink
Merge pull request #58 from JuliaGeodynamics/bk-lamem_2.1.4
Browse files Browse the repository at this point in the history
using LaMEM_jll version 2.1.4
  • Loading branch information
boriskaus authored Aug 26, 2024
2 parents 4a3d110 + 994096b commit affa562
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
fail-fast: false
matrix:
version:
- '1.9'
- '1.10'
- '~1.11.0-0'
- 'nightly'
os:
- ubuntu-latest
Expand Down
12 changes: 5 additions & 7 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LaMEM"
uuid = "2e889f3d-35ce-4a77-8ea2-858aecb630f7"
authors = ["Boris Kaus <kaus@uni-mainz.de>"]
version = "0.3.8"
version = "0.4.0"

[deps]
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Expand All @@ -12,7 +12,6 @@ Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
LaMEM_jll = "15d6fa20-f789-5486-b71b-22b4ac8eb1c1"
LightXML = "9c8b4983-aa76-5018-a973-4c85ecc9e179"
MPICH_jll = "7cb0a576-ebde-5e09-9194-50597f1243b4"
MUMPS_jll = "ca64183c-ec4f-5579-95d5-17e128c21291"
ReadVTK = "dc215faf-f008-4882-a9f7-a79a826fadc3"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192"
Expand All @@ -24,25 +23,24 @@ Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PlotsExt = "Plots"

[compat]
CairoMakie = "0.11"
DelimitedFiles = "1"
DocStringExtensions = "0.9"
GeoParams = "0.4, 0.5, 0.6"
GeophysicalModelGenerator = "0.7"
Glob = "1"
LightXML = "0.9"
MPICH_jll = "4.1 - 4.1.2"
MUMPS_jll = "5.5 - 5.6"
LaMEM_jll = "~2.1.4"
Plots = "1"
ReadVTK = "0.1, 0.2"
Statistics = "1.0"
WriteVTK = "1"
julia = "1.9"
julia = "1.10"


[extras]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "CairoMakie", "Plots"]
test = ["Test", "Plots"]
14 changes: 8 additions & 6 deletions scripts/StrengthEnvelop.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using LaMEM, CairoMakie
using LaMEM

model = Model(Grid(nel=(4,32), x=[-1,1], z=[-30,1]),
Time(nstep_max=25, dt_min=1e-4, dt=1e-3, dt_max=10, time_end=100),
Expand All @@ -24,9 +24,11 @@ run_lamem(model,1)

data,_ = read_LaMEM_timestep(model, last=true)

#Create plot
fig1 = Figure(size=(800,800))
ax = Axis(fig1[1,1], xlabel = "τII [MPa]", ylabel = "Depth [km]",title="Geotherm=$(Tgradient)°C/km")
if 1==0
#Create plot
fig1 = Figure(size=(800,800))
ax = Axis(fig1[1,1], xlabel = "τII [MPa]", ylabel = "Depth [km]",title="Geotherm=$(Tgradient)°C/km")

lines!(ax, data.fields.j2_dev_stress[1,1,:], data.z.val[1,1,:], label="t=$time")
display(fig1)
lines!(ax, data.fields.j2_dev_stress[1,1,:], data.z.val[1,1,:], label="t=$time")
display(fig1)
end
7 changes: 5 additions & 2 deletions test/read_timestep.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pkg_dir = pkgdir(LaMEM)
data, time = read_LaMEM_timestep(FileName,Timestep, phase=true)

@test data.fields.phase[1000] == 0

#=
# read subduction setup
data, time = read_LaMEM_timestep("Subduction2D_FreeSlip_direct",1)
@test data.fields.density[10000] ≈ 3200.0f0
Expand All @@ -32,15 +32,18 @@ pkg_dir = pkgdir(LaMEM)
# Read PVD file
Timestep, FileNames, Time = read_LaMEM_simulation("Subduction2D_FreeSlip_direct")
@test Time[2] ≈ 0.055

=#

# Read passive tracers
data, time = read_LaMEM_timestep("PlumeLithosphereInteraction",10, passive_tracers=true)
@test data.z[100] -298.4531f0
@test data.fields.Temperature[100] 1350.0f0

# Read surface data
#=
data, time = read_LaMEM_timestep("Subduction2D_FreeSurface_direct",5, surf=true)
@test data.z[100] ≈ 0.68236357f0
@test sum(data.fields.topography[:,1,1]) ≈ 1.2645866f0
=#
end

6 changes: 3 additions & 3 deletions test/runLaMEM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ pkg_dir = pkgdir(LaMEM)
end

# Create a setup using GMG
include("CreateMarkers_Subduction_Linear_FreeSlip_parallel.jl")
out = run_lamem(ParamFile_2, 1, "-nstep_max 1") # 1 core
@test isnothing(out)
#include("CreateMarkers_Subduction_Linear_FreeSlip_parallel.jl")
#out = run_lamem(ParamFile_2, 1, "-nstep_max 1") # 1 core
#@test isnothing(out)

# Try direct solvers
ParamFile = "input_files/FallingBlock_DirectSolver.dat";
Expand Down
16 changes: 8 additions & 8 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using Test
using LaMEM

#include("test_julia_setups.jl")
#include("runLaMEM.jl")
#include("read_timestep.jl")
#include("run_lamem_save_grid_test.jl")
#include("mesh_refinement_test.jl")
#include("read_logfile.jl")
#include("test_compression.jl")
#include("test_GeoParams_integration.jl")
include("test_julia_setups.jl")
include("runLaMEM.jl")
include("read_timestep.jl")
include("run_lamem_save_grid_test.jl")
include("mesh_refinement_test.jl")
include("read_logfile.jl")
include("test_compression.jl")
include("test_GeoParams_integration.jl")
include("test_examples.jl")

if !Sys.iswindows()
Expand Down

2 comments on commit affa562

@boriskaus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/113865

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.0 -m "<description of version>" affa562383efd734d99f7f166fe66f7f03433044
git push origin v0.4.0

Please sign in to comment.