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

Method analyze

SRC/analysis/analysis/PFEMAnalysis.cpp:81–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81int
82PFEMAnalysis::analyze(bool flush)
83{
84 Domain* theDomain = this->getDomainPtr();
85 double current = theDomain->getCurrentTime();
86 if(newstep) {
87 next = current + dtmax;
88 }
89 bool instep = false;
90
91 while(true) {
92
93 // identify domain
94 if (this->identify() < 0) {
95 opserr<<"WARNING: failed to identify domain -- PFEMAnalysis\n";
96 return -1;
97 }
98
99 // analyze
100#ifdef _PARALLEL_INTERPRETERS
101 int myid;
102 MPI_Comm_rank(MPI_COMM_WORLD, &myid);
103 if(myid == 0) {
104 opserr<<"\n\nTime = "<<current<<", dt = "<<dt<<"\n\n";
105 }
106#else
107 opserr<<"\n\nTime = "<<current<<", dt = "<<dt<<"\n\n";
108#endif
109
110 // analysis
111 int converged = DirectIntegrationAnalysis::analyze(1, dt);
112
113 // if failed
114 if(converged < 0) {
115 dt *= ratio;
116 if(dt < dtmin) {
117 return -1;
118 }
119 instep = true;
120 newstep = false;
121 continue;
122 }
123
124 // if converged
125 if(instep) {
126 current = theDomain->getCurrentTime();
127 dt = next - current;
128 } else {
129 newstep = true;
130 dt = dtmax;
131 }
132
133 break;
134 }
135
136 Domain* the_Domain = this->getDomainPtr();
137 if (the_Domain != 0 && flush) {
138 the_Domain->flushRecorders();

Callers 15

define_modelFunction · 0.45
end_loaded_cantileverFunction · 0.45
bending_tri6n.pyFile · 0.45
bending_quad9n.pyFile · 0.45
run_benchmarkFunction · 0.45
run_benchmarkFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 4

identifyMethod · 0.95
flushRecordersMethod · 0.80
getDomainPtrMethod · 0.45
getCurrentTimeMethod · 0.45

Tested by 3

define_modelFunction · 0.36
end_loaded_cantileverFunction · 0.36