Changeset 5259 for issm/trunk/src/c/objects/Node.cpp
- Timestamp:
- 08/13/10 16:59:27 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Node.cpp
r5258 r5259 334 334 void Node::GetDofList(int* outdoflist,int approximation_enum){ 335 335 int i; 336 for(i=0;i<this->indexing.numberofdofs;i++){ 337 outdoflist[i]=indexing.doflist[i]; 336 int count=0; 337 338 if(approximation_enum && this->indexing.doftype){ //if an approximation is specified and this node has several approsimations 339 for(i=0;i<this->indexing.numberofdofs;i++){ 340 if(indexing.doftype[i]==approximation_enum){ 341 outdoflist[count]=indexing.doflist[i]; 342 count++; 343 } 344 } 345 ISSMASSERT(count); 346 } 347 else{ 348 for(i=0;i<this->indexing.numberofdofs;i++){ 349 outdoflist[i]=indexing.doflist[i]; 350 } 338 351 } 339 352 } … … 455 468 /*}}}*/ 456 469 /*FUNCTION Node::GetNumberOfDofs{{{1*/ 457 int Node::GetNumberOfDofs(){ 458 459 return this->indexing.numberofdofs; 470 int Node::GetNumberOfDofs(int approximation_enum){ 471 472 int i; 473 int numdofs=0; 474 475 /*Count the dofs if an approximation is specified and the node contains several dofs type*/ 476 if(approximation_enum && this->indexing.doftype){ 477 for(i=0;i<this->indexing.numberofdofs;i++){ 478 if(this->indexing.doftype[i]==approximation_enum) numdofs++; 479 } 480 } 481 else numdofs=this->indexing.numberofdofs; 482 483 ISSMASSERT(numdofs); 484 return numdofs; 460 485 461 486 }
Note:
See TracChangeset
for help on using the changeset viewer.