Changeset 5792


Ignore:
Timestamp:
09/14/10 08:09:50 (15 years ago)
Author:
Mathieu Morlighem
Message:

Fixed tiling

Location:
issm/trunk/src/c/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/DofIndexing.cpp

    r5783 r5792  
    5050        this->clone=in->clone;
    5151
    52         if(this->gsize>0 && this->gsize!=UNDEF){
     52        if(this->gsize>0){
    5353                this->f_set=(bool*)xmalloc(this->gsize*sizeof(bool));
    5454                this->s_set=(bool*)xmalloc(this->gsize*sizeof(bool));
     
    6767        if(this->ssize>0 && this->ssize!=UNDEF)this->sdoflist=(int*)xmalloc(this->ssize*sizeof(int)); else this->sdoflist=NULL;
    6868
    69         if(this->gsize>0 && this->gsize!=UNDEF){
     69        if(this->gsize>0){
    7070                memcpy(this->f_set,in->f_set,this->gsize*sizeof(bool));
    7171                memcpy(this->s_set,in->s_set,this->gsize*sizeof(bool));
     
    101101
    102102        /*allocate: */
    103         if(this->gsize>0 && this->gsize!=UNDEF){
     103        if(this->gsize>0){
    104104                this->f_set=(bool*)xmalloc(this->gsize*sizeof(bool));
    105105                this->s_set=(bool*)xmalloc(this->gsize*sizeof(bool));
     
    115115                if(this->doftype)this->doftype[i]=in_doftype[i];
    116116                this->svalues[i]=0; //0 constraint is the default value
     117                this->gdoflist[i]=UNDEF;
    117118        }
    118119}
     
    228229       
    229230        /*Allocate: */
    230         if(this->gsize>0 && this->gsize!=UNDEF){
     231        if(this->gsize>0){
    231232                this->f_set=(bool*)xmalloc(this->gsize*sizeof(bool));
    232233                this->s_set=(bool*)xmalloc(this->gsize*sizeof(bool));
     
    243244                this->gdoflist=NULL;
    244245        }
    245         if(this->fsize>0 && this->fsize!=UNDEF)
     246        if(this->fsize>0)
    246247         this->fdoflist=(int*)xmalloc(this->fsize*sizeof(int));
    247248        else
    248249         this->fdoflist=NULL;
    249         if(this->ssize>0 && this->ssize!=UNDEF)
     250        if(this->ssize>0)
    250251         this->sdoflist=(int*)xmalloc(this->ssize*sizeof(int));
    251252        else
     
    253254
    254255        /*Copy arrays: */
    255         if(this->gsize>0 && this->gsize!=UNDEF){
     256        if(this->gsize>0){
    256257                memcpy(f_set,marshalled_dataset,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool);
    257258                memcpy(s_set,marshalled_dataset,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool);
    258                 memcpy(this->svalues,marshalled_dataset,this->gsize*sizeof(double));marshalled_dataset+=this->gsize*sizeof(double);
    259                 if(flagdoftype){ memcpy(doftype,marshalled_dataset,gsize*sizeof(int));marshalled_dataset+=gsize*sizeof(int); }
    260                 memcpy(this->gdoflist,marshalled_dataset,this->gsize*sizeof(int));marshalled_dataset+=this->gsize*sizeof(int);
     259                memcpy(svalues,marshalled_dataset,gsize*sizeof(double));marshalled_dataset+=gsize*sizeof(double);
     260                if(flagdoftype){memcpy(doftype,marshalled_dataset,gsize*sizeof(int));marshalled_dataset+=gsize*sizeof(int); }
     261                memcpy(gdoflist,marshalled_dataset,gsize*sizeof(int));marshalled_dataset+=gsize*sizeof(int);
    261262        }
    262263       
     
    296297        memcpy(marshalled_dataset,&clone,sizeof(clone));marshalled_dataset+=sizeof(clone);
    297298       
    298         if(this->gsize>0 && this->gsize!=UNDEF){
     299        if(this->gsize>0){
    299300                memcpy(marshalled_dataset,f_set,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool);
    300301                memcpy(marshalled_dataset,s_set,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool);
     
    316317
    317318        size+=4*sizeof(int)+sizeof(bool);
    318         if(this->gsize>0 && this->gsize!=UNDEF){
     319        if(this->gsize>0){
    319320                size+= 2*this->gsize*sizeof(bool)+
    320321                           this->gsize*sizeof(double)+
  • issm/trunk/src/c/objects/Node.cpp

    r5774 r5792  
    566566                count=0;
    567567                for(i=0;i<this->indexing.gsize;i++){
    568                         if(this->indexing.s_set[i])values[count]=this->indexing.svalues[i];
    569                         count++;
     568                        if(this->indexing.s_set[i]){
     569                                values[count]=this->indexing.svalues[i];
     570                                count++;
     571                        }
    570572                }
    571573               
Note: See TracChangeset for help on using the changeset viewer.