Changeset 18936


Ignore:
Timestamp:
12/04/14 15:18:30 (10 years ago)
Author:
Eric.Larour
Message:

CHG: some minor comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/IndependentObject.cpp

    r18871 r18936  
    7474        int my_rank;
    7575        FILE* fid=NULL;
    76         int Xcount;
     76        int Xcount=0;
    7777
    7878        /*recover my_rank:*/
     
    166166                                 If we have been supplied an X vector, use it instead of what we just read: */
    167167                                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*/
    169169                                }
    170170                                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];
    172172                                }
    173173                        }
     
    204204void IndependentObject::FillIndependents(IssmDouble** data, IssmDouble* xp){/*{{{*/
    205205
    206         int i;
    207 
    208206        /*Branch according to the type of variable: */
    209207        if(type==0){ /*scalar:*/
     
    212210        else if(type==1){ /* vector:*/
    213211                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];
    217213        }
    218214        else _error_("should not have a type of " << type);
Note: See TracChangeset for help on using the changeset viewer.