| 672 | } |
| 673 | |
| 674 | double Element::getCharacteristicLength(void) |
| 675 | { |
| 676 | int numNodes = this->getNumExternalNodes(); |
| 677 | Node **theNodes = this->getNodePtrs(); |
| 678 | double cLength = 0.0; |
| 679 | double minSize = 10e14; //Tesser |
| 680 | |
| 681 | for (int i=0; i<numNodes; i++) { |
| 682 | Node *nodeI = theNodes[i]; |
| 683 | Vector iCoords = nodeI->getCrds(); |
| 684 | int iDOF = nodeI->getNumberDOF(); |
| 685 | for (int j=i+1; j<numNodes; j++) { |
| 686 | Node *nodeJ = theNodes[j]; |
| 687 | Vector jCoords = nodeJ->getCrds(); |
| 688 | int jDOF = nodeI->getNumberDOF(); |
| 689 | double ijLength = 0; |
| 690 | for (int k=0; k<iDOF && k<jDOF; k++) { |
| 691 | ijLength += (jCoords(k)-iCoords(k))*(jCoords(k)-iCoords(k)); //Tesser |
| 692 | } |
| 693 | ijLength = sqrt(ijLength); |
| 694 | if (ijLength > cLength) |
| 695 | cLength = ijLength; |
| 696 | if (ijLength < minSize) |
| 697 | minSize = ijLength; |
| 698 | } |
| 699 | } |
| 700 | return minSize; |
| 701 | } |
| 702 | |
| 703 | |
| 704 |
nothing calls this directly
no test coverage detected