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

Function OPS_UniformExcitationPattern

SRC/domain/pattern/UniformExcitation.cpp:49–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47void* OPS_TimeSeriesIntegrator();
48
49void* OPS_UniformExcitationPattern()
50{
51 if (OPS_GetNumRemainingInputArgs() < 2) {
52 opserr << "WARNING insufficient args : pattern UniformExcitation tag dir\n";
53 return 0;
54 }
55
56 int patternID;
57 int numdata = 1;
58 if (OPS_GetIntInput(&numdata, &patternID) < 0) {
59 opserr << "WARNING invalid patternID\n";
60 return 0;
61 }
62
63 int dir;
64 if (OPS_GetIntInput(&numdata, &dir) < 0) {
65 opserr << "WARNING invalid dir \n";
66 return 0;
67 }
68
69 dir--; // subtract 1 for c indexing
70
71 TimeSeries *accelSeries = 0;
72 TimeSeries *velSeries = 0;
73 TimeSeries *dispSeries = 0;
74 TimeSeriesIntegrator *seriesIntegrator = 0;
75 double dt = 0.01;
76 double vel0 = 0.0;
77 double fact = 1.0;
78
79 bool doneSeries = false;
80 while (OPS_GetNumRemainingInputArgs()>1 && doneSeries == false) {
81
82 const char* flag = OPS_GetString();
83
84 if ((strcmp(flag,"-vel0") == 0) || (strcmp(flag,"-initialVel") == 0)) {
85
86 if (OPS_GetDoubleInput(&numdata, &vel0) < 0) {
87 opserr << "WARNING invalid vel0: pattern type UniformExcitation\n";
88 return 0;
89 }
90 }
91
92 else if ((strcmp(flag,"-fact") == 0) || (strcmp(flag,"-factor") == 0)) {
93
94 if (OPS_GetDoubleInput(&numdata, &fact) < 0) {
95 opserr << "WARNING invalid fact: pattern type UniformExcitation\n";
96 return 0;
97 }
98 }
99
100
101 else if ((strcmp(flag,"-accel") == 0) || (strcmp(flag,"-acceleration") == 0)) {
102
103 int tsTag;
104 if (OPS_GetIntInput(&numdata, &tsTag) < 0) {
105 opserr << "WARNING invalid accel series tag\n";
106 return 0;

Callers 1

OPS_PatternFunction · 0.85

Calls 7

OPS_getTimeSeriesFunction · 0.85
OPS_TimeSeriesIntegratorFunction · 0.85
OPS_GetIntInputFunction · 0.50
OPS_GetStringFunction · 0.50
OPS_GetDoubleInputFunction · 0.50
getTimeIncrMethod · 0.45

Tested by

no test coverage detected