comb_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 COMB_TIP_MESH_HEADER
31 #define COMB_TIP_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 #include "tip_spine_mesh.h"
39 
40 //#include "my_spine_mesh.h"
41 
42 using namespace oomph;
43 
44 //======================================================================
49 // *****We do not introduce periodic meshes at this point beacause we should change the complete bulk mesh*******
51 // and a surface layer of corresponding Spine interface elements,
57 //======================================================================
58 
59 
60 template <class ELEMENT, class INTERFACE_ELEMENT>
62 {
63 
64 public:
65 
68 // to the elements in each direction of each cubic mesh
69 
70 
71  CombTipSpineMesh(const unsigned int &nel, const double &alpha, const double &length, const double &height, const double &radius, const unsigned &flag,
72  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper);
73 
74 
76  FiniteElement* &interface_element_pt(const unsigned long &i)
77  {return Interface_element_pt[i];}
78 
80 
81  unsigned long ninterface_element() const {return Interface_element_pt.size();}
82 
84  FiniteElement* &bulk_element_pt(const unsigned long &i)
85  {return Bulk_element_pt[i];}
86 
87 
89  unsigned long nbulk() const {return Bulk_element_pt.size();}
90 
91 
92 
94  {
95  //Clear vectors of pointers to the nodes and elements
96  Node_pt.clear();
97  Bulk_element_pt.clear();
98  Interface_element_pt.clear();
99  Element_pt.clear();
100  Spine_pt.clear();
101  }
102 
103 
104 
105 
106 
110 
111 /* virtual void spine_node_update(SpineNode* spine_node_pt)
112  {
113  //Get fraction along the spine
114  double W = spine_node_pt->fraction();
115  //Get spine height
116  double H = spine_node_pt->h();
117 
118  //Set the value of z
119  spine_node_pt->x(2) = 0.0 + W*H;
120  }*/
121 
122  virtual void spine_node_update(SpineNode* spine_node_pt)
123  {
124  //Get fraction along the spine
125  double W = spine_node_pt->fraction();
126  //Get spine height
127  double H = spine_node_pt->h();
128  //Get the position of the node at the origin
129  // SpineNode* origin_pt = dynamic_cast<SpineNode*>(spine_node_pt->spine_pt()->geom_data_pt(0));
130  Vector<double> origin_pt(3);
131  origin_pt[0] = spine_node_pt->spine_pt()->geom_parameter(0);
132  origin_pt[1] = spine_node_pt->spine_pt()->geom_parameter(1);
133  origin_pt[2] = spine_node_pt->spine_pt()->geom_parameter(2);
134 
135  //set scale norm vector
136  double norm = sqrt( (Xax - origin_pt[0] ) * (Xax - origin_pt[0] )+ (Yax - origin_pt[1] ) * (Yax - origin_pt[1] ) +
137  (Zax - origin_pt[2] ) * (Zax - origin_pt[2]) );
138 
139  //Set the x coordinate
140  spine_node_pt->x(0) = origin_pt[0] + H*W* (Xax - origin_pt[0] )/norm;
141 
142  //Set the y coordinate
143  spine_node_pt->x(1) = origin_pt[1] + H*W* (Yax - origin_pt[1] )/norm;
144 
145  //Set the value of z
146  spine_node_pt->x(2) = origin_pt[2] + H*W* (Zax - origin_pt[2] )/norm;
147 
148 
149  }
150 
151 protected:
152 
153  //Number of elements (Nx = Ny = Nel, Nz = 2*Nel)
154  unsigned int Nel;
155 
157  double Alpha;
158  double Length;
159  double Height;
160  double Radius;
161  unsigned Flag;
162 
164  double Xax;
165  double Yax;
166  double Zax;
167 
168 
171 
174 
175 
176 // Rotation functions
177  void rotate_90_zeq1_xeq0( SpineMesh* rot_mesh_pt)
178  {
179  unsigned long nnode = rot_mesh_pt->nnode();
180  for(unsigned long i = 0; i<nnode;i++)
181  {
182  Node* node_pt = rot_mesh_pt->node_pt(i);
183  double x_node = node_pt->x(0);
184  double z_node = node_pt->x(2);
185  node_pt->x(0) = 1.0 - z_node;
186  node_pt->x(2) = 1.0 + x_node;
187  }
188 
189 
190 // We rotate as well the geometric parameters which were originally set as the coordinate of the node at the origin of the spine
191  unsigned long nspines = rot_mesh_pt->nspine();
192  for(unsigned long i = 0; i<nspines;i++)
193  {
194  Spine* spine_pt = rot_mesh_pt->spine_pt(i);
195  double x_spine = spine_pt->geom_parameter(0);
196  double z_spine = spine_pt->geom_parameter(2);
197  spine_pt->geom_parameter(0) = 1.0 - z_spine;
198  spine_pt->geom_parameter(2) = 1.0 + x_spine;
199  }
200 
201  //we update again the nodes
202  rot_mesh_pt->node_update();
203  }
204 
205 
206 
207  void rotate_90_zeq1_yeq0( SpineMesh* rot_mesh_pt)
208  {
209  unsigned long nnode = rot_mesh_pt->nnode();
210  for(unsigned long i = 0; i<nnode;i++)
211  {
212  Node* node_pt = rot_mesh_pt->node_pt(i);
213  double y_node = node_pt->x(1);
214  double z_node = node_pt->x(2);
215  node_pt->x(1) = -1.0 + z_node;
216  node_pt->x(2) = 1.0 - y_node;
217  }
218 
219  // We rotate as well the geometric parameters which were originally set as the coordinate of the node at the origin of the spine
220 
221  unsigned long nspines = rot_mesh_pt->nspine();
222  for(unsigned long i = 0; i<nspines;i++)
223  {
224  Spine* spine_pt = rot_mesh_pt->spine_pt(i);
225  double y_spine = spine_pt->geom_parameter(1);
226  double z_spine = spine_pt->geom_parameter(2);
227  spine_pt->geom_parameter(1) = -1.0 + z_spine;
228  spine_pt->geom_parameter(2) = 1.0 - y_spine;
229  }
230 
231  //we update again the nodes
232  rot_mesh_pt->node_update();
233  }
234 
235 
236 
239  virtual void build_single_layer_mesh(TimeStepper* time_stepper_pt);
240 
241 
242  void add_side_spinemesh(unsigned int bound1, MyTipMesh<ELEMENT,INTERFACE_ELEMENT > *addmesh_pt,int *addmesh_map_boundary, int total_boundaries, unsigned flag);
243 
244  void change_boundaries(Mesh *pt_mesh,unsigned int oldbound, unsigned int newbound, unsigned int total_boundaries);
245 };
246 
247 
248 
249 //===========================================================================
254 
255 //===========================================================================
256 template<class ELEMENT, class INTERFACE_ELEMENT>
257 CombTipSpineMesh<ELEMENT, INTERFACE_ELEMENT>::CombTipSpineMesh(const unsigned int &nel, const double &alpha, const double &length, const double &height, const double &radius,
258  const unsigned &flag,TimeStepper* time_stepper_pt):
259  Nel(nel), Alpha(alpha), Length(length), Height(height), Radius(radius), Flag(flag)
260 {
261  // We've called the "generic" constructor for the RectangularQuadMesh
262  // which doesn't do much...
263  // Now set up the parameters that characterise the mesh geometry
264  // then call the constructor
265 
266 
267  // Periodic?
268 // MySimpleCubicQuadMesh<ELEMENT >::Xperiodic = false;
269 
270  // Now build the mesh:
271 
272 
273  build_single_layer_mesh(time_stepper_pt);
274 
275 }
276 
277 
278 
279 //===========================================================================
282 //===========================================================================
283 template<class ELEMENT, class INTERFACE_ELEMENT>
285  TimeStepper* time_stepper_pt)
286 {
287 
288 
289 // Axis pf simmetry
290  Xax = 0.0;
291  Yax = 0.0;
292  Zax = 1.0;
293 
294  unsigned n_x = Nel;
295  unsigned n_y = Nel;
296  unsigned n_z = Nel;
297 
298  // Build the first canion mesh:
299 MyTipMesh<ELEMENT,INTERFACE_ELEMENT >* mesh1_pt = new MyTipMesh<ELEMENT,INTERFACE_ELEMENT > (n_x,n_y,n_z,0.0,1.0,-1.0,0.0,0.0,1.0,Radius,0,time_stepper_pt);
300 
301  mesh1_pt->node_update();
302 
303  //mesh1_pt->output("tip1.dat");
304 // We copy this mesh to our problem mesh
305 
306 
307 // add the nodes to the mesh
308 //we reasign the spine_nodes to point to the ptoblem mesh
309  for(unsigned i = 0; i< mesh1_pt->nnode(); i++)
310  {
311  //Set spine update flag equal to Flag for the nodes of this function
312  mesh1_pt->node_pt(i)->node_update_fct_id() = Flag;
313  mesh1_pt->node_pt(i)->spine_mesh_pt() = this;
314  this->add_node_pt(mesh1_pt->node_pt(i));
315  }
316 
317  // add the bulk elements to the mesh
318  for(unsigned i = 0; i< mesh1_pt->nbulk(); i++)
319  {
320  Bulk_element_pt.push_back(mesh1_pt->bulk_element_pt(i));
321  }
322 
323  // add the interface elements to the mesh
324 for(unsigned i = 0; i< mesh1_pt->ninterface_element(); i++)
325  {
326  Interface_element_pt.push_back(mesh1_pt->interface_element_pt(i));
327  }
328 
329 // add all the elements to the mesh
330 for(unsigned i = 0; i< mesh1_pt->nelement(); i++)
331  {
332  Element_pt.push_back(mesh1_pt->element_pt(i));
333  }
334 
335 
336  // add the spines to the mesh
337 for(unsigned i = 0; i< mesh1_pt->nspine(); i++)
338  {
339  Spine_pt.push_back(mesh1_pt->spine_pt(i));
340  }
341 
342 //add the boundaries
343  set_nboundary( mesh1_pt->nboundary());
344 
345 for(unsigned b =0; b< mesh1_pt->nboundary(); b++)
346  {
347  for(unsigned i = 0; i<mesh1_pt->nboundary_node(b); i++)
348  {
349  // We remove the node from the old boundary mesh ( This is not necessary and it is mainly wrotten for avoiding the warning message)
350  Node* node_pt = mesh1_pt->boundary_node_pt(b,i );
351  node_pt->remove_from_boundary(b);
352  this->add_boundary_node( b , node_pt);
353  }
354  }
355 
356 
357 
358 //We create a second mesh
359  MyTipMesh<ELEMENT,INTERFACE_ELEMENT >* mesh2_pt = new MyTipMesh<ELEMENT,INTERFACE_ELEMENT > (n_x,n_y,n_z,0.0,1.0,-1.0,0.0,0.0,1.0,Radius,1,time_stepper_pt);
360 
361  //mesh2_pt->output("tip2.dat");
362 
363 //Resignation pointer for the boundary conditions of the second mesh
364  int addmesh_map_boundary[6];
365 
366  for(unsigned int i =0;i<6;i++)
367  {
368  addmesh_map_boundary[i] = i;
369  }
370 
371  addmesh_map_boundary[2] = 6;
372  addmesh_map_boundary[0] = 2;
373  addmesh_map_boundary[4] = -1;
374 
375  add_side_spinemesh(2, mesh2_pt ,addmesh_map_boundary, 7,Flag);
376 // cout<<"After adding 2 the mesh has "<<nbulk()<<" bulk elements"<<endl;
377 
378 
379 
380 //We create a third mesh
381  MyTipMesh<ELEMENT,INTERFACE_ELEMENT >* mesh3_pt = new MyTipMesh<ELEMENT,INTERFACE_ELEMENT > (n_x,n_y,n_z,0.0,1.0,-1.0,0.0,0.0,1.0,Radius,2,time_stepper_pt);
382 
383  //mesh3_pt->output("tip3.dat");
384 
385  change_boundaries( mesh3_pt,2,3,6);
386 
387  //std::cout<<"After change the boundary 2 have "
388  // <<mesh3_pt->nboundary_node(2)<<" nodes"<<std::endl;
389 
390 
391 //Resignation pointer for the boundary conditions of the third mesh
392 
393  for(unsigned int i =0;i<6;i++)
394  {
395  addmesh_map_boundary[i] = i;
396  }
397  addmesh_map_boundary[1] = 7;
398  addmesh_map_boundary[0] = 1;
399  addmesh_map_boundary[3] = -1;
400 
401  add_side_spinemesh(1, mesh3_pt ,addmesh_map_boundary, 8,Flag);
402 
403 // cout<<"After adding 3 the mesh has "<<nbulk()<<" bulk elements"<<endl;
404 
405 
406 //We create a fourth mesh
407  MyTipMesh<ELEMENT,INTERFACE_ELEMENT >* mesh4_pt = new MyTipMesh<ELEMENT,INTERFACE_ELEMENT > (n_x,n_y,n_z,0.0,1.0,-1.0,0.0,0.0,1.0,Radius,0,time_stepper_pt);
408 
409 
410 // We miror the mesh twice
411  rotate_90_zeq1_xeq0(mesh4_pt);
412 
413  // mesh4_pt->output("tip4.dat");
414 //Resignation pointer for the boundary conditions of the fifth mesh
415 
416  for(unsigned int i =0;i<6;i++)
417  {
418  addmesh_map_boundary[i] = i;
419  }
420  addmesh_map_boundary[0] = 2;
421  addmesh_map_boundary[1] =7 ;
422  addmesh_map_boundary[2] = 6;
423  addmesh_map_boundary[4] = -1;
424 //cout<<"Before adding 4 the mesh has "<<nnode()<<" nodes "<<endl;
425 
426  add_side_spinemesh(6, mesh4_pt ,addmesh_map_boundary, 8,Flag);
427 
428 
429 
430 
431 //cout<<"After adding 4 the mesh has "<<nnode()<<" nodes "<<endl;
432 //We create a fourth mesh
433  MyTipMesh<ELEMENT,INTERFACE_ELEMENT >* mesh5_pt = new MyTipMesh<ELEMENT,INTERFACE_ELEMENT > (n_x,n_y,n_z,0.0,1.0,-1.0,0.0,0.0,1.0,Radius,0,time_stepper_pt);
434 
435 // We miror the mesh twice
436  rotate_90_zeq1_yeq0(mesh5_pt);
437 
438  //mesh5_pt->output("tip5.dat");
439 
440  change_boundaries( mesh5_pt,2,3,6);
441 
442 //Resignation pointer for the boundary conditions of the fourth mesh
443 
444  for(unsigned int i =0;i<6;i++)
445  {
446  addmesh_map_boundary[i] = i;
447  }
448  addmesh_map_boundary[0] = 1;
449  addmesh_map_boundary[1] = 6;
450  addmesh_map_boundary[3] = -1;
451 
452 // Add to the general mesh
453  add_side_spinemesh(7, mesh5_pt ,addmesh_map_boundary, 8,Flag);
454 
455 // cout<<"After adding 5 in the tip mesh the boundary 1 has"<<this->nboundary_node(1)<<"nodes"<<endl;
456 
457 // cout<<"After adding 5 the mesh has "<<nbulk()<<" bulk elements"<<endl;
458 
459 
460 
461 
462 // We create the last mesh
463  MyTipMesh<ELEMENT,INTERFACE_ELEMENT >* mesh6_pt = new MyTipMesh<ELEMENT,INTERFACE_ELEMENT > (n_x,n_y,n_z,0.0,1.0,-1.0,0.0,0.0,1.0,Radius,1,time_stepper_pt);
464 
465  rotate_90_zeq1_xeq0(mesh6_pt);
466 
467  // mesh6_pt->output("tip6.dat");
468 
469  change_boundaries( mesh6_pt,4,1,6);
470 
471  for(unsigned int i =0;i<6;i++)
472  {
473  addmesh_map_boundary[i] = i;
474  }
475  addmesh_map_boundary[0] = 6;
476  addmesh_map_boundary[1] = -1;
477  addmesh_map_boundary[2] = 4;
478 
479 // Add to the general mesh
480  add_side_spinemesh(6, mesh6_pt ,addmesh_map_boundary, 7,Flag);
481 
482  std::cout<<"The tip mesh consists of "
483  <<nbulk()<<" bulk elements and "<<ninterface_element()
484  << " interface elements."<<std::endl;
485 
486 // At the end we destroy the block meshes in two steps
487 
488 // 1. We disconect the meshesh from the nodes and elements (if not we delete them at the time we delete the meshes)
495 
496 //2. Simply delete (this function can give a segmentation fault error when there are spines still attached to the old update functions written in the constructor)
497  delete mesh1_pt;
498  delete mesh2_pt;
499  delete mesh3_pt;
500  delete mesh4_pt;
501  delete mesh5_pt;
502  delete mesh6_pt;
503 
504 
505 
506 
507 // until now we have just worked with a square channel
508 // introduce the aspect ratio and different lenght (there is a factor 2 becasue 1 = halve height= b/2)
509  int ncount;
510  ncount = this->nnode();
511  for(int i = 0; i< ncount; i++)
512  {
513  Node* node_pt = this->node_pt(i);
514  node_pt->x(0) = node_pt->x(0) * Alpha/2;
515  node_pt->x(1) = node_pt->x(1) * Length;
516  node_pt->x(2) = node_pt->x(2) * Height/2;
517  }
518 // Update also the origin of the spines
519  unsigned long nspines = this->nspine();
520  for(unsigned long i = 0; i<nspines;i++)
521  {
522  Spine* spine_pt = this->spine_pt(i);
523  double x_spine = spine_pt->geom_parameter(0);
524  double y_spine = spine_pt->geom_parameter(1);
525  double z_spine = spine_pt->geom_parameter(2);
526  spine_pt->geom_parameter(0) = x_spine *Alpha/2.0;
527  spine_pt->geom_parameter(1) = y_spine * Length;
528  spine_pt->geom_parameter(2) = z_spine * Height/2.0;
529  }
530 
531 
532 // Update the axis of simmetry
533  Zax = Zax * Height/2.0;
534 
535 // Update the spines heigth according to the new geometry
536  ncount = this->nboundary_node(5);
537 
538  for(int i = 0; i< ncount; i++)
539  {
540  SpineNode* spine_node_pt = dynamic_cast<SpineNode*>(this->boundary_node_pt(5,i));
541  Spine* spine_pt = spine_node_pt->spine_pt();
542  double x_spine = spine_pt->geom_parameter(0);
543  double y_spine = spine_pt->geom_parameter(1);
544  double z_spine = spine_pt->geom_parameter(2);
545 
546  double dorg = sqrt( (spine_node_pt->x(0) - x_spine )*(spine_node_pt->x(0) - x_spine )+
547  (spine_node_pt->x(1) - y_spine)*(spine_node_pt->x(1) - y_spine)+
548  (spine_node_pt->x(2) - z_spine)*(spine_node_pt->x(2) - z_spine) );
549  spine_node_pt->h() = dorg;
550 
551  }
552 
553 
554 }
555 
556 
557 
558 
559 
560 
561 
562 
563 
564 
565 //Agregate a MySpineMesh to the problem mesh mesh_pt
566 //The function neeeds the pointer to the new added mes;, the sahred boundary of the problem mesh;
567 //a pointer which is a map between the boundaries in the addeed mesh and their new values when the mesh
568 //is attached (we will set as convection boundary = -1 for the shared boundary), the new total value of boundaries and a flag
569 // which will be used by the function update_node ( so that all the sub meshes with the same flag will be updated using the same function)
570 
571 //This function can not be extended to adding every spine_mesh because the class SpineMesh lacks the bulk and interface element pointers
572 
573 template<class ELEMENT, class INTERFACE_ELEMENT> void CombTipSpineMesh<ELEMENT, INTERFACE_ELEMENT>::add_side_spinemesh(unsigned int bound1,
574  MyTipMesh<ELEMENT,INTERFACE_ELEMENT > *addmesh_pt, int *addmesh_map_boundary, int total_boundaries, unsigned spine_flag)
575 {
576 
577 
578  //Call the generic function
579  MeshHelper::merge_spine_meshes(this,bound1,addmesh_pt,addmesh_map_boundary,
580  total_boundaries,spine_flag);
581 
582 // add the bulk elements to the mesh
583  for(unsigned i = 0; i< addmesh_pt->nbulk(); i++)
584  {
585  this->Bulk_element_pt.push_back(addmesh_pt->bulk_element_pt(i));
586  }
587 
588  // add the interface elements to the mesh
589 for(unsigned i = 0; i< addmesh_pt->ninterface_element(); i++)
590  {
591  this->Interface_element_pt.push_back(addmesh_pt->interface_element_pt(i));
592  }
593 }
594 
595 
596 
597 
601 
602 
603 //Merges this boundaries of the problem mesh. Both boundaries must contain nodes exactly in the same positions and equivalent spines.
604 //The nodes of one of the boundaries will be completly deleted and the ones of the other will keep on the mesh but not any more in the former boundary
605 //(they will remain in other boundaries different from bound1 and bound2)
606 //The function neeeds the boundary numbers to be merged and the end total number of boundaries (the merged boundaries can still exists but they
607 // would contain 0 nodes after calling this function)
608 
609 //This function can not be extended to adding every spine_mesh because the class SpineMesh lacks the bulk and interface element pointers
610 
611 template<class ELEMENT, class INTERFACE_ELEMENT> void CombTipSpineMesh<ELEMENT, INTERFACE_ELEMENT>::change_boundaries(Mesh *pt_mesh,
612  unsigned int oldbound, unsigned int newbound, unsigned int total_boundaries)
613 {
614 
615  for(unsigned int i = 0; i<pt_mesh->nboundary_node(oldbound);i++)
616  {
617  if( !(pt_mesh->boundary_node_pt(oldbound,i)->is_on_boundary(newbound)) ) //Do not add the nodes which were before on the boundary
618  pt_mesh->add_boundary_node(newbound, pt_mesh->boundary_node_pt(oldbound,i) );
619  }
620  pt_mesh->remove_boundary_nodes(oldbound);
621  pt_mesh->set_nboundary(total_boundaries);
622 
623 }
624 
625 
626 #endif
627 
628 
629 
630 
634 
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
MatrixXf H
Definition: HessenbergDecomposition_matrixH.cpp:4
Scalar * b
Definition: benchVecAdd.cpp:17
Definition: comb_tip_spine_mesh.h:62
double Xax
Axis of Symmetry.
Definition: comb_tip_spine_mesh.h:164
unsigned Flag
Definition: comb_tip_spine_mesh.h:161
unsigned long ninterface_element() const
Number of elements on interface.
Definition: comb_tip_spine_mesh.h:81
void add_side_spinemesh(unsigned int bound1, MyTipMesh< ELEMENT, INTERFACE_ELEMENT > *addmesh_pt, int *addmesh_map_boundary, int total_boundaries, unsigned flag)
Definition: comb_tip_spine_mesh.h:573
virtual void spine_node_update(SpineNode *spine_node_pt)
Definition: comb_tip_spine_mesh.h:122
virtual void build_single_layer_mesh(TimeStepper *time_stepper_pt)
Definition: comb_tip_spine_mesh.h:284
void change_boundaries(Mesh *pt_mesh, unsigned int oldbound, unsigned int newbound, unsigned int total_boundaries)
Definition: comb_tip_spine_mesh.h:611
void rotate_90_zeq1_xeq0(SpineMesh *rot_mesh_pt)
Definition: comb_tip_spine_mesh.h:177
Vector< FiniteElement * > Interface_element_pt
Vector of pointers to interface elements.
Definition: comb_tip_spine_mesh.h:173
FiniteElement *& interface_element_pt(const unsigned long &i)
Access functions for pointers to interface elements.
Definition: comb_tip_spine_mesh.h:76
unsigned long nbulk() const
Number of elements in bulk.
Definition: comb_tip_spine_mesh.h:89
unsigned int Nel
Definition: comb_tip_spine_mesh.h:154
Vector< FiniteElement * > Bulk_element_pt
Vector of pointers to element in the fluid layer.
Definition: comb_tip_spine_mesh.h:170
void rotate_90_zeq1_yeq0(SpineMesh *rot_mesh_pt)
Definition: comb_tip_spine_mesh.h:207
void flush_spine_element_and_node_storage()
Definition: comb_tip_spine_mesh.h:93
double Length
Definition: comb_tip_spine_mesh.h:158
double Yax
Definition: comb_tip_spine_mesh.h:165
FiniteElement *& bulk_element_pt(const unsigned long &i)
Access functions for pointers to elements in bulk.
Definition: comb_tip_spine_mesh.h:84
double Alpha
Aspect ratio, lengt, heighth and radius.
Definition: comb_tip_spine_mesh.h:157
double Radius
Definition: comb_tip_spine_mesh.h:160
double Zax
Definition: comb_tip_spine_mesh.h:166
CombTipSpineMesh(const unsigned int &nel, const double &alpha, const double &length, const double &height, const double &radius, const unsigned &flag, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: comb_tip_spine_mesh.h:257
double Height
Definition: comb_tip_spine_mesh.h:159
coincides with the numeration of the spines
Definition: tip_spine_mesh.h:52
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
FiniteElement *& interface_element_pt(const unsigned long &i)
Access functions for pointers to interface elements.
Definition: tip_spine_mesh.h:75
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
Definition: mesh.h:67
void add_boundary_node(const unsigned &b, Node *const &node_pt)
Add a (pointer to) a node to the b-th boundary.
Definition: mesh.cc:243
unsigned long nboundary_node(const unsigned &ibound) const
Return number of nodes on a particular boundary.
Definition: mesh.h:833
static Steady< 0 > Default_TimeStepper
The Steady Timestepper.
Definition: mesh.h:75
void set_nboundary(const unsigned &nbound)
Set the number of boundaries in the mesh.
Definition: mesh.h:505
unsigned nboundary() const
Return number of boundaries.
Definition: mesh.h:827
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Definition: mesh.h:448
void remove_boundary_nodes()
Clear all pointers to boundary nodes.
Definition: mesh.cc:204
unsigned long nnode() const
Return number of nodes in the mesh.
Definition: mesh.h:596
Node *& boundary_node_pt(const unsigned &b, const unsigned &n)
Return pointer to node n on boundary b.
Definition: mesh.h:493
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
Definition: nodes.h:906
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
virtual bool is_on_boundary() const
Definition: nodes.h:1373
virtual void remove_from_boundary(const unsigned &b)
Definition: nodes.cc:2350
Definition: spines.h:613
SpineNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global SpineNode.
Definition: spines.h:648
unsigned long nspine() const
Return the number of spines in the mesh.
Definition: spines.h:635
Spine *& spine_pt(const unsigned long &i)
Return the i-th spine in the mesh.
Definition: spines.h:623
void node_update(const bool &update_all_solid_nodes=false)
Definition: spines.cc:84
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
unsigned & node_update_fct_id()
Access function to ID of node update function (within specific mesh)
Definition: spines.h:384
double & fraction()
Set reference to fraction along spine.
Definition: spines.h:378
Definition: spines.h:64
double & geom_parameter(const unsigned &i)
Definition: spines.h:287
Definition: timesteppers.h:231
RealScalar alpha
Definition: level1_cplx_impl.h:151
double Height
Height of domain.
Definition: flow_past_oscillating_cylinder.cc:316
double Radius
Radius of the pipe.
Definition: pipe.cc:55
double Length
Length of the pipe.
Definition: pipe.cc:52
double height(const double &x)
Height of domain.
Definition: simple_spine_channel.cc:429
double Alpha
Parameter for steepness of step.
Definition: two_d_adv_diff_adapt.cc:53
radius
Definition: UniformPSDSelfTest.py:15
void merge_spine_meshes(MESH1 *mesh_pt, unsigned bound1, MESH2 *addmesh_pt, int *addmesh_map_boundary, int total_boundaries, unsigned spine_flag)
Definition: merge_meshes.h:32
unsigned Flag
Flag for solution.
Definition: navier_stokes_preconditioners.cc:42
@ W
Definition: quadtree.h:63
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10