Changeset 21510
- Timestamp:
- 02/02/17 15:33:44 (8 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
r21261 r21510 60 60 parameters->AddObject(iomodel->CopyConstantObject("md.settings.results_on_nodes",SettingsResultsOnNodesEnum)); 61 61 parameters->AddObject(iomodel->CopyConstantObject("md.settings.io_gather",SettingsIoGatherEnum)); 62 parameters->AddObject(iomodel->CopyConstantObject("md.settings.solver_residue_threshold",SettingsSolverResidueThresholdEnum)); 62 63 parameters->AddObject(iomodel->CopyConstantObject("md.autodiff.isautodiff",AutodiffIsautodiffEnum)); 63 64 parameters->AddObject(iomodel->CopyConstantObject("md.qmu.isdakota",QmuIsdakotaEnum)); -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r21469 r21510 309 309 SettingsRecordingFrequencyEnum, 310 310 SettingsWaitonlockEnum, 311 SettingsSolverResidueThresholdEnum, 311 312 DebugProfilingEnum, 312 313 ProfilingCurrentMemEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r21469 r21510 315 315 case SettingsRecordingFrequencyEnum : return "SettingsRecordingFrequency"; 316 316 case SettingsWaitonlockEnum : return "SettingsWaitonlock"; 317 case SettingsSolverResidueThresholdEnum : return "SettingsSolverResidueThreshold"; 317 318 case DebugProfilingEnum : return "DebugProfiling"; 318 319 case ProfilingCurrentMemEnum : return "ProfilingCurrentMem"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r21469 r21510 321 321 else if (strcmp(name,"SettingsRecordingFrequency")==0) return SettingsRecordingFrequencyEnum; 322 322 else if (strcmp(name,"SettingsWaitonlock")==0) return SettingsWaitonlockEnum; 323 else if (strcmp(name,"SettingsSolverResidueThreshold")==0) return SettingsSolverResidueThresholdEnum; 323 324 else if (strcmp(name,"DebugProfiling")==0) return DebugProfilingEnum; 324 325 else if (strcmp(name,"ProfilingCurrentMem")==0) return ProfilingCurrentMemEnum; … … 382 383 else if (strcmp(name,"SmbWini")==0) return SmbWiniEnum; 383 384 else if (strcmp(name,"SmbAini")==0) return SmbAiniEnum; 384 else if (strcmp(name,"SmbTini")==0) return SmbTiniEnum;385 385 else stage=4; 386 386 } 387 387 if(stage==4){ 388 if (strcmp(name,"SmbSizeini")==0) return SmbSizeiniEnum; 388 if (strcmp(name,"SmbTini")==0) return SmbTiniEnum; 389 else if (strcmp(name,"SmbSizeini")==0) return SmbSizeiniEnum; 389 390 else if (strcmp(name,"SMBforcing")==0) return SMBforcingEnum; 390 391 else if (strcmp(name,"SmbMassBalance")==0) return SmbMassBalanceEnum; … … 505 506 else if (strcmp(name,"Temperature")==0) return TemperatureEnum; 506 507 else if (strcmp(name,"TemperaturePicard")==0) return TemperaturePicardEnum; 507 else if (strcmp(name,"TemperaturePDD")==0) return TemperaturePDDEnum;508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"ThicknessAbsMisfit")==0) return ThicknessAbsMisfitEnum; 511 if (strcmp(name,"TemperaturePDD")==0) return TemperaturePDDEnum; 512 else if (strcmp(name,"ThicknessAbsMisfit")==0) return ThicknessAbsMisfitEnum; 512 513 else if (strcmp(name,"SurfaceAbsMisfit")==0) return SurfaceAbsMisfitEnum; 513 514 else if (strcmp(name,"Vel")==0) return VelEnum; … … 628 629 else if (strcmp(name,"Outputdefinition39")==0) return Outputdefinition39Enum; 629 630 else if (strcmp(name,"Outputdefinition40")==0) return Outputdefinition40Enum; 630 else if (strcmp(name,"Outputdefinition41")==0) return Outputdefinition41Enum;631 631 else stage=6; 632 632 } 633 633 if(stage==6){ 634 if (strcmp(name,"Outputdefinition42")==0) return Outputdefinition42Enum; 634 if (strcmp(name,"Outputdefinition41")==0) return Outputdefinition41Enum; 635 else if (strcmp(name,"Outputdefinition42")==0) return Outputdefinition42Enum; 635 636 else if (strcmp(name,"Outputdefinition43")==0) return Outputdefinition43Enum; 636 637 else if (strcmp(name,"Outputdefinition44")==0) return Outputdefinition44Enum; … … 751 752 else if (strcmp(name,"Mumps")==0) return MumpsEnum; 752 753 else if (strcmp(name,"Gsl")==0) return GslEnum; 753 else if (strcmp(name,"Cuffey")==0) return CuffeyEnum;754 754 else stage=7; 755 755 } 756 756 if(stage==7){ 757 if (strcmp(name,"BuddJacka")==0) return BuddJackaEnum; 757 if (strcmp(name,"Cuffey")==0) return CuffeyEnum; 758 else if (strcmp(name,"BuddJacka")==0) return BuddJackaEnum; 758 759 else if (strcmp(name,"CuffeyTemperate")==0) return CuffeyTemperateEnum; 759 760 else if (strcmp(name,"Paterson")==0) return PatersonEnum; … … 874 875 else if (strcmp(name,"BalancethicknessAnalysis")==0) return BalancethicknessAnalysisEnum; 875 876 else if (strcmp(name,"BalancethicknessSolution")==0) return BalancethicknessSolutionEnum; 876 else if (strcmp(name,"Balancethickness2Analysis")==0) return Balancethickness2AnalysisEnum;877 877 else stage=8; 878 878 } 879 879 if(stage==8){ 880 if (strcmp(name,"Balancethickness2Solution")==0) return Balancethickness2SolutionEnum; 880 if (strcmp(name,"Balancethickness2Analysis")==0) return Balancethickness2AnalysisEnum; 881 else if (strcmp(name,"Balancethickness2Solution")==0) return Balancethickness2SolutionEnum; 881 882 else if (strcmp(name,"BalancethicknessSoftAnalysis")==0) return BalancethicknessSoftAnalysisEnum; 882 883 else if (strcmp(name,"BalancethicknessSoftSolution")==0) return BalancethicknessSoftSolutionEnum; … … 997 998 else if (strcmp(name,"Contours")==0) return ContoursEnum; 998 999 else if (strcmp(name,"Parameters")==0) return ParametersEnum; 999 else if (strcmp(name,"Vertices")==0) return VerticesEnum;1000 1000 else stage=9; 1001 1001 } 1002 1002 if(stage==9){ 1003 if (strcmp(name,"Results")==0) return ResultsEnum; 1003 if (strcmp(name,"Vertices")==0) return VerticesEnum; 1004 else if (strcmp(name,"Results")==0) return ResultsEnum; 1004 1005 else if (strcmp(name,"MaximumNumberOfDefinitions")==0) return MaximumNumberOfDefinitionsEnum; 1005 1006 else stage=10; -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_linear.cpp
r21294 r21510 19 19 Vector<IssmDouble>* ys = NULL; 20 20 int configuration_type; 21 IssmDouble solver_residue_threshold; 21 22 22 23 /*solver convergence test: */ … … 27 28 Vector<IssmDouble>* KUF=NULL; 28 29 29 30 31 30 /*Recover parameters: */ 32 31 femmodel->parameters->FindParam(&configuration_type,ConfigurationTypeEnum); 32 femmodel->parameters->FindParam(&solver_residue_threshold,SettingsSolverResidueThresholdEnum); 33 33 femmodel->UpdateConstraintsx(); 34 34 SystemMatricesx(&Kff,&Kfs,&pf,&df,NULL,femmodel); … … 47 47 nF=pf->Norm(NORM_TWO); 48 48 solver_residue=nKUF/nF; 49 if( solver_residue>1.e-6)_error_(" solver residue too high!: norm(KU-F)/norm(F)=" << solver_residue << "\n");49 if(isnan(solver_residue_threshold) == false && solver_residue>solver_residue_threshold)_error_(" solver residue too high!: norm(KU-F)/norm(F)=" << solver_residue << "\n"); 50 50 51 51 //clean up -
issm/trunk-jpl/src/m/classes/settings.js
r20777 r21510 27 27 //upload options: 28 28 upload_port = 0; 29 30 //throw an error if solver residue exceeds this value 31 self.solver_residue_threshold=1e-6; 29 32 30 33 }// }}} … … 43 46 fielddisplay(this,'upload_port','port login (default is 0)'); 44 47 fielddisplay(this,'upload_filename','unique id generated when uploading the file to server'); 48 fielddisplay(this,'solver_residue_threshold','throw an error if solver residue exceeds this value'); 45 49 46 50 … … 58 62 checkfield(md,'fieldname','settings.recording_frequency','numel',[1],'>=',0); 59 63 checkfield(md,'fieldname','settings.waitonlock','numel',[1]); 64 checkfield(md,'fieldname','settings.solver_residue_threshold','numel',[1],'>',0); 60 65 } // }}} 61 66 this.marshall=function(md,prefix,fid) { //{{{ … … 65 70 WriteData(fid,prefix,'object',this,'fieldname','output_frequency','format','Integer'); 66 71 WriteData(fid,prefix,'object',this,'fieldname','recording_frequency','format','Integer'); 72 WriteData(fid,prefix,'object',this,'fieldname','solver_residue_threshold','format','Double'); 67 73 if (this.waitonlock>0) WriteData(fid,prefix,'name','md.settings.waitonlock','data',true,'format','Boolean'); 68 74 else WriteData(fid,prefix,'name','md.settings.waitonlock','data',false,'format','Boolean'); … … 83 89 this.upload_port = 0; 84 90 this.upload_filename = ''; 91 this.solver_residue_threshold = 0; 85 92 this.setdefaultparameters(); 86 93 //}}} -
issm/trunk-jpl/src/m/classes/settings.m
r20690 r21510 17 17 upload_port = 0; 18 18 upload_filename = ''; 19 solver_residue_threshold = 0; 19 20 end 20 21 methods … … 48 49 49 50 %upload options: 50 upload_port = 0; 51 self.upload_port = 0; 52 53 %throw an error if solver residue exceeds this value 54 self.solver_residue_threshold = 1e-6; 51 55 52 56 end % }}} … … 59 63 md = checkfield(md,'fieldname','settings.recording_frequency','numel',[1],'>=',0); 60 64 md = checkfield(md,'fieldname','settings.waitonlock','numel',[1]); 65 md = checkfield(md,'fieldname','settings.solver_residue_threshold','numel',[1],'>',0); 61 66 62 67 end % }}} … … 75 80 fielddisplay(self,'upload_port','port login (default is 0)'); 76 81 fielddisplay(self,'upload_filename','unique id generated when uploading the file to server'); 82 fielddisplay(self,'solver_residue_threshold','throw an error if solver residue exceeds this value (NaN to deactivate)'); 77 83 78 84 end % }}} … … 84 90 WriteData(fid,prefix,'object',self,'fieldname','recording_frequency','format','Integer'); 85 91 WriteData(fid,prefix,'object',self,'fieldname','waitonlock','data',self.waitonlock>0,'format','Boolean'); 92 WriteData(fid,prefix,'object',self,'fieldname','solver_residue_threshold','format','Double'); 86 93 end % }}} 87 94 function savemodeljs(self,fid,modelname) % {{{ … … 98 105 writejsdouble(fid,[modelname '.settings.upload_port'],self.upload_port); 99 106 writejsstring(fid,[modelname '.settings.upload_filename'],self.upload_filename); 100 107 writejsstring(fid,[modelname '.settings.solver_residue_threshold'],self.solver_residue_threshold); 101 108 end % }}} 102 109 end -
issm/trunk-jpl/src/m/classes/settings.py
r21254 r21510 18 18 self.recording_frequency = 0 19 19 self.waitonlock = 0 20 self.solver_residue_threshold = 0 20 21 21 22 #set defaults … … 32 33 string="%s\n%s"%(string,fielddisplay(self,"recording_frequency","frequency at which the runs are being recorded, allowing for a restart")) 33 34 string="%s\n%s"%(string,fielddisplay(self,"waitonlock","maximum number of minutes to wait for batch results, or return 0")) 35 string="%s\n%s"%(string,fielddisplay(self,"solver_residue_threshold","throw an error if solver residue exceeds this value (NaN to deactivate)")) 34 36 return string 35 37 #}}} … … 55 57 self.waitonlock=2**31-1 56 58 59 #throw an error if solver residue exceeds this value 60 self.solver_residue_threshold=1e-6; 61 57 62 return self 58 63 #}}} … … 64 69 md = checkfield(md,'fieldname','settings.recording_frequency','numel',[1],'>=',0) 65 70 md = checkfield(md,'fieldname','settings.waitonlock','numel',[1]) 71 md = checkfield(md,'fieldname','settings.solver_residue_threshold','numel',[1],'>',0) 66 72 67 73 return md … … 73 79 WriteData(fid,prefix,'object',self,'fieldname','output_frequency','format','Integer') 74 80 WriteData(fid,prefix,'object',self,'fieldname','recording_frequency','format','Integer') 81 WriteData(fid,prefix,'object',self,'fieldname','solver_residue_threshold','format','Double') 75 82 if self.waitonlock>0: 76 83 WriteData(fid,prefix,'name','md.settings.waitonlock','data',True,'format','Boolean');
Note:
See TracChangeset
for help on using the changeset viewer.