======================================================================= PML3D element tcl command =======================================================================
| 55 | // PML3D element tcl command |
| 56 | // ======================================================================= |
| 57 | void* OPS_PML3D() |
| 58 | { |
| 59 | // check if the total number of arguments passed is correct |
| 60 | if (OPS_GetNumRemainingInputArgs() < (9 + PML3D_NUM_PROPS + 3)) { |
| 61 | opserr << "WARNING insufficient arguments\n"; |
| 62 | opserr << "Want: element PML3D eleTag? [8 integer nodeTags] [PML3D_NUM_PARAMS material properties]\n"; |
| 63 | return 0; |
| 64 | } |
| 65 | |
| 66 | // reading element tag and node numbers |
| 67 | int idata[9]; |
| 68 | int num = 9; |
| 69 | if (OPS_GetIntInput(&num, idata) < 0) { |
| 70 | opserr << "WARNING: invalid integer data : could be the tag or the node numbers \n"; |
| 71 | return 0; |
| 72 | } |
| 73 | |
| 74 | // reading Newmark parameters |
| 75 | double Newmark[3]; |
| 76 | num = 3; |
| 77 | if (OPS_GetDoubleInput(&num, Newmark) < 0) { |
| 78 | opserr << "WARNING: invalid double data: could be Newmark parameters\n"; |
| 79 | return 0; |
| 80 | } |
| 81 | |
| 82 | // reading material properties |
| 83 | double dData[PML3D_NUM_PROPS]; num = PML3D_NUM_PROPS; |
| 84 | if (OPS_GetDoubleInput(&num, dData) < 0) { |
| 85 | opserr << "WARNING: invalid double data\n"; |
| 86 | return 0; |
| 87 | } |
| 88 | |
| 89 | // create a new PML3D element and add it to the Domain |
| 90 | return new PML3D(idata[0], &idata[1], Newmark, dData); |
| 91 | } |
| 92 | |
| 93 | // ======================================================================= |
| 94 | // static data |
no test coverage detected