streamfunction_include.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 //Header file for my streamfunction problem class
27 
28 //Needs to include the refineable streamfunction element class
30 
31 namespace oomph
32 {
33 
34 //======================================================================
36 //======================================================================
37 class streamfunction_mesh : public virtual Refineable_r_mesh<RefineablePolarStreamfunctionElement>
38 {
39 protected:
40 
41  //Storage for pointers to my traction elements
44 
45 public:
46 
49  {return Inlet_traction_elt_pt[e];}
54  {return Outlet_traction_elt_pt[e];}
57 
60  streamfunction_mesh(const unsigned int &nx,const unsigned int &ny) :
62  {
63  //Now bolt on traction stuff
64 
65  //Assign fluid elements to vector
67 
68  //We need traction elements at both inlet and outlet
71  }
72 
73  //Function to add the traction boundary elements
74  void make_traction_elements(const bool& outlet)
75  {
76  //Specify inlet/outlet specific quantities
77  unsigned ibound; int index;
78  if(outlet) {ibound=1;index=1;}
79  else {ibound=3;index=-1;}
80 
81  unsigned num_elt = this->nboundary_element(ibound);
82 
83  //Loop over the number of elements on the boundary
84  for(unsigned ielt=0;ielt<num_elt;ielt++)
85  {
88  (this->boundary_element_pt(ibound,ielt),index);
89  //Push it back onto the Element_pt Vector
90  this->Element_pt.push_back(surface_element_pt);
91 
92  if(outlet) { this->Outlet_traction_elt_pt.push_back(surface_element_pt); }
93  else { this->Inlet_traction_elt_pt.push_back(surface_element_pt); }
94 
95  //Any other information to pass:
96  surface_element_pt->set_boundary(index);
97  surface_element_pt->alpha_pt() = &Global_Physical_Variables::Alpha;
98 
99  }//End of loop over elements
100 
101  std::cout << std::endl << "Streamfunction traction elements attached to streamfunction_mesh" << std::endl << std::endl;
102 
103  }//End of make traction elements
104 
105  //Function to remove the traction boundary elements
107  {
108  //Find the number of traction elements
109  unsigned Ntraction = this->inlet_traction_elt_length();
110  Ntraction += this->outlet_traction_elt_length();
111 
112  //The traction elements are ALWAYS? stored at the end
113  //So delete and remove them
114  for(unsigned e=0;e<Ntraction;e++)
115  {
116  delete this->Element_pt.back();
117  this->Element_pt.pop_back();
118  }
119 
120  //Now clear the vectors of pointers to traction elements
121  Inlet_traction_elt_pt.clear();
122  Outlet_traction_elt_pt.clear();
123 
124  std::cout << std::endl << "Streamfunction traction elements removed from streamfunction_mesh" << std::endl << std::endl;
125 
126  }//End of remove_traction_elements
127 
128  //Function to put current fluid elements into a vector of their own
130  {
131  unsigned check=inlet_traction_elt_length();
133 
134  this->Fluid_elt_pt.clear();
135 
136  if(check!=0)
137  {
138  std::cout << "Warning, attempting to assemble streamfunction element vector ";
139  std::cout << "whilst streamfunction traction elements are attached to the mesh" << std::endl;
140  }
141  else
142  {
143  unsigned n_elt = this->Element_pt.size();
144  for(unsigned e=0;e<n_elt;e++)
145  {
146  this->Fluid_elt_pt.push_back(this->Element_pt[e]);
147  }
148  }
149  }//End of assign_fluid_element_vector
150 
151 }; //End of streamfunction_mesh class
152 
153 //====================================================================
155 //====================================================================
156 
157 //====== start_of_problem_class=======================================
159 //====================================================================
161 {
162 protected:
163 
166 
167 public:
168 
170  StreamfunctionProblem(const bool& eigen);
171 
174 
177  void actions_before_solve();
178 
181 
184  {
185  // Strip traction elements from mesh before refine
187  }
188 
191  {
192  //Reassign fluid elements to storage
194 
195  //Add traction elements back onto the mesh
198 
199  //Repin the velocities stored at all nodes
200  pin_velocities();
201 
202  //Repin boundaries?
203  //pin_boundaries();
204  }
205 
206  // Access function for the specific mesh
208  {
209  // Upcast from pointer to the Mesh base class to the specific
210  // element type that we're using here.
211  return dynamic_cast<streamfunction_mesh* >(Problem::mesh_pt());
212  }
213 
215  void pin_boundaries();
216 
218  void pin_velocities();
219 
221  void assign_velocities();
222 
224  void get_vels(const Vector<double>& x_to_get, double& stream);
225 
227  void my_output(const int radial,
228  const int azimuthal,
229  bool log_output,string file_name);
230 
233  void doc_solution(DocInfo& doc_info);
234 
235  // Header for doc_solution
236  void header( ofstream &some_file );
237 
238 }; // end of problem class
239 
240 //=====start_of_constructor===============================================
242 //========================================================================
244 {
245  // Are we solving for an eigenfunction?
246  this->eigenfunction=eigen;
247 
248  // Setup mesh
249 
250  // # of elements in x-direction
253 
254  // Build and assign mesh
255  //Problem::mesh_pt() = new streamfunction_mesh<RefineablePolarStreamfunctionElement>(n_x,n_y);
256  Problem::mesh_pt() = new streamfunction_mesh(n_x,n_y);
257 
258  // Set error estimator
261 
262  // Pin the relevant boundaries
263  pin_boundaries();
264 
265  // Now loop over all nodes and pin the nodal dofs storing velocities
266  pin_velocities();
267 
268  // Complete the build of all elements so they are fully functional
269 
270  //Find number of fluid elements in mesh
271  unsigned n_fluid = mesh_pt()->fluid_elt_length();
272  for(unsigned i=0;i<n_fluid;i++)
273  {
274  // Upcast from GeneralsedElement to the present element
276 
277  //Set the pointer to the angle Alpha
279  }
280 
281  //Find number of traction elements in mesh
282 
283  // Setup equation numbering scheme
284  std::cout <<"Number of equations: " << assign_eqn_numbers() << std::endl;
285 
286 } // end of constructor
287 
288 //========================================start_of_actions_before_solve===
291 //========================================================================
293 {
294  // How many boundaries are there?
295  unsigned n_bound = mesh_pt()->nboundary();
296 
297  //Loop over the side boundaries
298  for(unsigned i=0;i<n_bound;i+=2)
299  {
300  // How many nodes are there on this boundary?
301  unsigned n_node = mesh_pt()->nboundary_node(i);
302 
303  // Loop over the nodes on boundary
304  for (unsigned n=0;n<n_node;n++)
305  {
306  // Get pointer to node
307  Node* nod_pt=mesh_pt()->boundary_node_pt(i,n);
308 
309  // Extract nodal coordinates from node:
310  Vector<double> x(2);
311  x[0]=nod_pt->x(0);
312  x[1]=nod_pt->x(1);
313 
314  double stream = 0.5*x[1];
315  // Zero boundary conditions for eigenproblem
316  if(this->eigenfunction) stream=0.0;
317 
318  // Assign values to the first nodal value
319  nod_pt->set_value(0,stream);
320 
321  }
322  }
323 } // end of actions before solve
324 
325 //========================================================================
327 //========================================================================
329 {
330  unsigned n_bound = mesh_pt()->nboundary();
331  //for(unsigned i=0;i<n_bound;i++)
332  for(unsigned i=0;i<n_bound;i+=2)
333  {
334  unsigned n_node = mesh_pt()->nboundary_node(i);
335  for (unsigned n=0;n<n_node;n++)
336  {
337  //Pin both streamfunction and vorcitity at boundaries
338  mesh_pt()->boundary_node_pt(i,n)->pin(0);
339  }
340  }
341 
342 } // end of pin_boundaries
343 
344 //========================================================================
346 //========================================================================
348 {
349  // Loop over all nodes and asign values for velocites
350  unsigned num_nod = mesh_pt()->nnode();
351  for(unsigned i=0;i<num_nod;i++)
352  {
353  mesh_pt()->node_pt(i)->pin(1);
354  mesh_pt()->node_pt(i)->pin(2);
355  }
356 
357 } // end of pin_velocities
358 
359 //========================================================================
361 //========================================================================
363 {
364  // Loop over all nodes and asign values for velocites
365  unsigned num_nod = mesh_pt()->nnode();
366  for(unsigned i=0;i<num_nod;i++)
367  {
368  // Extract nodal coordinates from node:
369  Vector<double> x(2);
370  x[0]=mesh_pt()->node_pt(i)->x(0);
371  x[1]=mesh_pt()->node_pt(i)->x(1);
372 
373  //double A = Global_Physical_Variables::Alpha;
374 
375  //double u=(x[0]/A)*cos(x[1])-(1./(4.*A));
376  //double v=-2.*x[0]*sin(x[1])+0.25*x[1];
377  //A=0.0;
378  double u=0.0;double v=0.0;
379 
380  mesh_pt()->node_pt(i)->set_value(1,u);
381  mesh_pt()->node_pt(i)->set_value(2,v);
382  }
383 
384 } // end of assign_velocities
385 
386 //========================================================================
387 // Rich's function for locating the element which contains given
388 // coordinates and returning u,v there
389 // Note that this function currently fails at r and theta max
390 //========================================================================
391 void StreamfunctionProblem::get_vels(const Vector<double>& x_to_get, double& stream)
392 {
393  // local coord
394  Vector<double> s( 2, 0.0 );
395  // global coords
396  Vector<double> x_lower_left( 2, 0.0 );
397  Vector<double> x_centre( 2, 0.0 );
398  Vector<double> x_upper_right( 2, 0.0 );
399  Vector<double> x( 2, 0.0 );
400  double a,b,c,sub;
401  //Reset interpolated velocity - check they're being set at some point
402  stream=-2.;
403 
404  // Loop over all the (fluid) elements
405  unsigned long n_element = mesh_pt() -> nelement();
406  for ( unsigned long e = 0; e < n_element; e++ )
407  {
408  // Cast to the particular element type, this is necessary because
409  // the base elements don't have the member functions that we're about
410  // to call!
411  RefineablePolarStreamfunctionElement* elt_pt = dynamic_cast<RefineablePolarStreamfunctionElement*>( mesh_pt() -> element_pt(e) );
412 
413  s[0] = -1.0; s[1] = -1.0;
414  elt_pt -> get_x( s, x_lower_left );
415 
416  s[0] = 1.0; s[1] = 1.0;
417  elt_pt -> get_x( s, x_upper_right );
418 
419  // check the elts lower left corner is SW of point to return
420  if ( ( x_lower_left[0] <= x_to_get[0] )
421  && ( x_lower_left[1] <= x_to_get[1] ) )
422  {
423  // check the elts upper right corner is NE of point to return
424  if ( ( x_upper_right[0] > x_to_get[0] )
425  && ( x_upper_right[1] > x_to_get[1] ) )
426  {
427  //Quadratic interpolation:
428  a=x_lower_left[0];
429  s[0] = 0.0; s[1] = 0.0;
430  elt_pt -> get_x( s, x_centre );
431  b=x_centre[0];
432  c=x_upper_right[0];
433  sub=pow(c-a,2.0)-8.0*(a+c-2.0*b)*(b-x_to_get[0]);
434 
435  if(abs(a+c-2.*b)<1.e-8)s[0] = -1.0 + 2.*( x_to_get[0] - x_lower_left[0] )
436  / ( x_upper_right[0] - x_lower_left[0] );
437  else s[0]=((a-c)+sqrt(sub))/(2.0*(a+c-2.0*b));
438 
439  // our point to get is in the current elt
440  // now work out the local coordinate
441  // This only works for evenly spaced global
442  // coordinates across the element - Not true
443  // in radial direction.
444  s[1] = -1.0 + 2.*( x_to_get[1] - x_lower_left[1] )
445  / ( x_upper_right[1] - x_lower_left[1] );
446 
447  // check on my quadratic interpolation
448  elt_pt -> get_x( s, x );
449 
450  if(abs(x[0]-x_to_get[0])>1.e-12)
451  {
452  if(abs(a+c-2.*b)<1.e-8) std::cout << "Element almost linear: " << abs(a+c-2.*b) << std::endl;
453  std::cout << "error in interpolation: " << (x[0]-x_to_get[0]) << std::endl;
454  std::cout << "r:" << x[0] << "r to get: " << x_to_get[0] << std::endl;
455  }
456 
457  // get the position of this
458  elt_pt -> get_x( s, x );
459  stream = elt_pt -> interpolated_streamfunction( s );
460 
461  break;
462  }
463  }
464  //return vels;
465  }
466 }
467 
468 //========================================================================
469 // My function for outputting the streamfunction using
470 // Rich's get_vels() function
471 //========================================================================
472 void StreamfunctionProblem::my_output(const int radial,const int azimuthal,bool log_output,string file_name)
473 {
474  // Quick adjustment so that I don't ever end up exactly on a boundary
475  // (get_vels fails on certain boundaries)
476  // (current difference between x_to_get and x_upper_right around 7.e-15 so
477  // 1.e-13 should be fine...)
478  double inner=Global_Physical_Variables::R_l+1.e-13;
479  double outer=Global_Physical_Variables::R_r-1.e-13;
480  // And the same for azimuthal direction
481  double left=-1.+1.e-13;
482  double right=1.-1.e-13;
483 
484  // Set up common ratio for log spaced output
485  double R = pow((outer/inner),(1.0/(radial - 1.0)));
486 
487  // New output file
488  ofstream out;
489  out.open(file_name.c_str());
490 
491  out << "# Streamfunction output at " << radial << " radial and " << azimuthal << " azimuthal points" << std::endl;
492  out << "# Re = " << Global_Physical_Variables::Re << " Alpha = " << Global_Physical_Variables::Alpha
493  << " R_l = " << Global_Physical_Variables::R_l << std::endl;
494  out << "# Initial xmesh: " << Global_Physical_Variables::xmesh << " Initial ymesh " << Global_Physical_Variables::ymesh << std::endl;
495  out << "# Uniform refinements: " << Global_Physical_Variables::uniform << " Adaptive refinements: " << Global_Physical_Variables::adaptive << std::endl;
496  out << "# log_mesh = " << Global_Physical_Variables::log_mesh << " new_outlet_region = " << Global_Physical_Variables::new_outlet_region << std::endl;
497  out << "# Inlet traction: " << Global_Physical_Variables::inlet_traction << " Outlet traction: " << Global_Physical_Variables::outlet_traction << std::endl;
498  out << "# eta_inlet: " << Global_Physical_Variables::eta_inlet << " eta_outlet: " << Global_Physical_Variables::eta_outlet << std::endl;
499  out << "# Pin v at inlet: " << Global_Physical_Variables::pinv << std::endl;
500  out << std::endl;
501 
502  std::cout << endl;
503  std::cout << "Outputting streamfunction to file " << file_name << " at " << radial
504  << " radial plot points and " << azimuthal << " azimuthal points." << std::endl;
505  std::cout << std::endl;
506 
507  //Position of elements
508  Vector<double> position(2,0.0);
509  double stream=0.0;
510 
511  //Loops now radial inside azimuthal to agree with my poisson solver
512  if(log_output)
513  {
514  for(int i=0;i<radial;i++)
515  {
516  // Update radial position
517  position[0]=inner*pow(R,i);
518 
519  for(int j=0;j<azimuthal;j++)
520  {
521  // Update azimuthal position
522  position[1]=left + ((right-left)*j)/(azimuthal-1.0);
523 
524  // Read off the velocity at this point
525  get_vels(position,stream);
526 
527  // Output to file
528  out << position[0] << " " << position[1] << " " << stream << std::endl;
529 
530  } // End of loop over azimuthal
531 
532  out << std::endl;
533 
534  } // End of loop over radial
535 
536  } // End of log spaced output loop
537  else
538  {
539  for(int i=0;i<radial;i++)
540  {
541  // Update radial position
542  position[0]=inner + ((outer-inner)*i)/(radial-1.0);
543 
544  for(int j=0;j<azimuthal;j++)
545  {
546  // Update azimthual position
547  position[1]=left + ((right-left)*j)/(azimuthal-1.0);
548 
549  // Read off the velocity at this point
550  get_vels(position,stream);
551 
552  // Output to file
553  out << position[0] << " " << position[1] << " " << stream << std::endl;
554 
555  } // End of loop over azimuthal
556 
557  out << std::endl;
558 
559  } // End of loop over radial
560 
561  } // End of regular spaced output loop
562 
563  out.close();
564 
565 }
566 
567 //===============start_of_doc=============================================
569 //========================================================================
571 {
572  ofstream some_file;
573  char filename[100];
574 
575  // Number of plot points: npts x npts
576  unsigned npts=3;
577 
578  // Output solution
579  //-----------------
580  sprintf(filename,"%s/streamfunction%i.dat",doc_info.directory().c_str(),
581  doc_info.number());
582  some_file.open(filename);
583  header(some_file);
584  mesh_pt()->output(some_file,npts);
585  some_file.close();
586 
587 } // end of doc
588 
589 void StreamfunctionProblem::header( ofstream &some_file )
590  {
591  some_file << "# Refineable streamfunction mesh" << "\n";
592  some_file << "# Re = " << Global_Physical_Variables::Re << " Alpha = " << Global_Physical_Variables::Alpha
593  << " R_l = " << Global_Physical_Variables::R_l << "\n";
594  some_file << "# Initial xmesh = " << Global_Physical_Variables::xmesh
595  << " Initial ymesh = " << Global_Physical_Variables::ymesh << "\n";
596  some_file << "# Uniform refinements: " << Global_Physical_Variables::uniform
597  << " Adaptive refinements: " << Global_Physical_Variables::adaptive << "\n";
598  some_file << "# inlet_traction = " << Global_Physical_Variables::inlet_traction
599  << " eta_inlet = " << Global_Physical_Variables::eta_inlet << "\n";
600  some_file << "# outlet_traction = " << Global_Physical_Variables::outlet_traction
601  << " eta_outlet = " << Global_Physical_Variables::eta_outlet << "\n";
602  some_file << "# log_mesh = " << Global_Physical_Variables::log_mesh
603  << " new_outlet_region = " << Global_Physical_Variables::new_outlet_region << "\n";
604  some_file << "# pinv = " << Global_Physical_Variables::pinv << "\n";
605  some_file << "\n";
606  }
607 
608 //====================================================================
610 //====================================================================
611 
612 } //End of namespace oomph
AnnoyingScalar abs(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:135
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
@ R
Definition: StatisticsVector.h:21
Scalar * b
Definition: benchVecAdd.cpp:17
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
void set_value(const unsigned &i, const double &value_)
Definition: nodes.h:271
Definition: oomph_utilities.h:499
std::string directory() const
Output directory.
Definition: oomph_utilities.h:524
unsigned & number()
Number used (e.g.) for labeling output files.
Definition: oomph_utilities.h:554
unsigned long nboundary_node(const unsigned &ibound) const
Return number of nodes on a particular boundary.
Definition: mesh.h:833
unsigned nboundary_element(const unsigned &b) const
Return number of finite elements that are adjacent to boundary b.
Definition: mesh.h:878
unsigned nboundary() const
Return number of boundaries.
Definition: mesh.h:827
FiniteElement * boundary_element_pt(const unsigned &b, const unsigned &e) const
Return pointer to e-th finite element on boundary b.
Definition: mesh.h:840
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Definition: mesh.h:448
unsigned long nnode() const
Return number of nodes in the mesh.
Definition: mesh.h:596
void output(std::ostream &outfile)
Output for all elements.
Definition: mesh.cc:2027
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
Definition: mesh.h:436
Node *& boundary_node_pt(const unsigned &b, const unsigned &n)
Return pointer to node n on boundary b.
Definition: mesh.h:493
Vector< GeneralisedElement * > Element_pt
Vector of pointers to generalised elements.
Definition: mesh.h:186
Definition: nodes.h:906
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
double *& alpha_pt()
Pointer to Alpha.
Definition: streamfunction_elements.h:49
Definition: polar_streamfunction_traction_elements.h:45
void set_boundary(int bound)
Function to set boundary.
Definition: polar_streamfunction_traction_elements.h:106
double *& alpha_pt()
Pointer to Alpha.
Definition: polar_streamfunction_traction_elements.h:100
Definition: problem.h:151
Mesh *& mesh_pt()
Return a pointer to the global mesh.
Definition: problem.h:1280
unsigned long assign_eqn_numbers(const bool &assign_local_eqn_numbers=true)
Definition: problem.cc:1989
const unsigned & ny() const
Return number of elements in y direction.
Definition: rectangular_quadmesh.template.h:231
const unsigned & nx() const
Return number of elements in x direction.
Definition: rectangular_quadmesh.template.h:224
ErrorEstimator *& spatial_error_estimator_pt()
Access to spatial error estimator.
Definition: refineable_mesh.h:143
Definition: refineable_streamfunction_elements.h:176
My log r spaced mesh.
Definition: refineable_r_mesh.h:37
Vector< GeneralisedElement * > Fluid_elt_pt
Definition: refineable_r_mesh.h:41
unsigned fluid_elt_length()
Return length of fluid element vector.
Definition: refineable_r_mesh.h:49
Polar Streamfunction problem class.
Definition: streamfunction_include.h:161
void my_output(const int radial, const int azimuthal, bool log_output, string file_name)
Output the streamfunction on a regular grid.
Definition: streamfunction_include.h:472
void actions_after_solve()
Update the problem after solve (empty)
Definition: streamfunction_include.h:180
void header(ofstream &some_file)
Definition: streamfunction_include.h:589
void get_vels(const Vector< double > &x_to_get, double &stream)
Return the value of the streamfunction at given global coordinates.
Definition: streamfunction_include.h:391
~StreamfunctionProblem()
Destructor (empty – all the cleanup is done in base class)
Definition: streamfunction_include.h:173
void pin_velocities()
Pin velocities.
Definition: streamfunction_include.h:347
streamfunction_mesh * mesh_pt()
Definition: streamfunction_include.h:207
void pin_boundaries()
Pin boundaries.
Definition: streamfunction_include.h:328
void actions_before_solve()
Definition: streamfunction_include.h:292
bool eigenfunction
Storage for whether we're solving for an eigenfunction or not.
Definition: streamfunction_include.h:165
void assign_velocities()
Assign velocities to nodes.
Definition: streamfunction_include.h:362
StreamfunctionProblem(const bool &eigen)
Constructor: Pass pointer to source function.
Definition: streamfunction_include.h:243
void actions_after_adapt()
After adaptation: Unpin all pressures and then pin redudant pressure dofs.
Definition: streamfunction_include.h:190
void doc_solution(DocInfo &doc_info)
Doc the solution: doc_info contains labels/output directory etc.
Definition: streamfunction_include.h:570
void actions_before_adapt()
Before adaptation:
Definition: streamfunction_include.h:183
Definition: oomph-lib/src/generic/Vector.h:58
Definition: error_estimator.h:266
My streamfunction mesh class.
Definition: streamfunction_include.h:38
Vector< PolarStreamfunctionTractionElement< RefineablePolarStreamfunctionElement > * > Inlet_traction_elt_pt
Definition: streamfunction_include.h:42
void remove_traction_elements()
Definition: streamfunction_include.h:106
PolarStreamfunctionTractionElement< RefineablePolarStreamfunctionElement > * inlet_traction_elt_pt(unsigned e)
Return pointer to inlet traction element e.
Definition: streamfunction_include.h:48
unsigned inlet_traction_elt_length()
Return length of inlet traction element vector.
Definition: streamfunction_include.h:51
Vector< PolarStreamfunctionTractionElement< RefineablePolarStreamfunctionElement > * > Outlet_traction_elt_pt
Definition: streamfunction_include.h:43
PolarStreamfunctionTractionElement< RefineablePolarStreamfunctionElement > * outlet_traction_elt_pt(unsigned e)
Return pointer to outlet traction element e.
Definition: streamfunction_include.h:53
void make_traction_elements(const bool &outlet)
Definition: streamfunction_include.h:74
streamfunction_mesh(const unsigned int &nx, const unsigned int &ny)
Definition: streamfunction_include.h:60
void assign_fluid_element_vector()
Definition: streamfunction_include.h:129
unsigned outlet_traction_elt_length()
Return length of outlet traction element vector.
Definition: streamfunction_include.h:56
void check(bool b, bool ref)
Definition: fastmath.cpp:12
RealScalar s
Definition: level1_cplx_impl.h:130
const Scalar * a
Definition: level2_cplx_impl.h:32
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
int ymesh
Definition: jeffery_hamel.cc:62
int adaptive
Definition: jeffery_hamel.cc:106
bool pinv
Definition: jeffery_hamel.cc:86
bool new_outlet_region
Definition: jeffery_hamel.cc:93
bool outlet_traction
Definition: jeffery_hamel.cc:82
bool log_mesh
Definition: jeffery_hamel.cc:92
int uniform
Definition: jeffery_hamel.cc:106
int xmesh
Definition: jeffery_hamel.cc:61
double R_l
Definition: jeffery_hamel.cc:57
double eta_inlet
Definition: jeffery_hamel.cc:80
double Alpha
Scaling factor for wall thickness (to be used in an exercise)
Definition: unsteady_ring.cc:73
bool inlet_traction
Definition: jeffery_hamel.cc:79
double R_r
Definition: jeffery_hamel.cc:58
double eta_outlet
Definition: jeffery_hamel.cc:83
string filename
Definition: MergeRestartFiles.py:39
Z2ErrorEstimator * error_estimator_pt
Definition: MortaringCantileverCompareToNonMortaring.cpp:190
string file_name
Definition: Particles2023AnalysisHung.py:321
int c
Definition: calibrate.py:100
double Re
Hydrodynamic Parameters.
Definition: refineable_two_layer_soluble_surfactant.cc:106
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
list x
Definition: plotDoE.py:28
EIGEN_DONT_INLINE T sub(T a, T b)
Definition: svd_common.h:238
std::ofstream out("Result.txt")
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2