Ignore:
Timestamp:
11/19/21 11:13:48 (3 years ago)
Author:
Mathieu Morlighem
Message:

CHG: done with GetSolutionFromInputs

File:
1 edited

Legend:

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

    r26629 r26649  
    2323                coords3 = [0.333333333333333]
    2424        elseif(order==2)
    25                 weights = [0.577350269189625, 0.577350269189625, 0.577350269189625]
    26                 coords1 = [0.666666666666667, 0.166666666666667, 0.166666666666667]
    27                 coords2 = [0.166666666666667, 0.666666666666667, 0.166666666666667]
    28                 coords3 = [0.166666666666667, 0.166666666666667, 0.666666666666667]
     25                weights = [0.577350269189625; 0.577350269189625; 0.577350269189625]
     26                coords1 = [0.666666666666667; 0.166666666666667; 0.166666666666667]
     27                coords2 = [0.166666666666667; 0.666666666666667; 0.166666666666667]
     28                coords3 = [0.166666666666667; 0.166666666666667; 0.666666666666667]
    2929        elseif(order==3)
    3030                npoints=4
    31                 weights = [-0.974278579257493, 0.902109795608790, 0.902109795608790, 0.902109795608790]
    32                 coords1 = [0.333333333333333, 0.600000000000000, 0.200000000000000, 0.200000000000000]
    33                 coords2 = [0.333333333333333, 0.200000000000000, 0.600000000000000, 0.200000000000000]
    34                 coords3 = [0.333333333333333, 0.200000000000000, 0.200000000000000, 0.600000000000000]
     31                weights = [-0.974278579257493; 0.902109795608790; 0.902109795608790; 0.902109795608790]
     32                coords1 = [ 0.333333333333333; 0.600000000000000; 0.200000000000000; 0.200000000000000]
     33                coords2 = [ 0.333333333333333; 0.200000000000000; 0.600000000000000; 0.200000000000000]
     34                coords3 = [ 0.333333333333333; 0.200000000000000; 0.200000000000000; 0.600000000000000]
    3535        else
    3636                error("order ",order," not supported yet");
     
    3939        return GaussTria(npoints,weights,coords1,coords2,coords3)
    4040end# }}}
     41function GaussTria(finiteelement::IssmEnum) #{{{
    4142
     43        if(finiteelement==P0Enum)
     44                npoints = 1
     45                weights = [1.]
     46                coords1 = [0.333333333333333]
     47                coords2 = [0.333333333333333]
     48                coords3 = [0.333333333333333]
     49        elseif(finiteelement==P1Enum)
     50                        npoints = 3
     51                        weights = 0.333333333333333*ones(3)
     52                        coords1 = [1.; 0.; 0.]
     53                        coords2 = [0.; 1.; 0.]
     54                        coords3 = [0.; 0.; 1.]
     55        else
     56                error("finite element ", finiteelement," not supported yet");
     57        end
     58
     59        return GaussTria(npoints,weights,coords1,coords2,coords3)
     60end# }}}
Note: See TracChangeset for help on using the changeset viewer.