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

Function OPS_PML3D

SRC/element/PML/PML3D.cpp:57–91  ·  view source on GitHub ↗

======================================================================= PML3D element tcl command =======================================================================

Source from the content-addressed store, hash-verified

55// PML3D element tcl command
56// =======================================================================
57void* 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

Callers 1

TclCommand_addElementFunction · 0.85

Calls 3

OPS_GetIntInputFunction · 0.50
OPS_GetDoubleInputFunction · 0.50

Tested by

no test coverage detected