Ignore:
Timestamp:
12/03/21 11:18:50 (3 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added subelement GL calculation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/jl/solve/friction.jl

    r26704 r26705  
    11#Friction class definition
    2 struct Friction#{{{
     2
     3abstract type CoreFriction end
     4struct CoreBuddFriction#{{{
    35        H_input::ElementInput
    46        b_input::ElementInput
     
    810        g::Float64
    911end# }}}
    10 function Friction(element::Tria) #{{{
     12function CoreFriction(element::Tria) #{{{
    1113
    12         H_input  = GetInput(element, ThicknessEnum)
    13         b_input  = GetInput(element, BaseEnum)
    14         c_input  = GetInput(element, FrictionCoefficientEnum)
     14        frictionlaw = FindParam(element, FrictionLawEnum)
    1515
    16         rho_ice   = FindParam(element, MaterialsRhoIceEnum)
    17         rho_water = FindParam(element, MaterialsRhoSeawaterEnum)
    18         g         = FindParam(element, ConstantsGEnum)
     16        if frictionlaw==1
     17                H_input  = GetInput(element, ThicknessEnum)
     18                b_input  = GetInput(element, BaseEnum)
     19                c_input  = GetInput(element, FrictionCoefficientEnum)
    1920
    20         return Friction(H_input, b_input, c_input, rho_ice, rho_water, g)
     21                rho_ice   = FindParam(element, MaterialsRhoIceEnum)
     22                rho_water = FindParam(element, MaterialsRhoSeawaterEnum)
     23                g         = FindParam(element, ConstantsGEnum)
     24
     25                return CoreBuddFriction(H_input, b_input, c_input, rho_ice, rho_water, g)
     26        else
     27                error("Friction ",typeof(md.friction)," not supported yet")
     28        end
    2129end#}}}
    2230
    2331#vertices functions
    24 function Alpha2(friction::Friction, gauss::GaussTria, i::Int64) #{{{
     32function Alpha2(friction::CoreBuddFriction, gauss::GaussTria, i::Int64) #{{{
    2533
    2634        #Get effective pressure
Note: See TracChangeset for help on using the changeset viewer.