Changeset 18936
- Timestamp:
- 12/04/14 15:18:30 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/IndependentObject.cpp
r18871 r18936 74 74 int my_rank; 75 75 FILE* fid=NULL; 76 int Xcount ;76 int Xcount=0; 77 77 78 78 /*recover my_rank:*/ … … 166 166 If we have been supplied an X vector, use it instead of what we just read: */ 167 167 if(X){ 168 for (int i=0;i<M*N; ++i) matrix[i]<<=X[Xcount+i]; /*we use the <<= ADOLC overloaded operator to declare the independency*/168 for (int i=0;i<M*N;i++) matrix[i]<<=X[Xcount+i]; /*<<= ADOLC overloaded operator to declare independent*/ 169 169 } 170 170 else{ 171 for (int i=0;i<M*N; ++i) matrix[i]<<=buffer[i]; /*we use the <<= ADOLC overloaded operator to declare the independency*/171 for (int i=0;i<M*N;i++) matrix[i]<<=buffer[i]; 172 172 } 173 173 } … … 204 204 void IndependentObject::FillIndependents(IssmDouble** data, IssmDouble* xp){/*{{{*/ 205 205 206 int i;207 208 206 /*Branch according to the type of variable: */ 209 207 if(type==0){ /*scalar:*/ … … 212 210 else if(type==1){ /* vector:*/ 213 211 IssmDouble* values=data[name]; 214 for(i=0;i<this->numberofindependents;i++){ 215 xp[i]=values[i]; 216 } 212 for(int i=0;i<this->numberofindependents;i++) xp[i]=values[i]; 217 213 } 218 214 else _error_("should not have a type of " << type);
Note:
See TracChangeset
for help on using the changeset viewer.