Changeset 5792
- Timestamp:
- 09/14/10 08:09:50 (15 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/DofIndexing.cpp
r5783 r5792 50 50 this->clone=in->clone; 51 51 52 if(this->gsize>0 && this->gsize!=UNDEF){52 if(this->gsize>0){ 53 53 this->f_set=(bool*)xmalloc(this->gsize*sizeof(bool)); 54 54 this->s_set=(bool*)xmalloc(this->gsize*sizeof(bool)); … … 67 67 if(this->ssize>0 && this->ssize!=UNDEF)this->sdoflist=(int*)xmalloc(this->ssize*sizeof(int)); else this->sdoflist=NULL; 68 68 69 if(this->gsize>0 && this->gsize!=UNDEF){69 if(this->gsize>0){ 70 70 memcpy(this->f_set,in->f_set,this->gsize*sizeof(bool)); 71 71 memcpy(this->s_set,in->s_set,this->gsize*sizeof(bool)); … … 101 101 102 102 /*allocate: */ 103 if(this->gsize>0 && this->gsize!=UNDEF){103 if(this->gsize>0){ 104 104 this->f_set=(bool*)xmalloc(this->gsize*sizeof(bool)); 105 105 this->s_set=(bool*)xmalloc(this->gsize*sizeof(bool)); … … 115 115 if(this->doftype)this->doftype[i]=in_doftype[i]; 116 116 this->svalues[i]=0; //0 constraint is the default value 117 this->gdoflist[i]=UNDEF; 117 118 } 118 119 } … … 228 229 229 230 /*Allocate: */ 230 if(this->gsize>0 && this->gsize!=UNDEF){231 if(this->gsize>0){ 231 232 this->f_set=(bool*)xmalloc(this->gsize*sizeof(bool)); 232 233 this->s_set=(bool*)xmalloc(this->gsize*sizeof(bool)); … … 243 244 this->gdoflist=NULL; 244 245 } 245 if(this->fsize>0 && this->fsize!=UNDEF)246 if(this->fsize>0) 246 247 this->fdoflist=(int*)xmalloc(this->fsize*sizeof(int)); 247 248 else 248 249 this->fdoflist=NULL; 249 if(this->ssize>0 && this->ssize!=UNDEF)250 if(this->ssize>0) 250 251 this->sdoflist=(int*)xmalloc(this->ssize*sizeof(int)); 251 252 else … … 253 254 254 255 /*Copy arrays: */ 255 if(this->gsize>0 && this->gsize!=UNDEF){256 if(this->gsize>0){ 256 257 memcpy(f_set,marshalled_dataset,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool); 257 258 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){ 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); 261 262 } 262 263 … … 296 297 memcpy(marshalled_dataset,&clone,sizeof(clone));marshalled_dataset+=sizeof(clone); 297 298 298 if(this->gsize>0 && this->gsize!=UNDEF){299 if(this->gsize>0){ 299 300 memcpy(marshalled_dataset,f_set,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool); 300 301 memcpy(marshalled_dataset,s_set,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool); … … 316 317 317 318 size+=4*sizeof(int)+sizeof(bool); 318 if(this->gsize>0 && this->gsize!=UNDEF){319 if(this->gsize>0){ 319 320 size+= 2*this->gsize*sizeof(bool)+ 320 321 this->gsize*sizeof(double)+ -
issm/trunk/src/c/objects/Node.cpp
r5774 r5792 566 566 count=0; 567 567 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 } 570 572 } 571 573
Note:
See TracChangeset
for help on using the changeset viewer.