-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #251 from PTsolvers/pa-melt
Adapts WENO5 struct for GPU & updates melt_fraction computation
- Loading branch information
Showing
20 changed files
with
62 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,26 @@ | ||
function compute_melt_fraction!(ϕ, rheology, args) | ||
ni = size(ϕ) | ||
@parallel (@idx ni) compute_melt_fraction_kernel!(ϕ, rheology, args) | ||
return nothing | ||
end | ||
|
||
@parallel_indices (I...) function compute_melt_fraction_kernel!(ϕ, rheology, args) | ||
args_ijk = ntuple_idx(args, I...) | ||
ϕ[I...] = compute_melt_frac(rheology, args_ijk) | ||
ϕ[I...] = compute_meltfraction(rheology, args_ijk) | ||
return nothing | ||
end | ||
|
||
@inline function compute_melt_frac(rheology, args) | ||
return compute_meltfraction(rheology, args) | ||
end | ||
|
||
function compute_melt_fraction!(ϕ, phase_ratios, rheology, args) | ||
function compute_melt_fraction!(ϕ, phase_ratios::JustPIC.PhaseRatios, rheology, args) | ||
ni = size(ϕ) | ||
@parallel (@idx ni) compute_melt_fraction_kernel!(ϕ, phase_ratios, rheology, args) | ||
@parallel (@idx ni) compute_melt_fraction_kernel!( | ||
ϕ, phase_ratios.center, rheology, args | ||
) | ||
end | ||
|
||
@parallel_indices (I...) function compute_melt_fraction_kernel!( | ||
ϕ, phase_ratios, rheology, args | ||
) | ||
args_ijk = ntuple_idx(args, I...) | ||
ϕ[I...] = compute_melt_frac(rheology, args_ijk, phase_ratios[I...]) | ||
ϕ[I...] = fn_ratio(compute_meltfraction, rheology, @cell(phase_ratios[I...]), args_ijk) | ||
return nothing | ||
end | ||
|
||
@inline function compute_melt_frac(rheology, args, phase_ratios) | ||
return compute_meltfraction_ratio(phase_ratios, rheology, args) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.