source:
issm/oecreview/Archive/23390-24306/ISSM-24096-24097.diff@
24307
Last change on this file since 24307 was 24307, checked in by , 5 years ago | |
---|---|
File size: 14.5 KB |
-
../trunk-jpl/src/c/cores/masstransport_core.cpp
60 60 depthaverage_core(femmodel); 61 61 } 62 62 femmodel->SetCurrentConfiguration(MasstransportAnalysisEnum); 63 InputDuplicatex(femmodel,ThicknessEnum,ThicknessOldEnum); 63 64 if(stabilization==4){ 64 65 solutionsequence_fct(femmodel); 65 66 } -
../trunk-jpl/src/c/classes/Elements/Penta.cpp
1807 1807 1808 1808 /*Fetch dof list and allocate solution vector*/ 1809 1809 GetDofListLocal(&doflist,NoneApproximationEnum,GsetEnum); 1810 IssmDouble* values 1810 IssmDouble* values = xNew<IssmDouble>(numnodes); 1811 1811 1812 1812 /*Use the dof list to index into the solution vector: */ 1813 1813 for(int i=0;i<numnodes;i++){ -
../trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp
807 807 /*Only update if on base*/ 808 808 if(!element->IsOnBase()) return; 809 809 810 /*Get basal element*/811 int domaintype; element->FindParam(&domaintype,DomainTypeEnum);812 Element* basalelement=element;813 if(domaintype!=Domain2DhorizontalEnum) basalelement = element->SpawnBasalElement();814 815 /*Fetch number of nodes and dof for this finite element*/816 int numnodes = basalelement->GetNumberOfNodes();817 int numvertices = basalelement->GetNumberOfVertices();818 819 /*Keep old thickness for later*/820 IssmDouble* oldthickness = xNew<IssmDouble>(numvertices);821 basalelement->GetInputListOnNodes(&oldthickness[0],ThicknessEnum);822 823 810 /*Fetch dof list and allocate solution vector*/ 824 811 int *doflist = NULL; 825 812 element->GetDofListLocal(&doflist,NoneApproximationEnum,GsetEnum); 813 814 int numnodes = element->GetNumberOfNodes(); 826 815 IssmDouble* newthickness = xNew<IssmDouble>(numnodes); 827 816 828 817 /*Use the dof list to index into the solution vector: */ 829 IssmDouble minthickness = basalelement->FindParam(MasstransportMinThicknessEnum);818 IssmDouble minthickness = element->FindParam(MasstransportMinThicknessEnum); 830 819 for(int i=0;i<numnodes;i++){ 831 820 newthickness[i]=solution[doflist[i]]; 832 821 /*Check solution*/ … … 834 823 if(xIsInf<IssmDouble>(newthickness[i])) _error_("Inf found in solution vector"); 835 824 if(newthickness[i]<minthickness) newthickness[i]=minthickness; 836 825 } 837 838 826 element->AddBasalInput(ThicknessEnum,newthickness,element->GetElementType()); 839 840 /*Free ressources:*/ 827 xDelete<int>(doflist); 841 828 xDelete<IssmDouble>(newthickness); 842 xDelete<int>(doflist);843 829 830 /*Update bed and surface accordingly*/ 831 832 /*Get basal element*/ 833 int domaintype; element->FindParam(&domaintype,DomainTypeEnum); 834 Element* basalelement=element; 835 if(domaintype!=Domain2DhorizontalEnum) basalelement = element->SpawnBasalElement(); 836 837 /*Fetch number of nodes and dof for this finite element*/ 838 int numvertices = basalelement->GetNumberOfVertices(); 839 844 840 /*Now, we need to do some "processing"*/ 845 841 newthickness = xNew<IssmDouble>(numvertices); 842 IssmDouble* oldthickness = xNew<IssmDouble>(numvertices); 846 843 IssmDouble* cumdeltathickness = xNew<IssmDouble>(numvertices); 847 844 IssmDouble* deltathickness = xNew<IssmDouble>(numvertices); 848 845 IssmDouble* newbase = xNew<IssmDouble>(numvertices); … … 855 852 856 853 /*Get previous base, thickness, surfac and current sealevel and bed:*/ 857 854 basalelement->GetInputListOnVertices(&newthickness[0],ThicknessEnum); 855 basalelement->GetInputListOnVertices(&oldthickness[0],ThicknessOldEnum); 858 856 basalelement->GetInputListOnVertices(&oldbase[0],BaseEnum); 859 857 basalelement->GetInputListOnVertices(&oldsurface[0],SurfaceEnum); 860 858 basalelement->GetInputListOnVertices(&phi[0],MaskGroundediceLevelsetEnum); … … 868 866 869 867 /*What is the delta thickness forcing the sea-level rise core: cumulated over time, hence the +=:*/ 870 868 for(int i=0;i<numvertices;i++){ 871 cumdeltathickness[i] +=newthickness[i]-oldthickness[i];872 deltathickness[i] =newthickness[i]-oldthickness[i];869 cumdeltathickness[i] += newthickness[i]-oldthickness[i]; 870 deltathickness[i] = newthickness[i]-oldthickness[i]; 873 871 } 874 872 875 873 /*Find MasstransportHydrostaticAdjustment to figure out how to update the geometry:*/ … … 879 877 IssmDouble rho_water = basalelement->FindParam(MaterialsRhoSeawaterEnum); 880 878 881 879 for(int i=0;i<numvertices;i++) { 882 if (phi[i]>0.){ //this is an ice sheet: just add thickness to base. 883 /*Update! actually, the bed has moved too!:*/ 880 if (phi[i]>0.){ //this is grounded ice: just add thickness to base. 884 881 if(isgroundingline){ 885 882 newsurface[i] = bed[i]+newthickness[i]; //surface = bed + newthickness 886 883 newbase[i] = bed[i]; //new base at new bed … … 887 884 } 888 885 else{ 889 886 newsurface[i] = oldbase[i]+newthickness[i]; //surface = oldbase + newthickness 890 newbase[i] 887 newbase[i] = oldbase[i]; //same base: do nothing 891 888 } 892 889 } 893 890 else{ //this is an ice shelf: hydrostatic equilibrium*/ -
../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
776 776 ThicknessAcrossGradientEnum, 777 777 ThicknessAlongGradientEnum, 778 778 ThicknessEnum, 779 ThicknessOldEnum, 779 780 ThicknessPositiveEnum, 780 781 VelEnum, 781 782 VxAverageEnum, -
../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
782 782 case ThicknessAcrossGradientEnum : return "ThicknessAcrossGradient"; 783 783 case ThicknessAlongGradientEnum : return "ThicknessAlongGradient"; 784 784 case ThicknessEnum : return "Thickness"; 785 case ThicknessOldEnum : return "ThicknessOld"; 785 786 case ThicknessPositiveEnum : return "ThicknessPositive"; 786 787 case VelEnum : return "Vel"; 787 788 case VxAverageEnum : return "VxAverage"; -
../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
800 800 else if (strcmp(name,"ThicknessAcrossGradient")==0) return ThicknessAcrossGradientEnum; 801 801 else if (strcmp(name,"ThicknessAlongGradient")==0) return ThicknessAlongGradientEnum; 802 802 else if (strcmp(name,"Thickness")==0) return ThicknessEnum; 803 else if (strcmp(name,"ThicknessOld")==0) return ThicknessOldEnum; 803 804 else if (strcmp(name,"ThicknessPositive")==0) return ThicknessPositiveEnum; 804 805 else if (strcmp(name,"Vel")==0) return VelEnum; 805 806 else if (strcmp(name,"VxAverage")==0) return VxAverageEnum; … … 873 874 else if (strcmp(name,"Outputdefinition54")==0) return Outputdefinition54Enum; 874 875 else if (strcmp(name,"Outputdefinition55")==0) return Outputdefinition55Enum; 875 876 else if (strcmp(name,"Outputdefinition56")==0) return Outputdefinition56Enum; 876 else if (strcmp(name,"Outputdefinition57")==0) return Outputdefinition57Enum;877 877 else stage=8; 878 878 } 879 879 if(stage==8){ 880 if (strcmp(name,"Outputdefinition58")==0) return Outputdefinition58Enum; 880 if (strcmp(name,"Outputdefinition57")==0) return Outputdefinition57Enum; 881 else if (strcmp(name,"Outputdefinition58")==0) return Outputdefinition58Enum; 881 882 else if (strcmp(name,"Outputdefinition59")==0) return Outputdefinition59Enum; 882 883 else if (strcmp(name,"Outputdefinition5")==0) return Outputdefinition5Enum; 883 884 else if (strcmp(name,"Outputdefinition60")==0) return Outputdefinition60Enum; … … 996 997 else if (strcmp(name,"DoubleExternalResult")==0) return DoubleExternalResultEnum; 997 998 else if (strcmp(name,"DoubleInput")==0) return DoubleInputEnum; 998 999 else if (strcmp(name,"DoubleMatArrayParam")==0) return DoubleMatArrayParamEnum; 999 else if (strcmp(name,"DoubleMatExternalResult")==0) return DoubleMatExternalResultEnum;1000 1000 else stage=9; 1001 1001 } 1002 1002 if(stage==9){ 1003 if (strcmp(name,"DoubleMatParam")==0) return DoubleMatParamEnum; 1003 if (strcmp(name,"DoubleMatExternalResult")==0) return DoubleMatExternalResultEnum; 1004 else if (strcmp(name,"DoubleMatParam")==0) return DoubleMatParamEnum; 1004 1005 else if (strcmp(name,"DoubleParam")==0) return DoubleParamEnum; 1005 1006 else if (strcmp(name,"DoubleVecParam")==0) return DoubleVecParamEnum; 1006 1007 else if (strcmp(name,"Element")==0) return ElementEnum; … … 1119 1120 else if (strcmp(name,"Materials")==0) return MaterialsEnum; 1120 1121 else if (strcmp(name,"Matestar")==0) return MatestarEnum; 1121 1122 else if (strcmp(name,"Matice")==0) return MaticeEnum; 1122 else if (strcmp(name,"Matlitho")==0) return MatlithoEnum;1123 1123 else stage=10; 1124 1124 } 1125 1125 if(stage==10){ 1126 if (strcmp(name,"MatrixParam")==0) return MatrixParamEnum; 1126 if (strcmp(name,"Matlitho")==0) return MatlithoEnum; 1127 else if (strcmp(name,"MatrixParam")==0) return MatrixParamEnum; 1127 1128 else if (strcmp(name,"MaxAbsVx")==0) return MaxAbsVxEnum; 1128 1129 else if (strcmp(name,"MaxAbsVy")==0) return MaxAbsVyEnum; 1129 1130 else if (strcmp(name,"MaxAbsVz")==0) return MaxAbsVzEnum; … … 1242 1243 else if (strcmp(name,"StringArrayParam")==0) return StringArrayParamEnum; 1243 1244 else if (strcmp(name,"StringExternalResult")==0) return StringExternalResultEnum; 1244 1245 else if (strcmp(name,"StringParam")==0) return StringParamEnum; 1245 else if (strcmp(name,"SubelementFriction1")==0) return SubelementFriction1Enum;1246 1246 else stage=11; 1247 1247 } 1248 1248 if(stage==11){ 1249 if (strcmp(name,"SubelementFriction2")==0) return SubelementFriction2Enum; 1249 if (strcmp(name,"SubelementFriction1")==0) return SubelementFriction1Enum; 1250 else if (strcmp(name,"SubelementFriction2")==0) return SubelementFriction2Enum; 1250 1251 else if (strcmp(name,"SubelementMelt1")==0) return SubelementMelt1Enum; 1251 1252 else if (strcmp(name,"SubelementMelt2")==0) return SubelementMelt2Enum; 1252 1253 else if (strcmp(name,"SubelementMigration")==0) return SubelementMigrationEnum; -
../trunk-jpl/src/c/shared/Enum/Enum.vim
780 780 syn keyword cConstant ThicknessAcrossGradientEnum 781 781 syn keyword cConstant ThicknessAlongGradientEnum 782 782 syn keyword cConstant ThicknessEnum 783 syn keyword cConstant ThicknessOldEnum 783 784 syn keyword cConstant ThicknessPositiveEnum 784 785 syn keyword cConstant VelEnum 785 786 syn keyword cConstant VxAverageEnum … … 1280 1281 syn keyword cType Cfsurfacelogvel 1281 1282 syn keyword cType Cfsurfacesquare 1282 1283 syn keyword cType Channel 1284 syn keyword cType classes 1283 1285 syn keyword cType Constraint 1284 1286 syn keyword cType Constraints 1285 1287 syn keyword cType Contour … … 1286 1288 syn keyword cType Contours 1287 1289 syn keyword cType ControlInput 1288 1290 syn keyword cType Covertree 1291 syn keyword cType DatasetInput 1289 1292 syn keyword cType DataSetParam 1290 syn keyword cType DatasetInput1291 1293 syn keyword cType Definition 1292 1294 syn keyword cType DependentObject 1293 1295 syn keyword cType DoubleArrayInput … … 1300 1302 syn keyword cType Element 1301 1303 syn keyword cType ElementHook 1302 1304 syn keyword cType ElementMatrix 1305 syn keyword cType Elements 1303 1306 syn keyword cType ElementVector 1304 syn keyword cType Elements1305 1307 syn keyword cType ExponentialVariogram 1306 1308 syn keyword cType ExternalResult 1307 1309 syn keyword cType FemModel … … 1308 1310 syn keyword cType FileParam 1309 1311 syn keyword cType Friction 1310 1312 syn keyword cType Gauss 1313 syn keyword cType GaussianVariogram 1314 syn keyword cType gaussobjects 1311 1315 syn keyword cType GaussPenta 1312 1316 syn keyword cType GaussSeg 1313 1317 syn keyword cType GaussTetra 1314 1318 syn keyword cType GaussTria 1315 syn keyword cType GaussianVariogram1316 1319 syn keyword cType GenericExternalResult 1317 1320 syn keyword cType GenericOption 1318 1321 syn keyword cType GenericParam … … 1320 1323 syn keyword cType Hook 1321 1324 syn keyword cType Input 1322 1325 syn keyword cType Inputs 1326 syn keyword cType IntArrayInput 1323 1327 syn keyword cType IntInput 1324 1328 syn keyword cType IntMatParam 1325 1329 syn keyword cType IntParam … … 1327 1331 syn keyword cType IoModel 1328 1332 syn keyword cType IssmDirectApplicInterface 1329 1333 syn keyword cType IssmParallelDirectApplicInterface 1334 syn keyword cType krigingobjects 1330 1335 syn keyword cType Load 1331 1336 syn keyword cType Loads 1332 1337 syn keyword cType Masscon … … 1337 1342 syn keyword cType Matestar 1338 1343 syn keyword cType Matice 1339 1344 syn keyword cType Matlitho 1345 syn keyword cType matrixobjects 1340 1346 syn keyword cType MatrixParam 1341 1347 syn keyword cType Misfit 1342 1348 syn keyword cType Moulin … … 1349 1355 syn keyword cType Observation 1350 1356 syn keyword cType Observations 1351 1357 syn keyword cType Option 1358 syn keyword cType Options 1352 1359 syn keyword cType OptionUtilities 1353 syn keyword cType Options1354 1360 syn keyword cType Param 1355 1361 syn keyword cType Parameters 1356 1362 syn keyword cType Pengrid … … 1363 1369 syn keyword cType Quadtree 1364 1370 syn keyword cType Regionaloutput 1365 1371 syn keyword cType Results 1372 syn keyword cType Riftfront 1366 1373 syn keyword cType RiftStruct 1367 syn keyword cType Riftfront1368 1374 syn keyword cType Seg 1369 1375 syn keyword cType SegInput 1376 syn keyword cType Segment 1370 1377 syn keyword cType SegRef 1371 syn keyword cType Segment1372 1378 syn keyword cType SpcDynamic 1373 1379 syn keyword cType SpcStatic 1374 1380 syn keyword cType SpcTransient … … 1388 1394 syn keyword cType VectorParam 1389 1395 syn keyword cType Vertex 1390 1396 syn keyword cType Vertices 1391 syn keyword cType classes1392 syn keyword cType gaussobjects1393 syn keyword cType krigingobjects1394 syn keyword cType matrixobjects1395 1397 syn keyword cType AdjointBalancethickness2Analysis 1396 1398 syn keyword cType AdjointBalancethicknessAnalysis 1397 1399 syn keyword cType AdjointHorizAnalysis … … 1410 1412 syn keyword cType ExtrudeFromTopAnalysis 1411 1413 syn keyword cType FreeSurfaceBaseAnalysis 1412 1414 syn keyword cType FreeSurfaceTopAnalysis 1415 syn keyword cType GiaIvinsAnalysis 1413 1416 syn keyword cType GLheightadvectionAnalysis 1414 syn keyword cType GiaIvinsAnalysis1415 1417 syn keyword cType HydrologyDCEfficientAnalysis 1416 1418 syn keyword cType HydrologyDCInefficientAnalysis 1417 1419 syn keyword cType HydrologyGlaDSAnalysis
Note:
See TracBrowser
for help on using the repository browser.