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

Function OPS_HSConstraint

SRC/analysis/integrator/HSConstraint.cpp:39–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37#include <elementAPI.h>
38
39void* OPS_HSConstraint()
40{
41 int numdata = OPS_GetNumRemainingInputArgs();
42 if (numdata < 1) {
43 opserr << "WARNING integrator HSConstraint <arcLength> <psi_u> <psi_f> <u_ref> \n";
44 return 0;
45 }
46 if (numdata > 4) numdata = 4;
47
48 double data[4];
49 if (OPS_GetDoubleInput(&numdata, data) < 0) {
50 opserr << "WARNING integrator HSConstraint invalid double inputs\n";
51 return 0;
52 }
53 double arcLength = data[0];
54 double psi_u = data[1];
55 double psi_f = data[2];
56 double u_ref = data[3];
57
58 switch(numdata) {
59 case 1:
60 return new HSConstraint(arcLength);
61 case 2:
62 return new HSConstraint(arcLength, psi_u);
63 case 3:
64 return new HSConstraint(arcLength, psi_u, psi_f);
65 case 4:
66 return new HSConstraint(arcLength, psi_u, psi_f, u_ref);
67 }
68
69 return 0;
70}
71
72HSConstraint::HSConstraint(double arcLength, double psi_u, double psi_f, double u_ref)
73:StaticIntegrator(INTEGRATOR_TAGS_HSConstraint),

Callers 1

OPS_IntegratorFunction · 0.85

Calls 2

OPS_GetDoubleInputFunction · 0.50

Tested by

no test coverage detected