void * OPS_AC3D8HexWithSensitivity(void){ int matTag; static int idData[10]; //if the number of arguments is less than the minimum, throw an error int argc = OPS_GetNumRemainingInputArgs(); if (argc != 10) { opserr << "element AC3D8Hex incorrect num args .. 11 expected\n"; return 0; } if (OPS_GetIntInput(&argc, idData) != 0) { opserr << "element AC3D8Hex error reading integers\n"; return 0; } matTag = idData[9]; NDMaterial *theMaterial = OPS_GetNDMaterial(matTag); if (theMaterial == 0) { opserr << "command: element AC3D8Hex " << idData[0] << " - no NDMaterial with tag " << matTag << " exists\n"; return 0; } Element *theEle = new AC3D8HexWithSensitivity(idData[0],idData[1],idData[2],idData[3],idData[4],idData[5],idData[6],idData[7],idData[8],theMaterial); return theEle; }
void * OPS_FourNodeQuad3d() { Element *theEle = 0; int numRemainingArgs = OPS_GetNumRemainingInputArgs(); if (numRemainingArgs == 0) { // parallel processing theEle = new FourNodeQuad3d(); return theEle; } if (numRemainingArgs != 8 && numRemainingArgs != 12) { opserr << "ERROR - FourNodeQuad3d not enough args provided, want: element FourNodeQuad3d tag? iNode? jNode? kNode? lNode? thickness? type? matID? <p? rho? b1? b2?>\n"; } // get the id and end nodes int iData[6]; double dData[5]; dData[1] = 0.0; dData[2] = 0.0; dData[3] = 0.0; dData[4] = 0.0; int numData; int matTag = 0; int eleTag = 0; char *pType; numData = 5; if (OPS_GetIntInput(&numData, iData) != 0) { opserr << "WARNING element FourNodeQuad3d : invalid element data\n"; return 0; } eleTag = iData[0]; numData = 1; if (OPS_GetDoubleInput(&numData, dData) != 0) { opserr << "WARNING element FourNodeQuad3d : invalid thickness for element: " << eleTag << "\n"; return 0; } if (OPS_GetStringCopy(&pType) != 0) { opserr << "WARNING element FourNodeQuad3d : invalid pType for element: " << eleTag << "\n"; } numData = 1; if (OPS_GetIntInput(&numData, &matTag) != 0) { opserr << "WARNING element FourNodeQuad3d : invalid matTag for element: " << eleTag << "\n"; delete [] pType; return 0; } NDMaterial *theMaterial = OPS_GetNDMaterial(matTag); if (theMaterial == 0) { opserr << "WARNING material with tag " << matTag << "not found for element " << eleTag << endln; return 0; } if (numRemainingArgs == 12) { numData = 4; if (OPS_GetDoubleInput(&numData, &dData[1]) != 0) { opserr << "WARNING element FourNodeQuad3d : invalid optional args for element: " << eleTag << "\n"; delete [] pType; return 0; } } // now create the truss and add it to the Domain theEle = new FourNodeQuad3d(eleTag, iData[1], iData[2], iData[3], iData[4], *theMaterial, pType, dData[0], dData[1], dData[2], dData[3], dData[4]); if (theEle == 0) { opserr << "WARNING ran out of memory creating element with tag " << eleTag << endln; delete theMaterial; delete [] pType; return 0; } delete [] pType; return theEle; }
OPS_Export void * OPS_BeamContact2Dp(void) { if (num_BeamContact2Dp == 0) { num_BeamContact2Dp++; OPS_Error("BeamContact2Dp element - Written: C.McGann, P.Arduino, P.Mackenzie-Helnwein, U.Washington\n", 1); } // Pointer to an element that will be returned Element *theElement = 0; int numRemainingInputArgs = OPS_GetNumRemainingInputArgs(); if (numRemainingInputArgs < 7) { opserr << "Invalid #args, want: element BeamContact2Dp eleTag? iNode? jNode? slaveNode? matTag? width? penalty? <cSwitch>?\n"; return 0; } int iData[5]; double dData[2]; int icSwitch = 0; int numData = 5; if (OPS_GetIntInput(&numData, iData) != 0) { opserr << "WARNING invalid integer data: element BeamContact2Dp " << iData[0] << endln; return 0; } numData = 2; if (OPS_GetDoubleInput(&numData, dData) !=0) { opserr << "WARNING invalid data: element BeamContact2Dp " << iData[0] << endln; return 0; } int matID = iData[4]; NDMaterial *theMaterial = OPS_GetNDMaterial(matID); if (theMaterial == 0) { opserr << "WARNING element BeamContact2Dp " << iData[0] << endln; opserr << " Material: " << matID << "not found\n"; return 0; } numRemainingInputArgs -= 7; while (numRemainingInputArgs >= 1) { numData = 1; if (OPS_GetIntInput(&numData, &icSwitch) != 0) { opserr << "WARNING invalid initial contact flag: element BeamContact2Dp " << iData[0] << endln; return 0; } numRemainingInputArgs -= 1; } // Parsing was successful, allocate the element theElement = new BeamContact2Dp(iData[0], iData[1], iData[2], iData[3], *theMaterial, dData[0], dData[1], icSwitch); if (theElement == 0) { opserr << "WARNING could not create element of type BeamContact2Dp\n"; return 0; } return theElement; }
OPS_Export void * OPS_SSPquad(void) { if (num_SSPquad == 0) { num_SSPquad++; //OPS_Error("SSPquad element - Written: C.McGann, P.Arduino, P.Mackenzie-Helnwein, U.Washington\n", 1); } // Pointer to an element that will be returned Element *theElement = 0; int numRemainingInputArgs = OPS_GetNumRemainingInputArgs(); if (numRemainingInputArgs < 8) { opserr << "Invalid #args, want: element SSPquad eleTag? iNode? jNode? kNode? lNode? matTag? type? thickness? <b1? b2?>?\n"; return 0; } int iData[6]; char *theType; double dData[3]; dData[1] = 0.0; dData[2] = 0.0; int numData = 6; if (OPS_GetIntInput(&numData, iData) != 0) { opserr << "WARNING invalid integer data: element SSPquad " << iData[0] << endln; return 0; } if (OPS_GetStringCopy(&theType) != 0) { opserr << "WARNING invalid type, want: ""PlaneStress"" or ""PlaneStrain"" element SSPquad " << iData[0] << endln; return 0; } numData = 1; if (OPS_GetDoubleInput(&numData, dData) != 0) { opserr << "WARNING invalid thickness data: element SSPquad " << iData[0] << endln; return 0; } int matID = iData[5]; NDMaterial *theMaterial = OPS_GetNDMaterial(matID); if (theMaterial == 0) { opserr << "WARNING element SSPquad " << iData[0] << endln; opserr << " Material: " << matID << "not found\n"; return 0; } if (numRemainingInputArgs == 10) { numData = 2; if (OPS_GetDoubleInput(&numData, &dData[1]) != 0) { opserr << "WARNING invalid optional data: element SSPquad " << iData[0] << endln; return 0; } } // parsing was successful, allocate the element theElement = new SSPquad(iData[0], iData[1], iData[2], iData[3], iData[4], *theMaterial, theType, dData[0], dData[1], dData[2]); if (theElement == 0) { opserr << "WARNING could not create element of type SSPquad\n"; return 0; } return theElement; }
OPS_Export void * OPS_SSPquadUP(void) { if (num_SSPquadUP == 0) { num_SSPquadUP++; OPS_Error("SSPquadUP element - Written: C.McGann, P.Arduino, P.Mackenzie-Helnwein, U.Washington\n", 1); } // Pointer to an element that will be returned Element *theElement = 0; int numRemainingInputArgs = OPS_GetNumRemainingInputArgs(); if (numRemainingInputArgs < 13) { opserr << "Invalid #args, want: element SSPquadUP eleTag? iNode? jNode? kNode? lNode? matTag? t? fBulk? fDen? k1? k2? e? alpha? <b1? b2?>?\n"; return 0; } int iData[6]; double dData[9]; dData[7] = 0.0; dData[8] = 0.0; int numData = 6; if (OPS_GetIntInput(&numData, iData) != 0) { opserr << "WARNING invalid integer data: element SSPquadUP " << iData[0] << endln; return 0; } numData = 7; if (OPS_GetDoubleInput(&numData, dData) != 0) { opserr << "WARNING invalid double data: element SSPquadUP " << iData[0] << endln; return 0; } int matID = iData[5]; NDMaterial *theMaterial = OPS_GetNDMaterial(matID); if (theMaterial == 0) { opserr << "WARNING element SSPquadUP " << iData[0] << endln; opserr << " Material: " << matID << "not found\n"; return 0; } if (numRemainingInputArgs == 15) { numData = 2; if (OPS_GetDoubleInput(&numData, &dData[7]) != 0) { opserr << "WARNING invalid optional data: element SSPquadUP " << iData[0] << endln; return 0; } } // parsing was successful, allocate the element theElement = new SSPquadUP(iData[0], iData[1], iData[2], iData[3], iData[4], *theMaterial, dData[0], dData[1], dData[2], dData[3], dData[4], dData[5], dData[6], dData[7], dData[8]); if (theElement == 0) { opserr << "WARNING could not create element of type SSPquadUP\n"; return 0; } return theElement; }