Changeset 26649 for issm/trunk-jpl/src/jl/solve/gauss.jl
- Timestamp:
- 11/19/21 11:13:48 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/jl/solve/gauss.jl
r26629 r26649 23 23 coords3 = [0.333333333333333] 24 24 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] 29 29 elseif(order==3) 30 30 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] 35 35 else 36 36 error("order ",order," not supported yet"); … … 39 39 return GaussTria(npoints,weights,coords1,coords2,coords3) 40 40 end# }}} 41 function GaussTria(finiteelement::IssmEnum) #{{{ 41 42 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) 60 end# }}}
Note:
See TracChangeset
for help on using the changeset viewer.