Changeset 26131 for issm/trunk-jpl/src/c/classes/Elements/Element.cpp
- Timestamp:
- 03/23/21 11:52:52 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/c/classes/Elements/Element.cpp ¶
r26073 r26131 947 947 /*First, figure out size of doflist and create it: */ 948 948 int numberofdofs=0; 949 for(int i=0;i<numnodes;i++) numberofdofs+=nodes[i]->GetNumberOfDofs(approximation_enum, setenum);949 for(int i=0;i<numnodes;i++) numberofdofs+=nodes[i]->GetNumberOfDofs(approximation_enum,GsetEnum); 950 950 951 951 /*Allocate output*/ … … 955 955 int count=0; 956 956 for(int i=0;i<numnodes;i++){ 957 nodes[i]->GetDofList( doflist+count,approximation_enum,setenum);958 count+=nodes[i]->GetNumberOfDofs(approximation_enum, setenum);957 nodes[i]->GetDofList(&doflist[count],approximation_enum,setenum); 958 count+=nodes[i]->GetNumberOfDofs(approximation_enum,GsetEnum); 959 959 } 960 960 … … 970 970 /*First, figure out size of doflist and create it: */ 971 971 int numberofdofs=0; 972 for(int i=0;i<numnodes;i++) numberofdofs+=nodes[i]->GetNumberOfDofs( approximation_enum,setenum);972 for(int i=0;i<numnodes;i++) numberofdofs+=nodes[i]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum); 973 973 974 974 /*Allocate output*/ … … 978 978 int count=0; 979 979 for(int i=0;i<numnodes;i++){ 980 _assert_(count<numberofdofs); 980 981 nodes[i]->GetDofListLocal(doflist+count,approximation_enum,setenum); 981 count+=nodes[i]->GetNumberOfDofs(approximation_enum, setenum);982 count+=nodes[i]->GetNumberOfDofs(approximation_enum,GsetEnum); 982 983 } 983 984 … … 4373 4374 4374 4375 /*Copy current stiffness matrix*/ 4375 values=xNew<IssmDouble>(Ke->nrows*Ke->n cols);4376 for(i=0;i<Ke->nrows;i++) for(j=0;j<Ke->n cols;j++) values[i*Ke->ncols+j]=Ke->values[i*Ke->ncols+j];4376 values=xNew<IssmDouble>(Ke->nrows*Ke->nrows); 4377 for(i=0;i<Ke->nrows;i++) for(j=0;j<Ke->nrows;j++) values[i*Ke->nrows+j]=Ke->values[i*Ke->nrows+j]; 4377 4378 4378 4379 /*Get Coordinate Systems transform matrix*/ … … 4381 4382 /*Transform matrix: R*Ke*R^T */ 4382 4383 TripleMultiply(transform,numdofs,numdofs,0, 4383 values,Ke->nrows,Ke->n cols,0,4384 values,Ke->nrows,Ke->nrows,0, 4384 4385 transform,numdofs,numdofs,1, 4385 4386 &Ke->values[0],0); … … 4549 4550 4550 4551 /*Copy current stiffness matrix*/ 4551 values=xNew<IssmDouble>(Ke->nrows*Ke->n cols);4552 for(int i=0;i<Ke->nrows*Ke->n cols;i++) values[i]=Ke->values[i];4552 values=xNew<IssmDouble>(Ke->nrows*Ke->nrows); 4553 for(int i=0;i<Ke->nrows*Ke->nrows;i++) values[i]=Ke->values[i]; 4553 4554 4554 4555 /*Get Coordinate Systems transform matrix*/ … … 4557 4558 /*Transform matrix: R^T*Ke*R */ 4558 4559 TripleMultiply(transform,numdofs,numdofs,1, 4559 values,Ke->nrows,Ke->n cols,0,4560 values,Ke->nrows,Ke->nrows,0, 4560 4561 transform,numdofs,numdofs,0, 4561 4562 &Ke->values[0],0);
Note:
See TracChangeset
for help on using the changeset viewer.