Changeset 26738 for issm/trunk-jpl/src/jl/core/elements.jl
- Timestamp:
- 12/17/21 12:21:15 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/jl/core/elements.jl
r26736 r26738 46 46 end 47 47 end #}}} 48 function InputUpdateFromVector(element::Tria, vector::Vector{Float64}, enum::IssmEnum, layout::IssmEnum) #{{{ 49 50 lidlist = element.vertexids 51 data = Vector{Float64}(undef, 3) 52 53 if(layout==VertexSIdEnum) 54 for i in 1:3 55 data[i] = vector[element.vertices[i].sid] 56 @assert isfinite(data[i]) 57 end 58 SetTriaInput(element.inputs, enum, P1Enum, lidlist, data) 59 else 60 error("layout ", layout, " not supported yet"); 61 end 62 end #}}} 48 63 function Update(element::Tria, inputs::Inputs, index::Int64, md::model, finiteelement::IssmEnum) #{{{ 49 64 … … 108 123 InputServe!(element,input) 109 124 return input 125 126 end # }}} 127 function GetInputListOnNodes!(element::Tria, vector::Vector{Float64}, enum::IssmEnum) # {{{ 128 129 #Get Input first 130 input = GetInput(element, enum) 131 132 #Get value at each vertex (i.e. P1 Nodes) 133 gauss=GaussTria(P1Enum) 134 for i in 1:gauss.numgauss 135 vector[i] = GetInputValue(input, gauss, i) 136 end 110 137 111 138 end # }}} … … 197 224 end 198 225 end#}}} 226 function IsIceInElement(element::Tria) #{{{ 227 #We consider that an element has ice if at least one of its nodes has a negative level set 228 229 input=GetInput(element, MaskIceLevelsetEnum) 230 231 if GetInputMin(input)<0 232 return true 233 else 234 return false 235 end 236 237 end#}}} 199 238 function GetIcefrontCoordinates!(element::Tria, xyz_front::Matrix{Float64}, xyz_list::Matrix{Float64}, levelsetenum::IssmEnum) #{{{ 200 239
Note:
See TracChangeset
for help on using the changeset viewer.