| 2103 | } |
| 2104 | |
| 2105 | int |
| 2106 | Domain::setModalDampingFactors(Vector *theValues, bool inclMatrix) |
| 2107 | { |
| 2108 | // if theValues == 0, turn off modal damping |
| 2109 | if (theValues == 0) { |
| 2110 | if (theModalDampingFactors != 0) |
| 2111 | delete theModalDampingFactors; |
| 2112 | theModalDampingFactors = 0; |
| 2113 | inclModalMatrix = inclMatrix; |
| 2114 | return 0; |
| 2115 | } |
| 2116 | |
| 2117 | // make sure the eigen value vector is large enough |
| 2118 | if (theModalDampingFactors == 0 || theModalDampingFactors->Size() != theValues->Size()) { |
| 2119 | if (theModalDampingFactors != 0) |
| 2120 | delete theModalDampingFactors; |
| 2121 | theModalDampingFactors = new Vector(*theValues); |
| 2122 | } else { |
| 2123 | *theModalDampingFactors = *theValues; |
| 2124 | } |
| 2125 | |
| 2126 | inclModalMatrix = inclMatrix; |
| 2127 | |
| 2128 | return 0; |
| 2129 | } |
| 2130 | |
| 2131 | const Vector * |
| 2132 | Domain::getModalDampingFactors(void) |