Changeset 9650
- Timestamp:
- 09/07/11 10:22:21 (14 years ago)
- Location:
- issm/trunk
- Files:
-
- 7 added
- 14 deleted
- 77 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
r9646 r9650 72 72 MaskVertexonfloatingiceEnum, 73 73 MaskVertexonwaterEnum, 74 QmuIsdakotaEnum, 75 QmuMassFluxSegmentsEnum, 76 QmuPartitionEnum, 77 QmuNumberofpartitionsEnum, 78 QmuNumberofresponsesEnum, 79 QmuResponsedescriptorsEnum, 80 QmuVariabledescriptorsEnum, 74 81 BalancethicknessSpcthicknessEnum, 75 82 BalancethicknessThickeningRateEnum, … … 373 380 NumberOfVerticesEnum, 374 381 OutputFilePointerEnum, 375 DakotaAnalysisEnum,376 382 QmuErrNameEnum, 377 383 QmuInNameEnum, 378 QmuMassFluxSegmentsEnum,379 384 QmuOutNameEnum, 380 QmuPartEnum,381 QmuNumberOfResponsesEnum,382 385 IndexedEnum, 383 386 RegularEnum, … … 385 388 ScaledEnum, 386 389 NodalEnum, 387 ResponsedescriptorsEnum,388 VariabledescriptorsEnum,389 390 VerboseEnum, 390 391 PetscOptionsStringsEnum, … … 469 470 WaitonlockEnum, 470 471 NumberOfResponsesEnum, 471 NpartEnum, 472 PartEnum, 472 473 473 MaxSteadystateIterationsEnum, 474 474 RequestedOutputsEnum, -
issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp
r9356 r9650 35 35 36 36 /*First, recover qmu partition of vertices: */ 37 parameters->FindParam(&qmu_part,&dummy,QmuPart Enum);37 parameters->FindParam(&qmu_part,&dummy,QmuPartitionEnum); 38 38 39 39 /*Some parameters: */ 40 40 numberofvertices=vertices->NumberOfVertices(); 41 parameters->FindParam(&npart, NpartEnum);41 parameters->FindParam(&npart,QmuNumberofpartitionsEnum); 42 42 43 43 /*average onto the separate areas. The result will be a npart sized vector. */ -
issm/trunk/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp
r9356 r9650 36 36 37 37 /*retrieve npart: */ 38 parameters->FindParam(&npart, NpartEnum);38 parameters->FindParam(&npart,QmuNumberofpartitionsEnum); 39 39 40 40 /*save the d_responses pointer: */ -
issm/trunk/src/c/modules/Dakotax/SpawnCoreParallel.cpp
r9571 r9650 55 55 56 56 /*retrieve parameters: */ 57 femmodel->parameters->FindParam(&responses_descriptors,&numresponsedescriptors, ResponsedescriptorsEnum);57 femmodel->parameters->FindParam(&responses_descriptors,&numresponsedescriptors,QmuResponsedescriptorsEnum); 58 58 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 59 59 femmodel->parameters->FindParam(&control_analysis,ControlAnalysisEnum); -
issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp
r9646 r9650 76 76 case MaskVertexonfloatingiceEnum : return "MaskVertexonfloatingice"; 77 77 case MaskVertexonwaterEnum : return "MaskVertexonwater"; 78 case QmuIsdakotaEnum : return "QmuIsdakota"; 79 case QmuMassFluxSegmentsEnum : return "QmuMassFluxSegments"; 80 case QmuPartitionEnum : return "QmuPartition"; 81 case QmuNumberofpartitionsEnum : return "QmuNumberofpartitions"; 82 case QmuNumberofresponsesEnum : return "QmuNumberofresponses"; 83 case QmuResponsedescriptorsEnum : return "QmuResponsedescriptors"; 84 case QmuVariabledescriptorsEnum : return "QmuVariabledescriptors"; 78 85 case BalancethicknessSpcthicknessEnum : return "BalancethicknessSpcthickness"; 79 86 case BalancethicknessThickeningRateEnum : return "BalancethicknessThickeningRate"; … … 325 332 case NumberOfVerticesEnum : return "NumberOfVertices"; 326 333 case OutputFilePointerEnum : return "OutputFilePointer"; 327 case DakotaAnalysisEnum : return "DakotaAnalysis";328 334 case QmuErrNameEnum : return "QmuErrName"; 329 335 case QmuInNameEnum : return "QmuInName"; 330 case QmuMassFluxSegmentsEnum : return "QmuMassFluxSegments";331 336 case QmuOutNameEnum : return "QmuOutName"; 332 case QmuPartEnum : return "QmuPart";333 case QmuNumberOfResponsesEnum : return "QmuNumberOfResponses";334 337 case IndexedEnum : return "Indexed"; 335 338 case RegularEnum : return "Regular"; … … 337 340 case ScaledEnum : return "Scaled"; 338 341 case NodalEnum : return "Nodal"; 339 case ResponsedescriptorsEnum : return "Responsedescriptors";340 case VariabledescriptorsEnum : return "Variabledescriptors";341 342 case VerboseEnum : return "Verbose"; 342 343 case PetscOptionsStringsEnum : return "PetscOptionsStrings"; … … 413 414 case WaitonlockEnum : return "Waitonlock"; 414 415 case NumberOfResponsesEnum : return "NumberOfResponses"; 415 case NpartEnum : return "Npart";416 case PartEnum : return "Part";417 416 case MaxSteadystateIterationsEnum : return "MaxSteadystateIterations"; 418 417 case RequestedOutputsEnum : return "RequestedOutputs"; -
issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
r9356 r9650 25 25 26 26 /*retrieve parameters: */ 27 parameters->FindParam(&npart, NpartEnum);28 parameters->FindParam(&qmu_part,&dummy,QmuPart Enum);27 parameters->FindParam(&npart,QmuNumberofpartitionsEnum); 28 parameters->FindParam(&qmu_part,&dummy,QmuPartitionEnum); 29 29 numberofvertices=vertices->NumberOfVertices(); 30 30 -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp
r9641 r9650 29 29 iomodel->Constant(&numberofelements,NumberOfElementsEnum); 30 30 iomodel->Constant(&control_analysis,ControlAnalysisEnum); 31 iomodel->Constant(&dakota_analysis, DakotaAnalysisEnum);31 iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum); 32 32 33 33 /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */ -
issm/trunk/src/c/modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp
r9625 r9650 63 63 64 64 /*recover parameters: */ 65 iomodel->Constant(&dakota_analysis, DakotaAnalysisEnum);66 parameters->AddObject(new BoolParam( DakotaAnalysisEnum,dakota_analysis));65 iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum); 66 parameters->AddObject(new BoolParam(QmuIsdakotaEnum,dakota_analysis)); 67 67 68 68 if(dakota_analysis){ … … 86 86 /*}}}*/ 87 87 /*Fetch variable descriptors: {{{1*/ 88 iomodel->FetchData(&variabledescriptors,&numvariabledescriptors, VariabledescriptorsEnum);88 iomodel->FetchData(&variabledescriptors,&numvariabledescriptors,QmuVariabledescriptorsEnum); 89 89 90 90 /*Ok, we have all the variable descriptors. Build a parameter with it: */ 91 parameters->AddObject(new StringArrayParam( VariabledescriptorsEnum,variabledescriptors,numvariabledescriptors));91 parameters->AddObject(new StringArrayParam(QmuVariabledescriptorsEnum,variabledescriptors,numvariabledescriptors)); 92 92 93 93 /*}}}*/ 94 94 /*Fetch response descriptors: {{{1*/ 95 iomodel->FetchData(&responsedescriptors,&numresponsedescriptors, ResponsedescriptorsEnum);95 iomodel->FetchData(&responsedescriptors,&numresponsedescriptors,QmuResponsedescriptorsEnum); 96 96 97 97 /*Ok, we have all the response descriptors. Build a parameter with it: */ 98 parameters->AddObject(new StringArrayParam( ResponsedescriptorsEnum,responsedescriptors,numresponsedescriptors));99 parameters->AddObject(new IntParam(QmuNumber OfResponsesEnum,numberofresponses));98 parameters->AddObject(new StringArrayParam(QmuResponsedescriptorsEnum,responsedescriptors,numresponsedescriptors)); 99 parameters->AddObject(new IntParam(QmuNumberofresponsesEnum,numberofresponses)); 100 100 /*}}}*/ 101 101 /*Deal with partitioning: {{{1*/ 102 102 /*partition vertices in iomodel->qmu_npart parts, unless a partition is already present: */ 103 103 104 parameters->AddObject(iomodel->CopyConstantObject( NpartEnum));105 iomodel->FetchData(&dpart,NULL,NULL, PartEnum);104 parameters->AddObject(iomodel->CopyConstantObject(QmuNumberofpartitionsEnum)); 105 iomodel->FetchData(&dpart,NULL,NULL,QmuPartitionEnum); 106 106 107 107 if(!dpart){ … … 113 113 for(i=0;i<numberofvertices;i++)dpart[i]=iomodel->my_vertices[i]; 114 114 } 115 parameters->AddObject(new DoubleVecParam(QmuPart Enum,dpart,numberofvertices));115 parameters->AddObject(new DoubleVecParam(QmuPartitionEnum,dpart,numberofvertices)); 116 116 /*}}}*/ 117 117 /*Deal with data needed because of qmu variables: {{{1*/ -
issm/trunk/src/c/modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp
r9641 r9650 23 23 iomodel->Constant(&dim,DimEnum); 24 24 iomodel->Constant(&numberofelements,NumberOfElementsEnum); 25 iomodel->Constant(&dakota_analysis, DakotaAnalysisEnum);25 iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum); 26 26 27 27 /*Now, is the model 3d? otherwise, do nothing: */ -
issm/trunk/src/c/modules/OutputResultsx/OutputResultsx.cpp
r9622 r9650 42 42 43 43 /*retrieve parameters: */ 44 parameters->FindParam(&dakota_analysis, DakotaAnalysisEnum);44 parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum); 45 45 46 46 if(dakota_analysis){ -
issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp
r9646 r9650 74 74 else if (strcmp(name,"MaskVertexonfloatingice")==0) return MaskVertexonfloatingiceEnum; 75 75 else if (strcmp(name,"MaskVertexonwater")==0) return MaskVertexonwaterEnum; 76 else if (strcmp(name,"QmuIsdakota")==0) return QmuIsdakotaEnum; 77 else if (strcmp(name,"QmuMassFluxSegments")==0) return QmuMassFluxSegmentsEnum; 78 else if (strcmp(name,"QmuPartition")==0) return QmuPartitionEnum; 79 else if (strcmp(name,"QmuNumberofpartitions")==0) return QmuNumberofpartitionsEnum; 80 else if (strcmp(name,"QmuNumberofresponses")==0) return QmuNumberofresponsesEnum; 81 else if (strcmp(name,"QmuResponsedescriptors")==0) return QmuResponsedescriptorsEnum; 82 else if (strcmp(name,"QmuVariabledescriptors")==0) return QmuVariabledescriptorsEnum; 76 83 else if (strcmp(name,"BalancethicknessSpcthickness")==0) return BalancethicknessSpcthicknessEnum; 77 84 else if (strcmp(name,"BalancethicknessThickeningRate")==0) return BalancethicknessThickeningRateEnum; … … 323 330 else if (strcmp(name,"NumberOfVertices")==0) return NumberOfVerticesEnum; 324 331 else if (strcmp(name,"OutputFilePointer")==0) return OutputFilePointerEnum; 325 else if (strcmp(name,"DakotaAnalysis")==0) return DakotaAnalysisEnum;326 332 else if (strcmp(name,"QmuErrName")==0) return QmuErrNameEnum; 327 333 else if (strcmp(name,"QmuInName")==0) return QmuInNameEnum; 328 else if (strcmp(name,"QmuMassFluxSegments")==0) return QmuMassFluxSegmentsEnum;329 334 else if (strcmp(name,"QmuOutName")==0) return QmuOutNameEnum; 330 else if (strcmp(name,"QmuPart")==0) return QmuPartEnum;331 else if (strcmp(name,"QmuNumberOfResponses")==0) return QmuNumberOfResponsesEnum;332 335 else if (strcmp(name,"Indexed")==0) return IndexedEnum; 333 336 else if (strcmp(name,"Regular")==0) return RegularEnum; … … 335 338 else if (strcmp(name,"Scaled")==0) return ScaledEnum; 336 339 else if (strcmp(name,"Nodal")==0) return NodalEnum; 337 else if (strcmp(name,"Responsedescriptors")==0) return ResponsedescriptorsEnum;338 else if (strcmp(name,"Variabledescriptors")==0) return VariabledescriptorsEnum;339 340 else if (strcmp(name,"Verbose")==0) return VerboseEnum; 340 341 else if (strcmp(name,"PetscOptionsStrings")==0) return PetscOptionsStringsEnum; … … 411 412 else if (strcmp(name,"Waitonlock")==0) return WaitonlockEnum; 412 413 else if (strcmp(name,"NumberOfResponses")==0) return NumberOfResponsesEnum; 413 else if (strcmp(name,"Npart")==0) return NpartEnum;414 else if (strcmp(name,"Part")==0) return PartEnum;415 414 else if (strcmp(name,"MaxSteadystateIterations")==0) return MaxSteadystateIterationsEnum; 416 415 else if (strcmp(name,"RequestedOutputs")==0) return RequestedOutputsEnum; -
issm/trunk/src/c/objects/Elements/Penta.cpp
r9646 r9650 7505 7505 iomodel->Constant(&yts,ConstantsYtsEnum); 7506 7506 iomodel->Constant(&stabilization,PrognosticStabilizationEnum); 7507 iomodel->Constant(&dakota_analysis, DakotaAnalysisEnum);7507 iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum); 7508 7508 iomodel->Constant(&isstokes,IsstokesEnum); 7509 7509 iomodel->Constant(&beta,MaterialsBetaEnum); -
issm/trunk/src/c/objects/Elements/Tria.cpp
r9646 r9650 5220 5220 iomodel->Constant(&yts,ConstantsYtsEnum); 5221 5221 iomodel->Constant(&stabilization,PrognosticStabilizationEnum); 5222 iomodel->Constant(&dakota_analysis, DakotaAnalysisEnum);5222 iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum); 5223 5223 5224 5224 /*Recover element type*/ -
issm/trunk/src/c/solutions/CorePointerFromSolutionEnum.cpp
r9594 r9650 29 29 /*retrieve some parameters: */ 30 30 parameters->FindParam(&control_analysis,ControlAnalysisEnum); 31 parameters->FindParam(&dakota_analysis, DakotaAnalysisEnum);31 parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum); 32 32 33 33 switch(solutiontype){ -
issm/trunk/src/c/solutions/control_core.cpp
r9571 r9650 57 57 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 58 58 femmodel->parameters->FindParam(&isstokes,IsstokesEnum); 59 femmodel->parameters->FindParam(&dakota_analysis, DakotaAnalysisEnum);59 femmodel->parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum); 60 60 61 61 /*out of solution_type, figure out solution core and adjoint function pointer*/ -
issm/trunk/src/c/solutions/controlrestart.cpp
r9571 r9650 18 18 femmodel->parameters->FindParam(&control_type,NULL,ControlTypeEnum); 19 19 femmodel->parameters->FindParam(&nsteps,NstepsEnum); 20 femmodel->parameters->FindParam(&dakota_analysis, DakotaAnalysisEnum);20 femmodel->parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum); 21 21 22 22 /*only save if we are not running qmu analysis. We certainly don't want to save control results each time we -
issm/trunk/src/c/solutions/diagnostic_core.cpp
r9571 r9650 30 30 femmodel->parameters->FindParam(&ismacayealpattyn,IsmacayealpattynEnum); 31 31 femmodel->parameters->FindParam(&isstokes,IsstokesEnum); 32 femmodel->parameters->FindParam(&dakota_analysis, DakotaAnalysisEnum);32 femmodel->parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum); 33 33 femmodel->parameters->FindParam(&control_analysis,ControlAnalysisEnum); 34 34 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); -
issm/trunk/src/c/solutions/issm.cpp
r9594 r9650 87 87 /*get parameters: */ 88 88 femmodel->parameters->FindParam(&waitonlock,WaitonlockEnum); 89 femmodel->parameters->FindParam(&dakota_analysis, DakotaAnalysisEnum);89 femmodel->parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum); 90 90 femmodel->parameters->FindParam(&control_analysis,ControlAnalysisEnum); 91 91 -
issm/trunk/src/c/solutions/thermal_core.cpp
r9628 r9650 31 31 femmodel->parameters->FindParam(&control_analysis,ControlAnalysisEnum); 32 32 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 33 femmodel->parameters->FindParam(&dakota_analysis, DakotaAnalysisEnum);33 femmodel->parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum); 34 34 35 35 /*Compute number of time steps: */ -
issm/trunk/src/m/classes/clusters/castor.m
r9625 r9650 94 94 %compress the files into one zip. 95 95 compressstring=['tar -zcf ' md.private.runtimename '.tar.gz ' md.miscellaneous.name '.bin ' md.miscellaneous.name '.queue ' md.miscellaneous.name '.petsc ']; 96 if md. dakota_analysis,96 if md.qmu.isdakota, 97 97 compressstring=[compressstring md.miscellaneous.name '.qmu.in']; 98 98 end … … 124 124 %What packages are we picking up from remote cluster 125 125 packages={[md.miscellaneous.name '.outlog'],[md.miscellaneous.name '.errlog']}; 126 if md. dakota_analysis,126 if md.qmu.isdakota, 127 127 packages{end+1}=[md.miscellaneous.name '.qmu.err']; 128 128 packages{end+1}=[md.miscellaneous.name '.qmu.out']; 129 if isfield(md.qmu _params,'tabular_graphics_data'),130 if md.qmu _params.tabular_graphics_data==true,129 if isfield(md.qmu.params,'tabular_graphics_data'), 130 if md.qmu.params.tabular_graphics_data==true, 131 131 packages{end+1}='dakota_tabular.dat'; 132 132 end -
issm/trunk/src/m/classes/clusters/cosmos.m
r9625 r9650 93 93 %compress the files into one zip. 94 94 compressstring=['tar -zcf ' md.private.runtimename '.tar.gz ' md.miscellaneous.name '.bin ' md.miscellaneous.name '.queue ' md.miscellaneous.name '.petsc ']; 95 if md. dakota_analysis,95 if md.qmu.isdakota, 96 96 compressstring=[compressstring md.miscellaneous.name '.qmu.in']; 97 97 end … … 123 123 %What packages are we picking up from remote cluster 124 124 packages={[md.miscellaneous.name '.outlog'],[md.miscellaneous.name '.errlog']}; 125 if md. dakota_analysis,125 if md.qmu.isdakota, 126 126 packages{end+1}=[md.miscellaneous.name '.qmu.err']; 127 127 packages{end+1}=[md.miscellaneous.name '.qmu.out']; 128 if isfield(md.qmu _params,'tabular_graphics_data'),129 if md.qmu _params.tabular_graphics_data==true,128 if isfield(md.qmu.params,'tabular_graphics_data'), 129 if md.qmu.params.tabular_graphics_data==true, 130 130 packages{end+1}='dakota_tabular.dat'; 131 131 end -
issm/trunk/src/m/classes/clusters/gemini.m
r9625 r9650 94 94 %compress the files into one zip. 95 95 compressstring=['tar -zcf ' md.private.runtimename '.tar.gz ' md.miscellaneous.name '.bin ' md.miscellaneous.name '.queue ' md.miscellaneous.name '.petsc ']; 96 if md. dakota_analysis,96 if md.qmu.isdakota, 97 97 compressstring=[compressstring md.miscellaneous.name '.qmu.in']; 98 98 end … … 124 124 %What packages are we picking up from remote cluster 125 125 packages={[md.miscellaneous.name '.outlog'],[md.miscellaneous.name '.errlog']}; 126 if md. dakota_analysis,126 if md.qmu.isdakota, 127 127 packages{end+1}=[md.miscellaneous.name '.qmu.err']; 128 128 packages{end+1}=[md.miscellaneous.name '.qmu.out']; 129 if isfield(md.qmu _params,'tabular_graphics_data'),130 if md.qmu _params.tabular_graphics_data==true,129 if isfield(md.qmu.params,'tabular_graphics_data'), 130 if md.qmu.params.tabular_graphics_data==true, 131 131 packages{end+1}='dakota_tabular.dat'; 132 132 end -
issm/trunk/src/m/classes/clusters/generic.m
r9625 r9650 123 123 %compress the files into one zip. 124 124 compressstring=['tar -zcf ' md.private.runtimename '.tar.gz ' md.miscellaneous.name '.bin ' md.miscellaneous.name '.queue ' md.miscellaneous.name '.petsc ']; 125 if md. dakota_analysis,125 if md.qmu.isdakota, 126 126 compressstring=[compressstring md.miscellaneous.name '.qmu.in']; 127 127 end … … 154 154 %What packages are we picking up from remote cluster 155 155 packages={[md.miscellaneous.name '.outlog'],[md.miscellaneous.name '.errlog']}; 156 if md. dakota_analysis,156 if md.qmu.isdakota, 157 157 packages{end+1}=[md.miscellaneous.name '.qmu.err']; 158 158 packages{end+1}=[md.miscellaneous.name '.qmu.out']; 159 if isfield(md.qmu _params,'tabular_graphics_data'),160 if md.qmu _params.tabular_graphics_data==true,159 if isfield(md.qmu.params,'tabular_graphics_data'), 160 if md.qmu.params.tabular_graphics_data==true, 161 161 packages{end+1}='dakota_tabular.dat'; 162 162 end -
issm/trunk/src/m/classes/clusters/pfe.m
r9625 r9650 182 182 %compress the files into one zip. 183 183 compressstring=['tar -zcf ' md.private.runtimename '.tar.gz ' md.miscellaneous.name '.bin ' md.miscellaneous.name '.queue ' md.miscellaneous.name '.petsc ']; 184 if md. dakota_analysis,184 if md.qmu.isdakota, 185 185 compressstring=[compressstring md.miscellaneous.name '.qmu.in ']; 186 186 end … … 234 234 packages={}; 235 235 end 236 if md. dakota_analysis,236 if md.qmu.isdakota, 237 237 packages{end+1}=[md.miscellaneous.name '.qmu.err']; 238 238 packages{end+1}=[md.miscellaneous.name '.qmu.out']; 239 if isfield(md.qmu _params,'tabular_graphics_data'),240 if md.qmu _params.tabular_graphics_data==true,239 if isfield(md.qmu.params,'tabular_graphics_data'), 240 if md.qmu.params.tabular_graphics_data==true, 241 241 packages{end+1}='dakota_tabular.dat'; 242 242 end -
issm/trunk/src/m/classes/clusters/pollux.m
r9625 r9650 94 94 %compress the files into one zip. 95 95 compressstring=['tar -zcf ' md.private.runtimename '.tar.gz ' md.miscellaneous.name '.bin ' md.miscellaneous.name '.queue ' md.miscellaneous.name '.petsc ']; 96 if md. dakota_analysis,96 if md.qmu.isdakota, 97 97 compressstring=[compressstring md.miscellaneous.name '.qmu.in']; 98 98 end … … 124 124 %What packages are we picking up from remote cluster 125 125 packages={[md.miscellaneous.name '.outlog'],[md.miscellaneous.name '.errlog']}; 126 if md. dakota_analysis,126 if md.qmu.isdakota, 127 127 packages{end+1}=[md.miscellaneous.name '.qmu.err']; 128 128 packages{end+1}=[md.miscellaneous.name '.qmu.out']; 129 if isfield(md.qmu _params,'tabular_graphics_data'),130 if md.qmu _params.tabular_graphics_data==true,129 if isfield(md.qmu.params,'tabular_graphics_data'), 130 if md.qmu.params.tabular_graphics_data==true, 131 131 packages{end+1}='dakota_tabular.dat'; 132 132 end -
issm/trunk/src/m/classes/model/model.m
r9649 r9650 30 30 materials = modelfield('default',0,'marshall',true); 31 31 mask = modelfield('default',0,'marshall',true); 32 qmu = modelfield('default',0,'marshall',true); 32 33 balancethickness = modelfield('default',0,'marshall',true); 33 34 … … 174 175 waitonlock = modelfield('default',0,'marshall',true,'format','Boolean'); 175 176 176 %qmu177 variables = modelfield('default',struct(),'marshall',false);178 responses = modelfield('default',struct(),'marshall',false);179 qmu_method = modelfield('default',struct(),'marshall',false);180 qmu_params = modelfield('default',struct(),'marshall',false);181 dakotaresults = modelfield('default',struct(),'marshall',false);182 dakota_analysis = modelfield('default',0,'marshall',true,'format','Boolean');183 part = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);184 npart = modelfield('default',0,'marshall',true,'format','Integer');185 numberofresponses = modelfield('default',0,'marshall',true,'format','Integer');186 variabledescriptors = modelfield('default',{},'marshall',true,'format','StringArray');187 responsedescriptors = modelfield('default',{},'marshall',true,'format','StringArray');188 qmu_mass_flux_profile_directory = modelfield('default',NaN,'marshall',false);189 qmu_mass_flux_profiles = modelfield('default',NaN,'marshall',false);190 qmu_mass_flux_segments = modelfield('default',{},'marshall',true,'format','MatArray');191 192 177 %ad: automatic differentiation 193 178 ad_analysis = modelfield('default',false,'marshall',true,'format','Boolean'); 194 179 ad_forward = modelfield('default',true,'marshall',true,'format','Boolean'); 195 180 ad_reverse = modelfield('default',false,'marshall',true,'format','Boolean'); 196 197 %partitioner:198 adjacency = modelfield('default',NaN,'marshall',false);199 vwgt = modelfield('default',NaN,'marshall',false);200 181 %}}} 201 182 end … … 311 292 disp(sprintf('%s%s%s',' Parameters: type ''',inputname(1),'.par'' to display')); 312 293 disp(sprintf(' Solution parameters: %s')); 313 disp(sprintf('%s%s%s',' Qmu: type ''',inputname(1),'.qmu'' to display'));314 294 disp(sprintf('%s%s%s',' Diagnostic solution parameters: type ''',inputname(1),'.diagnostic'' to display')); 315 295 disp(sprintf('%s%s%s',' Thermal solution parameters: type ''',inputname(1),'.thermal'' to display')); … … 357 337 if isfield(structmd,'g'), md.constants.g=structmd.g; end 358 338 if isfield(structmd,'yts'), md.constants.yts=structmd.yts; end 359 if isfield(structmd,'dakota_analysis'), md.dakota_analysis=structmd.dakota_analysis; end360 339 if isfield(structmd,'surface_mass_balance'), md.surfaceforcings.mass_balance=structmd.surface_mass_balance; end 361 340 if isfield(structmd,'basal_melting_rate'), md.basalforcings.melting_rate=structmd.basal_melting_rate; end … … 527 506 md.materials=materials; 528 507 md.mask=mask; 508 md.qmu=qmu; 529 509 md.balancethickness=balancethickness; 530 510 … … 654 634 if(strcmp(index1.subs,'res')), displayresults(md);return; end 655 635 if(strcmp(index1.subs,'obs')), displayobservations(md);return; end 656 if(strcmp(index1.subs,'qmu')), displayqmu(md);return; end657 636 if(strcmp(index1.subs,'diagnostic')), displaydiagnostic(md);return; end 658 637 if(strcmp(index1.subs,'transient')), displaytransient(md);return; end -
issm/trunk/src/m/enum/EnumToModelField.m
r9636 r9650 15 15 case MaterialsRheologyBEnum(), string='rheology_B'; return 16 16 case MaterialsRheologyBbarEnum(), string='rheology_B'; return 17 case DhdtEnum(),string='dhdt'; return17 case BalancethicknessThickeningRateEnum: string='dhdt'; return 18 18 case VxEnum(), string='vx'; return 19 19 case VxObsEnum(), string='vx_obs'; return -
issm/trunk/src/m/kml/kml_mesh_write.m
r9625 r9650 220 220 221 221 if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ... 222 md. npart222 md.qmu.numberofpartitions 223 223 kdoc.feature{1}(end+1)=kml_part_flagedges(md,varargin{3:end}); 224 224 end … … 227 227 228 228 if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ... 229 md. npart229 md.qmu.numberofpartitions 230 230 kdoc.feature{1}(end+1)=kml_unsh_edges(md,varargin{3:end}); 231 231 end … … 234 234 235 235 if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ... 236 md. npart236 md.qmu.numberofpartitions 237 237 kdoc.feature{1}(end+1)=kml_part_elems(md,varargin{3:end}); 238 238 end … … 241 241 242 242 if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ... 243 md. npart243 md.qmu.numberofpartitions 244 244 kdoc.feature{1}(end+1)=kml_part_edges(md,varargin{3:end}); 245 245 end … … 248 248 249 249 if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ... 250 md. npart250 md.qmu.numberofpartitions 251 251 kdoc.feature{1}(end+1)=kml_partitions(md,varargin{3:end}); 252 252 end -
issm/trunk/src/m/kml/kml_part_edges.m
r8298 r9650 118 118 119 119 if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ... 120 md. npart120 md.qmu.numberofpartitions 121 121 kfold=kml_folder(); 122 122 kfold.name ='Partition Edges'; 123 123 kfold.visibility=1; 124 124 kfold.descript =sprintf('Partitions=%d, Nodes=%d',... 125 md. npart,md.numberofnodes);126 kfold.feature ={repmat(kml_placemark(),1,md. npart)};125 md.qmu.numberofpartitions,md.numberofnodes); 126 kfold.feature ={repmat(kml_placemark(),1,md.qmu.numberofpartitions)}; 127 127 128 128 % write each partition as a linestring multigeometry placemark 129 129 130 disp(['Writing ' num2str(md. npart) ' partitions as KML linestrings.']);131 epart=md. part(md.elements)+1;130 disp(['Writing ' num2str(md.qmu.numberofpartitions) ' partitions as KML linestrings.']); 131 epart=md.qmu.partition(md.elements)+1; 132 132 if exist('ndata','var') || exist('edata','var') 133 pdata=zeros(1,md. npart);133 pdata=zeros(1,md.qmu.numberofpartitions); 134 134 pdata(:)=NaN; 135 135 end … … 137 137 % loop over each partition 138 138 139 for k=1:md. npart139 for k=1:md.qmu.numberofpartitions 140 140 % disp(['partition k=' int2str(k)]) 141 141 … … 158 158 159 159 if exist('ndata','var') 160 pdata(k)=ndata(find(md. part+1==k,1));160 pdata(k)=ndata(find(md.qmu.partition+1==k,1)); 161 161 elseif exist('edata','var') 162 162 for i=1:size(epartp,1) -
issm/trunk/src/m/kml/kml_part_elems.m
r8298 r9650 118 118 119 119 if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ... 120 md. npart120 md.qmu.numberofpartitions 121 121 kfold=kml_folder(); 122 122 kfold.name ='Partition Elements'; 123 123 kfold.visibility=1; 124 124 kfold.descript =sprintf('Partitions=%d, Nodes=%d\n',... 125 md. npart,md.numberofnodes);126 kfold.feature ={repmat(kml_placemark(),1,md. npart)};125 md.qmu.numberofpartitions,md.numberofnodes); 126 kfold.feature ={repmat(kml_placemark(),1,md.qmu.numberofpartitions)}; 127 127 128 128 % write each partition loop as a polygon multigeometry placemark 129 129 130 disp(['Writing ' num2str(md. npart) ' partitions as KML polygons.']);131 epart=md. part(md.elements)+1;130 disp(['Writing ' num2str(md.qmu.numberofpartitions) ' partitions as KML polygons.']); 131 epart=md.qmu.partition(md.elements)+1; 132 132 if exist('ndata','var') || exist('edata','var') 133 pdata=zeros(1,md. npart);133 pdata=zeros(1,md.qmu.numberofpartitions); 134 134 pdata(:)=NaN; 135 135 end … … 137 137 % loop over each partition 138 138 139 for k=1:md. npart139 for k=1:md.qmu.numberofpartitions 140 140 141 141 % for each partition, find all the included elements … … 151 151 152 152 if exist('ndata','var') 153 pdata(k)=ndata(find(md. part+1==k,1));153 pdata(k)=ndata(find(md.qmu.partition+1==k,1)); 154 154 elseif exist('edata','var') 155 155 for i=1:size(epart,1) -
issm/trunk/src/m/kml/kml_part_flagedges.m
r7461 r9650 73 73 74 74 if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ... 75 md. npart76 [latseg,lonseg]=flagedges(md.elements,md.lat,md.long,md. part);75 md.qmu.numberofpartitions 76 [latseg,lonseg]=flagedges(md.elements,md.lat,md.long,md.qmu.partition); 77 77 kfold=kml_folder(); 78 78 kfold.name ='Partition Segments'; 79 79 kfold.visibility=1; 80 80 kfold.descript =sprintf('Partitions=%d, Segments=%d',... 81 md. npart,size(latseg,1));81 md.qmu.numberofpartitions,size(latseg,1)); 82 82 kfold.feature ={repmat(kml_placemark(),1,size(latseg,1))}; 83 83 -
issm/trunk/src/m/kml/kml_partitions.m
r8298 r9650 119 119 120 120 if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ... 121 md. npart121 md.qmu.numberofpartitions 122 122 kfold=kml_folder(); 123 123 kfold.name ='Partitions'; 124 124 kfold.visibility=1; 125 125 kfold.descript =sprintf('Partitions=%d, Nodes=%d',... 126 md. npart,md.numberofnodes);127 kfold.feature ={repmat(kml_placemark(),1,md. npart)};126 md.qmu.numberofpartitions,md.numberofnodes); 127 kfold.feature ={repmat(kml_placemark(),1,md.qmu.numberofpartitions)}; 128 128 129 129 % write each partition as a polygon multigeometry placemark 130 130 131 disp(['Writing ' num2str(md. npart) ' partitions as KML polygons.']);132 epart=md. part(md.elements)+1;131 disp(['Writing ' num2str(md.qmu.numberofpartitions) ' partitions as KML polygons.']); 132 epart=md.qmu.partition(md.elements)+1; 133 133 if exist('ndata','var') || exist('edata','var') 134 pdata=zeros(1,md. npart);134 pdata=zeros(1,md.qmu.numberofpartitions); 135 135 pdata(:)=NaN; 136 136 end … … 138 138 % loop over each partition 139 139 140 for k=1:md. npart140 for k=1:md.qmu.numberofpartitions 141 141 % disp(['partition k=' int2str(k)]) 142 142 … … 159 159 160 160 if exist('ndata','var') 161 pdata(k)=ndata(find(md. part+1==k,1));161 pdata(k)=ndata(find(md.qmu.partition+1==k,1)); 162 162 elseif exist('edata','var') 163 163 for i=1:size(epartp,1) -
issm/trunk/src/m/kml/kml_unsh_edges.m
r7461 r9650 73 73 74 74 if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ... 75 md. npart75 md.qmu.numberofpartitions 76 76 [edgeadj]=edgeadjacency(md.elements,md.nodeconnectivity); 77 77 [icol,irow]=find(edgeadj'==0); … … 85 85 kfold.visibility=1; 86 86 kfold.descript =sprintf('Partitions=%d, Edges=%d',... 87 md. npart,size(edgeuns,1));87 md.qmu.numberofpartitions,size(edgeuns,1)); 88 88 kfold.feature ={repmat(kml_placemark(),1,size(edgeuns,1))}; 89 89 -
issm/trunk/src/m/model/ismodelselfconsistent.m
r9648 r9650 252 252 %}}} 253 253 %QMU {{{1 254 if md. dakota_analysis,255 if md.qmu _params.evaluation_concurrency~=1,254 if md.qmu.isdakota, 255 if md.qmu.params.evaluation_concurrency~=1, 256 256 message(['model not consistent: concurrency should be set to 1 when running dakota in library mode']); 257 257 end 258 if ~isempty(md. part),259 if numel(md. part)~=md.numberofnodes,258 if ~isempty(md.qmu.partition), 259 if numel(md.qmu.partition)~=md.numberofnodes, 260 260 message(['model not consistent: user supplied partition for qmu analysis should have size md.numberofnodes x 1 ']); 261 261 end 262 if find(md. part)>=md.numberofnodes,262 if find(md.qmu.partition)>=md.numberofnodes, 263 263 message(['model not consistent: user supplied partition should be indexed from 0 (c-convention)']); 264 264 end 265 if min(md. part)~=0,265 if min(md.qmu.partition)~=0, 266 266 message(['model not consistent: partition vector not indexed from 0 on']); 267 267 end 268 if max(md. part)>=md.numberofnodes,268 if max(md.qmu.partition)>=md.numberofnodes, 269 269 message(['model not consistent: partition vector cannot have maximum index larger than number of nodes']); 270 270 end 271 if ~isempty(find(md. part<0)),271 if ~isempty(find(md.qmu.partition<0)), 272 272 message(['model not consistent: partition vector cannot have values less than 0']); 273 273 end 274 if ~isempty(find(md. part>=md.npart)),275 message(['model not consistent: partition vector cannot have values more than md. npart-1']);276 end 277 if max(md. part)>=md.npart,274 if ~isempty(find(md.qmu.partition>=md.qmu.numberofpartitions)), 275 message(['model not consistent: partition vector cannot have values more than md.qmu.numberofpartitions-1']); 276 end 277 if max(md.qmu.partition)>=md.qmu.numberofpartitions, 278 278 message(['model not consistent: for qmu analysis, partitioning vector cannot go over npart, number of partition areas']); 279 279 end -
issm/trunk/src/m/model/isresultconsistent.m
r9632 r9650 21 21 22 22 %do not check results if qmu analysis 23 if md. dakota_analysis,23 if md.qmu.isdakota, 24 24 return 25 25 end -
issm/trunk/src/m/model/loadresultsfromcluster.m
r9625 r9650 36 36 37 37 %erase the log and output files 38 if md. dakota_analysis,38 if md.qmu.isdakota, 39 39 delete([['qmu' num2str(feature('GetPid')) '/'] md.miscellaneous.name '.outlog']); 40 40 delete([['qmu' num2str(feature('GetPid')) '/'] md.miscellaneous.name '.errlog']); … … 49 49 hostname=oshostname(); 50 50 if strcmpi(hostname,cluster.name), 51 if md. dakota_analysis,51 if md.qmu.isdakota, 52 52 delete([['qmu' num2str(feature('GetPid')) '/'] md.miscellaneous.name '.bin']); 53 53 delete([['qmu' num2str(feature('GetPid')) '/'] md.miscellaneous.name '.queue']); -
issm/trunk/src/m/model/loadresultsfromdisk.m
r9622 r9650 11 11 end 12 12 13 if ~md. dakota_analysis,13 if ~md.qmu.isdakota, 14 14 15 15 %initialize md.results if not a structure yet -
issm/trunk/src/m/model/partition/AreaAverageOntoPartition.m
r9190 r9650 21 21 md.numberofnodes=md.numberofnodes2d; 22 22 md.numberofelements=md.numberofelements2d; 23 md.v wgt=[];23 md.vertex_weight=[]; 24 24 md.nodeconnectivity=[]; 25 25 … … 29 29 %finally, project vector: 30 30 vector=project2d(md3d,vector,layer); 31 md. part=project2d(md3d,md3d.part,layer);31 md.qmu.partition=project2d(md3d,md3d.part,layer); 32 32 end 33 33 34 34 %ok, first check that part is Matlab indexed 35 part=md. part+1;35 part=md.qmu.partition+1; 36 36 37 37 %some check: 38 if md. npart~=max(part),39 error('AreaAverageOntoPartition error message: ''npart'' should be equal to max(md. part)');38 if md.qmu.numberofpartitions~=max(part), 39 error('AreaAverageOntoPartition error message: ''npart'' should be equal to max(md.qmu.partition)'); 40 40 end 41 41 … … 44 44 45 45 %start weight average 46 weightedvector=vector.*md.v wgt;46 weightedvector=vector.*md.vertex_weight; 47 47 for i=1:max(part), 48 48 pos=find(part==i); 49 partvector(i)=sum(weightedvector(pos))/sum(md.v wgt(pos));49 partvector(i)=sum(weightedvector(pos))/sum(md.vertex_weight(pos)); 50 50 end 51 51 -
issm/trunk/src/m/model/partition/adjacency.m
r9190 r9650 6 6 % the required output is: 7 7 % md.adj_mat (double [sparse nv x nv], vertex adjacency matrix) 8 % md.v wgt (double [nv], vertex weights)8 % md.vertex_weight (double [nv], vertex weights) 9 9 10 10 indi=[md.elements(:,1);md.elements(:,2);md.elements(:,3)]; … … 12 12 values=1; 13 13 14 md. adjacency=sparse(indi,indj,values,md.numberofnodes,md.numberofnodes);15 md. adjacency=double([md.adjacency | md.adjacency']);14 md.qmu.adjacency=sparse(indi,indj,values,md.numberofnodes,md.numberofnodes); 15 md.qmu.adjacency=double([md.qmu.adjacency | md.qmu.adjacency']); 16 16 17 17 %now, build vwgt: … … 24 24 pos=find(connectivity); 25 25 connectivity(pos)=areas(connectivity(pos))/3; 26 md.v wgt=sum(connectivity,2);26 md.vertex_weight=sum(connectivity,2); -
issm/trunk/src/m/model/partition/partitioner.m
r9207 r9650 1 function md =partitioner(md,varargin)1 function md.qmu.partitionitioner(md,varargin) 2 2 %PARTITIONER - partition mesh 3 3 % … … 9 9 % section: 1 by defaults(1=bisection, 2=quadrisection, 3=octasection) 10 10 % recomputeadjacency: 'on' by default (set to 'off' to compute existing one) 11 % Output: md. partrecover the partition vector11 % Output: md.qmu.partition recover the partition vector 12 12 % 13 13 % Usage: 14 % md =partitioner(md,'package','chaco','npart',100,'weighting','on');14 % md.qmu.partitionitioner(md,'package','chaco','npart',100,'weighting','on'); 15 15 % 16 16 … … 39 39 md.numberofnodes=md.numberofnodes2d; 40 40 md.numberofelements=md.numberofelements2d; 41 md.v wgt=[];41 md.vertex_weight=[]; 42 42 md.nodeconnectivity=[]; 43 43 end … … 63 63 %are we using weights? 64 64 if strcmpi(getfieldvalue(options,'weighting'),'on'), 65 weights=floor(md.v wgt/min(md.vwgt));65 weights=floor(md.vertex_weight/min(md.vertex_weight)); 66 66 method(3)=1; 67 67 else … … 70 70 71 71 % partition into nparts 72 part=Chaco(md. adjacency,weights,[],md.x, md.y ,md.z,method,npart,[])'+1; %index partitions from 1 up. like metis.72 part=Chaco(md.qmu.adjacency,weights,[],md.x, md.y ,md.z,method,npart,[])'+1; %index partitions from 1 up. like metis. 73 73 74 74 elseif strcmpi(package,'scotch'), … … 76 76 %are we using weights? 77 77 if strcmpi(getfieldvalue(options,'weighting'),'on'), 78 weights=floor(md.v wgt/min(md.vwgt));78 weights=floor(md.vertex_weight/min(md.vertex_weight)); 79 79 end 80 maptab=Scotch(md. adjacency,[],weights,[],'cmplt',[npart]);80 maptab=Scotch(md.qmu.adjacency,[],weights,[],'cmplt',[npart]); 81 81 82 82 part=maptab(:,2);%index partitions from 1 up. like metis. … … 89 89 elseif strcmpi(package,'metis'), 90 90 91 [element_partitioning,part]=MeshPartition(md ,npart);91 [element_partitioning,part]=MeshPartition(md.qmu.numberofpartitions); 92 92 93 93 else … … 103 103 end 104 104 105 md. part=part;105 md.qmu.partition=part; -
issm/trunk/src/m/model/plot/applyoptions.m
r9289 r9650 437 437 %flag edges of a partition 438 438 if exist(options,'partitionedges') 439 [xsegments ysegments]=flagedges(md.elements,md.x,md.y,md. part);439 [xsegments ysegments]=flagedges(md.elements,md.x,md.y,md.qmu.partition); 440 440 xsegments=xsegments*getfieldvalue(options,'unit',1); 441 441 ysegments=ysegments*getfieldvalue(options,'unit',1); -
issm/trunk/src/m/model/plot/plot_importancefactors.m
r8472 r9650 23 23 24 24 %go through all response functions and find the one corresponding to the correct responsefunctiondescriptor 25 responsefunctions=md. dakotaresults{2};25 responsefunctions=md.qmu.results{2}; 26 26 found=0; 27 27 for i=1:length(responsefunctions), … … 38 38 39 39 %Now recover response to the correct desgin variable 40 importancefactors=zeros(md. npart,1);40 importancefactors=zeros(md.qmu.numberofpartitions,1); 41 41 count=0; 42 42 for i=1:nfun, … … 58 58 59 59 %Ok, get partitioning. 60 [epart npart]=MeshPartition(md,md. npart);60 [epart npart]=MeshPartition(md,md.qmu.numberofpartitions); 61 61 62 62 %distribute importance factor -
issm/trunk/src/m/model/plot/plot_parthist.m
r8472 r9650 13 13 subplot(nlines,ncols,i); 14 14 15 imin=min(md. part);16 imax=max(md. part);15 imin=min(md.qmu.partition); 16 imax=max(md.qmu.partition); 17 17 18 18 part=zeros(imax-imin+1,2); 19 19 20 20 for i=imin:imax 21 ind=find(md. part== i);21 ind=find(md.qmu.partition == i); 22 22 part(i-imin+1,1)=length(ind); 23 part(i-imin+1,2)=sum(md.v wgt(ind));23 part(i-imin+1,2)=sum(md.vertex_weight(ind)); 24 24 end 25 25 -
issm/trunk/src/m/model/plot/plot_parthistn.m
r8472 r9650 13 13 subplot(nlines,ncols,i); 14 14 15 imin=min(md. part);16 imax=max(md. part);15 imin=min(md.qmu.partition); 16 imax=max(md.qmu.partition); 17 17 18 18 part=zeros(imax-imin+1,2); 19 19 20 20 for i=imin:imax 21 ind=find(md. part== i);21 ind=find(md.qmu.partition == i); 22 22 part(i-imin+1,1)=length(ind); 23 part(i-imin+1,2)=sum(md.v wgt(ind));23 part(i-imin+1,2)=sum(md.vertex_weight(ind)); 24 24 end 25 25 -
issm/trunk/src/m/model/plot/plot_parthistw.m
r8472 r9650 13 13 subplot(nlines,ncols,i); 14 14 15 imin=min(md. part);16 imax=max(md. part);15 imin=min(md.qmu.partition); 16 imax=max(md.qmu.partition); 17 17 18 18 part=zeros(imax-imin+1,2); 19 19 20 20 for i=imin:imax 21 ind=find(md. part== i);21 ind=find(md.qmu.partition == i); 22 22 part(i-imin+1,1)=length(ind); 23 part(i-imin+1,2)=sum(md.v wgt(ind));23 part(i-imin+1,2)=sum(md.vertex_weight(ind)); 24 24 end 25 25 -
issm/trunk/src/m/model/plot/plot_qmu_mass_flux_segments.m
r8472 r9650 11 11 [x y z elements is2d isplanet]=processmesh(md,[],options); 12 12 13 allsegments=md.qmu _mass_flux_segments;13 allsegments=md.qmu.mass_flux_segments; 14 14 15 15 if (md.dim==2), -
issm/trunk/src/m/model/plot/plot_qmumean.m
r8472 r9650 27 27 28 28 %go pick up the response: 29 allresponses=md. dakotaresults.dresp_out;30 responses=zeros(md. npart,1);29 allresponses=md.qmu.results.dresp_out; 30 responses=zeros(md.qmu.numberofpartitions,1); 31 31 32 32 count=1; … … 48 48 49 49 %now, project onto vertices 50 responses_on_node=responses(md. part+1);50 responses_on_node=responses(md.qmu.partition+1); 51 51 52 52 %plot -
issm/trunk/src/m/model/plot/plot_qmustddev.m
r8472 r9650 27 27 28 28 %go pick up the response: 29 allresponses=md. dakotaresults.dresp_out;30 responses=zeros(md. npart,1);29 allresponses=md.qmu.results.dresp_out; 30 responses=zeros(md.qmu.numberofpartitions,1); 31 31 32 32 count=1; … … 49 49 50 50 %now, project onto vertices 51 responses_on_node=responses(md. part+1);51 responses_on_node=responses(md.qmu.partition+1); 52 52 53 53 %plot -
issm/trunk/src/m/model/solve.m
r9625 r9650 40 40 %if running qmu analysis, some preprocessing of dakota files using 41 41 %models fields needs to be carried out. 42 if md. dakota_analysis,42 if md.qmu.isdakota, 43 43 md=preqmu(md,options); 44 44 end … … 74 74 75 75 %post processes qmu results if necessary 76 if md. dakota_analysis,76 if md.qmu.isdakota, 77 77 md=postqmu(md); 78 78 cd .. -
issm/trunk/src/m/model/solveparallel.m
r9625 r9650 39 39 40 40 %post processes qmu results if necessary 41 if md. dakota_analysis,41 if md.qmu.isdakota, 42 42 if ~strncmpi(options.keep,'y',1) 43 43 system(['rm -rf qmu' num2str(feature('GetPid'))]); -
issm/trunk/src/m/model/tres.m
r9629 r9650 47 47 48 48 elseif strcmpi(string,'dakota'), 49 md. dakotaresults=md.results.dakota;49 md.qmu.results=md.results.dakota; 50 50 51 51 elseif strcmpi(string,'flaim'), -
issm/trunk/src/m/qmu/examples/all_parameters.m
r9619 r9650 16 16 nonlinear_equality_constraint; 17 17 18 md. variables=struct();19 md. variables.nuv=normal_uncertain.empty();20 md. variables.nuv(end+1)=normal_uncertain('rho_ice',917,45.85);21 md. variables.nuv(end+1)=normal_uncertain('thickness',1,0.05);22 md. variables.nuv(end+1)=normal_uncertain('drag',1,0.05);23 md. variables.cdv=continuous_design.empty();24 md. variables.cdv(end+1)=continuous_design('thickness',1,0.9,1.1);25 md. variables.cdv(end+1)=continuous_design('drag',1,0.5,1.5);26 md. variables.csv=continuous_state.empty();27 md. variables.csv(end+1)=continuous_state('gravity',9.8);28 md. variables.lic=linear_inequality_constraint.empty();29 md. variables.lic(end+1)=linear_inequality_constraint([1 2 3],4,5);30 md. variables.lic(end+1)=linear_inequality_constraint([1 2],4,5);31 md. variables.lic(end+1)=linear_inequality_constraint([1 2 3 4],4,5);32 md. variables.lec=linear_equality_constraint.empty();33 md. variables.lec(end+1)=linear_equality_constraint([1 2 3],4);18 md.qmu.variables=struct(); 19 md.qmu.variables.nuv=normal_uncertain.empty(); 20 md.qmu.variables.nuv(end+1)=normal_uncertain('rho_ice',917,45.85); 21 md.qmu.variables.nuv(end+1)=normal_uncertain('thickness',1,0.05); 22 md.qmu.variables.nuv(end+1)=normal_uncertain('drag',1,0.05); 23 md.qmu.variables.cdv=continuous_design.empty(); 24 md.qmu.variables.cdv(end+1)=continuous_design('thickness',1,0.9,1.1); 25 md.qmu.variables.cdv(end+1)=continuous_design('drag',1,0.5,1.5); 26 md.qmu.variables.csv=continuous_state.empty(); 27 md.qmu.variables.csv(end+1)=continuous_state('gravity',9.8); 28 md.qmu.variables.lic=linear_inequality_constraint.empty(); 29 md.qmu.variables.lic(end+1)=linear_inequality_constraint([1 2 3],4,5); 30 md.qmu.variables.lic(end+1)=linear_inequality_constraint([1 2],4,5); 31 md.qmu.variables.lic(end+1)=linear_inequality_constraint([1 2 3 4],4,5); 32 md.qmu.variables.lec=linear_equality_constraint.empty(); 33 md.qmu.variables.lec(end+1)=linear_equality_constraint([1 2 3],4); 34 34 35 35 %% a variety of responses 36 36 37 md. responses=struct();38 md. responses.rf =response_function.empty();39 md. responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);40 md. responses.rf (end+1)=response_function('max_abs_vy',[100 200 300],[]);41 md. responses.rf (end+1)=response_function('max_vel' ,[100 200 300],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);42 md. responses.of =objective_function.empty();43 md. responses.of (end+1)=objective_function('max_vel');44 md. responses.lst=least_squares_term.empty();45 md. responses.lst(end+1)=least_squares_term('max_vel');46 md. responses.nic=nonlinear_inequality_constraint.empty();47 md. responses.nic(end+1)=nonlinear_inequality_constraint('max_abs_vx',0,1000);48 md. responses.nic(end+1)=nonlinear_inequality_constraint('max_abs_vy',0,1000);49 md. responses.nec=nonlinear_equality_constraint.empty();50 md. responses.nec(end+1)=nonlinear_equality_constraint('max_abs_vx',500);51 md. responses.nec(end+1)=nonlinear_equality_constraint('max_abs_vy',500);37 md.qmu.responses=struct(); 38 md.qmu.responses.rf =response_function.empty(); 39 md.qmu.responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 40 md.qmu.responses.rf (end+1)=response_function('max_abs_vy',[100 200 300],[]); 41 md.qmu.responses.rf (end+1)=response_function('max_vel' ,[100 200 300],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 42 md.qmu.responses.of =objective_function.empty(); 43 md.qmu.responses.of (end+1)=objective_function('max_vel'); 44 md.qmu.responses.lst=least_squares_term.empty(); 45 md.qmu.responses.lst(end+1)=least_squares_term('max_vel'); 46 md.qmu.responses.nic=nonlinear_inequality_constraint.empty(); 47 md.qmu.responses.nic(end+1)=nonlinear_inequality_constraint('max_abs_vx',0,1000); 48 md.qmu.responses.nic(end+1)=nonlinear_inequality_constraint('max_abs_vy',0,1000); 49 md.qmu.responses.nec=nonlinear_equality_constraint.empty(); 50 md.qmu.responses.nec(end+1)=nonlinear_equality_constraint('max_abs_vx',500); 51 md.qmu.responses.nec(end+1)=nonlinear_equality_constraint('max_abs_vy',500); 52 52 53 53 %% a variety of studies … … 55 55 % a sampling study 56 56 57 md.qmu _method =dakota_method('nond_samp');58 md.qmu _method(end)=dmeth_params_set(md.qmu_method(end),...57 md.qmu.method =dakota_method('nond_samp'); 58 md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),... 59 59 'seed',1234,... 60 60 'samples',10); … … 62 62 % a local reliability study 63 63 64 md.qmu _method(end+1)=dakota_method('nond_l');64 md.qmu.method(end+1)=dakota_method('nond_l'); 65 65 66 66 % a multidimensional parameter study 67 67 68 md.qmu _method(end+1)=dakota_method('multi');69 md.qmu _method(end)=dmeth_params_set(md.qmu_method(end),...68 md.qmu.method(end+1)=dakota_method('multi'); 69 md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),... 70 70 'partitions',2); 71 71 72 72 % an optimization study 73 73 74 md.qmu _method(end+1)=dakota_method('conmin_f');75 md.qmu _method(end)=dmeth_params_set(md.qmu_method(end),...74 md.qmu.method(end+1)=dakota_method('conmin_f'); 75 md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),... 76 76 'max_iterations',10,... 77 77 'max_function_evaluations',50,... … … 80 80 %% a variety of parameters 81 81 82 md.qmu _params.evaluation_concurrency=4;83 md.qmu _params.analysis_driver='';84 md.qmu _params.analysis_components='';85 md.qmu _params.interval_type='forward';86 md.qmu _params.fd_gradient_step_size=0.001;82 md.qmu.params.evaluation_concurrency=4; 83 md.qmu.params.analysis_driver=''; 84 md.qmu.params.analysis_components=''; 85 md.qmu.params.interval_type='forward'; 86 md.qmu.params.fd_gradient_step_size=0.001; 87 87 88 md. npart=10;88 md.qmu.numberofpartitions=10; 89 89 md.rifts.numrifts=5; 90 90 -
issm/trunk/src/m/qmu/examples/direct.m
r4759 r9650 1 1 %using library mode of Dakota, only for parallel runs. 2 md.qmu _params.direct=true;3 md.qmu _params.analysis_driver='diagnostic';4 md.qmu _params.evaluation_concurrency=1;2 md.qmu.params.direct=true; 3 md.qmu.params.analysis_driver='diagnostic'; 4 md.qmu.params.evaluation_concurrency=1; 5 5 6 6 7 7 8 8 %or for matlab direct driver 9 md.qmu _params.direct=true;10 md.qmu _params.analysis_driver='matlab';11 md.qmu _params.evaluation_concurrency=2; %launch 2 matlabs9 md.qmu.params.direct=true; 10 md.qmu.params.analysis_driver='matlab'; 11 md.qmu.params.evaluation_concurrency=2; %launch 2 matlabs -
issm/trunk/src/m/qmu/examples/lrel.m
r4759 r9650 16 16 nonlinear_equality_constraint; 17 17 18 md. variables=struct();19 md. variables.nuv=normal_uncertain.empty();20 md. variables.nuv(end+1)=normal_uncertain('RhoIce',917,45.85);21 md. variables.nuv(end+1)=normal_uncertain('RhoWater',1023,51.15);22 md. variables.nuv(end+1)=normal_uncertain('HeatCapacity',2009,100.45);23 md. variables.nuv(end+1)=normal_uncertain('ThermalConductivity',2.2,0.11);24 md. variables.nuv(end+1)=normal_uncertain('Gravity',9.8,0.49);25 md. variables.nuv(end+1)=normal_uncertain('Thickness',1,0.05);26 md. variables.nuv(end+1)=normal_uncertain('Drag',1,0.05);18 md.qmu.variables=struct(); 19 md.qmu.variables.nuv=normal_uncertain.empty(); 20 md.qmu.variables.nuv(end+1)=normal_uncertain('RhoIce',917,45.85); 21 md.qmu.variables.nuv(end+1)=normal_uncertain('RhoWater',1023,51.15); 22 md.qmu.variables.nuv(end+1)=normal_uncertain('HeatCapacity',2009,100.45); 23 md.qmu.variables.nuv(end+1)=normal_uncertain('ThermalConductivity',2.2,0.11); 24 md.qmu.variables.nuv(end+1)=normal_uncertain('Gravity',9.8,0.49); 25 md.qmu.variables.nuv(end+1)=normal_uncertain('Thickness',1,0.05); 26 md.qmu.variables.nuv(end+1)=normal_uncertain('Drag',1,0.05); 27 27 28 28 %% a variety of responses 29 29 30 md. responses=struct();31 md. responses.rf =response_function.empty();32 md. responses.rf (end+1)=response_function('min_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);33 md. responses.rf (end+1)=response_function('max_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);34 md. responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);35 md. responses.rf (end+1)=response_function('min_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);36 md. responses.rf (end+1)=response_function('max_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);37 md. responses.rf (end+1)=response_function('max_abs_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);38 md. responses.rf (end+1)=response_function('min_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);39 md. responses.rf (end+1)=response_function('max_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);30 md.qmu.responses=struct(); 31 md.qmu.responses.rf =response_function.empty(); 32 md.qmu.responses.rf (end+1)=response_function('min_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 33 md.qmu.responses.rf (end+1)=response_function('max_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 34 md.qmu.responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 35 md.qmu.responses.rf (end+1)=response_function('min_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 36 md.qmu.responses.rf (end+1)=response_function('max_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 37 md.qmu.responses.rf (end+1)=response_function('max_abs_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 38 md.qmu.responses.rf (end+1)=response_function('min_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 39 md.qmu.responses.rf (end+1)=response_function('max_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 40 40 41 41 %% nond_local_reliability study 42 42 43 md.qmu _method =dakota_method('nond_l');43 md.qmu.method =dakota_method('nond_l'); 44 44 45 45 %% a variety of parameters 46 46 47 md.qmu _params.evaluation_concurrency=1;48 md.qmu _params.analysis_driver='';49 md.qmu _params.analysis_components='';50 md.qmu _params.interval_type='forward';51 md.qmu _params.fd_gradient_step_size=0.01;47 md.qmu.params.evaluation_concurrency=1; 48 md.qmu.params.analysis_driver=''; 49 md.qmu.params.analysis_components=''; 50 md.qmu.params.interval_type='forward'; 51 md.qmu.params.fd_gradient_step_size=0.01; 52 52 53 md. npart=10;53 md.qmu.numberofpartitions=10; 54 54 55 55 md.qmu -
issm/trunk/src/m/qmu/examples/lrel_mmf.m
r9571 r9650 16 16 nonlinear_equality_constraint; 17 17 18 md. variables=struct();19 md. variables.nuv=normal_uncertain.empty();20 %md. variables.nuv(end+1)=normal_uncertain('RhoIce',917,45.85);21 %md. variables.nuv(end+1)=normal_uncertain('RhoWater',1023,51.15);22 %md. variables.nuv(end+1)=normal_uncertain('HeatCapacity',2009,100.45);23 %md. variables.nuv(end+1)=normal_uncertain('ThermalConductivity',2.2,0.11);24 %md. variables.nuv(end+1)=normal_uncertain('Gravity',9.8,0.49);25 md. variables.nuv(end+1)=normal_uncertain('Thickness',1,0.05);26 %md. variables.nuv(end+1)=normal_uncertain('Drag',1,0.05);18 md.qmu.variables=struct(); 19 md.qmu.variables.nuv=normal_uncertain.empty(); 20 %md.qmu.variables.nuv(end+1)=normal_uncertain('RhoIce',917,45.85); 21 %md.qmu.variables.nuv(end+1)=normal_uncertain('RhoWater',1023,51.15); 22 %md.qmu.variables.nuv(end+1)=normal_uncertain('HeatCapacity',2009,100.45); 23 %md.qmu.variables.nuv(end+1)=normal_uncertain('ThermalConductivity',2.2,0.11); 24 %md.qmu.variables.nuv(end+1)=normal_uncertain('Gravity',9.8,0.49); 25 md.qmu.variables.nuv(end+1)=normal_uncertain('Thickness',1,0.05); 26 %md.qmu.variables.nuv(end+1)=normal_uncertain('Drag',1,0.05); 27 27 28 28 %% a variety of responses 29 29 30 md. responses=struct();31 md. responses.rf =response_function.empty();32 md. responses.rf (end+1)=response_function('min_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);33 md. responses.rf (end+1)=response_function('max_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);34 md. responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);35 md. responses.rf (end+1)=response_function('min_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);36 md. responses.rf (end+1)=response_function('max_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);37 md. responses.rf (end+1)=response_function('max_abs_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);38 md. responses.rf (end+1)=response_function('min_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);39 md. responses.rf (end+1)=response_function('max_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);40 md. responses.rf (end+1)=response_function('mass_flux1',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);41 md. responses.rf (end+1)=response_function('mass_flux_2',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);42 md. responses.rf (end+1)=response_function('mass_flux(3)',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);43 md. responses.rf (end+1)=response_function('mass_flux4 (repeat)',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);44 md. responses.rf (end+1)=response_function('mass_flux-5',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);45 md. responses.rf (end+1)=response_function('mass_flux^6',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);46 md. responses.rf (end+1)=response_function('mass_flux[7]',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);30 md.qmu.responses=struct(); 31 md.qmu.responses.rf =response_function.empty(); 32 md.qmu.responses.rf (end+1)=response_function('min_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 33 md.qmu.responses.rf (end+1)=response_function('max_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 34 md.qmu.responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 35 md.qmu.responses.rf (end+1)=response_function('min_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 36 md.qmu.responses.rf (end+1)=response_function('max_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 37 md.qmu.responses.rf (end+1)=response_function('max_abs_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 38 md.qmu.responses.rf (end+1)=response_function('min_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 39 md.qmu.responses.rf (end+1)=response_function('max_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 40 md.qmu.responses.rf (end+1)=response_function('mass_flux1',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 41 md.qmu.responses.rf (end+1)=response_function('mass_flux_2',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 42 md.qmu.responses.rf (end+1)=response_function('mass_flux(3)',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 43 md.qmu.responses.rf (end+1)=response_function('mass_flux4 (repeat)',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 44 md.qmu.responses.rf (end+1)=response_function('mass_flux-5',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 45 md.qmu.responses.rf (end+1)=response_function('mass_flux^6',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 46 md.qmu.responses.rf (end+1)=response_function('mass_flux[7]',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 47 47 48 48 %% create mass flux profile … … 51 51 %expcreateprofile('mass_flux.exp') 52 52 %expdisp('mass_flux.exp') 53 %md.qmu _mass_flux_profile='mass_flux.exp';54 %md.qmu _mass_flux_profile={'mass_flux.exp','mass_flux2.exp','mass_flux3.exp'};55 md.qmu _mass_flux_profile={'mass_flux.exp','mass_flux2.exp','mass_flux3.exp','mass_flux.exp','mass_flux5.exp','mass_flux6.exp','mass_flux7.exp'};53 %md.qmu.mass_flux_profile='mass_flux.exp'; 54 %md.qmu.mass_flux_profile={'mass_flux.exp','mass_flux2.exp','mass_flux3.exp'}; 55 md.qmu.mass_flux_profile={'mass_flux.exp','mass_flux2.exp','mass_flux3.exp','mass_flux.exp','mass_flux5.exp','mass_flux6.exp','mass_flux7.exp'}; 56 56 57 57 %% nond_local_reliability study 58 58 59 md.qmu _method =dakota_method('nond_l');59 md.qmu.method =dakota_method('nond_l'); 60 60 61 61 %% a variety of parameters 62 62 63 %md.qmu _params.evaluation_concurrency=4;64 md.qmu _params.evaluation_concurrency=1;65 md.qmu _params.analysis_driver='';66 md.qmu _params.analysis_components='';67 md.qmu _params.interval_type='forward';68 md.qmu _params.fd_gradient_step_size=0.01;63 %md.qmu.params.evaluation_concurrency=4; 64 md.qmu.params.evaluation_concurrency=1; 65 md.qmu.params.analysis_driver=''; 66 md.qmu.params.analysis_components=''; 67 md.qmu.params.interval_type='forward'; 68 md.qmu.params.fd_gradient_step_size=0.01; 69 69 70 md. dakota_analysis=1;71 md. npart=10;72 if isempty(md. adjacency)70 md.qmu.isdakota=1; 71 md.qmu.numberofpartitions=10; 72 if isempty(md.qmu.adjacency) 73 73 md=adjacency(md); 74 74 end 75 if isempty(md. part)76 % md. part=partitioner(md,'package','metis','npart',md.npart);77 md. part=partitioner(md,'package','chaco','npart',md.npart,'weighting','on');75 if isempty(md.qmu.partition) 76 % md.qmu.partition=partitioner(md,'package','metis','npart',md.qmu.numberofpartitions); 77 md.qmu.partition=partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on'); 78 78 % SpawnCore.m assumes partition vector starting at zero 79 md. part=md.part-1;79 md.qmu.partition=md.qmu.partition-1; 80 80 end 81 81 md.eps_rel=1.e-5; … … 89 89 90 90 %plotmodel(md,'data','mesh') 91 %plotmodel(md,'data',md. part)91 %plotmodel(md,'data',md.qmu.partition) 92 92 %plotmodel(md,'data','mesh','partitionedges','on','linewidth',2) 93 %part_hist(md. part,md.vwgt)94 %plotmodel(md,'data',log10(md.results.dakota.dresp_out(9).impfac(md. part+1)))93 %part_hist(md.qmu.partition,md.vertex_weight) 94 %plotmodel(md,'data',log10(md.results.dakota.dresp_out(9).impfac(md.qmu.partition+1))) 95 95 -
issm/trunk/src/m/qmu/examples/lsq.m
r4759 r9650 16 16 nonlinear_equality_constraint; 17 17 18 md. variables=struct();19 md. variables.cdv=continuous_design.empty();20 md. variables.cdv(end+1)=continuous_design('thickness',1,0.9,1.1);21 md. variables.cdv(end+1)=continuous_design('drag',1,0.5,1.5);22 md. variables.csv=continuous_state.empty();23 md. variables.csv(end+1)=continuous_state('gravity',9.8);18 md.qmu.variables=struct(); 19 md.qmu.variables.cdv=continuous_design.empty(); 20 md.qmu.variables.cdv(end+1)=continuous_design('thickness',1,0.9,1.1); 21 md.qmu.variables.cdv(end+1)=continuous_design('drag',1,0.5,1.5); 22 md.qmu.variables.csv=continuous_state.empty(); 23 md.qmu.variables.csv(end+1)=continuous_state('gravity',9.8); 24 24 25 25 %% a variety of responses 26 26 27 md. responses=struct();28 md. responses.lst=least_squares_term.empty();29 md. responses.lst(end+1)=least_squares_term('max_vx');30 md. responses.lst(end+1)=least_squares_term('max_vy');27 md.qmu.responses=struct(); 28 md.qmu.responses.lst=least_squares_term.empty(); 29 md.qmu.responses.lst(end+1)=least_squares_term('max_vx'); 30 md.qmu.responses.lst(end+1)=least_squares_term('max_vy'); 31 31 32 32 %% a least-squares study 33 33 34 md.qmu _method =dakota_method('nl2sol');35 md.qmu _method(end)=dmeth_params_set(md.qmu_method(end),...34 md.qmu.method =dakota_method('nl2sol'); 35 md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),... 36 36 'max_iterations',10,... 37 37 'max_function_evaluations',50,... … … 40 40 %% a variety of parameters 41 41 42 md.qmu _params.evaluation_concurrency=4;43 md.qmu _params.analysis_driver='';44 md.qmu _params.analysis_components='';45 md.qmu _params.interval_type='forward';46 md.qmu _params.fd_gradient_step_size=0.01;42 md.qmu.params.evaluation_concurrency=4; 43 md.qmu.params.analysis_driver=''; 44 md.qmu.params.analysis_components=''; 45 md.qmu.params.interval_type='forward'; 46 md.qmu.params.fd_gradient_step_size=0.01; 47 47 48 md. npart=10;48 md.qmu.numberofpartitions=10; 49 49 50 50 md.qmu -
issm/trunk/src/m/qmu/examples/opt.m
r4759 r9650 16 16 nonlinear_equality_constraint; 17 17 18 md. variables=struct();19 md. variables.cdv=continuous_design.empty();20 md. variables.cdv(end+1)=continuous_design('thickness',1,0.9,1.1);21 md. variables.cdv(end+1)=continuous_design('drag',1,0.5,1.5);22 md. variables.csv=continuous_state.empty();23 md. variables.csv(end+1)=continuous_state('gravity',9.8);18 md.qmu.variables=struct(); 19 md.qmu.variables.cdv=continuous_design.empty(); 20 md.qmu.variables.cdv(end+1)=continuous_design('thickness',1,0.9,1.1); 21 md.qmu.variables.cdv(end+1)=continuous_design('drag',1,0.5,1.5); 22 md.qmu.variables.csv=continuous_state.empty(); 23 md.qmu.variables.csv(end+1)=continuous_state('gravity',9.8); 24 24 25 25 %% a variety of responses 26 26 27 md. responses=struct();28 md. responses.of =objective_function.empty();29 md. responses.of (end+1)=objective_function('max_vel');27 md.qmu.responses=struct(); 28 md.qmu.responses.of =objective_function.empty(); 29 md.qmu.responses.of (end+1)=objective_function('max_vel'); 30 30 31 31 %% an optimization study 32 32 33 md.qmu _method =dakota_method('conmin_f');34 md.qmu _method(end)=dmeth_params_set(md.qmu_method(end),...33 md.qmu.method =dakota_method('conmin_f'); 34 md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),... 35 35 'max_iterations',10,... 36 36 'max_function_evaluations',50,... … … 39 39 %% a variety of parameters 40 40 41 md.qmu _params.evaluation_concurrency=4;42 md.qmu _params.analysis_driver='';43 md.qmu _params.analysis_components='';44 md.qmu _params.interval_type='forward';45 md.qmu _params.fd_gradient_step_size=0.01;41 md.qmu.params.evaluation_concurrency=4; 42 md.qmu.params.analysis_driver=''; 43 md.qmu.params.analysis_components=''; 44 md.qmu.params.interval_type='forward'; 45 md.qmu.params.fd_gradient_step_size=0.01; 46 46 47 md. npart=10;47 md.qmu.numberofpartitions=10; 48 48 49 49 md.qmu -
issm/trunk/src/m/qmu/examples/paramc.m
r4759 r9650 16 16 nonlinear_equality_constraint; 17 17 18 md. variables=struct();19 md. variables.nuv=normal_uncertain.empty();20 md. variables.nuv(end+1)=normal_uncertain('rho_ice',917,45.85);21 md. variables.nuv(end+1)=normal_uncertain('rho_water',1023,51.15);22 md. variables.nuv(end+1)=normal_uncertain('heatcapacity',2009,100.45);23 md. variables.nuv(end+1)=normal_uncertain('thermalconductivity',2.2,0.11);24 md. variables.cdv=continuous_design.empty();25 md. variables.cdv(end+1)=continuous_design('thickness',1,0.9,1.1);26 md. variables.cdv(end+1)=continuous_design('drag',1,0.5,1.5);27 md. variables.csv=continuous_state.empty();28 md. variables.csv(end+1)=continuous_state('gravity',9.8);18 md.qmu.variables=struct(); 19 md.qmu.variables.nuv=normal_uncertain.empty(); 20 md.qmu.variables.nuv(end+1)=normal_uncertain('rho_ice',917,45.85); 21 md.qmu.variables.nuv(end+1)=normal_uncertain('rho_water',1023,51.15); 22 md.qmu.variables.nuv(end+1)=normal_uncertain('heatcapacity',2009,100.45); 23 md.qmu.variables.nuv(end+1)=normal_uncertain('thermalconductivity',2.2,0.11); 24 md.qmu.variables.cdv=continuous_design.empty(); 25 md.qmu.variables.cdv(end+1)=continuous_design('thickness',1,0.9,1.1); 26 md.qmu.variables.cdv(end+1)=continuous_design('drag',1,0.5,1.5); 27 md.qmu.variables.csv=continuous_state.empty(); 28 md.qmu.variables.csv(end+1)=continuous_state('gravity',9.8); 29 29 30 30 %% a variety of responses 31 31 32 md. responses=struct();33 md. responses.rf =response_function.empty();34 md. responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);35 md. responses.rf (end+1)=response_function('max_abs_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);36 md. responses.rf (end+1)=response_function('max_vel' ,[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);32 md.qmu.responses=struct(); 33 md.qmu.responses.rf =response_function.empty(); 34 md.qmu.responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 35 md.qmu.responses.rf (end+1)=response_function('max_abs_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 36 md.qmu.responses.rf (end+1)=response_function('max_vel' ,[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 37 37 38 38 %% a parameter study 39 39 40 md.qmu _method =dakota_method('centered');41 md.qmu _method(end)=dmeth_params_set(md.qmu_method(end),...40 md.qmu.method =dakota_method('centered'); 41 md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),... 42 42 'percent_delta',10.,... 43 43 'deltas_per_variable',1); … … 45 45 %% a variety of parameters 46 46 47 md.qmu _params.evaluation_concurrency=4;48 md.qmu _params.analysis_driver='';49 md.qmu _params.analysis_components='';47 md.qmu.params.evaluation_concurrency=4; 48 md.qmu.params.analysis_driver=''; 49 md.qmu.params.analysis_components=''; 50 50 51 md. npart=10;51 md.qmu.numberofpartitions=10; 52 52 53 53 md.qmu -
issm/trunk/src/m/qmu/examples/paramm.m
r4759 r9650 16 16 nonlinear_equality_constraint; 17 17 18 md. variables=struct();19 md. variables.nuv=normal_uncertain.empty();20 md. variables.nuv(end+1)=normal_uncertain('rho_ice',917,45.85,900,1000);21 md. variables.nuv(end+1)=normal_uncertain('rho_water',1023,51.15,1000,1100);18 md.qmu.variables=struct(); 19 md.qmu.variables.nuv=normal_uncertain.empty(); 20 md.qmu.variables.nuv(end+1)=normal_uncertain('rho_ice',917,45.85,900,1000); 21 md.qmu.variables.nuv(end+1)=normal_uncertain('rho_water',1023,51.15,1000,1100); 22 22 23 23 %% a variety of responses 24 24 25 md. responses=struct();26 md. responses.rf =response_function.empty();27 md. responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);28 md. responses.rf (end+1)=response_function('max_abs_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);29 md. responses.rf (end+1)=response_function('max_vel' ,[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);25 md.qmu.responses=struct(); 26 md.qmu.responses.rf =response_function.empty(); 27 md.qmu.responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 28 md.qmu.responses.rf (end+1)=response_function('max_abs_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 29 md.qmu.responses.rf (end+1)=response_function('max_vel' ,[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 30 30 31 31 %% a parameter study 32 32 33 md.qmu _method =dakota_method('multidim');34 md.qmu _method(end)=dmeth_params_set(md.qmu_method(end),...33 md.qmu.method =dakota_method('multidim'); 34 md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),... 35 35 'partitions',[4 4]); 36 36 37 37 %% a variety of parameters 38 38 39 md.qmu _params.evaluation_concurrency=4;40 md.qmu _params.analysis_driver='';41 md.qmu _params.analysis_components='';39 md.qmu.params.evaluation_concurrency=4; 40 md.qmu.params.analysis_driver=''; 41 md.qmu.params.analysis_components=''; 42 42 43 md. npart=10;43 md.qmu.numberofpartitions=10; 44 44 45 45 md.qmu -
issm/trunk/src/m/qmu/examples/samp.m
r4759 r9650 16 16 nonlinear_equality_constraint; 17 17 18 md. variables=struct();19 md. variables.nuv=normal_uncertain.empty();20 md. variables.nuv(end+1)=normal_uncertain('rho_ice',917,45.85);21 md. variables.nuv(end+1)=normal_uncertain('rho_water',1023,51.15);22 md. variables.nuv(end+1)=normal_uncertain('heatcapacity',2009,100.45);23 md. variables.nuv(end+1)=normal_uncertain('thermalconductivity',2.2,0.11);24 md. variables.nuv(end+1)=normal_uncertain('gravity',9.8,0.49);25 md. variables.nuv(end+1)=normal_uncertain('thickness',1,0.05);26 md. variables.nuv(end+1)=normal_uncertain('drag',1,0.05);18 md.qmu.variables=struct(); 19 md.qmu.variables.nuv=normal_uncertain.empty(); 20 md.qmu.variables.nuv(end+1)=normal_uncertain('rho_ice',917,45.85); 21 md.qmu.variables.nuv(end+1)=normal_uncertain('rho_water',1023,51.15); 22 md.qmu.variables.nuv(end+1)=normal_uncertain('heatcapacity',2009,100.45); 23 md.qmu.variables.nuv(end+1)=normal_uncertain('thermalconductivity',2.2,0.11); 24 md.qmu.variables.nuv(end+1)=normal_uncertain('gravity',9.8,0.49); 25 md.qmu.variables.nuv(end+1)=normal_uncertain('thickness',1,0.05); 26 md.qmu.variables.nuv(end+1)=normal_uncertain('drag',1,0.05); 27 27 28 28 %% a variety of responses 29 29 30 md. responses=struct();31 md. responses.rf =response_function.empty();32 md. responses.rf (end+1)=response_function('min_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);33 md. responses.rf (end+1)=response_function('max_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);34 md. responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);35 md. responses.rf (end+1)=response_function('min_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);36 md. responses.rf (end+1)=response_function('max_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);37 md. responses.rf (end+1)=response_function('max_abs_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);38 md. responses.rf (end+1)=response_function('min_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);39 md. responses.rf (end+1)=response_function('max_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);30 md.qmu.responses=struct(); 31 md.qmu.responses.rf =response_function.empty(); 32 md.qmu.responses.rf (end+1)=response_function('min_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 33 md.qmu.responses.rf (end+1)=response_function('max_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 34 md.qmu.responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 35 md.qmu.responses.rf (end+1)=response_function('min_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 36 md.qmu.responses.rf (end+1)=response_function('max_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 37 md.qmu.responses.rf (end+1)=response_function('max_abs_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 38 md.qmu.responses.rf (end+1)=response_function('min_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 39 md.qmu.responses.rf (end+1)=response_function('max_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 40 40 41 41 %% nond_sampling study 42 42 43 md.qmu _method =dakota_method('nond_samp');44 md.qmu _method(end)=dmeth_params_set(md.qmu_method(end),...43 md.qmu.method =dakota_method('nond_samp'); 44 md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),... 45 45 'seed',1234,... 46 46 'samples',20,... … … 49 49 %% a variety of parameters 50 50 51 md.qmu _params.evaluation_concurrency=4;52 md.qmu _params.analysis_driver='';53 md.qmu _params.analysis_components='';51 md.qmu.params.evaluation_concurrency=4; 52 md.qmu.params.analysis_driver=''; 53 md.qmu.params.analysis_components=''; 54 54 55 md. npart=10;55 md.qmu.numberofpartitions=10; 56 56 57 57 md.qmu -
issm/trunk/src/m/qmu/examples/samp_direct.m
r4759 r9650 16 16 nonlinear_equality_constraint; 17 17 18 md. variables=struct();19 md. variables.nuv=normal_uncertain.empty();20 md. variables.nuv(end+1)=normal_uncertain('rho_ice',917,45.85);21 md. variables.nuv(end+1)=normal_uncertain('rho_water',1023,51.15);22 md. variables.nuv(end+1)=normal_uncertain('heatcapacity',2009,100.45);23 md. variables.nuv(end+1)=normal_uncertain('thermalconductivity',2.2,0.11);24 md. variables.nuv(end+1)=normal_uncertain('gravity',9.8,0.49);25 md. variables.nuv(end+1)=normal_uncertain('thickness',1,0.05);26 md. variables.nuv(end+1)=normal_uncertain('drag',1,0.05);18 md.qmu.variables=struct(); 19 md.qmu.variables.nuv=normal_uncertain.empty(); 20 md.qmu.variables.nuv(end+1)=normal_uncertain('rho_ice',917,45.85); 21 md.qmu.variables.nuv(end+1)=normal_uncertain('rho_water',1023,51.15); 22 md.qmu.variables.nuv(end+1)=normal_uncertain('heatcapacity',2009,100.45); 23 md.qmu.variables.nuv(end+1)=normal_uncertain('thermalconductivity',2.2,0.11); 24 md.qmu.variables.nuv(end+1)=normal_uncertain('gravity',9.8,0.49); 25 md.qmu.variables.nuv(end+1)=normal_uncertain('thickness',1,0.05); 26 md.qmu.variables.nuv(end+1)=normal_uncertain('drag',1,0.05); 27 27 28 28 %% a variety of responses 29 29 30 md. responses=struct();31 md. responses.rf =response_function.empty();32 md. responses.rf (end+1)=response_function('min_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);33 md. responses.rf (end+1)=response_function('max_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);34 md. responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);35 md. responses.rf (end+1)=response_function('min_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);36 md. responses.rf (end+1)=response_function('max_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);37 md. responses.rf (end+1)=response_function('max_abs_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);38 md. responses.rf (end+1)=response_function('min_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);39 md. responses.rf (end+1)=response_function('max_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);30 md.qmu.responses=struct(); 31 md.qmu.responses.rf =response_function.empty(); 32 md.qmu.responses.rf (end+1)=response_function('min_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 33 md.qmu.responses.rf (end+1)=response_function('max_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 34 md.qmu.responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 35 md.qmu.responses.rf (end+1)=response_function('min_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 36 md.qmu.responses.rf (end+1)=response_function('max_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 37 md.qmu.responses.rf (end+1)=response_function('max_abs_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 38 md.qmu.responses.rf (end+1)=response_function('min_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 39 md.qmu.responses.rf (end+1)=response_function('max_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]); 40 40 41 41 %% nond_sampling study 42 42 43 md.qmu _method =dakota_method('nond_samp');44 md.qmu _method(end)=dmeth_params_set(md.qmu_method(end),...43 md.qmu.method =dakota_method('nond_samp'); 44 md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),... 45 45 'seed',1234,... 46 46 'samples',20,... … … 49 49 %% a variety of parameters 50 50 51 md.qmu _params.direct=true;52 md.qmu _params.analysis_driver='diagnostic';53 md.qmu _params.evaluation_concurrency=1;51 md.qmu.params.direct=true; 52 md.qmu.params.analysis_driver='diagnostic'; 53 md.qmu.params.evaluation_concurrency=1; 54 54 55 md. npart=10;55 md.qmu.numberofpartitions=10; 56 56 57 57 md.qmu -
issm/trunk/src/m/qmu/expandresponses.m
r5487 r9650 1 function dresp=expandresponses(md ,responses)1 function dresp=expandresponses(md.qmu.responses) 2 2 3 3 fnames=fieldnames(responses); -
issm/trunk/src/m/qmu/expandvariables.m
r5487 r9650 1 function dvar=expandvariables(md ,variables)1 function dvar=expandvariables(md.qmu.variables) 2 2 3 3 fnames=fieldnames(variables); -
issm/trunk/src/m/qmu/importancefactors.m
r8298 r9650 13 13 14 14 %go through all response functions and find the one corresponding to the correct responsename 15 responsefunctions=md. dakotaresults.dresp_out;15 responsefunctions=md.qmu.results.dresp_out; 16 16 found=0; 17 17 for i=1:length(responsefunctions), … … 47 47 else 48 48 %distribute importance factor 49 factors=importancefactors(md. part'+1); %md.partwas created to index "c" style49 factors=importancefactors(md.qmu.partition'+1); %md.qmu.partition was created to index "c" style 50 50 end 51 51 -
issm/trunk/src/m/qmu/postqmu.m
r9630 r9650 49 49 50 50 % move all the individual function evalutations into zip files 51 if ~md. dakota_analysis,51 if ~md.qmu.isdakota, 52 52 system('zip -mq params.in.zip params.in.[1-9]*'); 53 53 system('zip -mq results.out.zip results.out.[1-9]*'); -
issm/trunk/src/m/qmu/preqmu.m
r9625 r9650 37 37 38 38 %retrieve variables and resposnes for this particular analysis. 39 variables=md. variables(options.ivar);40 responses=md. responses(options.iresp);39 variables=md.qmu.variables(options.ivar); 40 responses=md.qmu.responses(options.iresp); 41 41 42 42 %expand variables and responses 43 variables=expandvariables(md ,variables);44 responses=expandresponses(md ,responses);43 variables=expandvariables(md.qmu.variables); 44 responses=expandresponses(md.qmu.responses); 45 45 46 %go through variables and responses, and check they don't have more than md. npartvalues. Also determine numvariables and numresponses{{{146 %go through variables and responses, and check they don't have more than md.qmu.numberofpartitions values. Also determine numvariables and numresponses{{{1 47 47 numvariables=0; 48 48 variable_fieldnames=fieldnames(variables); … … 51 51 fieldvariables=variables.(field_name); 52 52 for j=1:numel(fieldvariables) 53 if strncmpi(fieldvariables(j).descriptor,'scaled_',7) && str2int(fieldvariables(j).descriptor,'last')>md. npart,54 error('preqmu error message: one of the expanded variables has more values than the number of partitions (setup in md. npart)');53 if strncmpi(fieldvariables(j).descriptor,'scaled_',7) && str2int(fieldvariables(j).descriptor,'last')>md.qmu.numberofpartitions, 54 error('preqmu error message: one of the expanded variables has more values than the number of partitions (setup in md.qmu.numberofpartitions)'); 55 55 end 56 56 end … … 64 64 fieldresponses=responses.(field_name); 65 65 for j=1:numel(fieldresponses) 66 if strncmpi(fieldresponses(j).descriptor,'scaled_',7) && str2int(fieldresponses(j).descriptor,'last')>md. npart,67 error('preqmu error message: one of the expanded responses has more values than the number of partitions (setup in md. npart)');66 if strncmpi(fieldresponses(j).descriptor,'scaled_',7) && str2int(fieldresponses(j).descriptor,'last')>md.qmu.numberofpartitions, 67 error('preqmu error message: one of the expanded responses has more values than the number of partitions (setup in md.qmu.numberofpartitions)'); 68 68 end 69 69 end … … 73 73 74 74 %create in file for dakota 75 dakota_in_data(md.qmu _method(options.imethod),variables,responses,md.qmu_params(options.iparams),options.qmufile);75 dakota_in_data(md.qmu.method(options.imethod),variables,responses,md.qmu.params(options.iparams),options.qmufile); 76 76 system(['rm -rf ' md.miscellaneous.name '.m']); 77 77 78 78 %build a list of variables and responses descriptors. the list is not expanded. {{{1 79 79 variabledescriptors={}; 80 variable_fieldnames=fieldnames(md. variables(options.ivar));80 variable_fieldnames=fieldnames(md.qmu.variables(options.ivar)); 81 81 for i=1:length(variable_fieldnames), 82 82 field_name=variable_fieldnames{i}; 83 fieldvariables=md. variables(options.ivar).(field_name);83 fieldvariables=md.qmu.variables(options.ivar).(field_name); 84 84 for j=1:numel(fieldvariables) 85 85 variabledescriptors{end+1}=fieldvariables(j).descriptor; … … 88 88 89 89 responsedescriptors={}; 90 response_fieldnames=fieldnames(md. responses(options.iresp));90 response_fieldnames=fieldnames(md.qmu.responses(options.iresp)); 91 91 for i=1:length(response_fieldnames), 92 92 field_name=response_fieldnames{i}; 93 fieldresponses=md. responses(options.iresp).(field_name);93 fieldresponses=md.qmu.responses(options.iresp).(field_name); 94 94 for j=1:numel(fieldresponses) 95 95 responsedescriptors{end+1}=fieldresponses(j).descriptor; … … 99 99 100 100 %register the fields that will be needed by the Qmu model. 101 md. numberofresponses=numresponses;102 md. variabledescriptors=variabledescriptors;103 md. responsedescriptors=responsedescriptors;101 md.qmu.numberofresponses=numresponses; 102 md.qmu.variabledescriptors=variabledescriptors; 103 md.qmu.responsedescriptors=responsedescriptors; 104 104 105 105 %now, we have to provide all the info necessary for the solutions to compute the responses. For ex, if mass_flux -
issm/trunk/src/m/qmu/process_qmu_response_data.m
r8936 r9650 13 13 14 14 %loop through response descriptors, and act accordingly 15 for i=1:numel(md. responsedescriptors),15 for i=1:numel(md.qmu.responsedescriptors), 16 16 17 17 %Do we have to process mass flux profiles? 18 if strncmpi(md. responsedescriptors{i},'indexed_MassFlux',16),18 if strncmpi(md.qmu.responsedescriptors{i},'indexed_MassFlux',16), 19 19 num_mass_flux=num_mass_flux+1; 20 20 process_mass_flux_profiles=1; … … 27 27 28 28 %we need a profile of points on which to compute the mass_flux, is it here? 29 if isnans(md.qmu _mass_flux_profiles),29 if isnans(md.qmu.mass_flux_profiles), 30 30 error('process_qmu_response_data error message: could not find a mass_flux exp profile!'); 31 31 end 32 32 33 if ~iscell(md.qmu _mass_flux_profiles),33 if ~iscell(md.qmu.mass_flux_profiles), 34 34 error('process_qmu_response_data error message: qmu_mass_flux_profiles field should be a cell array of domain outline names'); 35 35 end 36 36 37 if isempty(md.qmu _mass_flux_profiles),37 if isempty(md.qmu.mass_flux_profiles), 38 38 error('process_qmu_response_data error message: qmu_mass_flux_profiles cannot be empty!'); 39 39 end 40 40 41 if num_mass_flux~=numel(md.qmu _mass_flux_profiles),41 if num_mass_flux~=numel(md.qmu.mass_flux_profiles), 42 42 error('process_qmu_response_data error message: qmu_mass_flux_profiles should be of the same size as the number of MassFlux responses asked for in the Qmu analysis'); 43 43 end 44 44 45 45 %ok, process the domains named in qmu_mass_flux_profiles, to build a list of segments (MatArray) 46 md.qmu _mass_flux_segments=cell(num_mass_flux,1);46 md.qmu.mass_flux_segments=cell(num_mass_flux,1); 47 47 48 48 for i=1:num_mass_flux, 49 md.qmu _mass_flux_segments{i}=MeshProfileIntersection(md.elements,md.x,md.y,[md.qmu_mass_flux_profile_directory '/' md.qmu_mass_flux_profiles{i}]);49 md.qmu.mass_flux_segments{i}=MeshProfileIntersection(md.elements,md.x,md.y,[md.qmu.mass_flux_profile_directory '/' md.qmu.mass_flux_profiles{i}]); 50 50 end 51 51 -
issm/trunk/src/m/qmu/qmu_correlation.m
r9610 r9650 9 9 % mass_flux_drag_correlation=qmu_correlation(md,'drag','mass_flux'); 10 10 11 if ~isfield(md. dakotaresults,'dresp_dat'),11 if ~isfield(md.qmu.results,'dresp_dat'), 12 12 error('qmu_correlation error message: could not find dresp_dat field in dakota results. you need to run montecarlo before computing correlations'); 13 13 end 14 14 15 data=md. dakotaresults.dresp_dat;15 data=md.qmu.results.dresp_dat; 16 16 17 17 %go through all the rows and figure which one we are interested in. -
issm/trunk/src/m/qmu/qmumarshall.m
r9625 r9650 1 function qmumarshall(md ,variables,responses)1 function qmumarshall(md.qmu.variables,responses) 2 2 %QMUMARSHALL - output ISSM compatible binary file with qmu fields. This is 3 3 % in addition to the marshall routine for regular solve routines. 4 4 % Usage: 5 % qmumarshall(md ,variables,responses)5 % qmumarshall(md.qmu.variables,responses) 6 6 % 7 7 % where variables and responses are the Dakota variables and responses found in the model @md. … … 24 24 WriteData(fid,md.numvariabledescriptors,'Integer','numvariabledescriptors'); 25 25 for i=1:md.numvariabledescriptors, 26 field_name=md. variabledescriptors{i};26 field_name=md.qmu.variabledescriptors{i}; 27 27 WriteData(fid,field_name,'String',['variabledescriptor' num2str(i)]); 28 28 end … … 31 31 32 32 %write number of responses to disk 33 WriteData(fid,md. numberofresponses,'Integer','numberofresponses');34 WriteData(fid,md. numresponsedescriptors,'Integer','numresponsedescriptors');35 for i=1:md. numresponsedescriptors,36 field_name=md. responsedescriptors{i};33 WriteData(fid,md.qmu.numberofresponses,'Integer','numberofresponses'); 34 WriteData(fid,md.qmu.numresponsedescriptors,'Integer','numresponsedescriptors'); 35 for i=1:md.qmu.numresponsedescriptors, 36 field_name=md.qmu.responsedescriptors{i}; 37 37 WriteData(fid,field_name,'String',['responsedescriptor' num2str(i)]); 38 38 end … … 41 41 qmu_segments=0; 42 42 43 for i=1:numel(md. responsedescriptors),44 field_name=md. responsedescriptors{i};43 for i=1:numel(md.qmu.responsedescriptors), 44 field_name=md.qmu.responsedescriptors{i}; 45 45 if strncmpi(field_name,'indexed_MassFlux',16), 46 46 qmu_segments=1; … … 49 49 50 50 if qmu_segments, 51 WriteData(fid,md.qmu _mass_flux_num_profiles,'Integer','qmu_mass_flux_num_profiles');52 for i=1:md.qmu _mass_flux_num_profiles,53 WriteData(fid,md.qmu _mass_flux_segments{i},'Mat',['qmu_mass_flux_segments' num2str(i)]);51 WriteData(fid,md.qmu.mass_flux_num_profiles,'Integer','qmu_mass_flux_num_profiles'); 52 for i=1:md.qmu.mass_flux_num_profiles, 53 WriteData(fid,md.qmu.mass_flux_segments{i},'Mat',['qmu_mass_flux_segments' num2str(i)]); 54 54 end 55 55 else 56 md.qmu _mass_flux_num_profiles=0;57 WriteData(fid,md.qmu _mass_flux_num_profiles,'Integer','qmu_mass_flux_num_profiles');56 md.qmu.mass_flux_num_profiles=0; 57 WriteData(fid,md.qmu.mass_flux_num_profiles,'Integer','qmu_mass_flux_num_profiles'); 58 58 end 59 59 60 60 61 61 %write part and npart to disk 62 WriteData(fid,md. npart,'Integer','npart');63 WriteData(fid,md. part,'Mat','part');62 WriteData(fid,md.qmu.numberofpartitions,'Integer','npart'); 63 WriteData(fid,md.qmu.partition,'Mat','part'); 64 64 65 65 %close file … … 73 73 function qmumarshallusage(); 74 74 disp(' '); 75 disp('function qmumarshall(md ,variables,responses)');75 disp('function qmumarshall(md.qmu.variables,responses)'); 76 76 end -
issm/trunk/src/m/qmu/sensitivities.m
r5244 r9650 13 13 14 14 %go through all response functions and find the one corresponding to the correct responsename 15 responsefunctions=md. dakotaresults.dresp_out;15 responsefunctions=md.qmu.results.dresp_out; 16 16 found=0; 17 17 for i=1:length(responsefunctions), … … 63 63 else 64 64 %project the sensitivities from the partition onto the mesh 65 sens=rawsens(md. part'+1); %md.partwas created to index "c" style65 sens=rawsens(md.qmu.partition'+1); %md.qmu.partition was created to index "c" style 66 66 end -
issm/trunk/src/m/qmu/setupdesign/QmuSetupResponses.m
r5485 r9650 14 14 %partitions we want 15 15 16 for j=1:md. npart16 for j=1:md.qmu.numberofpartitions 17 17 dresp(end+1) =responses; 18 18 dresp(end ).descriptor=sprintf('%s_%d',responses.descriptor,j); -
issm/trunk/src/m/qmu/setupdesign/QmuSetupVariables.m
r7550 r9650 13 13 14 14 if isa(variables,'uniform_uncertain'), 15 if (length(variables.lower)>md. npart || length(variables.upper)>md.npart)15 if (length(variables.lower)>md.qmu.numberofpartitions || length(variables.upper)>md.qmu.numberofpartitions) 16 16 error('QmuSetupDesign error message: stddev should be either a scalar or a ''npart'' length vector'); 17 17 end 18 18 elseif isa(variables,'normal_uncertain'), 19 if length(variables.stddev)>md. npart,19 if length(variables.stddev)>md.qmu.numberofpartitions, 20 20 error('QmuSetupDesign error message: stddev should be either a scalar or a ''npart'' length vector'); 21 21 end … … 25 25 %partitions we want 26 26 27 for j=1:md. npart27 for j=1:md.qmu.numberofpartitions 28 28 dvar(end+1) =variables; 29 29 dvar(end ).descriptor=sprintf('%s_%d',variables.descriptor,j); -
issm/trunk/src/m/solutions/diagnostic_core.m
r9578 r9650 15 15 ismacayealpattyn=femmodel.parameters.Ismacayealpattyn; 16 16 isstokes=femmodel.parameters.Isstokes; 17 dakota_analysis=femmodel.parameters. DakotaAnalysis;17 dakota_analysis=femmodel.parameters.QmuIsdakota; 18 18 control_analysis=femmodel.parameters.ControlAnalysis; 19 19 solution_type=femmodel.parameters.SolutionType; -
issm/trunk/src/m/solutions/flaim.m
r9625 r9650 80 80 81 81 display('Calling KMLMeshWrite.'); 82 KMLMeshWrite(md.miscellaneous.name,md.miscellaneous.notes,md.elements,md.nodeconnectivity,md.lat,md.long,md. part,md.flaim.criterion,options.cmap,filekml);82 KMLMeshWrite(md.miscellaneous.name,md.miscellaneous.notes,md.elements,md.nodeconnectivity,md.lat,md.long,md.qmu.partition,md.flaim.criterion,options.cmap,filekml); 83 83 % for testing 84 84 %filekml='issm-split-geikie1-targets.kml'; -
issm/trunk/src/m/solutions/issm.m
r9625 r9650 22 22 23 23 %retrieve parameters 24 dakota_analysis=femmodel.parameters. DakotaAnalysis;24 dakota_analysis=femmodel.parameters.QmuIsdakota; 25 25 control_analysis=femmodel.parameters.ControlAnalysis; 26 26 -
issm/trunk/src/mex/DakotaResponses/DakotaResponses.cpp
r8910 r9650 39 39 40 40 /*number of responses: */ 41 parameters->FindParam(&numresponses,QmuNumber OfResponsesEnum);41 parameters->FindParam(&numresponses,QmuNumberofresponsesEnum); 42 42 43 43 /*dakota input: */ -
issm/trunk/template
r9647 r9650 138 138 thickness_obs 139 139 }}} 140 qmu{{{141 variables142 responses143 qmu_method -> remove all qmu_144 qmu_params145 dakotaresults ->results146 qmu_analysis -> isqmu147 part ->partition148 npart -> numberofpartitions149 numberofresponses150 variabledescriptors151 responsedescriptors152 qmu_mass_flux_profile_directory153 qmu_mass_flux_profiles154 qmu_mass_flux_segments155 156 adjacency157 vwgt -> vertex_weight158 }}}159 140 160 141 %To be completed
Note:
See TracChangeset
for help on using the changeset viewer.