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

Function OPS_doBlock2D

SRC/interpreter/OpenSeesElementCommands.cpp:893–1290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

891}
892
893int OPS_doBlock2D()
894{
895 int ndm = OPS_GetNDM();
896 int ndf = OPS_GetNDF();
897 Domain* theDomain = OPS_GetDomain();
898 if (theDomain == 0) return -1;
899
900 if (ndm < 2) {
901 opserr << "WARNING block2D numX? numY? startNode? startEle? eleType? eleArgs? coords?";
902 opserr << " : model dimension (ndm) must be at least 2 \n";
903 return -1;
904 }
905
906 if (OPS_GetNumRemainingInputArgs() < 7) {
907 opserr << "WARNING incorrect number of args :block2D numX? numY? startNode? startEle? eleType? eleArgs? coords?";
908 return -1;
909 }
910
911 // numX, numY, startNodeNum, startEleNum
912 int idata[4];
913 int numdata = 4;
914 if (OPS_GetIntInput(&numdata, idata) < 0) {
915 opserr << "WARNING invalid int inputs\n";
916 return -1;
917 }
918
919 // element type
920 const char* type = OPS_GetString();
921
922 // get args
923 const char* subtype = "";
924 double thick = 1.0;
925 int matTag=-1, secTag=-1;
926 int cArg = 6;
927 if (strcmp(type, "quad") == 0 || (strcmp(type,"stdQuad") == 0)) {
928 if (OPS_GetNumRemainingInputArgs() < 3) {
929 opserr<<"WARNING: want - thick, type, matTag\n";
930 return -1;
931 }
932 int numdata = 1;
933 if (OPS_GetDoubleInput(&numdata, &thick) < 0) {
934 opserr << "WARNING invalid thick\n";
935 return -1;
936 }
937 subtype = OPS_GetString();
938 if (OPS_GetIntInput(&numdata, &matTag) < 0) {
939 opserr << "WARNING invalid matTag\n";
940 return -1;
941 }
942 cArg = 9;
943
944 } else if (strcmp(type, "ShellMITC4") == 0 || strcmp(type, "shellMITC4") == 0 ||
945 strcmp(type, "shell") == 0 || strcmp(type, "Shell") == 0) {
946 if (OPS_GetNumRemainingInputArgs() < 1) {
947 opserr<<"WARNING: want - secTag\n";
948 return -1;
949 }
950 int numdata = 1;

Callers 2

Tcl_ops_block2dFunction · 0.85
Py_ops_block2dFunction · 0.85

Calls 14

OPS_GetNDMFunction · 0.70
OPS_GetNDFFunction · 0.70
OPS_GetDomainFunction · 0.70
OPS_GetIntInputFunction · 0.70
OPS_GetStringFunction · 0.70
OPS_GetDoubleInputFunction · 0.70
OPS_ResetCurrentInputArgFunction · 0.70
OPS_getNDMaterialFunction · 0.50
ZeroMethod · 0.45
getNodalCoordsMethod · 0.45

Tested by

no test coverage detected