Skip to content

Commit

Permalink
Merge pull request #586 from mhscott/qzSimple2
Browse files Browse the repository at this point in the history
Adding OPS_ command for QzSimple2
  • Loading branch information
mhscott committed May 29, 2021
2 parents c9627c1 + 7a37656 commit 6d25e6f
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions SRC/material/uniaxial/PY/QzSimple2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,43 @@
#include "QzSimple2.h"
#include <Vector.h>
#include <Channel.h>
#include <elementAPI.h>

// Controls on internal iterations between spring components
const int QZmaxIterations = 20;
const double QZtolerance = 1.0e-12;

void* OPS_QzSimple2()
{
int numdata = OPS_GetNumRemainingInputArgs();
if (numdata < 4) {
opserr << "WARNING insufficient arguments\n";
opserr << "Want: uniaxialMaterial QzSimple2 tag? qzType? qult? z50? suction? c?\n";
return 0;
}

int idata[2];
numdata = 2;
if (OPS_GetIntInput(&numdata, idata) < 0) {
opserr << "WARNING invalid int inputs\n";
return 0;
}

double ddata[4] = {0,0,0,0};
numdata = OPS_GetNumRemainingInputArgs();
if (numdata > 4) numdata = 4;
if (OPS_GetDoubleInput(&numdata, ddata) < 0) {
opserr << "WARNING invalid double inputs\n";
return 0;
}

UniaxialMaterial *theMaterial = 0;
theMaterial = new QzSimple2(idata[0], idata[1], ddata[0], ddata[1],
ddata[2], ddata[3]);

return theMaterial;
}

/////////////////////////////////////////////////////////////////////
// Constructor with data

Expand Down

0 comments on commit 6d25e6f

Please sign in to comment.