collapsible_channel_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// Copyright (C) 2006-2023 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 // Include guards
27 #ifndef OOMPH_COLLAPSIBLE_CHANNEL_MESH_HEADER
28 #define OOMPH_COLLAPSIBLE_CHANNEL_MESH_HEADER
29 
30 // Generic includes
31 #include "../generic/refineable_quad_mesh.h"
32 #include "../generic/macro_element.h"
33 #include "../generic/domain.h"
34 #include "../generic/quad_mesh.h"
35 
36 // Mesh is based on simple_rectangular_quadmesh
39 
40 // Include *.template.cc to allow building the templated member functions
41 #include "../generic/macro_element_node_update_element.h"
42 
43 // We need to include the templated sources for algebraic meshes
44 // to allow the build of all templates.
45 #include "../generic/algebraic_elements.h"
46 
47 // Include the headers file for collapsible channel
49 
50 namespace oomph
51 {
52  //========================================================================
53  /// Basic collapsible channel mesh.
54  /// The mesh is derived from the \c SimpleRectangularQuadMesh
55  /// so it's node and element numbering scheme is the same
56  /// as in that mesh. Only the boundaries are numbered differently
57  /// to allow the easy identification of the "collapsible" segment.
58  /// Boundary coordinates are set up for all nodes
59  /// located on boundary 3 (the collapsible segment).
60  /// The curvilinear ("collapsible") segment is defined by
61  /// a \c GeomObject.
62  //========================================================================
63  template<class ELEMENT>
65  {
66  public:
67  /// Constructor: Pass number of elements in upstream/collapsible/
68  /// downstream segment and across the channel; lengths of upstream/
69  /// collapsible/downstream segments and width of channel, pointer to
70  /// GeomObject that defines the collapsible segment and pointer to
71  /// TimeStepper (defaults to the default timestepper, Steady).
73  const unsigned& nup,
74  const unsigned& ncollapsible,
75  const unsigned& ndown,
76  const unsigned& ny,
77  const double& lup,
78  const double& lcollapsible,
79  const double& ldown,
80  const double& ly,
82  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper);
83 
84  /// destructor
86  {
87  delete Domain_pt;
88  }
89 
90  /// Access function to GeomObject representing wall
92  {
93  return Wall_pt;
94  }
95 
96  /// Access function to domain
98  {
99  return Domain_pt;
100  }
101 
102  /// Function pointer for function that squashes
103  /// the mesh near the walls. Default trivial mapping (the identity)
104  /// leaves vertical nodal positions unchanged. Mapping is
105  /// used in underlying CollapsibleChannelDomain. Virtual
106  /// so we can break it in derived classes (e.g. the Algebraic
107  /// versions of this mesh where it doesn't make any sense
108  /// to provide the bl_squash_fct after the mesh has been built).
110  {
111  return Domain_pt->bl_squash_fct_pt();
112  }
113 
114 
115  /// Function pointer for function that squashes
116  /// the mesh near the walls. Default trivial mapping (the identity)
117  /// leaves vertical nodal positions unchanged. Mapping is
118  /// used in underlying CollapsibleChannelDomain. Const version.
120  {
121  return Domain_pt->bl_squash_fct_pt();
122  }
123 
124 
125  /// Function pointer for function that redistributes the
126  /// elements in the axial direction. Virtual
127  /// so we can break it in derived classes (e.g. the Algebraic
128  /// versions of this mesh where it doesn't make any sense
129  /// to provide the bl_squash_fct after the mesh has been built).
131  {
133  }
134 
135 
136  /// Function pointer for function that redistributes the
137  /// elements in the axial direction. Const version
139  const
140  {
142  }
143 
144 
145  protected:
146  /// Pointer to domain
148 
149  /// Number of element columns in upstream part
150  unsigned Nup;
151 
152  /// Number of element columns in collapsible part
153  unsigned Ncollapsible;
154 
155  /// Number of element columns in downstream part
156  unsigned Ndown;
157 
158  /// Number of element rows across channel
159  unsigned Ny;
160 
161  /// Pointer to geometric object that represents the moving wall
163  };
164 
165 
166  /// //////////////////////////////////////////////////////////////////
167  /// //////////////////////////////////////////////////////////////////
168  /// //////////////////////////////////////////////////////////////////
169 
170 
171  //===================================================================
172  /// Refineable collapsible channel mesh.
173  /// The mesh is derived from the \c SimpleRectangularQuadMesh
174  /// so it's node and element numbering scheme is the same
175  /// as in that mesh. Only the boundaries are numbered differently
176  /// to allow the easy identification of the "collapsible" segment.
177  /// Boundary coordinates are set up for all nodes
178  /// located on boundary 3 (the collapsible segment).
179  /// The curvilinear ("collapsible") segment is defined by
180  /// a \c GeomObject.
181  //====================================================================
182  template<class ELEMENT>
184  : public virtual CollapsibleChannelMesh<ELEMENT>,
185  public RefineableQuadMesh<ELEMENT>
186  {
187  public:
188  /// Constructor: Pass number of elements, lengths, pointer to
189  /// geometric object that describes the wall and timestepper
191  const unsigned& nup,
192  const unsigned& ncollapsible,
193  const unsigned& ndown,
194  const unsigned& ny,
195  const double& lup,
196  const double& lcollapsible,
197  const double& ldown,
198  const double& ly,
200  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
201  : CollapsibleChannelMesh<ELEMENT>(nup,
202  ncollapsible,
203  ndown,
204  ny,
205  lup,
206  lcollapsible,
207  ldown,
208  ly,
209  wall_pt,
210  time_stepper_pt)
211  {
212  // Build quadtree forest
213  this->setup_quadtree_forest();
214  }
215 
216 
217  /// Destructor(empty)
219  };
220 
221 
222  /// //////////////////////////////////////////////////////////////////
223  /// //////////////////////////////////////////////////////////////////
224  /// //////////////////////////////////////////////////////////////////
225 
226 
227  //=====start_of_mesh=======================================================
228  /// Collapsible channel mesh with MacroElement-based node update.
229  /// The collapsible segment is represented by the specified geometric object.
230  /// Some or all of the geometric Data in that geometric object
231  /// may contain unknowns in the global Problem. The dependency
232  /// on these unknowns is taken into account when setting up
233  /// the Jacobian matrix of the elements. For this purpose,
234  /// the element (whose type is specified by the template parameter)
235  /// must inherit from MacroElementNodeUpdateElementBase.
236  //========================================================================
237  template<class ELEMENT>
239  : public virtual MacroElementNodeUpdateMesh,
240  public virtual CollapsibleChannelMesh<ELEMENT>
241  {
242  public:
243  /// Constructor: Pass numbers of elements and dimensions of the
244  /// various parts of the collapsible channel, pointer to
245  /// geometric object that represents the wall and pointer to
246  /// timestepper (defaults to Steady).
248  const unsigned& nup,
249  const unsigned& ncollapsible,
250  const unsigned& ndown,
251  const unsigned& ny,
252  const double& lup,
253  const double& lcollapsible,
254  const double& ldown,
255  const double& ly,
257  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
258  : CollapsibleChannelMesh<ELEMENT>(nup,
259  ncollapsible,
260  ndown,
261  ny,
262  lup,
263  lcollapsible,
264  ldown,
265  ly,
266  wall_pt,
267  time_stepper_pt)
268  {
269 #ifdef PARANOID
270  ELEMENT* el_pt = new ELEMENT;
271  if (dynamic_cast<MacroElementNodeUpdateElementBase*>(el_pt) == 0)
272  {
273  std::ostringstream error_message;
274  error_message << "Base class for ELEMENT in "
275  << "MacroElementNodeUpdateCollapsibleChannelMesh needs"
276  << "to be of type MacroElementNodeUpdateElement!\n";
277  error_message << "Whereas it is: typeid(el_pt).name()"
278  << typeid(el_pt).name() << std::endl;
279 
280  std::string function_name =
281  "MacroElementNodeUpdateCollapsibleChannelMesh::\n";
282  function_name += "MacroElementNodeUpdateCollapsibleChannelMesh()";
283 
284  throw OomphLibError(error_message.str(),
285  OOMPH_CURRENT_FUNCTION,
286  OOMPH_EXCEPTION_LOCATION);
287  }
288  delete el_pt;
289 #endif
290 
291  // Setup all the information that's required for MacroElement-based
292  // node update: Tell the elements that their geometry depends on the
293  // wall geometric object
294  unsigned n_element = this->nelement();
295  for (unsigned i = 0; i < n_element; i++)
296  {
297  // Upcast from FiniteElement to the present element
298  ELEMENT* el_pt = dynamic_cast<ELEMENT*>(this->element_pt(i));
299 
300 #ifdef PARANOID
301  // Check if cast is successful
303  dynamic_cast<MacroElementNodeUpdateElementBase*>(el_pt);
304  if (m_el_pt == 0)
305  {
306  std::ostringstream error_message;
307  error_message
308  << "Failed to upcast to MacroElementNodeUpdateElementBase\n";
309  error_message << "Element must be derived from "
310  "MacroElementNodeUpdateElementBase\n";
311  error_message << "but it is of type " << typeid(el_pt).name();
312 
313  std::string function_name =
314  "MacroElementNodeUpdateCollapsibleChannelMesh::\n";
315  function_name += "MacroElementNodeUpdateCollapsibleChannelMesh()";
316 
317  throw OomphLibError(error_message.str(),
318  OOMPH_CURRENT_FUNCTION,
319  OOMPH_EXCEPTION_LOCATION);
320  }
321 #endif
322 
323  // There's just one GeomObject
324  Vector<GeomObject*> geom_object_pt(1);
325  geom_object_pt[0] = this->Wall_pt;
326 
327  // Tell the element which geom objects its macro-element-based
328  // node update depends on
329  el_pt->set_node_update_info(geom_object_pt);
330  }
331 
332  // Add the geometric object(s) for the wall to the mesh's storage
333  Vector<GeomObject*> geom_object_pt(1);
334  geom_object_pt[0] = this->Wall_pt;
336 
337  // Fill in the domain pointer to the mesh's storage in the base class
339 
340  } // end of constructor
341 
342 
343  /// Destructor: empty
345 
346 
347  }; // end of mesh
348 
349 
350  /// /////////////////////////////////////////////////////////////////////////
351  /// /////////////////////////////////////////////////////////////////////////
352  /// /////////////////////////////////////////////////////////////////////////
353 
354 
355  //=====start_of_mesh=======================================================
356  /// Refineable collapsible channel mesh with MacroElement-based node update.
357  /// The collapsible segment is represented by the specified geometric object.
358  /// Some or all of the geometric Data in that geometric object
359  /// may contain unknowns in the global Problem. The dependency
360  /// on these unknowns is taken into account when setting up
361  /// the Jacobian matrix of the elements. For this purpose,
362  /// the element (whose type is specified by the template parameter)
363  /// must inherit from MacroElementNodeUpdateElementBase.
364  //========================================================================
365  template<class ELEMENT>
367  : public virtual MacroElementNodeUpdateCollapsibleChannelMesh<ELEMENT>,
368  public virtual RefineableQuadMesh<ELEMENT>
369  {
370  public:
371  /// Constructor: Pass numbers of elements and dimensions of the
372  /// various parts of the collapsible channel, pointer to
373  /// geometric object that represents the wall and pointer to
374  /// timestepper (defaults to Steady).
376  const unsigned& nup,
377  const unsigned& ncollapsible,
378  const unsigned& ndown,
379  const unsigned& ny,
380  const double& lup,
381  const double& lcollapsible,
382  const double& ldown,
383  const double& ly,
385  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
386  : CollapsibleChannelMesh<ELEMENT>(nup,
387  ncollapsible,
388  ndown,
389  ny,
390  lup,
391  lcollapsible,
392  ldown,
393  ly,
394  wall_pt,
395  time_stepper_pt),
397  ncollapsible,
398  ndown,
399  ny,
400  lup,
401  lcollapsible,
402  ldown,
403  ly,
404  wall_pt,
405  time_stepper_pt)
406  {
407  // Build quadtree forest
408  this->setup_quadtree_forest();
409  }
410 
411  /// Destructor: empty
413 
414  }; // end of mesh
415 
416 
417  /// //////////////////////////////////////////////////////////////////
418  /// //////////////////////////////////////////////////////////////////
419  /// //////////////////////////////////////////////////////////////////
420 
421 
422  //========start_of_algebraic_collapsible_channel_mesh==============
423  /// Collapsible channel mesh with algebraic node update
424  //=================================================================
425  template<class ELEMENT>
427  : public virtual CollapsibleChannelMesh<ELEMENT>,
428  public AlgebraicMesh
429  {
430  public:
431  /// Constructor: Pass number of elements in upstream/collapsible/
432  /// downstream segment and across the channel; lengths of upstream/
433  /// collapsible/downstream segments and width of channel, pointer to
434  /// GeomObject that defines the collapsible segment and pointer to
435  /// TimeStepper (defaults to the default timestepper, Steady).
437  const unsigned& nup,
438  const unsigned& ncollapsible,
439  const unsigned& ndown,
440  const unsigned& ny,
441  const double& lup,
442  const double& lcollapsible,
443  const double& ldown,
444  const double& ly,
446  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
447  : CollapsibleChannelMesh<ELEMENT>(nup,
448  ncollapsible,
449  ndown,
450  ny,
451  lup,
452  lcollapsible,
453  ldown,
454  ly,
455  wall_pt,
456  time_stepper_pt)
457  {
458  // Add the geometric object to the list associated with this AlgebraicMesh
460 
461  // Setup algebraic node update operations
463  }
464 
465  /// Destructor: empty
467 
468 
469  /// Constructor: Pass number of elements in upstream/collapsible/
470  /// downstream segment and across the channel; lengths of upstream/
471  /// collapsible/downstream segments and width of channel, pointer to
472  /// GeomObject that defines the collapsible segment and pointer to
473  /// TimeStepper (defaults to the default timestepper, Steady).
475  const unsigned& nup,
476  const unsigned& ncollapsible,
477  const unsigned& ndown,
478  const unsigned& ny,
479  const double& lup,
480  const double& lcollapsible,
481  const double& ldown,
482  const double& ly,
484  CollapsibleChannelDomain::BLSquashFctPt bl_squash_function_pt,
485  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
486  : CollapsibleChannelMesh<ELEMENT>(nup,
487  ncollapsible,
488  ndown,
489  ny,
490  lup,
491  lcollapsible,
492  ldown,
493  ly,
494  wall_pt,
495  time_stepper_pt)
496  {
497  // Add the geometric object to the list associated with this AlgebraicMesh
499 
500  // Set boundary layer squash function
501  this->Domain_pt->bl_squash_fct_pt() = bl_squash_function_pt;
502 
503  // Do MacroElement-based node update
505 
506  // Setup algebraic node update operations
508  }
509 
510  /// Function pointer for function that squashes
511  /// the mesh near the walls. Default trivial mapping (the identity)
512  /// leaves vertical nodal positions unchanged. Mapping is
513  /// used in underlying CollapsibleChannelDomain. Broken function
514  /// that overloads the version in the CollapsibleChannelMesh.
515  /// It does not make sense to specify the function pointer
516  /// after the mesh has been set up!
518  {
519  std::ostringstream error_message;
520  error_message
521  << "It does not make sense to set the bl_squash_fct_pt \n"
522  << "outside the constructor as it's only used to set up the \n"
523  << "algebraic remesh data when the algebraic mesh is first built. \n";
524  std::string function_name =
525  "AlgebraicCollapsibleChannelMesh::bl_squash_fct_pt()\n";
526 
527  throw OomphLibError(
528  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
529 
530  // Dummy return
531  return Dummy_fct_pt;
532  }
533 
534 
535  /// Function pointer for function that redistributes nodes
536  /// axially. Default trivial mapping (the identity)
537  /// leaves vertical nodal positions unchanged. Mapping is
538  /// used in underlying CollapsibleChannelDomain. Broken function
539  /// that overloads the version in the CollapsibleChannelMesh.
540  /// It does not make sense to specify the function pointer
541  /// after the mesh has been set up!
543  {
544  std::ostringstream error_message;
545  error_message
546  << "It does not make sense to set the axial_spacing_fct_pt \n"
547  << "outside the constructor as it's only used to set up the \n"
548  << "algebraic remesh data when the algebraic mesh is first built. \n";
549  std::string function_name =
550  "AlgebraicCollapsibleChannelMesh::axial_spacing_fct_pt()\n";
551 
552  throw OomphLibError(
553  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
554 
555  // Dummy return
556  return Dummy_fct_pt;
557  }
558 
559 
560  /// Update nodal position at time level t (t=0: present;
561  /// t>0: previous)
562  void algebraic_node_update(const unsigned& t, AlgebraicNode*& node_pt);
563 
564  /// Update the node-udate data after mesh adaptation.
565  /// Empty -- no update of node update required as this is
566  /// non-refineable mesh.
568 
569  protected:
570  /// Function to setup the algebraic node update
572 
573  /// Dummy function pointer
575  };
576 
577 
578  /// ////////////////////////////////////////////////////////////////////////
579  /// ////////////////////////////////////////////////////////////////////////
580  /// ////////////////////////////////////////////////////////////////////////
581 
582 
583  //=====start_of_refineable_algebraic_collapsible_channel_mesh=====
584  /// Refineable version of the CollapsibleChannel mesh with
585  /// algebraic node update.
586  //=================================================================
587  template<class ELEMENT>
589  : public RefineableQuadMesh<ELEMENT>,
590  public virtual AlgebraicCollapsibleChannelMesh<ELEMENT>
591  {
592  public:
593  /// Constructor: Pass number of elements in upstream/collapsible/
594  /// downstream segment and across the channel; lengths of upstream/
595  /// collapsible/downstream segments and width of channel, pointer to
596  /// GeomObject that defines the collapsible segment and pointer to
597  /// TimeStepper (defaults to the default timestepper, Steady).
599  const unsigned& nup,
600  const unsigned& ncollapsible,
601  const unsigned& ndown,
602  const unsigned& ny,
603  const double& lup,
604  const double& lcollapsible,
605  const double& ldown,
606  const double& ly,
608  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
609  : CollapsibleChannelMesh<ELEMENT>(nup,
610  ncollapsible,
611  ndown,
612  ny,
613  lup,
614  lcollapsible,
615  ldown,
616  ly,
617  wall_pt,
618  time_stepper_pt),
619  AlgebraicCollapsibleChannelMesh<ELEMENT>(nup,
620  ncollapsible,
621  ndown,
622  ny,
623  lup,
624  lcollapsible,
625  ldown,
626  ly,
627  wall_pt,
628  time_stepper_pt)
629  {
630  // Build quadtree forest
631  this->setup_quadtree_forest();
632  }
633 
634 
635  /// Constructor: Pass number of elements in upstream/collapsible/
636  /// downstream segment and across the channel; lengths of upstream/
637  /// collapsible/downstream segments and width of channel, pointer to
638  /// GeomObject that defines the collapsible segment and pointer to
639  /// TimeStepper (defaults to the default timestepper, Steady).
641  const unsigned& nup,
642  const unsigned& ncollapsible,
643  const unsigned& ndown,
644  const unsigned& ny,
645  const double& lup,
646  const double& lcollapsible,
647  const double& ldown,
648  const double& ly,
650  CollapsibleChannelDomain::BLSquashFctPt bl_squash_function_pt,
651  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
652  : CollapsibleChannelMesh<ELEMENT>(nup,
653  ncollapsible,
654  ndown,
655  ny,
656  lup,
657  lcollapsible,
658  ldown,
659  ly,
660  wall_pt,
661  time_stepper_pt),
662  AlgebraicCollapsibleChannelMesh<ELEMENT>(nup,
663  ncollapsible,
664  ndown,
665  ny,
666  lup,
667  lcollapsible,
668  ldown,
669  ly,
670  wall_pt,
671  bl_squash_function_pt,
672  time_stepper_pt)
673  {
674  // Build quadtree forest
675  this->setup_quadtree_forest();
676  }
677 
678  /// Update the node update data for specified node following
679  /// any mesh adapation
681  };
682 
683 
684 } // namespace oomph
685 
686 #endif
cstr elem_len * i
Definition: cfortran.h:603
char t
Definition: cfortran.h:568
////////////////////////////////////////////////////////////////// //////////////////////////////////...
AlgebraicCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, CollapsibleChannelDomain::BLSquashFctPt bl_squash_function_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in upstream/collapsible/ downstream segment and across the chann...
void setup_algebraic_node_update()
Function to setup the algebraic node update.
CollapsibleChannelDomain::BLSquashFctPt Dummy_fct_pt
Dummy function pointer.
void update_node_update(AlgebraicNode *&node_pt)
Update the node-udate data after mesh adaptation. Empty – no update of node update required as this i...
CollapsibleChannelDomain::BLSquashFctPt & bl_squash_fct_pt()
Function pointer for function that squashes the mesh near the walls. Default trivial mapping (the ide...
AlgebraicCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in upstream/collapsible/ downstream segment and across the chann...
void algebraic_node_update(const unsigned &t, AlgebraicNode *&node_pt)
Update nodal position at time level t (t=0: present; t>0: previous)
CollapsibleChannelDomain::BLSquashFctPt & axial_spacing_fct_pt()
Function pointer for function that redistributes nodes axially. Default trivial mapping (the identity...
////////////////////////////////////////////////////////////////////
void add_geom_object_list_pt(GeomObject *geom_object_pt)
Add the specified GeomObject to the list of geometric objects associated with this AlgebraicMesh; rem...
AlgebraicNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global AlgebraicNode.
////////////////////////////////////////////////////////////////////
AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function that implements axial spacing of macro elements.
double(* BLSquashFctPt)(const double &s)
Typedef for function pointer for function that squashes the macro elements near the wall to help reso...
double(* AxialSpacingFctPt)(const double &xi)
Typedef for function pointer for function that implements axial spacing of macro elements.
BLSquashFctPt & bl_squash_fct_pt()
Function pointer for function that squashes the macro elements near wall. Default mapping (identity) ...
Basic collapsible channel mesh. The mesh is derived from the SimpleRectangularQuadMesh so it's node a...
GeomObject *& wall_pt()
Access function to GeomObject representing wall.
GeomObject * Wall_pt
Pointer to geometric object that represents the moving wall.
CollapsibleChannelDomain * domain_pt()
Access function to domain.
CollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in upstream/collapsible/ downstream segment and across the chann...
CollapsibleChannelDomain::BLSquashFctPt bl_squash_fct_pt() const
Function pointer for function that squashes the mesh near the walls. Default trivial mapping (the ide...
virtual CollapsibleChannelDomain::AxialSpacingFctPt & axial_spacing_fct_pt() const
Function pointer for function that redistributes the elements in the axial direction....
unsigned Ncollapsible
Number of element columns in collapsible part.
virtual CollapsibleChannelDomain::BLSquashFctPt & bl_squash_fct_pt()
Function pointer for function that squashes the mesh near the walls. Default trivial mapping (the ide...
unsigned Nup
Number of element columns in upstream part.
virtual CollapsibleChannelDomain::AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function that redistributes the elements in the axial direction....
unsigned Ndown
Number of element columns in downstream part.
CollapsibleChannelDomain * Domain_pt
Pointer to domain.
unsigned Ny
Number of element rows across channel.
/////////////////////////////////////////////////////////////////////
Definition: geom_objects.h:101
////////////////////////////////////////////////////////////////// //////////////////////////////////...
MacroElementNodeUpdateCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass numbers of elements and dimensions of the various parts of the collapsible channel,...
////////////////////////////////////////////////////////////////////
MacroElementNodeUpdateMeshes contain MacroElementNodeUpdateNodes which have their own node update fun...
void set_geom_object_vector_pt(Vector< GeomObject * > geom_object_vector_pt)
Set geometric objects associated with MacroElementNodeUpdateMesh; this must also be called from the c...
Domain *& macro_domain_pt()
Broken assignment operator.
///////////////////////////////////////////////////////////////////////// ///////////////////////////...
MacroElementNodeUpdateRefineableCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass numbers of elements and dimensions of the various parts of the collapsible channel,...
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors.
Definition: mesh.h:75
virtual void node_update(const bool &update_all_solid_nodes=false)
Update nodal positions in response to changes in the domain shape. Uses the FiniteElement::get_x(....
Definition: mesh.cc:287
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
Definition: mesh.h:460
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
An OomphLibError object which should be thrown when an run-time error is encountered....
//////////////////////////////////////////////////////////////////////// ////////////////////////////...
void update_node_update(AlgebraicNode *&node_pt)
Update the node update data for specified node following any mesh adapation.
RefineableAlgebraicCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in upstream/collapsible/ downstream segment and across the chann...
RefineableAlgebraicCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, CollapsibleChannelDomain::BLSquashFctPt bl_squash_function_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in upstream/collapsible/ downstream segment and across the chann...
////////////////////////////////////////////////////////////////// //////////////////////////////////...
RefineableCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements, lengths, pointer to geometric object that describes the wall an...
Intermediate mesh class that implements the mesh adaptation functions specified in the TreeBasedRefin...
void setup_quadtree_forest()
Set up QuadTreeForest. Wipes any existing tree structure below the minimum refinement level and regar...
Simple rectangular 2D Quad mesh class. Nx : number of elements in the x direction.
const unsigned & ny() const
Access function for number of elements in y directions.
////////////////////////////////////////////////////////////////////// //////////////////////////////...
Definition: timesteppers.h:231
A slight extension to the standard template vector class so that we can include "graceful" array rang...
Definition: Vector.h:58
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...