Changeset 1665
- Timestamp:
- 08/13/09 11:28:46 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 6 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Makefile.am
r1628 r1665 258 258 ./Reducevectorgtosx/Reducevectorgtosx.cpp\ 259 259 ./Reducevectorgtosx/Reducevectorgtosx.h\ 260 ./Reducevectorgtofx/Reducevectorgtofx.cpp\ 261 ./Reducevectorgtofx/Reducevectorgtofx.h\ 260 262 ./Reducematrixfromgtofx/Reducematrixfromgtofx.cpp\ 261 263 ./Reducematrixfromgtofx/Reducematrixfromgton.cpp\ … … 543 545 ./Reducevectorgtosx/Reducevectorgtosx.cpp\ 544 546 ./Reducevectorgtosx/Reducevectorgtosx.h\ 547 ./Reducevectorgtofx/Reducevectorgtofx.cpp\ 548 ./Reducevectorgtofx/Reducevectorgtofx.h\ 545 549 ./Reducematrixfromgtofx/Reducematrixfromgtofx.cpp\ 546 550 ./Reducematrixfromgtofx/Reducematrixfromgton.cpp\ -
issm/trunk/src/c/issm.h
r1189 r1665 32 32 #include "./BuildNodeSetsx/BuildNodeSetsx.h" 33 33 #include "./Reducevectorgtosx/Reducevectorgtosx.h" 34 #include "./Reducevectorgtofx/Reducevectorgtofx.h" 34 35 #include "./NormalizeConstraintsx/NormalizeConstraintsx.h" 35 36 #include "./ConfigureObjectsx/ConfigureObjectsx.h" -
issm/trunk/src/c/parallel/diagnostic_core_nonlinear.cpp
r1661 r1665 66 66 loads=fem->loads->Copy(); 67 67 68 /*Initialize ug and ug_old */68 /*Initialize ug, uf, ug_old and uf_old */ 69 69 if (numberofdofspernode>=3)dofs[2]=1;//only keep vz if running with more than 3 dofs per node 70 70 if (numberofdofspernode==4)dofs[3]=1;//only keep vz and presure if running with more than 3 dofs per node 71 71 ug=inputs->Get("velocity",&dofs[0],4); 72 VecDuplicate(ug,&old_ug); 73 VecCopy(ug,old_ug); 72 VecDuplicate(ug,&old_ug); VecCopy(ug,old_ug); 73 Reducevectorgtofx(&uf,ug,fem->nodesets); 74 VecDuplicate(uf,&old_uf); VecCopy(uf,old_uf); 74 75 75 76 count=1; … … 143 144 144 145 /*mechanical residue = norm(KUold-F)/norm(F)*/ 145 if (count>1){ 146 //compute KUoldF = KUold - F = K*Uold - F 147 VecDuplicate(uf,&KUold); MatMultPatch(Kff,old_uf,KUold); 148 VecDuplicate(KUold,&KUoldF);VecCopy(KUold,KUoldF); VecAYPX(KUoldF,-1.0,pf); 149 //compute norm(KUF), norm(F) and residue 150 VecNorm(KUoldF,NORM_2,&nKUoldF); 151 mechanical_residue=nKUoldF/nF; 152 //clean up 153 VecFree(&KUold); 154 VecFree(&KUoldF); 155 } 156 else{ 157 mechanical_residue=nKUoldF/nF; 158 } 146 //compute KUoldF = KUold - F = K*Uold - F 147 VecDuplicate(uf,&KUold); MatMultPatch(Kff,old_uf,KUold); 148 VecDuplicate(KUold,&KUoldF);VecCopy(KUold,KUoldF); VecAYPX(KUoldF,-1.0,pf); 149 //compute norm(KUF), norm(F) and residue 150 VecNorm(KUoldF,NORM_2,&nKUoldF); 151 mechanical_residue=nKUoldF/nF; 152 //clean up 153 VecFree(&KUold); 154 VecFree(&KUoldF); 159 155 if (debug) _printf_("%-50s%g%s\n"," Convergence criterion: norm(KUold-F)/norm(F)",mechanical_residue*100," \%"); 160 156 -
issm/trunk/src/m/solutions/cielo/diagnostic_core_nonlinear.m
r1415 r1665 13 13 14 14 soln(count).u_g=get(inputs,'velocity',[1 1 (m.parameters.numberofdofspernode>=3) (m.parameters.numberofdofspernode>=3)]); %only keep vz if running with more than 3 dofs per node 15 soln(count).u_f= [];15 soln(count).u_f= Reducevectorgtof(soln(count).u_g,m.nodesets); 16 16 17 17 displaystring(m.parameters.debug,'\n%s',[' starting direct shooting method']); … … 65 65 66 66 %Force equilibrium 67 if count>2, 68 mechanical_residue=norm(K_ff*soln(count-1).u_f-p_f,2)/norm(p_f,2); 69 else 70 mechanical_residue=NaN; 71 end 67 mechanical_residue=norm(K_ff*soln(count-1).u_f-p_f,2)/norm(p_f,2); 72 68 displaystring(m.parameters.debug,'%-53s%g%s',' convergence criterion: norm(KUold-F)/norm(F)',mechanical_residue*100,' %'); 73 69 -
issm/trunk/src/mex/Makefile.am
r1378 r1665 38 38 Reducematrixfromgtof\ 39 39 Reducevectorgtos\ 40 Reducevectorgtof\ 40 41 SetStructureField\ 41 42 Solver\ … … 180 181 Reducevectorgtos/Reducevectorgtos.h 181 182 183 Reducevectorgtof_SOURCES = Reducevectorgtof/Reducevectorgtof.cpp\ 184 Reducevectorgtof/Reducevectorgtof.h 185 182 186 SetStructureField_SOURCES = SetStructureField/SetStructureField.cpp\ 183 187 SetStructureField/SetStructureField.h
Note:
See TracChangeset
for help on using the changeset viewer.