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

Method buildSubdomain

SRC/modelbuilder/PartitionedQuick2dFrame.cpp:189–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187
188
189int
190PartitionedQuick2dFrame::buildSubdomain(int subdomain,
191 int numSubdomains,
192 Subdomain &theSubdomain)
193{
194 subdomain--; // assumes subdomains labelled 0 through NSub-1 in rest of this
195
196 int numSect, numMat, numLoads;
197 int i,j;
198
199 int x_rst,y_rst,theta_rst;
200 float x_ld, y_ld, theta_ld;
201
202 numSect = 2;
203 numMat = 2;
204
205 /*
206 * Allocate Space for all the variables
207 */
208 int SectDat = 2; // A, I
209 int MatDat = 1; // E
210
211 Vector Sections(numSect*SectDat);
212 Vector Materials(numMat*MatDat);
213
214 /*
215 * Set the Sections Data & Material Data
216 */
217
218
219 for (i=0; i<numSect; i++) {
220 Sections(i*SectDat) = 1; Sections(i*SectDat+1) = 1;
221 }
222
223 for (i=0; i<numMat; i++) {
224 Materials(i*MatDat) = 1;
225 }
226
227 /*
228 * Read in the Nodal Data
229 */
230 double LL_x, LL_y, UR_x, UR_y, DIV_x, DIV_y, CURR_y, CURR_x;
231 int NO_x, NO_y;
232 LL_x = 0;
233 LL_y = 0;
234 UR_x = 1;
235 UR_y = 2;
236
237 NO_x = numX + 1;
238 NO_y = numY + 1;
239 numNode = NO_x * NO_y;
240 numSPs = NO_x;
241 numLoads = NO_y-1;
242 numLCs = 1;
243
244 DIV_x = (UR_x - LL_x) / (NO_x - 1);
245 DIV_y = (UR_y - LL_y) / (NO_y - 1);
246 CURR_y = LL_y;

Callers 1

buildFE_ModelMethod · 0.80

Calls 5

addExternalNodeMethod · 0.45
addNodeMethod · 0.45
addElementMethod · 0.45
addSP_ConstraintMethod · 0.45
addNodalLoadMethod · 0.45

Tested by

no test coverage detected