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

Method newStep

SRC/analysis/integrator/LoadPath.cpp:73–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73int
74LoadPath::newStep(void)
75{
76 AnalysisModel *theModel = this->getAnalysisModel();
77 if (theModel == 0) {
78 opserr << "LoadPath::newStep() - no associated AnalysisModel\n";
79 return -1;
80 }
81
82 if (loadPath == 0) {
83 opserr << "LoadPath::newStep() - no load path associated with object\n";
84 return -2;
85 }
86
87
88 double modelLambda = theModel->getCurrentDomainTime();
89
90 double currentLambda;
91 if (currentStep < loadPath->Size()) {
92
93 if (currentStep > 0) {
94 if (modelLambda == (*loadPath)(currentStep-1))
95 currentLambda = (*loadPath)(currentStep);
96 else
97 currentLambda = (*loadPath)(currentStep-1);
98 } else
99 currentLambda = (*loadPath)(currentStep);
100 }
101 else {
102 currentLambda = 0.0;
103 opserr << "LoadPath::newStep() - reached end of specified load path";
104 opserr << " - setting lambda = 0.0 \n";
105 }
106
107 currentStep++;
108 theModel->applyLoadDomain(currentLambda);
109
110 return 0;
111}
112
113int
114LoadPath::update(const Vector &deltaU)

Callers

nothing calls this directly

Calls 4

getAnalysisModelMethod · 0.45
getCurrentDomainTimeMethod · 0.45
SizeMethod · 0.45
applyLoadDomainMethod · 0.45

Tested by

no test coverage detected