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

Function OPS_PathSeries

SRC/domain/pattern/PathSeries.cpp:50–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48#include <string>
49
50void *OPS_PathSeries() {
51 if (OPS_GetNumRemainingInputArgs() < 1) {
52 opserr << "insufficient arguments: PathSeries\n";
53 return 0;
54 }
55
56 // get tag
57 int tag = 0;
58 int numData = 1;
59 if (OPS_GetIntInput(&numData, &tag) < 0) {
60 opserr << "tag is not specified\n";
61 return 0;
62 }
63
64 // get other inputs
65 double factor = 1.0, dt = -1.0;
66 const char *fileTime = 0, *filePath = 0, *fileName = 0;
67 std::vector<double> values, times;
68 bool useLast = false, prependZero = false;
69 double startTime = 0.0;
70
71 // check inputs
72 TimeSeries *theSeries = 0;
73 int loc = 2;
74 OPS_ResetCurrentInputArg(loc);
75 while (OPS_GetNumRemainingInputArgs() > 0) {
76 // next arg
77 const char *arg = OPS_GetString();
78 loc++;
79
80 // check arg
81 if (strcmp(arg, "-dt") == 0 ||
82 strcmp(arg, "-dT") == 0) {
83 if (OPS_GetNumRemainingInputArgs() < 1) {
84 opserr << "WARNING: dt is not specified\n";
85 return 0;
86 }
87 numData = 1;
88 if (OPS_GetDoubleInput(&numData, &dt) < 0) {
89 opserr << "WARNING: failed to get dt\n";
90 return 0;
91 }
92 loc++;
93
94 } else if (strcmp(arg, "-tag") == 0) {
95 if (OPS_GetNumRemainingInputArgs() < 1) {
96 opserr << "WARNING: tag is not specified\n";
97 return 0;
98 }
99 numData = 1;
100 if (OPS_GetIntInput(&numData, &tag) < 0) {
101 opserr << "WARNING: failed to get tag\n";
102 return 0;
103 }
104 loc++;
105
106 } else if (strcmp(arg, "-values") == 0) {
107

Callers 1

Calls 9

push_backMethod · 0.80
emptyMethod · 0.80
OPS_GetIntInputFunction · 0.50
OPS_ResetCurrentInputArgFunction · 0.50
OPS_GetStringFunction · 0.50
OPS_GetDoubleInputFunction · 0.50
OPS_GetDoubleListInputFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected