Skip to content

Commit 11e3e07

Browse files
authored
Merge pull request #187 from JuliaGeodynamics/pa-precomp
Fix precompilation error
2 parents 6257075 + 5de215a commit 11e3e07

File tree

3 files changed

+26
-22
lines changed

3 files changed

+26
-22
lines changed

.github/workflows/CI.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: CI
22

33
on:
44
push:
5+
branches:
6+
- main
57
pull_request:
68
branches:
79
- main
@@ -22,9 +24,8 @@ jobs:
2224
fail-fast: false
2325
matrix:
2426
version:
25-
- '1.9'
26-
- '1.10'
27-
- '1.11'
27+
- 'lts'
28+
- '1'
2829
# - 'pre'
2930
os:
3031
- ubuntu-latest
@@ -36,11 +37,11 @@ jobs:
3637
include:
3738
- os: macOS-latest
3839
arch: aarch64
39-
version: '1.10'
40+
version: 'lts'
4041
allow_failure: false
4142
- os: macOS-latest
4243
arch: aarch64
43-
version: '1.11'
44+
version: '1'
4445
allow_failure: false
4546
- os: macOS-latest
4647
arch: aarch64

src/ProfileProcessing.jl

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ function create_profile_screenshot!(Profile::ProfileData, DataSet::NamedTuple)
305305
else
306306
# we do not have this implemented
307307
#error("horizontal profiles not yet implemented")
308-
end
308+
end
309309
end
310310
Profile.SurfData = tmp # assign to profile data structure
311311
return
@@ -390,35 +390,29 @@ end
390390

391391

392392
"""
393-
extract_ProfileData!(Profile::ProfileData,VolData::GeoData, SurfData::NamedTuple, PointData::NamedTuple, ScreenshotData::NamedTuple; DimsVolCross=(100,100),Depth_extent=nothing,DimsSurfCross=(100,),section_width=50)
393+
extract_ProfileData!(Profile::ProfileData,VolData::GeoData, SurfData::NamedTuple, PointData::NamedTuple; DimsVolCross=(100,100),Depth_extent=nothing,DimsSurfCross=(100,),section_width=50, ScreenshotData=nothing)
394394
395395
Extracts data along a vertical or horizontal profile
396396
"""
397-
function extract_ProfileData!(Profile::ProfileData, VolData::Union{Nothing, GeoData} = nothing, SurfData::NamedTuple = NamedTuple(), PointData::NamedTuple = NamedTuple(),ScreenshotData::NamedTuple = NamedTuple(); DimsVolCross = (100, 100), Depth_extent = nothing, DimsSurfCross = (100,), section_width = 50km)
397+
function extract_ProfileData!(Profile::ProfileData, VolData::Union{Nothing, GeoData} = nothing, SurfData::NamedTuple = NamedTuple(), PointData::NamedTuple = NamedTuple(); DimsVolCross = (100, 100), Depth_extent = nothing, DimsSurfCross = (100,), section_width = 50km, ScreenshotData = nothing)
398+
399+
return extract_ProfileData!(Profile, VolData, SurfData, PointData, ScreenshotData; DimsVolCross = DimsVolCross, Depth_extent = Depth_extent, DimsSurfCross = DimsSurfCross, section_width = section_width)
400+
end
401+
402+
# Internal method - called by the main method with ScreenshotData as positional argument
403+
function extract_ProfileData!(Profile::ProfileData, VolData::Union{Nothing, GeoData}, SurfData::NamedTuple, PointData::NamedTuple, ScreenshotData::Union{Nothing, NamedTuple}; DimsVolCross = (100, 100), Depth_extent = nothing, DimsSurfCross = (100,), section_width = 50km)
398404

399405
if !isnothing(VolData)
400406
create_profile_volume!(Profile, VolData; DimsVolCross = DimsVolCross, Depth_extent = Depth_extent)
401407
end
402408
create_profile_surface!(Profile, SurfData, DimsSurfCross = DimsSurfCross)
403409
create_profile_point!(Profile, PointData, section_width = section_width)
404-
if !isempty(ScreenshotData)
410+
if !isnothing(ScreenshotData)
405411
create_profile_screenshot!(Profile, ScreenshotData)
406412
end
407413
return nothing
408414
end
409415

410-
"""
411-
extract_ProfileData!(Profile::ProfileData,VolData::GeoData, SurfData::NamedTuple, PointData::NamedTuple; DimsVolCross=(100,100),Depth_extent=nothing,DimsSurfCross=(100,),section_width=50)
412-
413-
Extracts data along a vertical or horizontal profile.
414-
"""
415-
function extract_ProfileData!(Profile::ProfileData, VolData::Union{Nothing, GeoData} = nothing, SurfData::NamedTuple = NamedTuple(), PointData::NamedTuple = NamedTuple(); DimsVolCross = (100, 100), Depth_extent = nothing, DimsSurfCross = (100,), section_width = 50km)
416-
417-
# call the actual function to extract the profile data
418-
extract_ProfileData!(Profile, VolData, SurfData, PointData,NamedTuple(); DimsVolCross = DimsVolCross, Depth_extent = Depth_extent, DimsSurfCross = DimsSurfCross, section_width = section_width)
419-
return nothing
420-
end
421-
422416

423417

424418

@@ -468,7 +462,7 @@ function extract_ProfileData(ProfileCoordFile::String, ProfileNumber::Int64, Dat
468462

469463
# project data onto profile:
470464
extract_ProfileData!(
471-
profile, VolData_combined, SurfData, PointData,
465+
profile, VolData_combined, SurfData, PointData;
472466
DimsVolCross = DimsVolCross, DimsSurfCross = DimsSurfCross,
473467
Depth_extent = DepthVol, section_width = WidthPointProfile
474468
)

test/test_pTatin_IO.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,12 @@ fe_data = convert2FEData(q1_data)
1010

1111
out = write_pTatin_mesh(fe_data)
1212
@test isnothing(out)
13+
@test isfile("md.bin")
14+
@test isfile("region_cell.bin")
15+
@test isfile("T_vertex.bin")
16+
@test isfile("Z_vertex.bin")
17+
18+
rm("md.bin")
19+
rm("region_cell.bin")
20+
rm("T_vertex.bin")
21+
rm("Z_vertex.bin")

0 commit comments

Comments
 (0)