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

Method buildInterface

SRC/modelbuilder/PartitionedQuick2dFrame.cpp:76–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76int
77PartitionedQuick2dFrame::buildInterface(int numSubdomains)
78{
79
80 Domain *theDomain = this->getDomainPtr();
81 if (theDomain == 0) {
82 opserr << "FATAL:PlaneFrame::buildModel(void) -";
83 opserr << " no associated domain.\n";
84 exit(-1);
85 return -1;
86 }
87
88 if (numSubdomains == 0) {
89 opserr << "FATAL:PlaneFrame::buildModel(void) -";
90 opserr << " numSubdomains = 0\n";
91 exit(-1);
92 return -2;
93 }
94
95 /*
96 * Read in the Nodal Data
97 */
98 int i,j;
99 double LL_x, LL_y, UR_x, UR_y, DIV_x, DIV_y, CURR_y, CURR_x;
100 int NO_x, NO_y;
101 LL_x = 0;
102 LL_y = 0;
103 UR_x = 1;
104 UR_y = 2;
105
106 NO_x = numX + 1;
107 NO_y = numY + 1;
108 numNode = NO_x * NO_y;
109 numSPs = NO_x;
110 int numLoads = NO_y-1;
111 numLCs = 1;
112
113 DIV_x = (UR_x - LL_x) / (NO_x - 1);
114 DIV_y = (UR_y - LL_y) / (NO_y - 1);
115 CURR_y = LL_y;
116
117 int numSubstructureStories = numY / numSubdomains;
118
119 DIV_y *= numSubstructureStories;
120 LL_y += DIV_y;
121 int ok;
122 int nodeNum = 1 + NO_x*numSubstructureStories;
123
124 for (i=1; i<numSubdomains; i++) {
125 CURR_x = LL_x;
126
127 for (j=0; j<NO_x; j++) {
128
129 Node *nodePtr = new Node(nodeNum,3,CURR_x,CURR_y);
130 if (nodePtr != 0) {
131 ok = theDomain->addNode(nodePtr);
132 if (ok < 0) {
133 opserr << "PartitionedQuick2dFrame::PartitionedQuick2dFrame::Input ";

Callers 1

buildFE_ModelMethod · 0.80

Calls 4

exitFunction · 0.85
getDomainPtrMethod · 0.45
addNodeMethod · 0.45
addNodalLoadMethod · 0.45

Tested by

no test coverage detected