MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / setModalDampingFactors

Method setModalDampingFactors

DEVELOPER/core/Domain.cpp:2105–2129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2103}
2104
2105int
2106Domain::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
2131const Vector *
2132Domain::getModalDampingFactors(void)

Callers 1

clearAllMethod · 0.95

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected