quarter_tube_mesh.template.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// Version 1.0; svn revision $LastChangedRevision$
7 //LIC//
8 //LIC// $LastChangedDate$
9 //LIC//
10 //LIC// Copyright (C) 2006-2016 Matthias Heil and Andrew Hazel
11 //LIC//
12 //LIC// This library is free software; you can redistribute it and/or
13 //LIC// modify it under the terms of the GNU Lesser General Public
14 //LIC// License as published by the Free Software Foundation; either
15 //LIC// version 2.1 of the License, or (at your option) any later version.
16 //LIC//
17 //LIC// This library is distributed in the hope that it will be useful,
18 //LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
19 //LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 //LIC// Lesser General Public License for more details.
21 //LIC//
22 //LIC// You should have received a copy of the GNU Lesser General Public
23 //LIC// License along with this library; if not, write to the Free Software
24 //LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 //LIC// 02110-1301 USA.
26 //LIC//
27 //LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
28 //LIC//
29 //LIC//====================================================================
30 #ifndef OOMPH_QUARTER_TUBE_MESH_HEADER
31 #define OOMPH_QUARTER_TUBE_MESH_HEADER
32 
33 // Headers
34 #include "../generic/refineable_brick_mesh.h"
35 #include "../generic/macro_element.h"
36 #include "../generic/domain.h"
37 #include "../generic/algebraic_elements.h"
38 #include "../generic/brick_mesh.h"
39 #include "../generic/macro_element_node_update_element.h"
40 
41 
42 //Include the headers file for domain
43 #include "quarter_tube_domain.h"
44 
45 namespace oomph
46 {
47 
48 
49 //====================================================================
50 /// \short 3D quarter tube mesh class.
51 /// The domain is specified by the GeomObject that identifies
52 /// boundary 3. Non-refineable base version!
53 ///
54 /// The mesh boundaries are numbered as follows:
55 /// - Boundary 0: "Inflow" cross section; located along the
56 /// line parametrised by \f$ \xi_0 = \xi_0^{lo} \f$
57 /// on the geometric object that specifies the wall.
58 /// - Boundary 1: Plane x=0
59 /// - Boundary 2: Plane y=0
60 /// - Boundary 3: The curved wall
61 /// - Boundary 4: "Outflow" cross section; located along the
62 /// line parametrised by \f$ \xi_0 = \xi_0^{hi} \f$
63 /// on the geometric object that specifies the wall.
64 ///
65 /// IMPORTANT NOTE: The interface looks more general than it should.
66 /// The toplogy must remain that of a quarter tube,
67 /// or the mesh generation will break.
68 //====================================================================
69 template <class ELEMENT>
70 class QuarterTubeMesh : public virtual BrickMeshBase
71 {
72 
73 public:
74 
75  /// \short Constructor: Pass pointer to geometric object that
76  /// specifies the wall, start and end coordinates on the
77  /// geometric object, and the fraction along
78  /// which the dividing line is to be placed, and the timestepper.
79  /// Timestepper defaults to Steady dummy timestepper.
80  QuarterTubeMesh(GeomObject* wall_pt,
81  const Vector<double>& xi_lo,
82  const double& fract_mid,
83  const Vector<double>& xi_hi,
84  const unsigned& nlayer,
85  TimeStepper* time_stepper_pt=
86  &Mesh::Default_TimeStepper);
87 
88  /// \short Destructor: empty
89  virtual ~QuarterTubeMesh()
90  {
91  delete Domain_pt;
92  }
93 
94  /// Access function to GeomObject representing wall
95  GeomObject*& wall_pt(){return Wall_pt;}
96 
97  /// Access function to domain
99 
100  /// \short Function pointer for function that squashes
101  /// the outer macro elements towards
102  /// the wall by mapping the input value of the "radial" macro element
103  /// coordinate to the return value (defined in the underlying Domain object)
105  {
106  return Domain_pt->bl_squash_fct_pt();
107  }
108 
109 
110  /// \short Function pointer for function for axial spacing
112  {
114  }
115 
116  /// Access function to underlying domain
118 
119 protected:
120 
121  /// Pointer to domain
123 
124  /// Pointer to the geometric object that represents the curved wall
125  GeomObject* Wall_pt;
126 
127  /// Lower limits for the coordinates along the wall
128  Vector<double> Xi_lo;
129 
130  /// Fraction along wall where outer ring is to be divided
131  double Fract_mid;
132 
133  /// Upper limits for the coordinates along the wall
134  Vector<double> Xi_hi;
135 
136 };
137 
138 
139 
140 
141 ////////////////////////////////////////////////////////////////////
142 ////////////////////////////////////////////////////////////////////
143 ////////////////////////////////////////////////////////////////////
144 
145 
146 
147 
148 
149 //=============================================================
150 /// Adaptative version of the QuarterTubeMesh base mesh.
151 /// The domain is specified by the GeomObject that identifies
152 /// boundary 3.
153 ///
154 /// The mesh boundaries are numbered as follows:
155 /// - Boundary 0: "Inflow" cross section; located along the
156 /// line parametrised by \f$ \xi_0 = \xi_0^{lo} \f$
157 /// on the geometric object that specifies the wall.
158 /// - Boundary 1: Plane x=0
159 /// - Boundary 2: Plane y=0
160 /// - Boundary 3: The curved wall
161 /// - Boundary 4: "Outflow" cross section; located along the
162 /// line parametrised by \f$ \xi_0 = \xi_0^{hi} \f$
163 /// on the geometric object that specifies the wall.
164 //=============================================================
165 template<class ELEMENT>
166 class RefineableQuarterTubeMesh : public virtual QuarterTubeMesh<ELEMENT>,
167  public RefineableBrickMesh<ELEMENT>
168 
169 {
170 
171 public :
172 
173 /// \short Constructor for adaptive deformable quarter tube mesh class.
174 /// The domain is specified by the GeomObject that
175 /// identifies boundary 3. Pass pointer to geometric object that
176 /// specifies the wall, start and end coordinates on the
177 /// geometric object, and the fraction along
178 /// which the dividing line is to be placed, and the timestepper.
179 /// Timestepper defaults to Steady dummy timestepper.
181  const Vector<double>& xi_lo,
182  const double& fract_mid,
183  const Vector<double>& xi_hi,
184  const unsigned& nlayer,
185  TimeStepper* time_stepper_pt=
186  &Mesh::Default_TimeStepper):
187  QuarterTubeMesh<ELEMENT>(wall_pt,xi_lo,fract_mid,xi_hi,
188  nlayer,time_stepper_pt)
189  {
190  // Loop over all elements and set macro element pointer
191  for (unsigned ielem=0;ielem<QuarterTubeMesh<ELEMENT>::nelement();ielem++)
192  {
193  dynamic_cast<RefineableQElement<3>*>(
195  set_macro_elem_pt(this->Domain_pt->macro_element_pt(ielem));
196  }
197 
198 
199  // Setup Octree forest: Turn elements into individual octrees
200  // and plant in forest
201  Vector<TreeRoot*> trees_pt;
202  for (unsigned iel=0;iel<QuarterTubeMesh<ELEMENT>::nelement();iel++)
203  {
204  FiniteElement* el_pt=QuarterTubeMesh<ELEMENT>::finite_element_pt(iel);
205  ELEMENT* ref_el_pt=dynamic_cast<ELEMENT*>(el_pt);
206  OcTreeRoot* octree_root_pt=new OcTreeRoot(ref_el_pt);
207  trees_pt.push_back(octree_root_pt);
208  }
209  this->Forest_pt = new OcTreeForest(trees_pt);
210 
211 #ifdef PARANOID
212  // Run self test
213  unsigned success_flag=
214  dynamic_cast<OcTreeForest*>(this->Forest_pt)->self_test();
215  if (success_flag==0)
216  {
217  oomph_info << "Successfully built octree forest " << std::endl;
218  }
219  else
220  {
221  throw OomphLibError(
222  "Trouble in building octree forest ",
223  OOMPH_CURRENT_FUNCTION,
224  OOMPH_EXCEPTION_LOCATION);
225  }
226 #endif
227 
228  }
229 
230  /// \short Destructor: empty
232 
233 };
234 
235 
236 
237 
238 
239 ////////////////////////////////////////////////////////////////////
240 ////////////////////////////////////////////////////////////////////
241 // MacroElementNodeUpdate-version of RefineableQuarterTubeMesh
242 ////////////////////////////////////////////////////////////////////
243 ////////////////////////////////////////////////////////////////////
244 
245 class MacroElementNodeUpdateNode;
246 
247 //========================================================================
248 /// MacroElementNodeUpdate version of RefineableQuarterTubeMesh
249 //========================================================================
250 template<class ELEMENT>
252 public virtual MacroElementNodeUpdateMesh,
253 public virtual RefineableQuarterTubeMesh<ELEMENT>
254 {
255 
256 
257 public:
258 
259 
260  /// \short Constructor: Pass pointer to geometric object, start and
261  /// end coordinates on the geometric object and the fraction along
262  /// which the dividing line is to be placed when updating the nodal positions,
263  /// and timestepper (defaults to (Steady) default timestepper
264  /// defined in Mesh). Setup the refineable mesh (by calling the
265  /// constructor for the underlying RefineableQuarterTubeMesh)
266  /// and the algebraic node update functions for nodes.
268  const Vector<double>& xi_lo,
269  const double& fract_mid,
270  const Vector<double>& xi_hi,
271  const unsigned& nlayer,
272  TimeStepper* time_stepper_pt=
273  &Mesh::Default_TimeStepper) :
274  MacroElementNodeUpdateMesh(),
275  RefineableQuarterTubeMesh<ELEMENT>(wall_pt,xi_lo,fract_mid,xi_hi,
276  nlayer,time_stepper_pt),
277  QuarterTubeMesh<ELEMENT>(wall_pt,xi_lo,fract_mid,xi_hi,
278  nlayer,time_stepper_pt)
279  {
280 
281 #ifdef PARANOID
282  ELEMENT* el_pt=new ELEMENT;
283  if (dynamic_cast<MacroElementNodeUpdateElementBase*>(el_pt)==0)
284  {
285  std::ostringstream error_message;
286  error_message
287  << "Base class for ELEMENT in "
288  << "MacroElementNodeUpdateRefineableQuarterTubeMesh needs"
289  << "to be of type MacroElementNodeUpdateElement!\n";
290  error_message << "Whereas it is: typeid(el_pt).name()"
291  << typeid(el_pt).name()
292  << std::endl;
293 
294  std::string function_name =
295  "MacroElementNodeUpdateRefineableQuaterCircleSectorMesh::\n";
296  function_name +=
297  "MacroElementNodeUpdateRefineableQuaterCircleSectorMesh()";
298 
299  throw OomphLibError(error_message.str(),
300  OOMPH_CURRENT_FUNCTION,
301  OOMPH_EXCEPTION_LOCATION);
302  }
303  delete el_pt;
304 #endif
305 
306  // Setup all the information that's required for MacroElement-based
307  // node update: Tell the elements that their geometry depends on the
308  // fishback geometric object
309  this->setup_macro_element_node_update();
310  }
311 
312  /// \short Destructor: empty
314 
315  /// \short Resolve mesh update: Update current nodal
316  /// positions via sparse MacroElement-based update.
317  /// [Doesn't make sense to use this mesh with SolidElements anyway,
318  /// so we buffer the case if update_all_solid_nodes is set to
319  /// true.]
320  void node_update(const bool& update_all_solid_nodes=false)
321  {
322 #ifdef PARANOID
323  if (update_all_solid_nodes)
324  {
325  std::string error_message =
326  "Doesn't make sense to use an MacroElementNodeUpdateMesh with\n";
327  error_message +=
328  "SolidElements so specifying update_all_solid_nodes=true\n";
329  error_message += "doesn't make sense either\n";
330 
331  std::string function_name =
332  "MacroElementNodeUpdateRefineableQuaterCircleSectorMesh::\n";
333  function_name += "node_update()";
334 
335  throw OomphLibError(error_message,
336  OOMPH_CURRENT_FUNCTION,
337  OOMPH_EXCEPTION_LOCATION);
338  }
339 #endif
340  MacroElementNodeUpdateMesh::node_update();
341  }
342 
343  private:
344 
345  /// \short Setup all the information that's required for MacroElement-based
346  /// node update: Tell the elements that their geometry depends on the
347  /// geometric object that parametrises the wall
349  {
350  unsigned n_element = this->nelement();
351  for(unsigned i=0;i<n_element;i++)
352  {
353  // Upcast from FiniteElement to the present element
354  ELEMENT *el_pt = dynamic_cast<ELEMENT*>(this->element_pt(i));
355 
356 #ifdef PARANOID
357  // Check if cast is successful
358  MacroElementNodeUpdateElementBase* m_el_pt=dynamic_cast<
359  MacroElementNodeUpdateElementBase*>(el_pt);
360  if (m_el_pt==0)
361  {
362  std::ostringstream error_message;
363  error_message
364  << "Failed to upcast to MacroElementNodeUpdateElementBase\n";
365  error_message
366  << "Element must be derived from MacroElementNodeUpdateElementBase\n";
367  error_message << "but it is of type " << typeid(el_pt).name();
368 
369  std::string function_name =
370  "MacroElementNodeUpdateRefineableQuaterCircleSectorMesh::\n";
371  function_name += "setup_macro_element_node_update()";
372 
373  throw OomphLibError(error_message.str(),
374  OOMPH_CURRENT_FUNCTION,
375  OOMPH_EXCEPTION_LOCATION);
376  }
377 #endif
378  // There's just one GeomObject
379  Vector<GeomObject*> geom_object_pt(1);
380  geom_object_pt[0] = this->Wall_pt;
381 
382  // Tell the element which geom objects its macro-element-based
383  // node update depends on
384  el_pt->set_node_update_info(geom_object_pt);
385  }
386 
387  // Add the geometric object(s) for the wall to the mesh's storage
388  Vector<GeomObject*> geom_object_pt(1);
389  geom_object_pt[0] = this->Wall_pt;
390  MacroElementNodeUpdateMesh::set_geom_object_vector_pt(geom_object_pt);
391 
392  // Fill in the domain pointer to the mesh's storage in the base class
393  MacroElementNodeUpdateMesh::macro_domain_pt()=this->domain_pt();
394 
395  }
396 };
397 
398 
399 
400 //======================================================================
401 /// AlgebraicMesh version of RefineableQuarterTubeMesh
402 //=====================================================================
403 
404 
405 //====================================================================
406 /// \short Algebraic 3D quarter tube mesh class.
407 ///
408 /// The mesh boundaries are numbered as follows:
409 /// - Boundary 0: "Inflow" cross section; located along the
410 /// line parametrised by \f$ \xi_0 = \xi_0^{lo} \f$
411 /// on the geometric object that specifies the wall.
412 /// - Boundary 1: Plane x=0
413 /// - Boundary 2: Plane y=0
414 /// - Boundary 3: The curved wall - specified by the GeomObject
415 /// passed to the mesh constructor.
416 /// - Boundary 4: "Outflow" cross section; located along the
417 /// line parametrised by \f$ \xi_0 = \xi_0^{hi} \f$
418 /// on the geometric object that specifies the wall.
419 //====================================================================
420 
421 
422 
423 //========================================================================
424 /// Algebraic version of RefineableQuarterTubeMesh
425 ///
426 /// Cross section through mesh looking along tube.........
427 ///
428 /// ---___
429 /// | ---____
430 /// | - BOUNDARY 3
431 /// | /
432 /// | [Region 2] / |
433 /// | / |
434 /// | N / |
435 /// | |_ E / |
436 /// BOUNDARY 1 |------------ |
437 /// | | |
438 /// | [Region 0] | [Region 1] | ^
439 /// | | | / \ direction of
440 /// | N | N | | 2nd Lagrangian
441 /// | |_ E | |_ E | | coordinate
442 /// |____________|____________| | along wall GeomObject
443 ///
444 /// BOUNDARY 2
445 ///
446 /// The Domain is built of slices each consisting of three
447 /// MacroElements as sketched.
448 /// The local coordinates are such that the (E)astern direction
449 /// coincides with the positive s_0 direction, while the
450 /// (N)orther direction coincides with the positive s_1 direction.
451 /// The positive s_2 direction points down the tube.
452 ///
453 /// Elements need to be derived from AlgebraicElementBase. In
454 /// addition to the refinement procedures available for the
455 /// RefineableQuarterTubeMesh which forms the basis for this mesh,
456 /// three algebraic node update functions are implemented for the nodes
457 /// in the three regions defined by the Domain MacroElements.
458 /// Note: it is assumed the cross section down the tube is
459 /// uniform when setup_algebraic_node_update() is called.
460 //========================================================================
461 template<class ELEMENT>
463  public virtual AlgebraicMesh,
464  public RefineableQuarterTubeMesh<ELEMENT>
465 {
466 
467 public:
468 
469  /// \short Constructor: Pass pointer to geometric object, start and
470  /// end coordinates of the geometric object and the fraction along
471  /// the 2nd Lagrangian coordinate at which the dividing line between
472  /// region 1 and region 2 is to be placed, and timestepper
473  /// (defaults to (Steady) default timestepper defined in Mesh).
474  /// Sets up the refineable mesh (by calling the constructor for the
475  /// underlying RefineableQuarterTubeMesh).
477  const Vector<double>& xi_lo,
478  const double& fract_mid,
479  const Vector<double>& xi_hi,
480  const unsigned& nlayer,
481  const double centre_box_size=1.0,
482  TimeStepper* time_stepper_pt=
483  &Mesh::Default_TimeStepper) :
484  QuarterTubeMesh<ELEMENT>(wall_pt, xi_lo, fract_mid, xi_hi,
485  nlayer, time_stepper_pt),
486  RefineableQuarterTubeMesh<ELEMENT>(wall_pt,xi_lo,fract_mid,xi_hi,
487  nlayer, time_stepper_pt),
488  Centre_box_size(centre_box_size)
489  {
490 
491 #ifdef PARANOID
492  ELEMENT* el_pt=new ELEMENT;
493  if (dynamic_cast<AlgebraicElementBase*>(el_pt)==0)
494  {
495  std::ostringstream error_message;
496 
497  error_message << "Base class for ELEMENT in "
498  << "AlgebraicRefineableQuarterTubeMesh needs"
499  << "to be of type AlgebraicElement!\n";
500  error_message << "Whereas it is: typeid(el_pt).name()"
501  << typeid(el_pt).name()
502  << std::endl;
503 
504  std::string function_name =
505  " AlgebraicRefineableQuarterTubeMesh::\n";
506  function_name += "AlgebraicRefineableQuarterTubeMesh()";
507 
508  throw OomphLibError(error_message.str(),
509  OOMPH_CURRENT_FUNCTION,
510  OOMPH_EXCEPTION_LOCATION);
511  }
512  delete el_pt;
513 #endif
514 
515  // Add the geometric object to the list associated with this AlgebraicMesh
516  AlgebraicMesh::add_geom_object_list_pt(wall_pt);
517 
518  // Setup algebraic node update operations
519  setup_algebraic_node_update();
520 
521  // Ensure nodes are in their default position
522  node_update();
523  }
524 
525  /// Run self-test for algebraic mesh -- return 0/1 for OK/failure
526  unsigned self_test()
527  {
528  return AlgebraicMesh::self_test();
529  }
530 
531  /// \short Broken version of the QuarterTubeDomain function
532  /// Function is broken because axial spacing isn't implemented
533  /// yet for the Algebraic version of the RefineableQuarterTubeMesh.
534  /// Note: this function must be used BEFORE algebraic_node_update(...)
535  /// is called.
537  {
538  std::ostringstream error_message;
539  error_message << "AxialSpacingFctPt has not been implemented "
540  << "for the AlgebraicRefineableQuarterTubeMesh\n";
541 
542  std::string function_name =
543  " AlgebraicRefineableQuarterTubeMesh::AxialSpacingFctPt()";
544 
545  throw OomphLibError(error_message.str(),
546  OOMPH_CURRENT_FUNCTION,
547  OOMPH_EXCEPTION_LOCATION);
548 
549  return this->Domain_pt->axial_spacing_fct_pt();
550  }
551 
552  /// \short Resolve mesh update: Update current nodal
553  /// positions via algebraic node update.
554  /// [Doesn't make sense to use this mesh with SolidElements anyway,
555  /// so we buffer the case if update_all_solid_nodes is set to
556  /// true.]
557  void node_update(const bool& update_all_solid_nodes=false)
558  {
559 #ifdef PARANOID
560  if (update_all_solid_nodes)
561  {
562  std::string error_message =
563  "Doesn't make sense to use an AlgebraicMesh with\n";
564  error_message +=
565  "SolidElements so specifying update_all_solid_nodes=true\n";
566  error_message += "doesn't make sense either\n";
567 
568  std::string function_name =
569  " AlgebraicRefineableQuarterTubeMesh::";
570  function_name += "node_update()";
571 
572  throw OomphLibError(error_message,
573  OOMPH_CURRENT_FUNCTION,
574  OOMPH_EXCEPTION_LOCATION);
575  }
576 #endif
577 
578  AlgebraicMesh::node_update();
579  }
580 
581 
582  /// \short Implement the algebraic node update function for a node
583  /// at time level t (t=0: present; t>0: previous): Update with
584  /// the node's first (default) update function.
585  void algebraic_node_update(const unsigned& t, AlgebraicNode*& node_pt)
586  {
587  // Update with the update function for the node's first (default)
588  // node update fct
589  unsigned id=node_pt->node_update_fct_id();
590 
591  switch (id)
592  {
593 
594  case Central_region:
595 
596  // Central region
597  node_update_central_region(t,node_pt);
598  break;
599 
600  case Lower_right_region:
601 
602  // Lower right region
603  node_update_lower_right_region(t,node_pt);
604  break;
605 
606  case Upper_left_region:
607 
608  // Upper left region
609  node_update_upper_left_region(t,node_pt);
610  break;
611 
612  default:
613 
614  std::ostringstream error_message;
615  error_message << "The node update fct id is "
616  << id << ", but it should only be one of "
617  << Central_region << ", "
618  << Lower_right_region << " or "
619  << Upper_left_region << std::endl;
620  std::string function_name =
621  " AlgebraicRefineableQuarterTubeMesh::";
622  function_name += "algebraic_node_update()";
623 
624  throw OomphLibError(error_message.str(),
625  OOMPH_CURRENT_FUNCTION,
626  OOMPH_EXCEPTION_LOCATION);
627  }
628  }
629 
630  /// \short Update the node update info for specified algebraic node
631  /// following any spatial mesh adaptation.
632  void update_node_update(AlgebraicNode*& node_pt)
633  {
634  // Get all node update fct for this node (resizes internally)
635  Vector<int> id;
636  node_pt->node_update_fct_id(id);
637 
638  // Loop over all update fcts
639  unsigned n_update=id.size();
640  for (unsigned i=0;i<n_update;i++)
641  {
642  update_node_update_in_region(node_pt, id[i]);
643  }
644 
645  }
646 
647 private:
648 
649  /// Size of centre box
651 
652  /// Remesh function ids
653  enum{Central_region, Lower_right_region, Upper_left_region};
654 
655  /// Fractional width of central region
656  double Lambda_x;
657 
658  /// Fractional height of central region
659  double Lambda_y;
660 
661  /// \short Algebraic update function for a node that is located
662  /// in the central region
663  void node_update_central_region(const unsigned& t,
664  AlgebraicNode*& node_pt);
665 
666  /// \short Algebraic update function for a node that is located
667  /// in the lower-right region
668  void node_update_lower_right_region(const unsigned& t,
669  AlgebraicNode*& node_pt);
670 
671  /// \short Algebraic update function for a node that is located
672  /// in the upper-left region
673  void node_update_upper_left_region(const unsigned& t,
674  AlgebraicNode*& node_pt);
675 
676  /// \short Setup algebraic update operation for all nodes
677  void setup_algebraic_node_update();
678 
679  /// \short Update algebraic node update function for nodes in
680  /// the region defined by region_id
681  void update_node_update_in_region(AlgebraicNode*& node_pt,
682  int& region_id);
683 
684 };
685 
686 
687 }
688 #endif
AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function that implements axial spacing of macro elements.
AlgebraicRefineableQuarterTubeMesh(GeomObject *wall_pt, const Vector< double > &xi_lo, const double &fract_mid, const Vector< double > &xi_hi, const unsigned &nlayer, const double centre_box_size=1.0, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to geometric object, start and end coordinates of the geometric object and ...
RefineableQuarterTubeMesh(GeomObject *wall_pt, const Vector< double > &xi_lo, const double &fract_mid, const Vector< double > &xi_hi, const unsigned &nlayer, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor for adaptive deformable quarter tube mesh class. The domain is specified by the GeomObjec...
void update_node_update(AlgebraicNode *&node_pt)
Update the node update info for specified algebraic node following any spatial mesh adaptation...
virtual ~RefineableQuarterTubeMesh()
Destructor: empty.
unsigned self_test()
Run self-test for algebraic mesh – return 0/1 for OK/failure.
MacroElementNodeUpdateRefineableQuarterTubeMesh(GeomObject *wall_pt, const Vector< double > &xi_lo, const double &fract_mid, const Vector< double > &xi_hi, const unsigned &nlayer, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to geometric object, start and end coordinates on the geometric object and ...
virtual QuarterTubeDomain::AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function for axial spacing.
QuarterTubeDomain::BLSquashFctPt & bl_squash_fct_pt()
Function pointer for function that squashes the outer macro elements towards the wall by mapping the ...
QuarterTubeMesh(GeomObject *wall_pt, const Vector< double > &xi_lo, const double &fract_mid, const Vector< double > &xi_hi, const unsigned &nlayer, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to geometric object that specifies the wall, start and end coordinates on t...
double(* AxialSpacingFctPt)(const double &xi)
Typedef for function pointer for function that implements axial spacing of macro elements.
Vector< double > Xi_hi
Upper limits for the coordinates along the wall.
Vector< double > Xi_lo
Lower limits for the coordinates along the wall.
BLSquashFctPt & bl_squash_fct_pt()
Function pointer for function that squashes the outer two macro elements towards the wall by mapping ...
void node_update(const bool &update_all_solid_nodes=false)
Resolve mesh update: Update current nodal positions via sparse MacroElement-based update...
QuarterTubeDomain::AxialSpacingFctPt & axial_spacing_fct_pt()
Broken version of the QuarterTubeDomain function Function is broken because axial spacing isn&#39;t imple...
double Fract_mid
Fraction along wall where outer ring is to be divided.
void setup_macro_element_node_update()
Setup all the information that&#39;s required for MacroElement-based node update: Tell the elements that ...
3D quarter tube mesh class. The domain is specified by the GeomObject that identifies boundary 3...
virtual ~QuarterTubeMesh()
Destructor: empty.
double(* BLSquashFctPt)(const double &s)
Typedef for function pointer for function that squashes the outer two macro elements towards the wall...
GeomObject * Wall_pt
Pointer to the geometric object that represents the curved wall.
Quarter tube as domain. Domain is bounded by curved boundary which is represented by a GeomObject...
GeomObject *& wall_pt()
Access function to GeomObject representing wall.
AlgebraicMesh version of RefineableQuarterTubeMesh.
MacroElementNodeUpdate version of RefineableQuarterTubeMesh.
double Lambda_x
Fractional width of central region.
void algebraic_node_update(const unsigned &t, AlgebraicNode *&node_pt)
Implement the algebraic node update function for a node at time level t (t=0: present; t>0: previous)...
QuarterTubeDomain * Domain_pt
Pointer to domain.
void node_update(const bool &update_all_solid_nodes=false)
Resolve mesh update: Update current nodal positions via algebraic node update. [Doesn&#39;t make sense to...
QuarterTubeDomain * domain_pt()
Access function to domain.
double Lambda_y
Fractional height of central region.
QuarterTubeDomain * domain_pt() const
Access function to underlying domain.