Changeset 4880 for issm/trunk/src/c/objects/Elements/Beam.cpp
- Timestamp:
- 07/29/10 11:26:26 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Beam.cpp
r4873 r4880 407 407 /*}}}*/ 408 408 /*FUNCTION Beam::InputConvergence{{{1*/ 409 void Beam::InputConvergence(int* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums){410 411 int 409 bool Beam::InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums){ 410 411 int i; 412 412 Input** new_inputs=NULL; 413 413 Input** old_inputs=NULL; 414 int converged=1;414 bool converged=true; 415 415 416 416 new_inputs=(Input**)xmalloc(num_enums/2*sizeof(Input*)); //half the enums are for the new inputs 417 417 old_inputs=(Input**)xmalloc(num_enums/2*sizeof(Input*)); //half the enums are for the old inputs 418 418 419 419 for(i=0;i<num_enums/2;i++){ 420 420 new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]); … … 427 427 for(i=0;i<num_criterionenums;i++){ 428 428 IsInputConverged(eps+i,new_inputs,old_inputs,num_enums/2,criterionenums[i]); 429 if(eps[i]>criterionvalues[i]) converged= 0;429 if(eps[i]>criterionvalues[i]) converged=false; 430 430 } 431 431 … … 434 434 xfree((void**)&old_inputs); 435 435 436 /* Assign output pointers:*/437 *pconverged=converged;436 /*Return output*/ 437 return converged; 438 438 439 439 }
Note:
See TracChangeset
for help on using the changeset viewer.