tip_spine_mesh.h
Go to the documentation of this file.
1 //LIC// ====================================================================
2 //LIC// This file forms part of oomph-lib, the object-oriented,
3 //LIC// multi-physics finite-element library, available
4 //LIC// at http://www.oomph-lib.org.
5 //LIC//
6 //LIC// Copyright (C) 2006-2022 Matthias Heil and Andrew Hazel
7 //LIC//
8 //LIC// This library is free software; you can redistribute it and/or
9 //LIC// modify it under the terms of the GNU Lesser General Public
10 //LIC// License as published by the Free Software Foundation; either
11 //LIC// version 2.1 of the License, or (at your option) any later version.
12 //LIC//
13 //LIC// This library is distributed in the hope that it will be useful,
14 //LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
15 //LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 //LIC// Lesser General Public License for more details.
17 //LIC//
18 //LIC// You should have received a copy of the GNU Lesser General Public
19 //LIC// License along with this library; if not, write to the Free Software
20 //LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 //LIC// 02110-1301 USA.
22 //LIC//
23 //LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
24 //LIC//
25 //LIC//====================================================================
26 // ?????? ASK ANDREW
27 //#ifndef SINGLE_LAYER_SPINE_MESH_HEADER
28 //#define SINGLE_LAYER_SPINE_MESH_HEADER
29 
30 #ifndef MY_TIP_SPINE_MESH_HEADER
31 #define MY_TIP_SPINE_MESH_HEADER
32 
33 // oomph-lib includes
34 #include "generic/spines.h"
35 // This has been changed to make reference to my cubic mesh
36 //#include "meshes/simple_cubic_mesh.h"
37 
38 
39 using namespace oomph;
40 //======================================================================
45 // Rhe cilinder radius is radius
46 // The cilinder may be the part of an ellipe if (xmax - xmi)n noneq ro (zmax -zmin)
48 //======================================================================
49 template <class ELEMENT, class INTERFACE_ELEMENT>
50 class MyTipMesh : public SimpleCubicMesh<ELEMENT >,
51  public SpineMesh
52 {
53 
54 public:
55 
59  MyTipMesh(const unsigned &nx,
60  const unsigned &ny,
61  const unsigned &nz,
62  const double &x_min,
63  const double &x_max,
64  const double &y_min,
65  const double &y_max,
66  const double &z_min,
67  const double &z_max,
68  const double &R,
69  const unsigned &rotation_flag,
70  TimeStepper* time_stepper_pt=
72 
73 
75  FiniteElement* &interface_element_pt(const unsigned long &i)
76  {return Interface_element_pt[i];}
77 
79  unsigned long ninterface_element() const {return Interface_element_pt.size();}
80 
82  FiniteElement* &bulk_element_pt(const unsigned long &i)
83  {return Bulk_element_pt[i];}
84 
86  unsigned long nbulk() const {return Bulk_element_pt.size();}
87 
88 // Reurn radius of the canyon
89  double radius() {return Radius;}
90 
91 // Change radius
92  void change_radius(double R)
93  {
94  double scaled_R = R/(this->Zmax - this->Zmin);
95  if ( (scaled_R<0.95) && (scaled_R>0.05) )
96  Radius = R;
97  else
98  {
99  std::ostringstream error_stream;
100  error_stream
101  <<
102  "We can not constract so small elements so close to the origin\n"
103  <<"Choose a different radius (actual scaled radius = "<<scaled_R<<"\n";
104 
105  throw OomphLibError(error_stream.str(),
108  }
109  }
110 
111 
115 
116  virtual void spine_node_update(SpineNode* spine_node_pt)
117  {
118  //Get fraction along the spine
119  double W = spine_node_pt->fraction();
120  //Get spine height
121  double H = spine_node_pt->h();
122  //Get the position of the node at the origin
123  // SpineNode* origin_pt = dynamic_cast<SpineNode*>(spine_node_pt->spine_pt()->geom_data_pt(0));
124  Vector<double> origin_pt(3);
125  origin_pt[0] = spine_node_pt->spine_pt()->geom_parameter(0);
126  origin_pt[1] = spine_node_pt->spine_pt()->geom_parameter(1);
127  origin_pt[2] = spine_node_pt->spine_pt()->geom_parameter(2);
128 
129  //set scale norm vector
130  double norm = sqrt( (Xax - origin_pt[0] ) * (Xax - origin_pt[0] )+ (Yax - origin_pt[1] ) * (Yax - origin_pt[1] ) +
131  (Zax - origin_pt[2] ) * (Zax - origin_pt[2]) );
132 
133  //Set the x coordinate
134  spine_node_pt->x(0) = origin_pt[0] + H*W* (Xax - origin_pt[0] )/norm;
135 
136  //Set the y coordinate
137  spine_node_pt->x(1) = origin_pt[1] + H*W* (Yax - origin_pt[1] )/norm;
138 
139  //Set the value of z
140  spine_node_pt->x(2) = origin_pt[2] + H*W* (Zax - origin_pt[2] )/norm;
141 
142 
143 
144  }
145 
146 
147 //This function wull be called only at the begining for setting the initial spine appropiated for makeing the canyon shape
148 //We will send the node wich is in the inmovile face (origin of the spines)
149  double init_spine_height(SpineNode* spine_node_pt)
150  {
151 
152  //set distance to the axis
153  double daxis = sqrt( (this->Xax - spine_node_pt->x(0) ) *(this->Xax - spine_node_pt->x(0) )+(this->Yax - spine_node_pt->x(1) ) * (this->Yax - spine_node_pt->x(1))
154  + (this->Zax - spine_node_pt->x(2) ) * (this->Zax - spine_node_pt->x(2)) );
155  double init_h = ( daxis - radius() ) ;
156  return init_h;
157 
158  }
159 
160  //========================================================
171  //========================================================
172 
173 
175  {
176  //Clear vectors of pointers to the nodes and elements
177  Interface_element_pt.clear();
178  Node_pt.clear();
179  Element_pt.clear();
180  Spine_pt.clear();
181  }
182 
183 
184 
185 
186 protected:
187 
190 
193 
195  double Radius;
196 
199  virtual void build_single_layer_mesh(TimeStepper* time_stepper_pt);
200 
201 
202 //Point where the spines point to
203  double Xax;
204 
205  double Yax;
206 
207  double Zax;
208 
209 //Flag that indicates wheterher we must do a rotation before setting the spines
210 
211  unsigned Rotation_flag;
212 
213 };
214 
215 
216 
217 //#endif
218 
219 
220 //===========================================================================
228 
233 //===========================================================================
234 template<class ELEMENT, class INTERFACE_ELEMENT>
236  const unsigned &nx, const unsigned &ny, const unsigned &nz,
237  const double &x_min, const double &x_max, const double &y_min,
238  const double &y_max, const double &z_min, const double &z_max, const double &R, const unsigned &rotation_flag, TimeStepper* time_stepper_pt) :
239  SimpleCubicMesh<ELEMENT >(nx,ny,nz,x_min,x_max,y_min,y_max,z_min,z_max,
240  time_stepper_pt)
241 {
242 // Point to which all spines point
243  this->Xax = 0.0;
244 
245  this->Yax = 0.0;
246 
247  this->Zax = 1.0;
248 
249  this->Rotation_flag = rotation_flag;
250 
251 
252  change_radius(R);
253 
254 
255  // Periodic?
256 // MySimpleCubicQuadMesh<ELEMENT >::Xperiodic = false;
257 
258  // Now build the mesh:
259  build_single_layer_mesh(time_stepper_pt);
260 }
261 
262 //===========================================================================
265 //===========================================================================
266 template<class ELEMENT, class INTERFACE_ELEMENT>
268  TimeStepper* time_stepper_pt)
269 {
270 
271 // Set rotation
272  if(Rotation_flag == 1) //rotation around y--axis
273  for(unsigned i = 0;i< this->nnode();i++)
274  {
275  double x_node = this->node_pt(i)->x(0);
276  double z_node = this->node_pt(i)->x(2);
277  this->node_pt(i)->x(0) = -z_node +1.0;
278  this->node_pt(i)->x(2) = x_node;
279  }
280 
281  if(Rotation_flag == 2) //rotation around y--axis
282  for(unsigned i = 0;i< this->nnode();i++)
283  {
284  double y_node = this->node_pt(i)->x(1);
285  double z_node = this->node_pt(i)->x(2);
286  this->node_pt(i)->x(1) = z_node - 1.0;
287  this->node_pt(i)->x(2) = -y_node;
288  }
289 
290 //Read out the number of elements in the x-direction
291  unsigned n_x = this->Nx;
292  unsigned n_y = this->Ny;
293  unsigned n_z = this->Nz;
294 
295 
296 
297  //Set up the pointers to elements in the bulk
298  unsigned nbulk=nelement();
299  Bulk_element_pt.reserve(nbulk);
300  for(unsigned e=0;e<nbulk;e++)
301  {
302  Bulk_element_pt.push_back(this->finite_element_pt(e));
303  }
304 
305  //Allocate memory for the spines and fractions along spines
306  //---------------------------------------------------------
307 
308  //Read out number of linear points in the element
309  unsigned n_p = dynamic_cast<ELEMENT*>(finite_element_pt(0))->nnode_1d();
310 
311  //Allocate store for the spines: (different in the case of periodic meshes !!)
312  Spine_pt.reserve(((n_p-1)*n_x+1)*((n_p-1)*n_y+1));
313 
314 
315 // NOW WE GO THROUH ALL THE ELEMENTS OF THE LOWER LAYERS AND ATTACHING THE SPINES
316 
317 // FIRST ELEMENT: Element 0
318 
319 
320 
321 for(unsigned l1=0;l1<n_p;l1++) //y loop over the nodes
322 {
323  for(unsigned l2=0;l2<n_p;l2++) //x loop over the nodes
324  {
325 
326  //Node j + i*np
327 // Vector to the origin node, it will be passed as argument for the a later update of the spine
328  Vector<double> origin_node(3);
329  origin_node[0] = element_node_pt(0,l2+l1*n_p)->x(0);
330  origin_node[1] = element_node_pt(0,l2+l1*n_p)->x(1);
331  origin_node[2] = element_node_pt(0,l2+l1*n_p)->x(2);
332 
333  double hinit = init_spine_height( element_node_pt(0,l2+l1*n_p) );
334  //Assign the new spine within the cilinder
335 // Spine* new_spine_pt=new Spine( hinit,origin_node );
336  Spine* new_spine_pt=new Spine(hinit);
337  new_spine_pt->set_geom_parameter(origin_node);
338  Spine_pt.push_back(new_spine_pt);
339 
340  // Get pointer to node
341  SpineNode* nod_pt=element_node_pt(0,l2+l1*n_p); // Element 0; node j + i*n_p
342  //Set the pointer to the spine
343  nod_pt->spine_pt() = new_spine_pt;
344  //Set the fraction
345  nod_pt->fraction() = 0.0;
346  // Pointer to the mesh that implements the update fct
347  nod_pt->spine_mesh_pt() = this;
348 
349  //Loop vertically along the spine
350  //Loop over the elements
351  for(unsigned long k=0;k<n_z;k++)
352  {
353  //Add bottom spine to element (equal to the one defined before the for structure (for k=0) or the top of the last one)
354  //dynamic_cast<ELEMENT*>(Element_pt[k*n_x*n_y])->add_spine(new_spine_pt);
355 
356  //Loop over the vertical nodes, apart from the first
357  for(unsigned l3=1;l3<n_p;l3++)
358  {
359  // Get pointer to node
360  SpineNode* nod_pt=element_node_pt(k*n_x*n_y,l3*n_p*n_p+l2+l1*n_p);
361  //Set the pointer to the spine
362  nod_pt->spine_pt() = new_spine_pt;
363  //Set the fraction
364  nod_pt->fraction()=(double(k)+double(l3)/double(n_p-1))/double(n_z);
365  // Pointer to the mesh that implements the update fct
366  nod_pt->spine_mesh_pt() = this;
367  }
368  }
369 
370 
371  }
372 }
373 
374 
375 
376  //LOOP OVER OTHER ELEMENTS IN THE FIRST ROW
377  //-----------------------------------------
378 
379 // The procedure is the same but we have to identify the before defined spines for not defining them two times
380 
381 for(unsigned j=1;j<n_x;j++) //loop over the elements in the first row
382 {
383 
384  for(unsigned l1=0;l1<n_p;l1++) //y loop over the nodes
385  {
386 
387 
388  // First we copy the last row of nodes into the first row of the new element (and extend to the third dimension)
389  /*for(unsigned k=0;k<n_z;k++)
390  {
391  //Recover the Spine of the before defined element
392  Spine* old_spine = dynamic_cast<ELEMENT*>(Element_pt[k*n_x*n_y+j-1])->spine_pt(l1*n_p+n_p-1);
393  //Add before defined spine to element
394  dynamic_cast<ELEMENT*>(Element_pt[k*n_x*n_y+j])->add_spine(old_spine);
395  }*/
396 
397 
398  for(unsigned l2=1;l2<n_p;l2++) //x loop over the nodes
399  {
400 
401  //Node j + i*np
402  Vector<double> origin_node(3);
403  origin_node[0] = element_node_pt(j,l2+l1*n_p)->x(0);
404  origin_node[1] = element_node_pt(j,l2+l1*n_p)->x(1);
405  origin_node[2] = element_node_pt(j,l2+l1*n_p)->x(2);
406 
407  double hinit = init_spine_height( element_node_pt(j,l2+l1*n_p) );
408  //Assign the new spine
409  Spine* new_spine_pt=new Spine( hinit);
410  new_spine_pt->set_geom_parameter(origin_node);
411 
412  Spine_pt.push_back(new_spine_pt);
413 
414 
415  // Get pointer to node
416  SpineNode* nod_pt=element_node_pt(j,l2+l1*n_p); // Element j; node l2 + l1*n_p
417  //Set the pointer to the spine
418  nod_pt->spine_pt() = new_spine_pt;
419  //Set the fraction
420  nod_pt->fraction() = 0.0;
421  // Pointer to the mesh that implements the update fct
422  nod_pt->spine_mesh_pt() = this;
423 
424  //Loop vertically along the spine
425  //Loop over the elements
426  for(unsigned long k=0;k<n_z;k++)
427  {
428  //Add bottom spine to element (equal to the one defined before the for structure (for k=0) or the top of the last one)
429  //dynamic_cast<ELEMENT*>(Element_pt[j+k*n_x*n_y])->add_spine(new_spine_pt);
430  //Loop over the vertical nodes, apart from the first
431  for(unsigned l3=1;l3<n_p;l3++)
432  {
433  // Get pointer to node
434  SpineNode* nod_pt=element_node_pt(j+k*n_x*n_y,l3*n_p*n_p+l2+l1*n_p);
435  //Set the pointer to the spine
436  nod_pt->spine_pt() = new_spine_pt;
437  //Set the fraction
438  nod_pt->fraction()=(double(k)+double(l3)/double(n_p-1))/double(n_z);
439  // Pointer to the mesh that implements the update fct
440  nod_pt->spine_mesh_pt() = this;
441  }
442  }
443 
444 
445  }
446  }
447 }
448 
449 //REST OF THE ELEMENTS
450 // Now we loop over the rest of the elements. We will separe the first of each row being al the rest equal
451 
452 
453 
454 for(unsigned long i=1;i<n_y;i++)
455 {
456 //FIRST ELEMENT OF THE ROW
457 
458  //First line of nodes is copied from the element of the bottom
459 
460 /* for(unsigned l2=0;l2<n_p;l2++)
461  {
462 
463  for(unsigned long k=0;k<n_z;k++)
464  {
465  //Recover the Spine of the before defined element
466  Spine* old_spine = dynamic_cast<ELEMENT*>(Element_pt[k*n_x*n_y+(i-1)*n_x])->spine_pt(n_p*(n_p-1)+l2);
467  //Add before defined spine to element
468  dynamic_cast<ELEMENT*>(Element_pt[i*n_x+k*n_x*n_y])->add_spine(old_spine);
469  }
470 
471  }*/
472 
473 
474 
475  for(unsigned l1=1;l1<n_p;l1++) //y loop over the nodes
476  {
477 
478  for(unsigned l2=0;l2<n_p;l2++) //x loop over the nodes
479  {
480 
481  //Node j + i*np
482  Vector<double> origin_node(3);
483  origin_node[0] = element_node_pt(i*n_x,l2+l1*n_p)->x(0);
484  origin_node[1] = element_node_pt(i*n_x,l2+l1*n_p)->x(1);
485  origin_node[2] = element_node_pt(i*n_x,l2+l1*n_p)->x(2);
486 
487  double hinit = init_spine_height( element_node_pt(i*n_x,l2+l1*n_p) );
488  //Assign the new spine
489  Spine* new_spine_pt= new Spine( hinit);
490  new_spine_pt->set_geom_parameter(origin_node);
491 
492 
493  Spine_pt.push_back(new_spine_pt);
494 
495 
496  // Get pointer to node
497  SpineNode* nod_pt=element_node_pt(i*n_x,l2+l1*n_p); // Element i*n_x; node l2 + l1*n_p
498  //Set the pointer to the spine
499  nod_pt->spine_pt() = new_spine_pt;
500  //Set the fraction
501  nod_pt->fraction() = 0.0;
502  // Pointer to the mesh that implements the update fct
503  nod_pt->spine_mesh_pt() = this;
504 
505  //Loop vertically along the spine
506  //Loop over the elements
507  for(unsigned long k=0;k<n_z;k++)
508  {
509  //Add bottom spine to element (equal to the one defined before the for structure (for k=0) or the top of the last one)
510  // dynamic_cast<ELEMENT*>(Element_pt[i*n_x+k*n_x*n_y])->add_spine(new_spine_pt);
511  //Loop over the vertical nodes, apart from the first
512  for(unsigned l3=1;l3<n_p;l3++)
513  {
514  // Get pointer to node
515  SpineNode* nod_pt=element_node_pt(i*n_x+k*n_x*n_y,l3*n_p*n_p+l2+l1*n_p);
516  //Set the pointer to the spine
517  nod_pt->spine_pt() = new_spine_pt;
518  //Set the fraction
519  nod_pt->fraction()=(double(k)+double(l3)/double(n_p-1))/double(n_z);
520  // Pointer to the mesh that implements the update fct
521  nod_pt->spine_mesh_pt() = this;
522  }
523  }
524 
525 
526  }
527  }
528 
529 
530 
531 
532 
533  // REST OF THE ELEMENTS OF THE ROW
534  for(unsigned j=1;j<n_x;j++)
535  {
536 
537 
538 //First line of nodes is copied from the element of the bottom
539 /* for(unsigned l2=0;l2<n_p;l2++)
540  {
541 
542  for(unsigned long k=0;k<n_z;k++)
543  {
544  //Recover the Spine of the before defined element
545  Spine* old_spine = dynamic_cast<ELEMENT*>(Element_pt[k*n_x*n_y+(i-1)*n_x+j])->spine_pt(n_p*(n_p-1)+l2);
546  //Add before defined spine to element
547  dynamic_cast<ELEMENT*>(Element_pt[i*n_x+k*n_x*n_y+j])->add_spine(old_spine);
548  }
549 
550  }*/
551 
552 
553 
554  for(unsigned l1=1;l1<n_p;l1++) //y loop over the nodes
555  {
556 
557  // First we copy the last row of nodes into the first row of the new element (and extend to the third dimension)
558  /* for(unsigned long k=0;k<n_z;k++)
559  {
560  //Recover the Spine of the before defined element
561  Spine* old_spine = dynamic_cast<ELEMENT*>(Element_pt[k*n_x*n_y+(j-1)+i*n_x])->spine_pt(l1*n_p+n_p-1);
562  //Add before defined spine to element
563  dynamic_cast<ELEMENT*>(Element_pt[k*n_x*n_y+j+i*n_x])->add_spine(old_spine);
564  }*/
565 
566  for(unsigned l2=1;l2<n_p;l2++) //x loop over the nodes
567  {
568 
569  //Node j + i*np
570  Vector<double> origin_node(3);
571  origin_node[0] = element_node_pt(j+i*n_x,l2+l1*n_p)->x(0);
572  origin_node[1] = element_node_pt(j+i*n_x,l2+l1*n_p)->x(1);
573  origin_node[2] = element_node_pt(j+i*n_x,l2+l1*n_p)->x(2);
574  double hinit = init_spine_height( element_node_pt(j+i*n_x,l2+l1*n_p) );
575 
576  //Assign the new spine with radius as unit length
577  Spine* new_spine_pt=new Spine( hinit);
578  new_spine_pt->set_geom_parameter(origin_node);
579 
580 
581  Spine_pt.push_back(new_spine_pt);
582 
583 
584  // Get pointer to node
585  SpineNode* nod_pt=element_node_pt(j+i*n_x,l2+l1*n_p); // Element j + i*n_x; node l2 + l1*n_p
586  //Set the pointer to the spine
587  nod_pt->spine_pt() = new_spine_pt;
588  //Set the fraction
589  nod_pt->fraction() = 0.0;
590  // Pointer to the mesh that implements the update fct
591  nod_pt->spine_mesh_pt() = this;
592 
593  //Loop vertically along the spine
594  //Loop over the elements
595  for(unsigned long k=0;k<n_z;k++)
596  {
597  //Add bottom spine to element (equal to the one defined before the for structure (for k=0) or the top of the last one)
598  //dynamic_cast<ELEMENT*>(Element_pt[j+i*n_x+k*n_x*n_y])->add_spine(new_spine_pt);
599  //Loop over the vertical nodes, apart from the first
600  for(unsigned l3=1;l3<n_p;l3++)
601  {
602  // Get pointer to node
603  SpineNode* nod_pt=element_node_pt(j+i*n_x+k*n_x*n_y,l3*n_p*n_p+l2+l1*n_p);
604  //Set the pointer to the spine
605  nod_pt->spine_pt() = new_spine_pt;
606  //Set the fraction
607  nod_pt->fraction()=(double(k)+double(l3)/double(n_p-1))/double(n_z);
608  // Pointer to the mesh that implements the update fct
609  nod_pt->spine_mesh_pt() = this;
610  }
611  }
612 
613 
614  }
615  }
616 
617  }
618 
619 
620 }
621 
622 
623 
624 
625 
626 
627  //Assign the 2D Line elements
628  //---------------------------
629 
630  //Get the present number of elements
631  unsigned long element_count = Element_pt.size();
632 
633  //Loop over the elements on the plane
634  for(unsigned l1=0;l1<n_y;l1++)
635  for(unsigned l2=0;l2<n_x;l2++)
636  {
637  {
638  //Construct a new 2D surface element on the face on which the local
639  //coordinate 2 is fixed at its max. value (1)
640  FiniteElement *interface_element_element_pt =
641  new INTERFACE_ELEMENT(finite_element_pt(n_x*n_y*(n_z-1)+l2+l1*n_x),3);
642 
643 
644  //Push it back onto the stack
645  Element_pt.push_back(interface_element_element_pt);
646 
647  //Push it back onto the stack of interface elements
648  Interface_element_pt.push_back(interface_element_element_pt);
649 
650  //Now assign the spines to the elements
651  /*for(unsigned i=0;i<n_p;i++) // y coordinate loop
652  {
653  for(unsigned j=0;j<n_p;j++) // x coordinate loop
654  {
655  //Push the spines back onto the stack
656  dynamic_cast<INTERFACE_ELEMENT*>
657  (Element_pt[element_count])->
658  add_spine(element_node_pt(n_x*n_y*(n_z-1)+l2+l1*n_x,n_p*n_p*(n_p-1)+j+i*n_p)->spine_pt());
659  }
660  }*/
661  element_count++;
662  }
663  }
664 
665 // We update all nodes
666 this->node_update();
667 
668 }
669 
670 /* WE WILL NOT USE REORDER AT THIS POINT
671 //======================================================================
674 //======================================================================
675 template <class ELEMENT, class INTERFACE_ELEMENT>
676 void SingleLayerSpineMesh<ELEMENT,INTERFACE_ELEMENT>::element_reorder()
677 {
678 
679  unsigned n_x = this->Nx;
680  unsigned n_y = this->Ny;
681  //Find out how many elements there are
682  unsigned long Nelement = nelement();
683  //Find out how many fluid elements there are
684  unsigned long Nfluid = n_x*n_y;
685  //Create a dummy array of elements
686  Vector<FiniteElement *> dummy;
687 
688  //Loop over the elements in horizontal order
689  for(unsigned long j=0;j<n_x;j++)
690  {
691  //Loop over the elements in lower layer vertically
692  for(unsigned long i=0;i<n_y;i++)
693  {
694  //Push back onto the new stack
695  dummy.push_back(finite_element_pt(n_x*i + j));
696  }
697 
698  //Push back the line element onto the stack
699  dummy.push_back(finite_element_pt(Nfluid+j));
700  }
701 
702  //Now copy the reordered elements into the element_pt
703  for(unsigned long e=0;e<Nelement;e++)
704  {
705  Element_pt[e] = dummy[e];
706  }
707 
708 }
709 */
710 #endif
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Array< double, 1, 3 > e(1./3., 0.5, 2.)
MatrixXf H
Definition: HessenbergDecomposition_matrixH.cpp:4
@ R
Definition: StatisticsVector.h:21
coincides with the numeration of the spines
Definition: tip_spine_mesh.h:52
virtual void build_single_layer_mesh(TimeStepper *time_stepper_pt)
Definition: tip_spine_mesh.h:267
MyTipMesh(const unsigned &nx, const unsigned &ny, const unsigned &nz, const double &x_min, const double &x_max, const double &y_min, const double &y_max, const double &z_min, const double &z_max, const double &R, const unsigned &rotation_flag, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: tip_spine_mesh.h:235
double init_spine_height(SpineNode *spine_node_pt)
Definition: tip_spine_mesh.h:149
Vector< FiniteElement * > Interface_element_pt
Vector of pointers to interface elements.
Definition: tip_spine_mesh.h:192
virtual void spine_node_update(SpineNode *spine_node_pt)
Definition: tip_spine_mesh.h:116
double Yax
Definition: tip_spine_mesh.h:205
void change_radius(double R)
Definition: tip_spine_mesh.h:92
unsigned long nbulk() const
Number of elements in bulk.
Definition: tip_spine_mesh.h:86
unsigned long ninterface_element() const
Number of elements on interface.
Definition: tip_spine_mesh.h:79
double Zax
Definition: tip_spine_mesh.h:207
double Radius
Sacled radius of the canyon (must be between 0 and one.
Definition: tip_spine_mesh.h:195
FiniteElement *& interface_element_pt(const unsigned long &i)
Access functions for pointers to interface elements.
Definition: tip_spine_mesh.h:75
double Xax
Definition: tip_spine_mesh.h:203
unsigned Rotation_flag
Definition: tip_spine_mesh.h:211
Vector< FiniteElement * > Bulk_element_pt
Vector of pointers to element in the fluid layer.
Definition: tip_spine_mesh.h:189
double radius()
Definition: tip_spine_mesh.h:89
void flush_spine_element_and_node_storage()
Definition: tip_spine_mesh.h:174
FiniteElement *& bulk_element_pt(const unsigned long &i)
Access functions for pointers to elements in bulk.
Definition: tip_spine_mesh.h:82
Definition: elements.h:1313
static Steady< 0 > Default_TimeStepper
The Steady Timestepper.
Definition: mesh.h:75
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
Definition: oomph_definitions.h:222
Simple cubic 3D Brick mesh class.
Definition: simple_cubic_mesh.template.h:47
Definition: spines.h:613
Definition: spines.h:328
double & h()
Access function to spine height.
Definition: spines.h:397
SpineMesh *& spine_mesh_pt()
Definition: spines.h:391
Spine *& spine_pt()
Access function to spine.
Definition: spines.h:372
double & fraction()
Set reference to fraction along spine.
Definition: spines.h:378
Definition: spines.h:64
void set_geom_parameter(const Vector< double > &geom_parameter)
Definition: spines.h:273
double & geom_parameter(const unsigned &i)
Definition: spines.h:287
Definition: timesteppers.h:231
char char char int int * k
Definition: level2_impl.h:374
unsigned Nx
Number of elements in each direction (used by SimpleCubicMesh)
Definition: structured_cubic_point_source.cc:114
unsigned Ny
Definition: structured_cubic_point_source.cc:115
double Zmin
Set up min z coordinate.
Definition: axisym_linear_elasticity/cylinder/cylinder.cc:74
unsigned Nz
Number of elements in z-direction.
Definition: axisym_linear_elasticity/cylinder/cylinder.cc:62
double Zmax
Set up max z coordinate.
Definition: axisym_linear_elasticity/cylinder/cylinder.cc:80
double Radius
Radius of the pipe.
Definition: pipe.cc:55
const unsigned nz
Definition: ConstraintElementsUnitTest.cpp:32
const unsigned nx
Definition: ConstraintElementsUnitTest.cpp:30
const unsigned ny
Definition: ConstraintElementsUnitTest.cpp:31
radius
Definition: UniformPSDSelfTest.py:15
@ W
Definition: quadtree.h:63
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2