Changeset 25531
- Timestamp:
- 09/03/20 21:27:22 (5 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/ExternalResults/GenericExternalResult.h
r25523 r25531 58 58 marshallhandle->call(object_enum); 59 59 marshallhandle->call(this->id); 60 marshallhandle->call(this->result_name); 61 marshallhandle->call(this->M); 62 marshallhandle->call(this->N); 60 63 marshallhandle->call(this->step); 61 64 marshallhandle->call(this->time); 62 63 /*Marshal result name*/ 64 int size = 0; 65 if(marshallhandle->OperationNumber()!=MARSHALLING_LOAD) size=strlen(result_name)+1; 66 marshallhandle->call(size); 67 marshallhandle->call(this->result_name,size); 68 69 /*Marshall value*/ 70 this->value=0; 71 bool isnull=true; 72 if(marshallhandle->OperationNumber()!=MARSHALLING_LOAD){ 73 if(value) isnull=false; 74 } 75 marshallhandle->call(isnull); 76 if(!isnull){ 77 marshallhandle->call(this->value); 78 } 65 marshallhandle->call(this->value); 79 66 } /*}}}*/ 80 67 … … 257 244 } /*}}}*/ 258 245 template <> inline void GenericExternalResult<int>::Marshall(MarshallHandle* marshallhandle){/*{{{*/ 259 printf("-------------- file: GenericExternalResult.h line: %i\n",__LINE__);260 246 this->GenericMarshall(marshallhandle); 261 247 } /*}}}*/ … … 276 262 } /*}}}*/ 277 263 template <> inline void GenericExternalResult<double>::Marshall(MarshallHandle* marshallhandle){/*{{{*/ 278 printf("-------------- file: GenericExternalResult.h line: %i\n",__LINE__);279 264 this->GenericMarshall(marshallhandle); 280 265 } /*}}}*/ -
issm/trunk-jpl/src/c/classes/Params/GenericParam.h
r25508 r25531 53 53 // use the default copy constructor instead 54 54 void Marshall(MarshallHandle* marshallhandle){ 55 _printf_(" WARNING: parameter "<<EnumToStringx(this->myEnumVal)<<" is a GenericParam and cannot be marshalled\n"); 55 if(this->InstanceEnum()!=FemModelCommEnum){ 56 _printf_(" WARNING: parameter "<<EnumToStringx(this->myEnumVal)<<" is a GenericParam and cannot be marshalled\n"); 57 } 56 58 /*Nothing for now*/ 57 59 } -
issm/trunk-jpl/src/c/datastructures/DataSet.cpp
r25528 r25531 241 241 _printf_(" WARNING: Could not load GenericExternalResult, need overload\n"); 242 242 } 243 else if(obj_enum==IntExternalResultEnum){ 244 GenericExternalResult<int>* res=new GenericExternalResult<int>(); 245 res->Marshall(marshallhandle); 246 this->AddObject(res); 247 } 248 else if(obj_enum==DoubleExternalResultEnum){ 249 GenericExternalResult<double>* res=new GenericExternalResult<double>(); 250 res->Marshall(marshallhandle); 251 this->AddObject(res); 252 } 243 253 else _error_("could not recognize enum type: " << obj_enum << ": " << EnumToStringx(obj_enum) ); 244 254 } -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_nonlinear.cpp
r24681 r25531 104 104 count++; 105 105 if(converged==true){ 106 femmodel->results->AddResult(new GenericExternalResult< IssmDouble>(femmodel->results->Size()+1,StressbalanceConvergenceNumStepsEnum,count));106 femmodel->results->AddResult(new GenericExternalResult<int>(femmodel->results->Size()+1,StressbalanceConvergenceNumStepsEnum,count)); 107 107 break; 108 108 } … … 110 110 _printf0_(" maximum number of nonlinear iterations (" << max_nonlinear_iterations << ") exceeded\n"); 111 111 converged=true; 112 femmodel->results->AddResult(new GenericExternalResult< IssmDouble>(femmodel->results->Size()+1,StressbalanceConvergenceNumStepsEnum,max_nonlinear_iterations));112 femmodel->results->AddResult(new GenericExternalResult<int>(femmodel->results->Size()+1,StressbalanceConvergenceNumStepsEnum,max_nonlinear_iterations)); 113 113 InputUpdateFromConstantx(femmodel,converged,ConvergedEnum); 114 114 InputUpdateFromSolutionx(femmodel,ug);
Note:
See TracChangeset
for help on using the changeset viewer.