Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration with Chmy.jl #141

Merged
merged 39 commits into from
Oct 9, 2024
Merged

Integration with Chmy.jl #141

merged 39 commits into from
Oct 9, 2024

Conversation

boriskaus
Copy link
Member

Chmy.jl is a package that can be used to write (staggered) finite difference codes that run on CPU and (parallel) GPU's.
This PR integrates the GeophysicalModelGenerator package with Chmy such that we can use all functionality of GMG to create initial model setups.

Example:

using Chmy, Chmy.Architectures, Chmy.Grids, Chmy.Fields
using KernelAbstractions # for backend-agnostic kernels

backend = CPU()
arch = Arch(backend)

# 3D Chmy grid
lx, ly, lz  = 10.0, 11.0, 12.0
nx, ny, nz  = 10,11,12
grid   = UniformGrid(arch;
                    origin=(-lx/2, -ly/2, -lz/2),
                    extent=(lx, ly, lz),
                    dims=(nx, ny, nz))

# Create Chmy fields
Temp_C   =  Field(backend, grid, Center())
Phases_C =  Field(backend, grid, Center(), Int32)

# Add a box
add_box!(Phases_V,Temp_V,grid, xlim=(0,1.0), zlim=(-2,0), phase=ConstantPhase(2))

@boriskaus boriskaus marked this pull request as draft October 9, 2024 07:42
@boriskaus boriskaus marked this pull request as ready for review October 9, 2024 09:10
@boriskaus boriskaus requested a review from aelligp October 9, 2024 12:34
src/Setup_geometry.jl Outdated Show resolved Hide resolved
src/Setup_geometry.jl Outdated Show resolved Hide resolved
src/Setup_geometry.jl Outdated Show resolved Hide resolved
src/Setup_geometry.jl Outdated Show resolved Hide resolved
src/Setup_geometry.jl Show resolved Hide resolved
src/Setup_geometry.jl Show resolved Hide resolved
src/Setup_geometry.jl Show resolved Hide resolved
src/Setup_geometry.jl Show resolved Hide resolved
src/Setup_geometry.jl Show resolved Hide resolved
src/Setup_geometry.jl Show resolved Hide resolved
boriskaus and others added 4 commits October 9, 2024 15:02
Co-authored-by: Albert de Montserrat <[email protected]>
Co-authored-by: Albert de Montserrat <[email protected]>
Co-authored-by: Albert de Montserrat <[email protected]>
Co-authored-by: Albert de Montserrat <[email protected]>
@boriskaus boriskaus merged commit 54377c0 into main Oct 9, 2024
39 checks passed
@boriskaus boriskaus deleted the bk-chmy branch October 9, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants