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

Method updateParameter

SRC/domain/node/Node.cpp:1996–2032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1994
1995
1996int
1997Node::updateParameter(int pparameterID, Information &info)
1998{
1999 if (pparameterID >= 1 && pparameterID <= 3)
2000 (*mass)(pparameterID-1,pparameterID-1) = info.theDouble;
2001
2002 else if (pparameterID == 7) {
2003 (*mass)(0,0) = info.theDouble;
2004 (*mass)(1,1) = info.theDouble;
2005 } else if (pparameterID == 8) {
2006 (*mass)(0,0) = info.theDouble;
2007 (*mass)(1,1) = info.theDouble;
2008 (*mass)(2,2) = info.theDouble;
2009 }
2010
2011 else if (pparameterID >= 4 && pparameterID <= 6) {
2012
2013 if ( (*Crd)(pparameterID-4) != info.theDouble) {
2014
2015 // Set the new coordinate value
2016 (*Crd)(pparameterID-4) = info.theDouble;
2017
2018 // Need to "setDomain" to make the change take effect.
2019 Domain *theDomain = this->getDomain();
2020 ElementIter &theElements = theDomain->getElements();
2021 Element *theElement;
2022 while ((theElement = theElements()) != 0) {
2023 theElement->setDomain(theDomain);
2024 }
2025 }
2026 else {
2027 // No change in nodal coordinate
2028 }
2029 }
2030
2031 return -1;
2032}
2033
2034
2035

Callers 8

OPS_updateMaterialStageFunction · 0.45
OPS_updateParameterFunction · 0.45
updateMethod · 0.45
updateParameterMethod · 0.45

Calls 3

getDomainMethod · 0.45
getElementsMethod · 0.45
setDomainMethod · 0.45

Tested by 2