30 #ifndef OOMPH_CIRCULAR_SHELL_MESH_TEMPLATE_CC    31 #define OOMPH_CIRCULAR_SHELL_MESH_TEMPLATE_CC    46  template <
class ELEMENT>
    55   MeshChecker::assert_geometric_element<QElementGeometricBase,ELEMENT>(2);
    58   unsigned n_node = nnode();
    63   for(
unsigned i=0;i<n_node;i++)
    65     node_pt(i)->xi(0) = scaled_x(node_pt(i)->x(0));
    66     node_pt(i)->xi(1) = node_pt(i)->x(1);
    74   std::map<Node*,double> min_dx;
    75   unsigned nnod=nnode();
    76   for (
unsigned j=0;j<nnod;j++) min_dx[node_pt(j)]=DBL_MAX;
    79   unsigned nelem=nelement();  
    80   for (
unsigned e=0;e<nelem;e++)
    82     ELEMENT* el_pt=
dynamic_cast<ELEMENT*
>(element_pt(e));
    83     unsigned n_node=el_pt->nnode();
    84     for(
unsigned j=0;j<n_node;j++)
    86       SolidNode* nod_pt=
dynamic_cast<SolidNode*
>(el_pt->node_pt(j));
    87       double x=nod_pt->xi(0);
    88       for(
unsigned k=0;k<n_node;k++)
    90         double dx=fabs(x-dynamic_cast<SolidNode*>(el_pt->node_pt(k))->xi(0));
    91         if (dx<min_dx[nod_pt])
    93           if (dx!=0.0) min_dx[nod_pt]=dx;
   104  unsigned n_position_type = finite_element_pt(0)->nnodal_position_type();
   108  if(n_position_type > 1)
   111    double xstep = (this->Xmax - this->Xmin)/((this->Np-1)*this->Nx);
   112    double ystep = (this->Ymax - this->Ymin)/((this->Np-1)*this->Ny);
   115    for(
unsigned j=0;j<n_node;j++)
   117      SolidNode* nod_pt=node_pt(j);
   120      xstep=min_dx[nod_pt];
   123      nod_pt->xi_gen(1,0) = 0.5*xstep;
   124      nod_pt->xi_gen(2,1) = 0.5*ystep;
   135 template <
class ELEMENT>
   141  unsigned nelem=nelement();  
   142  for (
unsigned e=0;e<nelem;e++)
   144    ELEMENT* el_pt=
dynamic_cast<ELEMENT*
>(element_pt(e));
   145    unsigned n_node=el_pt->nnode();
   146    for(
unsigned n=0;n<n_node;n++)
   149      Vector<double> xi(2);
   150      xi[0] = 
dynamic_cast<SolidNode*
>(el_pt->node_pt(n))->xi(0);
   151      xi[1] = 
dynamic_cast<SolidNode*
>(el_pt->node_pt(n))->xi(1);
   155      DenseMatrix<double> a(2,3);
   156      RankThreeTensor<double>  dadxi(2,2,3);
   159      undeformed_midplane_pt->d2position(xi,R,a,dadxi);
   163      DenseMatrix<double> dxids(2,2);
   165      el_pt->local_coordinate_of_node(n,s);
   166      el_pt->interpolated_dxids(s,dxids);
   167      double dxds=dxids(0,0);
   170      for(
unsigned i=0;i<3;i++)
   173        el_pt->node_pt(n)->x_gen(0,i) = R[i];
   176        el_pt->node_pt(n)->x_gen(1,i)=a(0,i)*dxds;             
   177        el_pt->node_pt(n)->x_gen(2,i)=
   178         0.5*a(1,i)*((this->Ymax-this->Ymin)/this->Ny);
   181        el_pt->node_pt(n)->x_gen(3,i) = 0.0; 
   184        if (dadxi(0,1,i)!=0.0)
   187          std::ostringstream error_stream;
   189           << 
"Undef. GeomObject for this shell mesh should not be warped!\n"   190           << 
"It may be possible to generalise the mesh generator to \n"   191           << 
"deal with this case -- feel free to have a go...\n";
   194           OOMPH_CURRENT_FUNCTION,
   195           OOMPH_EXCEPTION_LOCATION);
 
void build_mesh(const unsigned &nx, const unsigned &ny, const double &lx, const double &ly)
Mesh build helper fct. 
 
void assign_undeformed_positions(GeomObject *const &undeformed_midplane_pt)
In all elastic problems, the nodes must be assigned an undeformed, or reference, position, corresponding to the stress-free state of the elastic body. This function assigns the undeformed position for the nodes on the elastic tube.