Changeset 27113
- Timestamp:
- 06/27/22 05:39:50 (3 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Inputs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Inputs/ArrayInput.cpp
r25508 r27113 81 81 marshallhandle->call(object_enum); 82 82 marshallhandle->call(this->numberofelements_local); 83 84 /*Allocate memory if reading restart file*/ 85 if(marshallhandle->OperationNumber() == MARSHALLING_LOAD){ 86 _assert_(this->numberofelements_local>0); 87 _assert_(this->numberofelements_local<1e11); 88 if(this->numberofelements_local){ 89 this->N = xNewZeroInit<int>(this->numberofelements_local); 90 this->values = xNewZeroInit<IssmDouble*>(this->numberofelements_local); 91 } 92 else{ 93 this->N = NULL; 94 this->values = NULL; 95 } 96 } 97 98 /*Marshall N*/ 83 99 if(this->numberofelements_local){ 84 100 marshallhandle->call(this->N,this->numberofelements_local); 101 } 102 103 /*Marshall individual arrays*/ 104 if(this->numberofelements_local){ 85 105 for(int i=0;i<this->numberofelements_local;i++){ 86 if(this->values[i]){ 106 if(this->N[i]){ 107 108 /*Allocate if reading restart*/ 109 if(marshallhandle->OperationNumber() == MARSHALLING_LOAD){ 110 this->values[i] = xNew<IssmDouble>(this->N[i]); 111 } 112 _assert_(this->values[i]); 87 113 marshallhandle->call(this->values[i],this->N[i]); 88 114 } 89 115 } 90 116 } 91 else{92 this->N = NULL;93 this->values = NULL;94 }95 96 117 } 97 118 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp
r26174 r27113 167 167 this->inputs[index]=input; 168 168 } 169 else if(object_enum==ArrayInputEnum){ 170 ArrayInput* input=new ArrayInput(); 171 input->Marshall(marshallhandle); 172 this->inputs[index]=input; 173 } 169 174 else{ 170 175 _error_("input "<<EnumToStringx(object_enum)<<" not supported");
Note:
See TracChangeset
for help on using the changeset viewer.