Changeset 23053
- Timestamp:
- 08/06/18 11:27:18 (7 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r23035 r23053 2022 2022 /*}}}*/ 2023 2023 bool Element::IsInput(int name){/*{{{*/ 2024 if ( 2025 name==ThicknessEnum || 2026 name==SurfaceEnum || 2027 name==BaseEnum || 2028 name==BedEnum || 2029 name==BalancethicknessThickeningRateEnum || 2030 name==BalancethicknessOmegaEnum || 2031 name==SigmaNNEnum || 2032 name==SurfaceSlopeXEnum || 2033 name==SurfaceSlopeYEnum || 2034 name==SmbMassBalanceEnum || 2035 name==SmbAccumulationEnum || 2036 name==SmbRunoffEnum || 2037 name==SmbMeltEnum || 2038 name==SmbRefreezeEnum || 2039 name==SmbEvaporationEnum || 2040 name==SmbCEnum || 2041 name==SmbTaEnum || 2042 name==SmbVEnum || 2043 name==SmbDswrfEnum || 2044 name==SmbDlwrfEnum || 2045 name==SmbPEnum || 2046 name==SmbEAirEnum || 2047 name==SmbPAirEnum || 2048 name==SmbVzEnum || 2049 name==SmbTzEnum || 2050 name==SmbTmeanEnum || 2051 name==SmbIsInitializedEnum || 2052 name==BasalforcingsGroundediceMeltingRateEnum || 2053 name==BasalforcingsFloatingiceMeltingRateEnum || 2054 name==BasalforcingsGeothermalfluxEnum || 2055 name==BalancethicknessSpcthicknessEnum || 2056 name==SurfaceAreaEnum|| 2057 name==DamageDEnum || 2058 name==DamageDbarEnum || 2059 name==PressureEnum || 2060 name==VxEnum || 2061 name==VyEnum || 2062 name==VzEnum || 2063 name==VxMeshEnum || 2064 name==VyMeshEnum || 2065 name==VzMeshEnum || 2066 name==InversionVxObsEnum || 2067 name==InversionVyObsEnum || 2068 name==InversionVzObsEnum || 2069 name==TemperatureEnum || 2070 name==TemperaturePDDEnum || 2071 name==EnthalpyEnum || 2072 name==EnthalpyPicardEnum || 2073 name==WaterfractionEnum|| 2074 name==WatercolumnEnum || 2075 name==FrictionCoefficientEnum || 2076 name==FrictionAsEnum || 2077 name==FrictionEffectivePressureEnum || 2078 name==MaskGroundediceLevelsetEnum || 2079 name==MaskIceLevelsetEnum || 2080 name==IceMaskNodeActivationEnum || 2081 name==LevelsetfunctionSlopeXEnum || 2082 name==LevelsetfunctionSlopeYEnum || 2083 name==LevelsetfunctionPicardEnum || 2084 name==CalvingCalvingrateEnum || 2085 name==CalvingMeltingrateEnum || 2086 name==GradientEnum || 2087 name==OldGradientEnum || 2088 name==ConvergedEnum || 2089 name==MaterialsRheologyEEnum || 2090 name==MaterialsRheologyEbarEnum || 2091 name==MaterialsRheologyBEnum || 2092 name==MaterialsRheologyBbarEnum || 2093 name==MaterialsRheologyNEnum || 2094 name==MaterialsRheologyEcEnum || 2095 name==MaterialsRheologyEcbarEnum || 2096 name==MaterialsRheologyEsEnum || 2097 name==MaterialsRheologyEsbarEnum || 2098 name==SealevelEnum || 2099 name==SealevelUEsaEnum || 2100 name==SealevelUEsaRateEnum || 2101 name==SealevelNEsaEnum || 2102 name==SealevelNEsaRateEnum || 2103 name==SealevelUNorthEsaEnum || 2104 name==SealevelUEastEsaEnum || 2105 name==SealevelRSLEustaticEnum || 2106 name==SealevelRSLEustaticRateEnum || 2107 name==SealevelRSLEnum || 2108 name==SealevelRSLRateEnum || 2109 name==SealevelEustaticMaskEnum || 2110 name==SealevelEustaticOceanMaskEnum || 2111 name==SealevelUGiaEnum || 2112 name==SealevelUGiaRateEnum || 2113 name==SealevelNGiaEnum || 2114 name==SealevelNGiaRateEnum || 2115 name==SealevelriseDeltathicknessEnum || 2116 name==SealevelriseCumDeltathicknessEnum || 2117 name==EsaUmotionEnum || 2118 name==EsaNmotionEnum || 2119 name==EsaEmotionEnum || 2120 name==EsaXmotionEnum || 2121 name==EsaYmotionEnum || 2122 name==EsaStrainratexxEnum || 2123 name==EsaStrainratexyEnum || 2124 name==EsaStrainrateyyEnum || 2125 name==EsaRotationrateEnum || 2126 name==EsaDeltathicknessEnum || 2127 name==GiaWEnum || 2128 name==GiadWdtEnum || 2129 name==SedimentHeadHydrostepEnum || 2130 name==EplHeadHydrostepEnum || 2131 name==SedimentHeadOldEnum || 2132 name==EplHeadOldEnum || 2133 name==StressIntensityFactorEnum || 2134 name==StrainRateparallelEnum || 2135 name==StrainRateperpendicularEnum || 2136 name==HydrologydcEplThicknessOldEnum || 2137 name==HydrologydcEplInitialThicknessEnum || 2138 name==HydrologydcEplThicknessHydrostepEnum || 2139 name==HydrologydcMaskEplactiveNodeEnum || 2140 name==HydrologydcMaskThawedNodeEnum || 2141 name==HydrologyHeadEnum || 2142 name==HydrologyHeadOldEnum || 2143 name==StressbalanceConvergenceNumStepsEnum || 2144 name==MeshVertexonbaseEnum || 2145 name==FrictionPEnum || 2146 name==FrictionQEnum || 2147 name==FrictionCoefficientcoulombEnum || 2148 name==LoadingforceXEnum || 2149 name==LoadingforceYEnum || 2150 name==VelEnum || 2151 name==DeviatoricStressxxEnum || 2152 name==DeviatoricStressyyEnum || 2153 name==DeviatoricStressxyEnum || 2154 name==DeviatoricStressxzEnum || 2155 name==DeviatoricStressyzEnum || 2156 name==DeviatoricStresszzEnum || 2157 name==DeviatoricStresseffectiveEnum || 2158 name==VxAverageEnum || 2159 name==VyAverageEnum 2160 ) { 2161 return true; 2162 } 2024 if (name>InputsSTARTEnum && name<InputsENDEnum) {return true;} 2163 2025 else return false; 2164 2026 } -
issm/trunk-jpl/src/c/classes/Elements/Element.h
r23035 r23053 208 208 virtual void ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index)=0; 209 209 virtual void ControlToVectors(Vector<IssmPDouble>* vector_control, Vector<IssmPDouble>* vector_gradient,int control_enum)=0; 210 virtual void CreateDistanceInputFromSegmentlist(IssmDouble* segments,int numsegments,int distanceenum){_error_("not implemented yet");};210 virtual void CreateDistanceInputFromSegmentlist(IssmDouble* distances,int distanceenum){_error_("not implemented yet");}; 211 211 virtual void ElementResponse(IssmDouble* presponse,int response_enum)=0; 212 212 virtual void ElementSizes(IssmDouble* phx,IssmDouble* phy,IssmDouble* phz)=0; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r23035 r23053 823 823 824 824 }/*}}}*/ 825 void Tria::CreateDistanceInputFromSegmentlist(IssmDouble* segments,int numsegments,int distanceenum){/*{{{*/ 826 827 /*Intermediaries*/ 828 IssmDouble d,xn,yn; 825 void Tria::CreateDistanceInputFromSegmentlist(IssmDouble* distances,int distanceenum){/*{{{*/ 829 826 830 827 /*Get current field and vertex coordinates*/ 831 IssmDouble ls[NUMVERTICES]; 832 IssmDouble xyz_list[NUMVERTICES][3]; 833 ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 828 IssmDouble ls[NUMVERTICES],distance; 834 829 GetInputListOnVertices(&ls[0],distanceenum); 835 830 836 831 /*Get distance from list of segments and reset ls*/ 837 832 for(int j=0;j<NUMVERTICES;j++){ 838 IssmDouble dmin = 1.e+50; 839 for(int i=0;i<numsegments;i++){ 840 IssmDouble x = xyz_list[j][0]; 841 IssmDouble y = xyz_list[j][1]; 842 IssmDouble l2 = (segments[4*i+2]-segments[4*i+0])*(segments[4*i+2]-segments[4*i+0]) + (segments[4*i+3]-segments[4*i+1])*(segments[4*i+3]-segments[4*i+1]); 843 844 /*Segment has a length of 0*/ 845 if(l2==0.){ 846 d = (x-segments[4*i+0])*(x-segments[4*i+0])+(y-segments[4*i+1])*(y-segments[4*i+1]); 847 if(d<dmin) dmin = d; 848 continue; 849 } 850 851 /*Consider the line extending the segment, parameterized as v + t (w - v). 852 *We find projection of point p onto the line. 853 *It falls where t = [(p-v) . (w-v)] / |w-v|^2*/ 854 IssmDouble t = ((x-segments[4*i+0])*(segments[4*i+2]-segments[4*i+0]) + (y-segments[4*i+1])*(segments[4*i+3]-segments[4*i+1]))/l2; 855 if(t < 0.0){ 856 // Beyond the 'v' end of the segment 857 d = (x-segments[4*i+0])*(x-segments[4*i+0])+(y-segments[4*i+1])*(y-segments[4*i+1]); 858 } 859 else if (t > 1.0){ 860 // Beyond the 'w' end of the segment 861 d = (x-segments[4*i+2])*(x-segments[4*i+2])+(y-segments[4*i+3])*(y-segments[4*i+3]); 862 } 863 else{ 864 // Projection falls on the segment 865 xn = segments[4*i+0] + t * (segments[4*i+2] - segments[4*i+0]); 866 yn = segments[4*i+1] + t * (segments[4*i+3] - segments[4*i+1]); 867 d = (x-xn)*(x-xn)+(y-yn)*(y-yn); 868 } 869 870 if(d<dmin) dmin = d; 871 } 872 873 /*Update signed distance*/ 874 dmin = sqrt(dmin); 833 distance=distances[this->vertices[j]->Lid()]; 834 if(xIsNan<IssmDouble>(distance)) _error_("NaN found in vector"); 835 if(xIsInf<IssmDouble>(distance)) _error_("Inf found in vector"); 836 875 837 /*FIXME: do we really need this?*/ 876 if(distanceenum==MaskIceLevelsetEnum) if(d min>10000) dmin=10000;838 if(distanceenum==MaskIceLevelsetEnum) if(distance>10000) distance=10000; 877 839 if(ls[j]>0){ 878 ls[j] = d min;840 ls[j] = distance; 879 841 } 880 842 else{ 881 ls[j] = - d min;843 ls[j] = - distance; 882 844 } 883 845 } … … 2234 2196 2235 2197 switch(type){ 2236 case VertexPIdEnum: 2237 values = xNew<IssmDouble>(NUMVERTICES); 2238 for(int i=0;i<NUMVERTICES;i++){ 2239 values[i]=vector[this->vertices[i]->Pid()]; 2240 } 2241 /*update input*/ 2242 this->inputs->AddInput(new TriaInput(name,values,P1Enum)); 2243 break; 2244 2245 case VertexSIdEnum: 2246 values = xNew<IssmDouble>(NUMVERTICES); 2247 for(int i=0;i<NUMVERTICES;i++){ 2248 values[i]=vector[this->vertices[i]->Sid()]; 2249 } 2250 /*update input*/ 2251 this->inputs->AddInput(new TriaInput(name,values,P1Enum)); 2252 break; 2253 2254 case NodesEnum: 2255 /*Get number of nodes and dof list: */ 2256 numnodes = this->NumberofNodes(this->element_type); 2257 values = xNew<IssmDouble>(numnodes); 2258 GetDofList(&doflist,NoneApproximationEnum,GsetEnum); 2259 2260 for(int i=0;i<numnodes;i++){ 2261 values[i]=vector[doflist[i]]; 2262 if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in vector"); 2263 if(xIsInf<IssmDouble>(values[i])) _error_("Inf found in vector"); 2264 } 2265 this->inputs->AddInput(new TriaInput(name,values,this->element_type)); 2266 break; 2267 2268 case NodeSIdEnum: 2269 /*Get number of nodes and dof list: */ 2270 numnodes = this->NumberofNodes(this->element_type); 2271 values = xNew<IssmDouble>(numnodes); 2272 2273 for(int i=0;i<numnodes;i++){ 2274 values[i]=vector[nodes[i]->Sid()]; 2275 if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in vector"); 2276 if(xIsInf<IssmDouble>(values[i])) _error_("Inf found in vector"); 2277 } 2278 this->inputs->AddInput(new TriaInput(name,values,this->element_type)); 2279 break; 2280 2281 default: 2282 _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet"); 2198 case VertexLIdEnum: 2199 values = xNew<IssmDouble>(NUMVERTICES); 2200 for(int i=0;i<NUMVERTICES;i++){ 2201 values[i]=vector[this->vertices[i]->Lid()]; 2202 if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in vector"); 2203 if(xIsInf<IssmDouble>(values[i])) _error_("Inf found in vector"); 2204 } 2205 /*update input*/ 2206 this->inputs->AddInput(new TriaInput(name,values,P1Enum)); 2207 break; 2208 2209 case VertexPIdEnum: 2210 values = xNew<IssmDouble>(NUMVERTICES); 2211 for(int i=0;i<NUMVERTICES;i++){ 2212 values[i]=vector[this->vertices[i]->Pid()]; 2213 if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in vector"); 2214 if(xIsInf<IssmDouble>(values[i])) _error_("Inf found in vector"); 2215 } 2216 /*update input*/ 2217 this->inputs->AddInput(new TriaInput(name,values,P1Enum)); 2218 break; 2219 2220 case VertexSIdEnum: 2221 values = xNew<IssmDouble>(NUMVERTICES); 2222 for(int i=0;i<NUMVERTICES;i++){ 2223 values[i]=vector[this->vertices[i]->Sid()]; 2224 if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in vector"); 2225 if(xIsInf<IssmDouble>(values[i])) _error_("Inf found in vector"); 2226 } 2227 /*update input*/ 2228 this->inputs->AddInput(new TriaInput(name,values,P1Enum)); 2229 break; 2230 2231 case NodesEnum: 2232 /*Get number of nodes and dof list: */ 2233 numnodes = this->NumberofNodes(this->element_type); 2234 values = xNew<IssmDouble>(numnodes); 2235 GetDofList(&doflist,NoneApproximationEnum,GsetEnum); 2236 2237 for(int i=0;i<numnodes;i++){ 2238 values[i]=vector[doflist[i]]; 2239 if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in vector"); 2240 if(xIsInf<IssmDouble>(values[i])) _error_("Inf found in vector"); 2241 } 2242 this->inputs->AddInput(new TriaInput(name,values,this->element_type)); 2243 break; 2244 2245 case NodeSIdEnum: 2246 /*Get number of nodes and dof list: */ 2247 numnodes = this->NumberofNodes(this->element_type); 2248 values = xNew<IssmDouble>(numnodes); 2249 2250 for(int i=0;i<numnodes;i++){ 2251 values[i]=vector[nodes[i]->Sid()]; 2252 if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in vector"); 2253 if(xIsInf<IssmDouble>(values[i])) _error_("Inf found in vector"); 2254 } 2255 this->inputs->AddInput(new TriaInput(name,values,this->element_type)); 2256 break; 2257 2258 default: 2259 _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet"); 2283 2260 } 2284 2261 … … 2960 2937 _assert_(basinid<=num_basins); 2961 2938 2962 IssmDouble* boxareas = xNew<IssmDouble>(num_basins*maxbox);2939 IssmDouble* boxareas = NULL; 2963 2940 this->parameters->FindParam(&boxareas,&M,BasalforcingsPicoBoxAreaEnum); 2941 _assert_(M==num_basins*maxbox); 2964 2942 2965 2943 IssmDouble area_boxi = boxareas[basinid*maxbox+boxid]; -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r23035 r23053 66 66 void ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index); 67 67 void ControlToVectors(Vector<IssmPDouble>* vector_control, Vector<IssmPDouble>* vector_gradient,int control_enum); 68 void CreateDistanceInputFromSegmentlist(IssmDouble* segments,int numsegments,int distanceenum);68 void CreateDistanceInputFromSegmentlist(IssmDouble* distances,int distanceenum); 69 69 int EdgeOnBaseIndex(); 70 70 void EdgeOnBaseIndices(int* pindex1,int* pindex); -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r23049 r23053 1050 1050 1051 1051 /*3: Add distance input to all elements*/ 1052 for(int i=0;i<elements->Size();i++){ 1053 Element* element=dynamic_cast<Element*>(this->elements->GetObjectByOffset(i)); 1054 if(!element->IsOnBase()) continue; 1055 element->CreateDistanceInputFromSegmentlist(allsegmentlist,numseg,distanceenum); 1056 } 1057 1058 /*Extrude if necessary*/ 1059 int elementtype; 1060 this->parameters->FindParam(&elementtype,MeshElementtypeEnum); 1061 if(elementtype==PentaEnum){ 1062 InputExtrudex(this,distanceenum,-1); 1063 } 1064 else if(elementtype==TriaEnum){ 1065 /*no need to extrude*/ 1066 } 1067 else{ 1068 _error_("not implemented yet"); 1069 } 1052 IssmDouble* distances = xNew<IssmDouble>(vertices->Size()); 1053 IssmDouble d,xn,yn; 1054 for(int i=0;i<vertices->Size();i++){ 1055 Vertex* vertex=dynamic_cast<Vertex*>(this->vertices->GetObjectByOffset(i)); 1056 IssmDouble dmin = 1.e+50; 1057 1058 for(int i=0;i<numseg;i++){ 1059 IssmDouble x = vertex->x; 1060 IssmDouble y = vertex->y; 1061 1062 /*Skip if tip is more than 10xdmin away*/ 1063 if( pow(allsegmentlist[4*i+0] - x,2) + pow(y-allsegmentlist[4*i+1],2) > pow(10*dmin,2)) continue; 1064 1065 IssmDouble l2 = (allsegmentlist[4*i+2]-allsegmentlist[4*i+0])*(allsegmentlist[4*i+2]-allsegmentlist[4*i+0]) + (allsegmentlist[4*i+3]-allsegmentlist[4*i+1])*(allsegmentlist[4*i+3]-allsegmentlist[4*i+1]); 1066 1067 /*Segment has a length of 0*/ 1068 if(l2==0.){ 1069 d = (x-allsegmentlist[4*i+0])*(x-allsegmentlist[4*i+0])+(y-allsegmentlist[4*i+1])*(y-allsegmentlist[4*i+1]); 1070 if(d<dmin) dmin = d; 1071 continue; 1072 } 1073 1074 /*Consider the line extending the segment, parameterized as v + t (w - v). 1075 *We find projection of point p onto the line. 1076 *It falls where t = [(p-v) . (w-v)] / |w-v|^2*/ 1077 IssmDouble t = ((x-allsegmentlist[4*i+0])*(allsegmentlist[4*i+2]-allsegmentlist[4*i+0]) + (y-allsegmentlist[4*i+1])*(allsegmentlist[4*i+3]-allsegmentlist[4*i+1]))/l2; 1078 if(t < 0.0){ 1079 // Beyond the 'v' end of the segment 1080 d = (x-allsegmentlist[4*i+0])*(x-allsegmentlist[4*i+0])+(y-allsegmentlist[4*i+1])*(y-allsegmentlist[4*i+1]); 1081 } 1082 else if (t > 1.0){ 1083 // Beyond the 'w' end of the segment 1084 d = (x-allsegmentlist[4*i+2])*(x-allsegmentlist[4*i+2])+(y-allsegmentlist[4*i+3])*(y-allsegmentlist[4*i+3]); 1085 } 1086 else{ 1087 // Projection falls on the segment 1088 xn = allsegmentlist[4*i+0] + t * (allsegmentlist[4*i+2] - allsegmentlist[4*i+0]); 1089 yn = allsegmentlist[4*i+1] + t * (allsegmentlist[4*i+3] - allsegmentlist[4*i+1]); 1090 d = (x-xn)*(x-xn)+(y-yn)*(y-yn); 1091 } 1092 1093 if(d<dmin) dmin = d; 1094 } 1095 1096 /*Update signed distance*/ 1097 _assert_(vertex->lid<vertices->Size()); 1098 distances[vertex->lid] = sqrt(dmin); 1099 } 1100 1101 for(int i=0;i<this->elements->Size();i++){ 1102 Element* element=xDynamicCast<Element*>(this->elements->GetObjectByOffset(i)); 1103 element->CreateDistanceInputFromSegmentlist(distances,distanceenum); 1104 } 1105 //InputUpdateFromVectorx(this,distances,distanceenum,VertexLIdEnum); 1070 1106 1071 1107 /*Clean up and return*/ 1108 xDelete<IssmDouble>(distances); 1072 1109 xDelete<IssmDouble>(allsegmentlist); 1073 1110 }/*}}}*/ -
issm/trunk-jpl/src/c/classes/Vertex.cpp
r22789 r23053 20 20 } 21 21 /*}}}*/ 22 Vertex::Vertex(int vertex_id, int vertex_sid,int i, IoModel* iomodel){/*{{{*/22 Vertex::Vertex(int vertex_id, int vertex_sid,int vertex_lid,int i, IoModel* iomodel){/*{{{*/ 23 23 24 24 this->id = vertex_id; 25 25 this->sid = vertex_sid; 26 26 this->pid = UNDEF; 27 this->lid = vertex_lid; 27 28 28 29 _assert_(iomodel->Data("md.mesh.x") && iomodel->Data("md.mesh.y") && iomodel->Data("md.mesh.z")); … … 60 61 this->connectivity = iomodel->numbernodetoelementconnectivity[i]; 61 62 62 } 63 /*}}}*/ 63 }/*}}}*/ 64 64 Vertex::~Vertex(){/*{{{*/ 65 65 return; … … 84 84 _printf_(" sid: " << sid << "\n"); 85 85 _printf_(" pid: " << pid << "\n"); 86 _printf_(" lid: " << lid << "\n"); 86 87 _printf_(" x: " << x << "\n"); 87 88 _printf_(" y: " << y << "\n"); … … 104 105 MARSHALLING(sid); 105 106 MARSHALLING(pid); 107 MARSHALLING(lid); 106 108 MARSHALLING(x); 107 109 MARSHALLING(y); … … 113 115 /*}}}*/ 114 116 int Vertex::ObjectEnum(void){/*{{{*/ 115 116 117 return VertexEnum; 117 118 } 119 /*}}}*/ 118 }/*}}}*/ 120 119 121 120 /*Vertex management: */ … … 172 171 /*}}}*/ 173 172 int Vertex::Pid(void){ return pid; }/*{{{*/ 173 /*}}}*/ 174 int Vertex::Lid(void){ return lid; }/*{{{*/ 174 175 /*}}}*/ 175 176 void Vertex::SetClone(int* minranks){/*{{{*/ -
issm/trunk-jpl/src/c/classes/Vertex.h
r22778 r23053 25 25 int sid; // "serial" id (rank of this vertex if the dataset was on 1 cpu) 26 26 int pid; // "parallel" id 27 int lid; // "local" id 27 28 IssmDouble x; 28 29 IssmDouble y; … … 36 37 /*Vertex constructors, destructors {{{*/ 37 38 Vertex(); 38 Vertex(int id, int sid, 39 Vertex(int id, int sid,int lid,int i, IoModel* iomodel); 39 40 ~Vertex(); 40 41 /*}}}*/ … … 59 60 void OffsetPids(int pidcount); 60 61 int Pid(void); 62 int Lid(void); 61 63 void SetClone(int* minranks); 62 64 void ShowTruePids(int* borderpids); -
issm/trunk-jpl/src/c/modules/FloatingiceMeltingRatePicox/FloatingiceMeltingRatePicox.cpp
r22974 r23053 39 39 int numvertices,num_basins,maxbox,basinid; 40 40 IssmDouble dist_max; 41 IssmDouble* dmax_basin_cpu=NULL;42 41 IssmDouble* distances=NULL; 43 42 44 43 femmodel->parameters->FindParam(&num_basins,BasalforcingsPicoNumBasinsEnum); 45 44 femmodel->parameters->FindParam(&maxbox,BasalforcingsPicoMaxboxcountEnum); 46 dmax_basin_cpu=xNew<IssmDouble>(num_basins);45 IssmDouble* dmax_basin_cpu=xNew<IssmDouble>(num_basins); 47 46 48 47 femmodel->elements->InputDuplicate(MaskGroundediceLevelsetEnum,DistanceToGroundinglineEnum); … … 98 97 xDelete<int>(nd); 99 98 xDelete<IssmDouble>(dmax_basin); 99 xDelete<IssmDouble>(dmax_basin_cpu); 100 100 101 101 }/*}}}*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp
r22778 r23053 238 238 CreateNumberNodeToElementConnectivity(iomodel,solution_type); 239 239 240 int lid = 0; 240 241 for(i=0;i<iomodel->numberofvertices;i++){ 241 if(iomodel->my_vertices[i]) vertices->AddObject(new Vertex(i+1,i, i,iomodel));242 if(iomodel->my_vertices[i]) vertices->AddObject(new Vertex(i+1,i,lid++,i,iomodel)); 242 243 } 243 244 -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r23020 r23053 258 258 SealevelriseAbstolEnum, 259 259 SealevelriseAngularVelocityEnum, 260 SealevelriseCumDeltathicknessEnum,261 260 SealevelriseElasticEnum, 262 261 SealevelriseEquatorialMoiEnum, … … 530 529 RheologyBbarAbsGradientEnum, 531 530 SealevelEnum, 531 SealevelriseCumDeltathicknessEnum, 532 532 SealevelriseDeltathicknessEnum, 533 533 SedimentHeadHydrostepEnum, … … 1148 1148 VertexPIdEnum, 1149 1149 VertexSIdEnum, 1150 VertexLIdEnum, 1150 1151 VerticesEnum, 1151 1152 ViscousHeatingEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r23020 r23053 266 266 case SealevelriseAbstolEnum : return "SealevelriseAbstol"; 267 267 case SealevelriseAngularVelocityEnum : return "SealevelriseAngularVelocity"; 268 case SealevelriseCumDeltathicknessEnum : return "SealevelriseCumDeltathickness";269 268 case SealevelriseElasticEnum : return "SealevelriseElastic"; 270 269 case SealevelriseEquatorialMoiEnum : return "SealevelriseEquatorialMoi"; … … 536 535 case RheologyBbarAbsGradientEnum : return "RheologyBbarAbsGradient"; 537 536 case SealevelEnum : return "Sealevel"; 537 case SealevelriseCumDeltathicknessEnum : return "SealevelriseCumDeltathickness"; 538 538 case SealevelriseDeltathicknessEnum : return "SealevelriseDeltathickness"; 539 539 case SedimentHeadHydrostepEnum : return "SedimentHeadHydrostep"; … … 1152 1152 case VertexPIdEnum : return "VertexPId"; 1153 1153 case VertexSIdEnum : return "VertexSId"; 1154 case VertexLIdEnum : return "VertexLId"; 1154 1155 case VerticesEnum : return "Vertices"; 1155 1156 case ViscousHeatingEnum : return "ViscousHeating"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r23020 r23053 272 272 else if (strcmp(name,"SealevelriseAbstol")==0) return SealevelriseAbstolEnum; 273 273 else if (strcmp(name,"SealevelriseAngularVelocity")==0) return SealevelriseAngularVelocityEnum; 274 else if (strcmp(name,"SealevelriseCumDeltathickness")==0) return SealevelriseCumDeltathicknessEnum;275 274 else if (strcmp(name,"SealevelriseElastic")==0) return SealevelriseElasticEnum; 276 275 else if (strcmp(name,"SealevelriseEquatorialMoi")==0) return SealevelriseEquatorialMoiEnum; … … 383 382 else if (strcmp(name,"TransientIscoupler")==0) return TransientIscouplerEnum; 384 383 else if (strcmp(name,"TransientIsdamageevolution")==0) return TransientIsdamageevolutionEnum; 384 else if (strcmp(name,"TransientIsesa")==0) return TransientIsesaEnum; 385 385 else stage=4; 386 386 } 387 387 if(stage==4){ 388 if (strcmp(name,"TransientIsesa")==0) return TransientIsesaEnum; 389 else if (strcmp(name,"TransientIsgia")==0) return TransientIsgiaEnum; 388 if (strcmp(name,"TransientIsgia")==0) return TransientIsgiaEnum; 390 389 else if (strcmp(name,"TransientIsgroundingline")==0) return TransientIsgroundinglineEnum; 391 390 else if (strcmp(name,"TransientIshydrology")==0) return TransientIshydrologyEnum; … … 506 505 else if (strcmp(name,"HydrologyDrainageRate")==0) return HydrologyDrainageRateEnum; 507 506 else if (strcmp(name,"Ice")==0) return IceEnum; 507 else if (strcmp(name,"IceMaskNodeActivation")==0) return IceMaskNodeActivationEnum; 508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"IceMaskNodeActivation")==0) return IceMaskNodeActivationEnum; 512 else if (strcmp(name,"Input")==0) return InputEnum; 511 if (strcmp(name,"Input")==0) return InputEnum; 513 512 else if (strcmp(name,"InversionCostFunctionsCoefficients")==0) return InversionCostFunctionsCoefficientsEnum; 514 513 else if (strcmp(name,"InversionSurfaceObs")==0) return InversionSurfaceObsEnum; … … 548 547 else if (strcmp(name,"RheologyBbarAbsGradient")==0) return RheologyBbarAbsGradientEnum; 549 548 else if (strcmp(name,"Sealevel")==0) return SealevelEnum; 549 else if (strcmp(name,"SealevelriseCumDeltathickness")==0) return SealevelriseCumDeltathicknessEnum; 550 550 else if (strcmp(name,"SealevelriseDeltathickness")==0) return SealevelriseDeltathicknessEnum; 551 551 else if (strcmp(name,"SedimentHeadHydrostep")==0) return SedimentHeadHydrostepEnum; … … 1179 1179 else if (strcmp(name,"VertexPId")==0) return VertexPIdEnum; 1180 1180 else if (strcmp(name,"VertexSId")==0) return VertexSIdEnum; 1181 else if (strcmp(name,"VertexLId")==0) return VertexLIdEnum; 1181 1182 else if (strcmp(name,"Vertices")==0) return VerticesEnum; 1182 1183 else if (strcmp(name,"ViscousHeating")==0) return ViscousHeatingEnum;
Note:
See TracChangeset
for help on using the changeset viewer.