128 RectangularQuadMesh<ELEMENT>(nx,ny,lx,ly)
131 unsigned n_node = nnode();
136 for(
unsigned i=0;i<n_node;i++)
138 node_pt(i)->xi(0) = node_pt(i)->x(0);
139 node_pt(i)->xi(1) = node_pt(i)->x(1);
147 unsigned n_position_type = finite_element_pt(0)->nnodal_position_type();
151 if(n_position_type > 1)
153 double xstep = (this->Xmax - this->Xmin)/((this->Np-1)*this->Nx);
154 double ystep = (this->Ymax - this->Ymin)/((this->Np-1)*this->Ny);
155 for(
unsigned n=0;n<n_node;n++)
158 node_pt(n)->xi_gen(1,0) = 0.5*xstep;
159 node_pt(n)->xi_gen(2,1) = 0.5*ystep;
170 GeomObject*
const &undeformed_midplane_pt)
173 unsigned n_node = nnode();
176 for(
unsigned n=0;n<n_node;n++)
179 Vector<double> xi(2);
180 xi[0] = node_pt(n)->xi(0);
181 xi[1] = node_pt(n)->xi(1);
185 DenseMatrix<double> a(2,3);
186 RankThreeTensor<double> dadxi(2,2,3);
189 undeformed_midplane_pt->d2position(xi,R,a,dadxi);
192 for(
unsigned i=0;i<3;i++)
195 node_pt(n)->x_gen(0,i) = R[i];
199 node_pt(n)->x_gen(1,i) = 0.5*a(0,i)*((this->Xmax - this->Xmin)/this->Nx);
200 node_pt(n)->x_gen(2,i) = 0.5*a(1,i)*((this->Ymax - this->Ymin)/this->Ny);
204 node_pt(n)->x_gen(3,i) = 0.25*dadxi(0,1,i);
256 const double &lx,
const double &ly)
259 Undeformed_midplane_pt =
new EllipticalTube(1.0,1.0);
265 mesh_pt()->assign_undeformed_positions(Undeformed_midplane_pt);
268 mesh_pt()->element_reorder();
271 unsigned n_ends = mesh_pt()->nboundary_node(1);
276 mesh_pt()->boundary_node_pt(1,
i)->pin_position(2);
277 mesh_pt()->boundary_node_pt(3,
i)->pin_position(2);
279 mesh_pt()->boundary_node_pt(1,
i)->pin_position(2,2);
280 mesh_pt()->boundary_node_pt(3,
i)->pin_position(2,2);
285 mesh_pt()->boundary_node_pt(1,
i)->pin_position(0);
286 mesh_pt()->boundary_node_pt(3,
i)->pin_position(0);
288 mesh_pt()->boundary_node_pt(1,
i)->pin_position(2,0);
289 mesh_pt()->boundary_node_pt(3,
i)->pin_position(2,0);
291 mesh_pt()->boundary_node_pt(1,
i)->pin_position(1);
292 mesh_pt()->boundary_node_pt(3,
i)->pin_position(1);
294 mesh_pt()->boundary_node_pt(1,
i)->pin_position(2,1);
295 mesh_pt()->boundary_node_pt(3,
i)->pin_position(2,1);
301 mesh_pt()->boundary_node_pt(1,
i)->pin_position(1,0);
302 mesh_pt()->boundary_node_pt(1,
i)->pin_position(1,1);
303 mesh_pt()->boundary_node_pt(3,
i)->pin_position(1,0);
304 mesh_pt()->boundary_node_pt(3,
i)->pin_position(1,1);
306 mesh_pt()->boundary_node_pt(1,
i)->pin_position(3,0);
307 mesh_pt()->boundary_node_pt(1,
i)->pin_position(3,1);
308 mesh_pt()->boundary_node_pt(3,
i)->pin_position(3,0);
309 mesh_pt()->boundary_node_pt(3,
i)->pin_position(3,1);
313 unsigned n_side = mesh_pt()->nboundary_node(0);
317 mesh_pt()->boundary_node_pt(0,
i)->pin_position(1);
319 mesh_pt()->boundary_node_pt(0,
i)->pin_position(1,1);
321 mesh_pt()->boundary_node_pt(0,
i)->pin_position(2,0);
322 mesh_pt()->boundary_node_pt(0,
i)->pin_position(2,2);
324 mesh_pt()->boundary_node_pt(0,
i)->pin_position(3,0);
325 mesh_pt()->boundary_node_pt(0,
i)->pin_position(3,2);
328 mesh_pt()->boundary_node_pt(2,
i)->pin_position(0);
330 mesh_pt()->boundary_node_pt(2,
i)->pin_position(1,0);
332 mesh_pt()->boundary_node_pt(2,
i)->pin_position(2,1);
333 mesh_pt()->boundary_node_pt(2,
i)->pin_position(2,2);
335 mesh_pt()->boundary_node_pt(2,
i)->pin_position(3,1);
336 mesh_pt()->boundary_node_pt(2,
i)->pin_position(3,2);
411 std::cout << std::endl;
412 std::cout <<
"Controlled element: " <<
nel_ctrl << std::endl;
413 std::cout <<
"Displacement control applied at xi = ("
414 <<
xi[0] <<
", " <<
xi[1] <<
")" << std::endl;
415 std::cout <<
"Corresponding to x = ("
416 <<
x[0] <<
", " <<
x[1] <<
", " <<
x[2] <<
")" << std::endl;
449 el_pt->undeformed_midplane_pt() = Undeformed_midplane_pt;
458 el_pt->pre_compute_d2shape_lagrangian_at_knots();
470 Trace_node_pt = mesh_pt()->finite_element_pt(2*
ny-1)->node_pt(3);
471 Trace_node2_pt = mesh_pt()->finite_element_pt(
ny)->node_pt(1);