Changeset 24168
- Timestamp:
- 09/27/19 10:52:43 (5 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp
r18521 r24168 16 16 void AverageOntoPartitionx(double** paverage, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* vertex_response){ 17 17 18 int dummy;19 18 int npart; 20 double *qmu_ part = NULL;19 double *qmu_vpart = NULL; 21 20 22 21 /*output: */ … … 27 26 28 27 /*First, recover qmu partition of vertices: */ 29 parameters->FindParam(&qmu_ part,&dummy,QmuPartitionEnum);28 parameters->FindParam(&qmu_vpart,NULL,QmuVpartitionEnum); 30 29 31 30 /*Some parameters: */ … … 42 41 for(int i=0;i<elements->Size();i++){ 43 42 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); 44 element->AverageOntoPartition(partition_contributions,partition_areas,vertex_response,qmu_ part);43 element->AverageOntoPartition(partition_contributions,partition_areas,vertex_response,qmu_vpart); 45 44 } 46 45 … … 56 55 57 56 /*Free ressources:*/ 58 xDelete<double>(qmu_ part);57 xDelete<double>(qmu_vpart); 59 58 delete partition_contributions; 60 59 delete partition_areas; -
issm/trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
r24157 r24168 20 20 int ncols; 21 21 int npart; 22 double *qmu_ part = NULL;23 int qmu_npart;22 double *qmu_vpart = NULL; 23 double *qmu_epart = NULL; 24 24 25 25 double *distributed_values = NULL; … … 30 30 /*retrieve parameters: */ 31 31 femmodel->parameters->FindParam(&npart,QmuNumberofpartitionsEnum); 32 femmodel->parameters->FindParam(&qmu_part,&qmu_npart,QmuPartitionEnum); 32 femmodel->parameters->FindParam(&qmu_vpart,NULL,QmuVpartitionEnum); 33 femmodel->parameters->FindParam(&qmu_epart,NULL,QmuEpartitionEnum); 33 34 numberofvertices=femmodel->vertices->NumberOfVertices(); 34 35 numberofelements=femmodel->elements->NumberOfElements(); … … 60 61 61 62 62 /*We've got the parameter, we need to update it using qmu_ part and the distributed_values.63 * Several cases: we either have a nrows=numberofvertices or nrows=numberofelements, and64 * in addition, it can be either a static or transient (nrows+1) vector.65 * Deal with both cases accordingly: */63 /*We've got the parameter, we need to update it using qmu_vpart or qmu_epart (depending on whether 64 * it is element or vertex distributed), and the distributed_values. 65 In addition, the parameter can be either a static or transient (nrows+1) vector. */ 66 66 67 //_printf_("nrows: " << nrows << " numberofvertices: " << numberofvertices << " qmu_npart: " << qmu_npart << "\n"); 67 68 68 if ( qmu_npart==numberofvertices){69 if (nrows==numberofvertices | nrows==numberofvertices+1){ 69 70 for(k=0;k<numberofvertices;k++){ 70 71 for(l=0;l<ncols;l++){ 71 *(parameter+ncols*k+l)=*(parameter+ncols*k+l)*distributed_values[(int)qmu_ part[k]];72 *(parameter+ncols*k+l)=*(parameter+ncols*k+l)*distributed_values[(int)qmu_vpart[k]]; 72 73 } 73 74 } 74 75 } 75 else if ( qmu_npart==numberofelements){76 else if (nrows==numberofelements | nrows==numberofelements+1){ 76 77 for(k=0;k<numberofelements;k++){ 77 78 for(l=0;l<ncols;l++){ 78 *(parameter+ncols*k+l)=*(parameter+ncols*k+l)*distributed_values[(int)qmu_ part[k]];79 *(parameter+ncols*k+l)=*(parameter+ncols*k+l)*distributed_values[(int)qmu_epart[k]]; 79 80 } 80 81 } … … 100 101 101 102 /*Update inputs using the parameter matrix: */ 102 if( qmu_npart==numberofvertices)103 if(nrows==numberofvertices| nrows==numberofvertices+1) 103 104 InputUpdateFromMatrixDakotax(femmodel, parameter, nrows,ncols,StringToEnumx(root), VertexEnum); 104 105 else … … 125 126 126 127 /*Free ressources:*/ 127 xDelete<double>(qmu_part); 128 xDelete<double>(qmu_vpart); 129 xDelete<double>(qmu_epart); 128 130 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp
r24163 r24168 13 13 /*variable declarations*/ 14 14 int i; 15 int *part= NULL;16 double * dpart = NULL;15 double *vpart = NULL; 16 double *epart = NULL; 17 17 int npart; 18 18 char **responsedescriptors = NULL; … … 66 66 parameters->AddObject(new StringArrayParam(QmuResponsedescriptorsEnum,responsedescriptors,numresponsedescriptors)); 67 67 68 /*Deal with partitioning*/ 69 /*partition vertices in iomodel->qmu_npart parts, unless a partition is already present: */ 68 /*Load partitioning vectors (both vertex and element based: */ 70 69 parameters->AddObject(iomodel->CopyConstantObject("md.qmu.numberofpartitions",QmuNumberofpartitionsEnum)); 71 iomodel->FetchData(&dpart,&npart,NULL,"md.qmu.partition"); 72 if(!dpart) _error_("md.qmu.partition is empty"); 73 parameters->AddObject(new DoubleVecParam(QmuPartitionEnum,dpart,npart)); 70 iomodel->FetchData(&vpart,&npart,NULL,"md.qmu.vpartition"); if(!vpart) _error_("md.qmu.vpartition is empty"); 71 parameters->AddObject(new DoubleVecParam(QmuEpartitionEnum,vpart,npart)); 72 73 iomodel->FetchData(&epart,&npart,NULL,"md.qmu.epartition"); if(!epart) _error_("md.qmu.epartition is empty"); 74 parameters->AddObject(new DoubleVecParam(QmuVpartitionEnum,epart,npart)); 74 75 75 76 /*Deal with data needed because of qmu variables*/ … … 111 112 } 112 113 xDelete<char*>(variabledescriptors); 113 xDelete< int>(part);114 xDelete<double>( dpart);114 xDelete<double>(vpart); 115 xDelete<double>(epart); 115 116 xDelete<char>(qmuinname); 116 117 xDelete<char>(qmuerrname); -
issm/trunk-jpl/src/c/shared/Enum/Enum.vim
r24097 r24168 115 115 syn keyword cConstant DamageC2Enum 116 116 syn keyword cConstant DamageC3Enum 117 syn keyword cConstant DamageC4Enum 117 118 syn keyword cConstant DamageEnum 118 119 syn keyword cConstant DamageEquivStressEnum … … 125 126 syn keyword cConstant DamageStabilizationEnum 126 127 syn keyword cConstant DamageStressThresholdEnum 128 syn keyword cConstant DamageStressUBoundEnum 127 129 syn keyword cConstant DebugProfilingEnum 128 130 syn keyword cConstant DomainDimensionEnum … … 288 290 syn keyword cConstant QmuNumberofpartitionsEnum 289 291 syn keyword cConstant QmuOutNameEnum 290 syn keyword cConstant QmuPartitionEnum 292 syn keyword cConstant QmuEpartitionEnum 293 syn keyword cConstant QmuVpartitionEnum 291 294 syn keyword cConstant QmuResponsedescriptorsEnum 292 295 syn keyword cConstant QmuVariableDescriptorsEnum … … 395 398 syn keyword cConstant StressbalanceRiftPenaltyThresholdEnum 396 399 syn keyword cConstant StressbalanceShelfDampeningEnum 400 syn keyword cConstant ThermalIsdrainicecolumnEnum 397 401 syn keyword cConstant ThermalIsdynamicbasalspcEnum 398 402 syn keyword cConstant ThermalIsenthalpyEnum … … 405 409 syn keyword cConstant ThermalRequestedOutputsEnum 406 410 syn keyword cConstant ThermalStabilizationEnum 411 syn keyword cConstant ThermalWatercolumnUpperlimitEnum 407 412 syn keyword cConstant TimeEnum 408 413 syn keyword cConstant TimesteppingCflCoefficientEnum … … 459 464 syn keyword cConstant BasalforcingsIsmip6TfShelfEnum 460 465 syn keyword cConstant BasalforcingsIsmip6MeltAnomalyEnum 466 syn keyword cConstant BasalforcingsOceanSalinityEnum 467 syn keyword cConstant BasalforcingsOceanTempEnum 461 468 syn keyword cConstant BasalforcingsPicoBasinIdEnum 462 469 syn keyword cConstant BasalforcingsPicoBoxIdEnum … … 783 790 syn keyword cConstant ThicknessOldEnum 784 791 syn keyword cConstant ThicknessPositiveEnum 792 syn keyword cConstant ThicknessResidualEnum 785 793 syn keyword cConstant VelEnum 786 794 syn keyword cConstant VxAverageEnum … … 928 936 syn keyword cConstant BasalforcingsIsmip6Enum 929 937 syn keyword cConstant BasalforcingsPicoEnum 938 syn keyword cConstant BeckmannGoosseFloatingMeltRateEnum 930 939 syn keyword cConstant BedSlopeSolutionEnum 931 940 syn keyword cConstant BoolExternalResultEnum … … 1282 1291 syn keyword cType Cfsurfacesquare 1283 1292 syn keyword cType Channel 1284 syn keyword cType classes1285 1293 syn keyword cType Constraint 1286 1294 syn keyword cType Constraints … … 1289 1297 syn keyword cType ControlInput 1290 1298 syn keyword cType Covertree 1299 syn keyword cType DataSetParam 1291 1300 syn keyword cType DatasetInput 1292 syn keyword cType DataSetParam1293 1301 syn keyword cType Definition 1294 1302 syn keyword cType DependentObject … … 1303 1311 syn keyword cType ElementHook 1304 1312 syn keyword cType ElementMatrix 1313 syn keyword cType ElementVector 1305 1314 syn keyword cType Elements 1306 syn keyword cType ElementVector1307 1315 syn keyword cType ExponentialVariogram 1308 1316 syn keyword cType ExternalResult … … 1311 1319 syn keyword cType Friction 1312 1320 syn keyword cType Gauss 1313 syn keyword cType GaussianVariogram1314 syn keyword cType gaussobjects1315 1321 syn keyword cType GaussPenta 1316 1322 syn keyword cType GaussSeg 1317 1323 syn keyword cType GaussTetra 1318 1324 syn keyword cType GaussTria 1325 syn keyword cType GaussianVariogram 1319 1326 syn keyword cType GenericExternalResult 1320 1327 syn keyword cType GenericOption … … 1324 1331 syn keyword cType Input 1325 1332 syn keyword cType Inputs 1326 syn keyword cType IntArrayInput1327 1333 syn keyword cType IntInput 1328 1334 syn keyword cType IntMatParam … … 1332 1338 syn keyword cType IssmDirectApplicInterface 1333 1339 syn keyword cType IssmParallelDirectApplicInterface 1334 syn keyword cType krigingobjects1335 1340 syn keyword cType Load 1336 1341 syn keyword cType Loads … … 1343 1348 syn keyword cType Matice 1344 1349 syn keyword cType Matlitho 1345 syn keyword cType matrixobjects1346 1350 syn keyword cType MatrixParam 1347 1351 syn keyword cType Misfit … … 1356 1360 syn keyword cType Observations 1357 1361 syn keyword cType Option 1362 syn keyword cType OptionUtilities 1358 1363 syn keyword cType Options 1359 syn keyword cType OptionUtilities1360 1364 syn keyword cType Param 1361 1365 syn keyword cType Parameters … … 1370 1374 syn keyword cType Regionaloutput 1371 1375 syn keyword cType Results 1376 syn keyword cType RiftStruct 1372 1377 syn keyword cType Riftfront 1373 syn keyword cType RiftStruct1374 1378 syn keyword cType Seg 1375 1379 syn keyword cType SegInput 1380 syn keyword cType SegRef 1376 1381 syn keyword cType Segment 1377 syn keyword cType SegRef1378 1382 syn keyword cType SpcDynamic 1379 1383 syn keyword cType SpcStatic … … 1395 1399 syn keyword cType Vertex 1396 1400 syn keyword cType Vertices 1401 syn keyword cType classes 1402 syn keyword cType gaussobjects 1403 syn keyword cType krigingobjects 1404 syn keyword cType matrixobjects 1397 1405 syn keyword cType AdjointBalancethickness2Analysis 1398 1406 syn keyword cType AdjointBalancethicknessAnalysis … … 1413 1421 syn keyword cType FreeSurfaceBaseAnalysis 1414 1422 syn keyword cType FreeSurfaceTopAnalysis 1423 syn keyword cType GLheightadvectionAnalysis 1415 1424 syn keyword cType GiaIvinsAnalysis 1416 syn keyword cType GLheightadvectionAnalysis1417 1425 syn keyword cType HydrologyDCEfficientAnalysis 1418 1426 syn keyword cType HydrologyDCInefficientAnalysis -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r24146 r24168 284 284 QmuNumberofpartitionsEnum, 285 285 QmuOutNameEnum, 286 QmuPartitionEnum, 286 QmuEpartitionEnum, 287 QmuVpartitionEnum, 287 288 QmuResponsedescriptorsEnum, 288 289 QmuVariableDescriptorsEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r24146 r24168 292 292 case QmuNumberofpartitionsEnum : return "QmuNumberofpartitions"; 293 293 case QmuOutNameEnum : return "QmuOutName"; 294 case QmuPartitionEnum : return "QmuPartition"; 294 case QmuEpartitionEnum : return "QmuEpartition"; 295 case QmuVpartitionEnum : return "QmuVpartition"; 295 296 case QmuResponsedescriptorsEnum : return "QmuResponsedescriptors"; 296 297 case QmuVariableDescriptorsEnum : return "QmuVariableDescriptors"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r24146 r24168 298 298 else if (strcmp(name,"QmuNumberofpartitions")==0) return QmuNumberofpartitionsEnum; 299 299 else if (strcmp(name,"QmuOutName")==0) return QmuOutNameEnum; 300 else if (strcmp(name,"QmuPartition")==0) return QmuPartitionEnum; 300 else if (strcmp(name,"QmuEpartition")==0) return QmuEpartitionEnum; 301 else if (strcmp(name,"QmuVpartition")==0) return QmuVpartitionEnum; 301 302 else if (strcmp(name,"QmuResponsedescriptors")==0) return QmuResponsedescriptorsEnum; 302 303 else if (strcmp(name,"QmuVariableDescriptors")==0) return QmuVariableDescriptorsEnum; … … 382 383 else if (strcmp(name,"SmbRunoffref")==0) return SmbRunoffrefEnum; 383 384 else if (strcmp(name,"SmbSealev")==0) return SmbSealevEnum; 384 else if (strcmp(name,"SmbSwIdx")==0) return SmbSwIdxEnum;385 385 else stage=4; 386 386 } 387 387 if(stage==4){ 388 if (strcmp(name,"SmbT0dry")==0) return SmbT0dryEnum; 388 if (strcmp(name,"SmbSwIdx")==0) return SmbSwIdxEnum; 389 else if (strcmp(name,"SmbT0dry")==0) return SmbT0dryEnum; 389 390 else if (strcmp(name,"SmbT0wet")==0) return SmbT0wetEnum; 390 391 else if (strcmp(name,"SmbTdiff")==0) return SmbTdiffEnum; … … 505 506 else if (strcmp(name,"CrevasseDepth")==0) return CrevasseDepthEnum; 506 507 else if (strcmp(name,"DamageD")==0) return DamageDEnum; 507 else if (strcmp(name,"DamageDbar")==0) return DamageDbarEnum;508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"DamageF")==0) return DamageFEnum; 511 if (strcmp(name,"DamageDbar")==0) return DamageDbarEnum; 512 else if (strcmp(name,"DamageF")==0) return DamageFEnum; 512 513 else if (strcmp(name,"DegreeOfChannelization")==0) return DegreeOfChannelizationEnum; 513 514 else if (strcmp(name,"DeviatoricStresseffective")==0) return DeviatoricStresseffectiveEnum; … … 628 629 else if (strcmp(name,"MaterialsRheologyEbar")==0) return MaterialsRheologyEbarEnum; 629 630 else if (strcmp(name,"MaterialsRheologyEc")==0) return MaterialsRheologyEcEnum; 630 else if (strcmp(name,"MaterialsRheologyEcbar")==0) return MaterialsRheologyEcbarEnum;631 631 else stage=6; 632 632 } 633 633 if(stage==6){ 634 if (strcmp(name,"MaterialsRheologyEs")==0) return MaterialsRheologyEsEnum; 634 if (strcmp(name,"MaterialsRheologyEcbar")==0) return MaterialsRheologyEcbarEnum; 635 else if (strcmp(name,"MaterialsRheologyEs")==0) return MaterialsRheologyEsEnum; 635 636 else if (strcmp(name,"MaterialsRheologyEsbar")==0) return MaterialsRheologyEsbarEnum; 636 637 else if (strcmp(name,"MaterialsRheologyN")==0) return MaterialsRheologyNEnum; … … 751 752 else if (strcmp(name,"SmbTeValue")==0) return SmbTeValueEnum; 752 753 else if (strcmp(name,"SmbTemperaturesAnomaly")==0) return SmbTemperaturesAnomalyEnum; 753 else if (strcmp(name,"SmbTemperaturesLgm")==0) return SmbTemperaturesLgmEnum;754 754 else stage=7; 755 755 } 756 756 if(stage==7){ 757 if (strcmp(name,"SmbTemperaturesPresentday")==0) return SmbTemperaturesPresentdayEnum; 757 if (strcmp(name,"SmbTemperaturesLgm")==0) return SmbTemperaturesLgmEnum; 758 else if (strcmp(name,"SmbTemperaturesPresentday")==0) return SmbTemperaturesPresentdayEnum; 758 759 else if (strcmp(name,"SmbTemperaturesReconstructed")==0) return SmbTemperaturesReconstructedEnum; 759 760 else if (strcmp(name,"SmbTini")==0) return SmbTiniEnum; … … 874 875 else if (strcmp(name,"Outputdefinition48")==0) return Outputdefinition48Enum; 875 876 else if (strcmp(name,"Outputdefinition49")==0) return Outputdefinition49Enum; 876 else if (strcmp(name,"Outputdefinition4")==0) return Outputdefinition4Enum;877 877 else stage=8; 878 878 } 879 879 if(stage==8){ 880 if (strcmp(name,"Outputdefinition50")==0) return Outputdefinition50Enum; 880 if (strcmp(name,"Outputdefinition4")==0) return Outputdefinition4Enum; 881 else if (strcmp(name,"Outputdefinition50")==0) return Outputdefinition50Enum; 881 882 else if (strcmp(name,"Outputdefinition51")==0) return Outputdefinition51Enum; 882 883 else if (strcmp(name,"Outputdefinition52")==0) return Outputdefinition52Enum; … … 997 998 else if (strcmp(name,"DefaultCalving")==0) return DefaultCalvingEnum; 998 999 else if (strcmp(name,"Dense")==0) return DenseEnum; 999 else if (strcmp(name,"DependentObject")==0) return DependentObjectEnum;1000 1000 else stage=9; 1001 1001 } 1002 1002 if(stage==9){ 1003 if (strcmp(name,"DepthAverageAnalysis")==0) return DepthAverageAnalysisEnum; 1003 if (strcmp(name,"DependentObject")==0) return DependentObjectEnum; 1004 else if (strcmp(name,"DepthAverageAnalysis")==0) return DepthAverageAnalysisEnum; 1004 1005 else if (strcmp(name,"DeviatoricStressErrorEstimator")==0) return DeviatoricStressErrorEstimatorEnum; 1005 1006 else if (strcmp(name,"Divergence")==0) return DivergenceEnum; … … 1120 1121 else if (strcmp(name,"MassFlux")==0) return MassFluxEnum; 1121 1122 else if (strcmp(name,"Masscon")==0) return MassconEnum; 1122 else if (strcmp(name,"Massconaxpby")==0) return MassconaxpbyEnum;1123 1123 else stage=10; 1124 1124 } 1125 1125 if(stage==10){ 1126 if (strcmp(name,"Massfluxatgate")==0) return MassfluxatgateEnum; 1126 if (strcmp(name,"Massconaxpby")==0) return MassconaxpbyEnum; 1127 else if (strcmp(name,"Massfluxatgate")==0) return MassfluxatgateEnum; 1127 1128 else if (strcmp(name,"MasstransportAnalysis")==0) return MasstransportAnalysisEnum; 1128 1129 else if (strcmp(name,"MasstransportSolution")==0) return MasstransportSolutionEnum; … … 1243 1244 else if (strcmp(name,"Sset")==0) return SsetEnum; 1244 1245 else if (strcmp(name,"SteadystateSolution")==0) return SteadystateSolutionEnum; 1245 else if (strcmp(name,"StressIntensityFactor")==0) return StressIntensityFactorEnum;1246 1246 else stage=11; 1247 1247 } 1248 1248 if(stage==11){ 1249 if (strcmp(name,"StressbalanceAnalysis")==0) return StressbalanceAnalysisEnum; 1249 if (strcmp(name,"StressIntensityFactor")==0) return StressIntensityFactorEnum; 1250 else if (strcmp(name,"StressbalanceAnalysis")==0) return StressbalanceAnalysisEnum; 1250 1251 else if (strcmp(name,"StressbalanceConvergenceNumSteps")==0) return StressbalanceConvergenceNumStepsEnum; 1251 1252 else if (strcmp(name,"StressbalanceSIAAnalysis")==0) return StressbalanceSIAAnalysisEnum; -
issm/trunk-jpl/src/m/classes/qmu.m
r24162 r24168 12 12 params = struct(); 13 13 results = struct(); 14 partition = NaN; 14 vpartition = NaN; 15 epartition = NaN; 15 16 numberofpartitions = 0; 16 17 numberofresponses = 0; … … 25 26 methods 26 27 function self = extrude(self,md) % {{{ 27 self.partition=project3d(md,'vector',self.partition','type','node'); 28 self.vpartition=project3d(md,'vector',self.vpartition','type','node'); 29 self.epartition=project3d(md,'vector',self.epartition','type','element'); 28 30 end % }}} 29 31 function self = qmu(varargin) % {{{ … … 61 63 end 62 64 if mod(md.cluster.np-1,self.params.processors_per_evaluation), 63 md = checkmessage(md,['in parallel library mode, the requirement is for md.cluster.np = md.qmu.params.processors_per_evaluation * number_of_slaves, where number_of_slaves will automatically be determined by Dakota. Modify md.cluster.np accordingly']); 64 end 65 end 66 if ~isempty(md.qmu.partition), 67 if (numel(md.qmu.partition)~=md.mesh.numberofvertices & numel(md.qmu.partition)~=md.mesh.numberofelements) | size(md.qmu.partition,2)~=1, 68 md = checkmessage(md,['user supplied partition for qmu analysis should have size md.mesh.numberofvertices x 1 or md.mesh.numberofelements x 1']); 69 end 70 if min(md.qmu.partition)~=0, 71 md = checkmessage(md,['partition vector not indexed from 0 on']); 72 end 73 if max(md.qmu.partition)>=md.qmu.numberofpartitions, 74 md = checkmessage(md,['for qmu analysis, partitioning vector cannot go over npart, number of partition areas']); 75 end 76 end 77 65 %md = checkmessage(md,['in parallel library mode, the requirement is for md.cluster.np = md.qmu.params.processors_per_evaluation * number_of_slaves, where number_of_slaves will automatically be determined by Dakota. Modify md.cluster.np accordingly']); 66 end 67 end 68 if ~isempty(md.qmu.vpartition), 69 if numel(md.qmu.vpartition)~=md.mesh.numberofvertices 70 md = checkmessage(md,['user supplied vertex partition for qmu analysis should have size md.mesh.numberofvertices x 1']); 71 end 72 if min(md.qmu.vpartition)~=0, 73 md = checkmessage(md,['vertex partition vector not indexed from 0 on']); 74 end 75 if max(md.qmu.vpartition)>=md.qmu.numberofpartitions, 76 md = checkmessage(md,['for qmu analysis, vertex partitioning vector cannot go over npart, number of partition areas']); 77 end 78 end 79 if ~isempty(md.qmu.epartition), 80 if numel(md.qmu.epartition)~=md.mesh.numberofelements, 81 md = checkmessage(md,['user supplied element partition for qmu analysis should have size md.mesh.numberofelements x 1']); 82 end 83 if min(md.qmu.epartition)~=0, 84 md = checkmessage(md,['element partition vector not indexed from 0 on']); 85 end 86 if max(md.qmu.epartition)>=md.qmu.numberofpartitions, 87 md = checkmessage(md,['for qmu analysis, element partitioning vector cannot go over npart, number of partition areas']); 88 end 89 end 90 if isempty(md.qmu.vpartition) & isempty(md.qmu.epartition), 91 md = checkmessage(md,['for qmu analysis, at least one of element and partitioning vectors need to be supplied!']); 92 end 78 93 end % }}} 79 94 function disp(self) % {{{ … … 144 159 end 145 160 end 146 fielddisplay(self,'partition','user provided mesh partitioning, defaults to metis if not specified') 161 fielddisplay(self,'vpartition','user provided mesh partitioning (vertex based)'); 162 fielddisplay(self,'epartition','user provided mesh partitioning (element based)'); 147 163 fielddisplay(self,'numberofpartitions','number of partitions for semi-discrete qmu') 148 164 fielddisplay(self,'variabledescriptors',''); … … 162 178 return; 163 179 end 164 WriteData(fid,prefix,'object',self,'fieldname','partition','format','DoubleMat','mattype',2); 180 WriteData(fid,prefix,'object',self,'fieldname','vpartition','format','DoubleMat','mattype',2); 181 WriteData(fid,prefix,'object',self,'fieldname','epartition','format','DoubleMat','mattype',2); 165 182 WriteData(fid,prefix,'object',self,'fieldname','numberofpartitions','format','Integer'); 166 183 WriteData(fid,prefix,'object',self,'fieldname','numberofresponses','format','Integer');
Note:
See TracChangeset
for help on using the changeset viewer.