Changeset 21068
- Timestamp:
- 08/04/16 08:53:35 (9 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r21049 r21068 1498 1498 if(num_cost_functions<1) _error_("No cost functions found"); 1499 1499 cost_functions_enums=xNew<int>(num_cost_functions); 1500 for( intj=0;j<num_cost_functions;j++){ cost_functions_enums[j]=StringToEnumx(cost_functions[j]); }1500 for(j=0;j<num_cost_functions;j++){ cost_functions_enums[j]=StringToEnumx(cost_functions[j]); } 1501 1501 1502 1502 /*Create inputs and add to DataSetInput*/ -
issm/trunk-jpl/src/c/classes/Elements/Tetra.cpp
r21049 r21068 462 462 if(num_cost_functions<1) _error_("No cost functions found"); 463 463 cost_functions_enums=xNew<int>(num_cost_functions); 464 for( intj=0;j<num_cost_functions;j++){ cost_functions_enums[j]=StringToEnumx(cost_functions[j]); }464 for(j=0;j<num_cost_functions;j++){ cost_functions_enums[j]=StringToEnumx(cost_functions[j]); } 465 465 466 466 /*Create inputs and add to DataSetInput*/ -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r21049 r21068 1833 1833 if(num_cost_functions<1) _error_("No cost functions found"); 1834 1834 cost_functions_enums=xNew<int>(num_cost_functions); 1835 for( intj=0;j<num_cost_functions;j++){ cost_functions_enums[j]=StringToEnumx(cost_functions[j]); }1835 for(j=0;j<num_cost_functions;j++){ cost_functions_enums[j]=StringToEnumx(cost_functions[j]); } 1836 1836 1837 1837 /*Create inputs and add to DataSetInput*/ -
issm/trunk-jpl/src/c/classes/ExternalResults/GenericExternalResult.h
r20810 r21068 80 80 } /*}}}*/ 81 81 GenericExternalResult(int in_id, int in_enum_type,ResultType in_values, int in_M,int in_N,int in_step,IssmDouble in_time){/*{{{*/ 82 id = 0;83 result_name = NULL;84 M = 0;85 N = 0;86 step = 0;87 time = 0;88 value = in_values;89 82 _error_("template GenericExternalResult(int in_id, int in_enum_type,double* in_values, int in_M,int in_N,int in_step,IssmDouble in_time) not implemented for this ResultType\n"); 90 83 } 91 84 /*}}}*/ 85 GenericExternalResult(int in_id,const char* name_in,ResultType in_values, int in_M,int in_N,int in_step,IssmDouble in_time){/*{{{*/ 86 _error_("template GenericExternalResult(int in_id, int in_enum_type,double* in_values, int in_M,int in_N,int in_step,IssmDouble in_time) not implemented for this ResultType\n"); 87 } 88 /*}}}*/ 92 89 GenericExternalResult(int in_id, int in_enum_type,ResultType in_value,int in_step, IssmDouble in_time){ /*{{{*/ 93 90 id = in_id; … … 357 354 } 358 355 /*}}}*/ 356 template <> inline GenericExternalResult<IssmPDouble*>::GenericExternalResult(int in_id,const char* in_result_name,IssmPDouble* in_values, int in_M,int in_N,int in_step,IssmDouble in_time){/*{{{*/ 357 358 id = in_id; 359 M = in_M; 360 N = in_N; 361 362 /*Copy name*/ 363 this->result_name = xNew<char>(strlen(in_result_name)+1); 364 xMemCpy<char>(this->result_name,in_result_name,strlen(in_result_name)+1); 365 366 step = in_step; 367 time = in_time; 368 369 /*Copy result in values*/ 370 if(M*N){ 371 value=xNew<IssmPDouble>(M*N); 372 xMemCpy<IssmPDouble>(value,in_values,M*N); 373 } 374 else value=NULL; 375 } 376 /*}}}*/ 359 377 template <> inline GenericExternalResult<IssmPDouble*>::GenericExternalResult(int in_id, int in_enum_type,IssmPDouble* in_value,int in_step, IssmDouble in_time){ /*{{{*/ 360 378 _error_("you cannot initialize a GenericExternalResult<IssmPDouble*> without providing the dimensions of the matrix! Please use a more appropriate constructor!"); -
issm/trunk-jpl/src/c/main/kriging.cpp
r20840 r21068 55 55 if(IssmComm::GetRank()==0){ 56 56 output_fid=pfopen0(outbinfilename,"wb"); 57 results->AddObject(new GenericExternalResult<double*>(results->Size()+1, 0,predictions,ninterp,1,1,0));58 results->AddObject(new GenericExternalResult<double*>(results->Size()+1, 1,error,ninterp,1,1,0));57 results->AddObject(new GenericExternalResult<double*>(results->Size()+1,"predictions",predictions,ninterp,1,1,0)); 58 results->AddObject(new GenericExternalResult<double*>(results->Size()+1,"error",error,ninterp,1,1,0)); 59 59 for(int i=0;i<results->Size();i++){ 60 60 ExternalResult* result=xDynamicCast<ExternalResult*>(results->GetObjectByOffset(i)); -
issm/trunk-jpl/src/m/contrib/morlighem/gslib/pkriging.m
r20840 r21068 43 43 end 44 44 Download(cluster,name,{[name '.outbin']}); 45 structure=parseresultsfromdisk( [name '.outbin'],0);45 structure=parseresultsfromdisk(md,[name '.outbin'],0); 46 46 delete([name '.outlog']); 47 47 delete([name '.errlog']); … … 53 53 54 54 %Process results 55 B=structure. (EnumToString(0));55 B=structure.predictions; 56 56 B=reshape(B,size(x_interp,2),size(x_interp,1))'; 57 E=structure. (EnumToString(1));57 E=structure.error; 58 58 E=reshape(E,size(x_interp,2),size(x_interp,1))';
Note:
See TracChangeset
for help on using the changeset viewer.