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

Adapt code to follow new ODINN API #6

Open
JordiBolibar opened this issue Jun 16, 2023 · 0 comments
Open

Adapt code to follow new ODINN API #6

JordiBolibar opened this issue Jun 16, 2023 · 0 comments

Comments

@JordiBolibar
Copy link
Member

Following the design of the new API of ODINN, the 1D models should follow the new API described here: ODINN-SciML/ODINN.jl#82 (comment)

We should basically follow this example for a 2D SIA model:

include("iceflow_utils.jl")
include("SIA.jl")

# Abstract type as a parent type for Mass Balance models
abstract type IceflowModel end

###############################################
###### SHALLOW ICE APPROXIMATION MODELS #######
###############################################

# Subtype structure for Shallow Ice Approximation models
abstract type SIAmodel <: IceflowModel end

@kwdef mutable struct SIA2Dmodel <: SIAmodel
    A::Float64
    B::Matrix{Float64}
    S::Matrix{Float64}
    dSdx::Matrix{Float64}
    dSdy::Matrix{Float64}
    D::Matrix{Float64}
    dSdx_edges::Matrix{Float64}
    dSdy_edges::Matrix{Float64}
    ∇S::Matrix{Float64}
    Fx::Matrix{Float64}
    Fy::Matrix{Float64}
    Δx::Float64
    Δy::Float64
    Γ::Float64
end
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

No branches or pull requests

1 participant