Changeset 1973
- Timestamp:
- 08/26/09 17:03:57 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/BuildNodeSetsx/PartitionSets.cpp
r1967 r1973 105 105 *ppartitionc=partitionc; 106 106 107 108 107 } -
issm/trunk/src/c/parallel/diagnostic_core.cpp
r1964 r1973 56 56 int dof012[3]={0,1,2}; 57 57 int dof3[1]={3}; 58 double* dofset=NULL; 58 59 59 60 … … 136 137 VecFree(&ug); ug=NewVec(numberofnodes*3); 137 138 138 VecMerge(ug,ug_horiz,dofsetgen(2,&dof01[0],3,numberofnodes*3),numberofnodes*2);139 VecMerge(ug,ug_vert,dofsetgen(1,&dof2[0],3,numberofnodes*3),numberofnodes*1);139 xfree((void**)&dofset); dofset=dofsetgen(2,&dof01[0],3,numberofnodes*3); VecMerge(ug,ug_horiz,dofset,numberofnodes*2); 140 xfree((void**)&dofset); dofset=dofsetgen(1,&dof2[0],3,numberofnodes*3); VecMerge(ug,ug_vert,dofset,numberofnodes*1); 140 141 VecFree(&ug_horiz); VecFree(&ug_vert); 141 142 … … 160 161 //recombine ug and pg: 161 162 ug_stokes=NewVec(fem_ds->nodesets->GetGSize()); 162 VecMerge(ug_stokes,ug,dofsetgen(3,dof012,4,numberofnodes*4),numberofnodes*3);163 VecMerge(ug_stokes,pg,dofsetgen(1,dof3,4,numberofnodes*4),numberofnodes);163 xfree((void**)&dofset);dofset=dofsetgen(3,dof012,4,numberofnodes*4); VecMerge(ug_stokes,ug,dofset,numberofnodes*3); 164 xfree((void**)&dofset); dofset=dofsetgen(1,dof3,4,numberofnodes*4); VecMerge(ug_stokes,pg,dofset,numberofnodes); 164 165 165 166 inputs->Add("velocity",ug_stokes,numberofdofspernode_ds,numberofnodes); … … 167 168 168 169 if(debug)_printf_("%s\n"," update boundary conditions for stokes using velocities previously computed..."); 169 VecMerge(fem_ds->yg,ug,dofsetgen(3,dof012,4,numberofnodes*4),3*numberofnodes);170 xfree((void**)&dofset);dofset=dofsetgen(3,dof012,4,numberofnodes*4); VecMerge(fem_ds->yg,ug,dofset,3*numberofnodes); 170 171 VecFree(&fem_ds->ys); VecFree(&fem_ds->ys0); 171 172 Reducevectorgtosx(&fem_ds->ys,&fem_ds->ys0, fem_ds->yg,fem_ds->nodesets); … … 177 178 //decondition" pressure 178 179 VecFree(&pg); 179 VecPartition(&pg, ug, dofsetgen(1,dof3,4,numberofnodes*4), numberofnodes*1);180 xfree((void**)&dofset);dofset=dofsetgen(1,dof3,4,numberofnodes*4); VecPartition(&pg, ug, dofset, numberofnodes*1); 180 181 VecScale(pg,stokesreconditioning); 181 182 } … … 197 198 VecFree(&ug); 198 199 VecFree(&pg); 200 xfree((void**)&dofset); 199 201 200 202 } -
issm/trunk/src/c/parallel/diagnostic_core_linear.cpp
r571 r1973 49 49 /*!Reduce matrix from g to f size:*/ 50 50 if (debug) _printf_(" reducing matrix from g to f set\n"); 51 Reducematrixfromgtofx(&Kff,&Kfs,Kgg,fem->Gmn,fem->nodesets); 51 Reducematrixfromgtofx(&Kff,&Kfs,Kgg,fem->Gmn,fem->nodesets); MatFree(&Kgg); 52 52 53 53 54 54 /*!Reduce load from g to f size: */ 55 55 if (debug) _printf_(" reducing load from g to f set\n"); 56 Reduceloadfromgtofx(&pf, pg, fem->Gmn, Kfs, fem->ys, fem->nodesets); 56 Reduceloadfromgtofx(&pf, pg, fem->Gmn, Kfs, fem->ys, fem->nodesets);VecFree(&pg); MatFree(&Kfs); 57 57 58 58 /*Solve: */ 59 59 if (debug) _printf_(" solving\n"); 60 Solverx(&uf, Kff, pf, NULL, solver_string); 60 Solverx(&uf, Kff, pf, NULL, solver_string); MatFree(&Kff); VecFree(&pf); 61 61 62 62 //Merge back to g set 63 63 if (debug) _printf_(" merging solution from f to g set\n"); 64 Mergesolutionfromftogx(&ug, uf,fem->Gmn,fem->ys,fem->nodesets); 64 Mergesolutionfromftogx(&ug, uf,fem->Gmn,fem->ys,fem->nodesets);VecFree(&uf); 65 65 66 66 /*Assign output pointers:*/
Note:
See TracChangeset
for help on using the changeset viewer.