Changeset 5833
- Timestamp:
- 09/15/10 16:48:46 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Numerics/ElementMatrix.cpp
r5831 r5833 114 114 if(P[Ke2->row_flocaldoflist[i]] >= Ke1->nrows) fsize++; 115 115 } 116 printf("fsize = %i\n",fsize);117 ISSMERROR("STOP");118 116 if(fsize){ 119 117 this->row_flocaldoflist =(int*)xmalloc(fsize*sizeof(int)); 120 118 this->row_fglobaldoflist=(int*)xmalloc(fsize*sizeof(int)); 121 119 for(i=0;i<Ke1->row_fsize;i++){ 122 this->row_flocaldoflist[i]=Ke1->row_flocaldoflist[i]; 120 this->row_flocaldoflist[i] =Ke1->row_flocaldoflist[i]; 121 this->row_fglobaldoflist[i]=Ke1->row_fglobaldoflist[i]; 123 122 } 124 123 counter=Ke1->row_fsize; 125 124 for(i=0;i<Ke2->row_fsize;i++){ 126 125 if(P[Ke2->row_flocaldoflist[i]] >= Ke1->nrows){ 127 this->row_flocaldoflist[counter]=P[Ke2->row_flocaldoflist[i]]; 126 this->row_flocaldoflist[counter] =P[Ke2->row_flocaldoflist[i]]; 127 this->row_fglobaldoflist[counter]=Ke2->row_fglobaldoflist[i]; 128 128 } 129 129 } … … 134 134 } 135 135 136 ssize=Ke1->row_ssize+Ke2->row_ssize; 137 this->row_ssize=ssize; 136 /*Sset*/ 137 ssize=Ke1->row_ssize; 138 for(i=0;i<Ke2->row_ssize;i++){ 139 if(P[Ke2->row_slocaldoflist[i]] >= Ke1->nrows) ssize++; 140 } 138 141 if(ssize){ 139 ISSMERROR("STOP"); 140 this->row_slocaldoflist=(int*)xmalloc(ssize*sizeof(int)); 142 this->row_slocaldoflist =(int*)xmalloc(ssize*sizeof(int)); 141 143 this->row_sglobaldoflist=(int*)xmalloc(ssize*sizeof(int)); 142 //memcpy(this->row_slocaldoflist,slocaldoflist,ssize*sizeof(int)); 143 //memcpy(this->row_sglobaldoflist,sglobaldoflist,ssize*sizeof(int)); 144 for(i=0;i<Ke1->row_ssize;i++){ 145 this->row_slocaldoflist[i] =Ke1->row_slocaldoflist[i]; 146 this->row_sglobaldoflist[i]=Ke1->row_sglobaldoflist[i]; 147 } 148 counter=Ke1->row_ssize; 149 for(i=0;i<Ke2->row_ssize;i++){ 150 if(P[Ke2->row_slocaldoflist[i]] >= Ke1->nrows){ 151 this->row_slocaldoflist[counter] =P[Ke2->row_slocaldoflist[i]]; 152 this->row_sglobaldoflist[counter]=Ke2->row_sglobaldoflist[i]; 153 } 154 } 144 155 } 145 156 else{ … … 388 399 this->square=Ke->square; 389 400 this->kff =Ke->kff; 401 390 402 this->values=(double*)xmalloc(this->nrows*this->ncols*sizeof(double)); 391 403 memcpy(this->values,Ke->values,this->nrows*this->ncols*sizeof(double)); 404 405 this->gglobaldoflist=(int*)xmalloc(this->nrows*sizeof(int)); 406 memcpy(this->gglobaldoflist,Ke->gglobaldoflist,this->nrows*sizeof(int)); 392 407 393 408 this->row_fsize=Ke->row_fsize;
Note:
See TracChangeset
for help on using the changeset viewer.