geom_obj_with_boundary.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: 1097 $
7 //LIC//
8 //LIC// $LastChangedDate: 2015-12-17 11:53:17 +0000 (Thu, 17 Dec 2015) $
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_GEOM_OBJ_WITH_BOUNDARY_HEADER
31 #define OOMPH_GEOM_OBJ_WITH_BOUNDARY_HEADER
32 
33 
34 // Config header generated by autoconfig
35 #ifdef HAVE_CONFIG_H
36  #include <oomph-lib-config.h>
37 #endif
38 
39 
40 //oomph-lib headers
41 #include "geom_objects.h"
42 
43 
44 namespace oomph
45 {
46 
47 
48 //===========================================================================
49 /// Base class for upgraded disk-like GeomObject (i.e. 2D surface in 3D space)
50 /// with specification of boundaries. The GeomObject's position(...)
51 /// function computes the 3D (Eulerian) position vector r as a function of the
52 /// 2D intrinsic (Lagrangian) coordinates, zeta, without reference to
53 /// any boundaries. This class specifies the boundaries by specifying
54 /// a mapping from a 1D intrinsic boundary coordinate, zeta_bound,
55 /// to the 2D intrinsic (Lagrangian) coordinates, zeta.
56 ///
57 /// The class is made functional by provision (in the derived class!) of:
58 /// - a pointer to a GeomObject<1,2> that parametrises the 2D intrinisic
59 /// coordinates zeta along boundary b in terms of the 1D boundary
60 /// coordinate, zeta_bound,
61 /// - the initial value of the 1D boundary coordinate zeta_bound on boundary b,
62 /// - the final value of the 1D boundary coordinate zeta_bound on boundary b
63 /// .
64 /// for each of these boundaries. All three containers for these
65 /// must be resized (consistently) and populated in the derived class.
66 /// Number of boundaries is inferred from their size.
67 ///
68 /// Class also provides broken virtual function to specify boundary triads,
69 /// and various output functions.
70 //===========================================================================
72 {
73 
74 public:
75 
76  /// Constructor
78  {}
79 
80  /// How many boundaries do we have?
81  unsigned nboundary() const
82  {
84  }
85 
86  /// \short Compute 3D vector of Eulerian coordinates at 1D boundary coordinate
87  /// zeta_bound on boundary b:
88  void position_on_boundary(const unsigned& b,
89  const double& zeta_bound,
90  Vector<double>& r) const
91  {
92  Vector<double> zeta(2);
93  zeta_on_boundary(b,zeta_bound,zeta);
94  position(zeta,r);
95  }
96 
97  /// \short Compute 2D vector of intrinsic coordinates at 1D boundary coordinate
98  /// zeta_bound on boundary b:
99  void zeta_on_boundary(const unsigned& b,
100  const double& zeta_bound,
101  Vector<double>& zeta) const
102  {
103 #ifdef PARANOID
105  {
106  std::ostringstream error_message;
107  error_message
108  << "You must create a <1,2> Geom Object that provides a\n"
109  << "mapping from the 1D boundary coordinate to the 2D\n"
110  << "intrinsic Lagrangian coordinate of disk-like object\n"
111  << std::endl;
112  throw OomphLibError(error_message.str(),
113  OOMPH_CURRENT_FUNCTION,
114  OOMPH_EXCEPTION_LOCATION);
115  }
117  {
118  std::ostringstream error_message;
119  error_message
120  << "Boundary_parametrising_geom_object_pt must point to\n"
121  << "GeomObject with one Lagrangian coordinate. Yours has "
122  << Boundary_parametrising_geom_object_pt[b]->nlagrangian()
123  << std::endl;
124  throw OomphLibError(error_message.str(),
125  OOMPH_CURRENT_FUNCTION,
126  OOMPH_EXCEPTION_LOCATION);
127  }
129  {
130  std::ostringstream error_message;
131  error_message
132  << "Boundary_parametrising_geom_object_pt must point to\n"
133  << "GeomObject with two Eulerian coordinates. Yours has "
135  << std::endl;
136  throw OomphLibError(error_message.str(),
137  OOMPH_CURRENT_FUNCTION,
138  OOMPH_EXCEPTION_LOCATION);
139  }
140 #endif
141  Vector<double> zeta_bound_vector(1,zeta_bound);
143  position(zeta_bound_vector,zeta);
144  }
145 
146  /// \short Pointer to GeomObject<1,2> that parametrises intrinisc coordinates
147  /// along boundary b
149  {
151  }
152 
153  /// \short Initial value of 1D boundary coordinate
154  /// zeta_bound on boundary b:
155  double zeta_boundary_start(const unsigned& b) const
156  {
157  return Zeta_boundary_start[b];
158  }
159 
160  /// \short Final value of 1D boundary coordinate
161  /// zeta_bound on boundary b:
162  double zeta_boundary_end(const unsigned& b) const
163  {
164  return Zeta_boundary_end[b];
165  }
166 
167 
168 
169  /// \short Boundary triad on boundary b at boundary coordinate zeta_bound.
170  /// Broken virtual.
171  virtual void boundary_triad(const unsigned& b,
172  const double& zeta_bound,
173  Vector<double>& r,
174  Vector<double>& tangent,
175  Vector<double>& normal,
176  Vector<double>& binormal)
177  {
178  std::ostringstream error_message;
179  error_message
180  << "Broken virtual function; please implement for your\n"
181  << "derived version of this class!"
182  << std::endl;
183  throw OomphLibError(error_message.str(),
184  OOMPH_CURRENT_FUNCTION,
185  OOMPH_EXCEPTION_LOCATION);
186  }
187 
188  /// \short Output boundaries at nplot plot points. Streams:
189  /// - two_d_boundaries_file: zeta_0, zeta_1, zeta_bound
190  /// - three_d_boundaries_file : x, y, z, zeta_0, zeta_1, zeta_bound
191  void output_boundaries(const unsigned& nplot,
192  std::ofstream& two_d_boundaries_file,
193  std::ofstream& three_d_boundaries_file)
194  {
195  std::ofstream boundaries_tangent_file;
196  std::ofstream boundaries_normal_file;
197  std::ofstream boundaries_binormal_file;
199  two_d_boundaries_file,
200  three_d_boundaries_file,
201  boundaries_tangent_file,
202  boundaries_normal_file,
203  boundaries_binormal_file);
204  }
205 
206 
207  /// \short Output boundaries and triad at nplot plot points. Streams:
208  /// - two_d_boundaries_file: zeta_0, zeta_1, zeta_bound
209  /// - three_d_boundaries_file : x, y, z, zeta_0, zeta_1, zeta_bound
210  /// - boundaries_tangent_file : x, y, z, t_x, t_y, t_z
211  /// - boundaries_normal_file : x, y, z, n_x, n_y, n_z
212  /// - boundaries_binormal_file: x, y, z, N_x, N_y, N_z
213  void output_boundaries_and_triads(const unsigned& nplot,
214  std::ofstream& two_d_boundaries_file,
215  std::ofstream& three_d_boundaries_file,
216  std::ofstream& boundaries_tangent_file,
217  std::ofstream& boundaries_normal_file,
218  std::ofstream& boundaries_binormal_file)
219  {
220  Vector<double> r(3);
221  Vector<double> zeta(2);
222  double zeta_bound=0.0;
223  Vector<double> tangent(3);
224  Vector<double> normal(3);
225  Vector<double> binormal(3);
226  unsigned nb=nboundary();
227  for (unsigned b=0;b<nb;b++)
228  {
229  two_d_boundaries_file << "ZONE" << std::endl;
230  three_d_boundaries_file << "ZONE" << std::endl;
231  boundaries_tangent_file << "ZONE" << std::endl;
232  boundaries_normal_file << "ZONE" << std::endl;
233  boundaries_binormal_file << "ZONE" << std::endl;
234 
235  double zeta_min=zeta_boundary_start(b);
236  double zeta_max=zeta_boundary_end(b);
237  unsigned n=100;
238  for (unsigned i=0;i<n;i++)
239  {
240  zeta_bound=zeta_min+
241  (zeta_max-zeta_min)*double(i)/double(n-1);
242  position_on_boundary(b,zeta_bound,r);
243  zeta_on_boundary(b,zeta_bound,zeta);
244  boundary_triad(b,
245  zeta_bound,
246  r,
247  tangent,
248  normal,
249  binormal);
250 
251  two_d_boundaries_file << zeta[0] <<" "
252  << zeta[1] <<" "
253  << zeta_bound << " "
254  << std::endl;
255 
256  three_d_boundaries_file << r[0] << " "
257  << r[1] << " "
258  << r[2] << " "
259  << zeta[0] <<" "
260  << zeta[1] <<" "
261  << zeta_bound << " "
262  << std::endl;
263 
264  boundaries_tangent_file << r[0] << " "
265  << r[1] << " "
266  << r[2] << " "
267  << tangent[0] << " "
268  << tangent[1] << " "
269  << tangent[2] << " "
270  << std::endl;
271 
272  boundaries_normal_file << r[0] << " "
273  << r[1] << " "
274  << r[2] << " "
275  << normal[0] << " "
276  << normal[1] << " "
277  << normal[2] << " "
278  << std::endl;
279 
280  boundaries_binormal_file << r[0] << " "
281  << r[1] << " "
282  << r[2] << " "
283  << binormal[0] << " "
284  << binormal[1] << " "
285  << binormal[2] << " "
286  << std::endl;
287  }
288  }
289  }
290 
291 
292  /// \short Specify intrinsic coordinates of a point within a specified
293  /// region -- region ID, r, should be positive.
294  void add_region_coordinates(const unsigned &r,
296  {
297  // Verify if not using the default region number (zero)
298  if (r == 0)
299  {
300  std::ostringstream error_message;
301  error_message << "Please use another region id different from zero.\n"
302  << "It is internally used as the default region number.\n";
303  throw OomphLibError(error_message.str(),
304  OOMPH_CURRENT_FUNCTION,
305  OOMPH_EXCEPTION_LOCATION);
306  }
307  // Need two coordinates
308  unsigned n=zeta_in_region.size();
309  if (n!=2)
310  {
311  std::ostringstream error_message;
312  error_message << "Vector specifying zeta coordinates of point in\n"
313  << "region has be length 2; yours has length "
314  << n << std::endl;
315  throw OomphLibError(error_message.str(),
316  OOMPH_CURRENT_FUNCTION,
317  OOMPH_EXCEPTION_LOCATION);
318  }
319 
320  // First check if the region with the specified id does not already exist
321  std::map<unsigned, Vector<double> >::iterator it;
322  it = Zeta_in_region.find(r);
323 
324  // If it is already a region defined with that id throw an error
325  if (it != Zeta_in_region.end())
326  {
327  std::ostringstream error_message;
328  error_message << "The region id (" << r << ") that you are using for"
329  << "defining\n"
330  << "your region is already in use. Use another\n"
331  << "region id and verify that you are not re-using\n"
332  <<" previously defined regions ids.\n"<<std::endl;
333  OomphLibWarning(error_message.str(),
334  OOMPH_CURRENT_FUNCTION,
335  OOMPH_EXCEPTION_LOCATION);
336  }
337 
338  // If it does not exist then create the map
340 
341  }
342 
343  /// Return map that stores zeta coordinates of points that identify regions
344  std::map<unsigned, Vector<double> > zeta_in_region() const
345  {
346  return Zeta_in_region;
347  }
348 
349 protected:
350 
351  /// \short Storage for initial value of 1D boundary coordinate
352  /// on boundary b:
354 
355  /// \short Storage for final value of 1D boundary coordinate
356  /// on boundary b:
358 
359  /// \short Pointer to GeomObject<1,2> that parametrises intrinisc coordinates
360  /// along boundary b; essentially provides a wrapper to zeta_on_boundary(...)
362 
363  /// Map to store zeta coordinates of points that identify regions
364  std::map<unsigned, Vector<double> > Zeta_in_region;
365 
366 };
367 
368 
369 
370 /////////////////////////////////////////////////////////////////////
371 /////////////////////////////////////////////////////////////////////
372 /////////////////////////////////////////////////////////////////////
373 
374 
375 //=========================================================================
376 /// \short Warped disk in 3d: zeta[0]=x; zeta[1]=y (so it doesn't have
377 /// coordinate singularities), with specification of two boundaries (b=0,1)
378 /// that turn the whole thing into a circular disk.
379 //=========================================================================
381 {
382 
383 public:
384 
385  /// Constructor. Pass amplitude and azimuthal wavenumber of
386  /// warping as arguments. Can specify vertical offset as final, optional
387  /// argument.
388  WarpedCircularDisk(const double& epsilon, const unsigned& n,
389  const double& z_offset=0.0) :
390  Epsilon(epsilon), N(n), Z_offset(z_offset)
391  {
392  // How many boundaries do we have?
393  unsigned nb=2;
395  Zeta_boundary_start.resize(nb,0.0);
396  Zeta_boundary_end.resize(nb,0.0);
397 
398  // GeomObject<1,2> representing the first boundary
400  Zeta_boundary_start[0]=0.0;
402 
403  // GeomObject<1,2> representing the second boundary
407 
408  }
409 
410  /// Empty default constructor.
412  {
413  throw OomphLibError("Don't call default constructor!",
414  OOMPH_CURRENT_FUNCTION,
415  OOMPH_EXCEPTION_LOCATION);
416  }
417 
418 
419  /// Broken copy constructor
421  {
422  BrokenCopy::broken_copy("WarpedCircularDisk");
423  }
424 
425  /// Broken assignment operator
427  {
428  BrokenCopy::broken_assign("WarpedCircularDisk");
429  }
430 
431  /// Destructor
433  {
434  unsigned n=nboundary();
435  for (unsigned b=0;b<n;b++)
436  {
439  }
440  }
441 
442  /// Access fct to amplitude of disk warping
443  double& epsilon()
444  {
445  return Epsilon;
446  }
447 
448  /// \short Position Vector at Lagrangian coordinate zeta
449  void position(const Vector<double>& zeta, Vector<double>& r) const
450  {
451  // Position Vector
452  r[0] = zeta[0];
453  r[1] = zeta[1];
454  double radius=sqrt(r[0]*r[0]+r[1]*r[1]);
455  double phi=atan2(r[1],r[0]);
456  r[2]=Z_offset+w(radius,phi);
457  }
458 
459 
460  /// \short Parametrised position on object: r(zeta). Evaluated at
461  /// previous timestep. t=0: current time; t>0: previous
462  /// timestep. Object is steady so calls time-independent version
463  void position(const unsigned& t, const Vector<double>& zeta,
464  Vector<double>& r) const
465  {
466  position(zeta,r);
467  }
468 
469 
470  /// Boundary triad on boundary b at boundary coordinate zeta_bound
471  void boundary_triad(const unsigned& b,
472  const double& zeta_bound,
473  Vector<double>& r,
474  Vector<double>& tangent,
475  Vector<double>& normal,
476  Vector<double>& binormal)
477  {
478  double phi=zeta_bound;
479 
480  // Position Vector
481  r[0] = cos(phi);
482  r[1] = sin(phi);
483  r[2]=Z_offset+w(1.0,phi);
484 
485  Vector<double> dr_dr(3);
486  dr_dr[0]=cos(phi);
487  dr_dr[1]=sin(phi);
488  dr_dr[2]=dwdr(1.0,phi);
489  double inv_norm=1.0/sqrt(dr_dr[0]*dr_dr[0]+
490  dr_dr[1]*dr_dr[1]+
491  dr_dr[2]*dr_dr[2]);
492 
493  normal[0]=dr_dr[0]*inv_norm;
494  normal[1]=dr_dr[1]*inv_norm;
495  normal[2]=dr_dr[2]*inv_norm;
496 
497  Vector<double> dr_dphi(3);
498  dr_dphi[0]=-sin(phi);
499  dr_dphi[1]=cos(phi);
500  dr_dphi[2]=dwdphi(1.0,phi);
501 
502  inv_norm=1.0/sqrt(dr_dphi[0]*dr_dphi[0]+
503  dr_dphi[1]*dr_dphi[1]+
504  dr_dphi[2]*dr_dphi[2]);
505 
506  tangent[0]=dr_dphi[0]*inv_norm;
507  tangent[1]=dr_dphi[1]*inv_norm;
508  tangent[2]=dr_dphi[2]*inv_norm;
509 
510  binormal[0]=tangent[1]*normal[2]-tangent[2]*normal[1];
511  binormal[1]=tangent[2]*normal[0]-tangent[0]*normal[2];
512  binormal[2]=tangent[0]*normal[1]-tangent[1]*normal[0];
513 
514  }
515 
516 private:
517 
518  /// Vertical deflection
519  double w(const double& r, const double& phi) const
520  {
521  return Epsilon*cos(double(N)*phi)*pow(r,2);
522  }
523 
524  /// Deriv of vertical deflection w.r.t. radius
525  double dwdr(const double& r, const double& phi) const
526  {
527  return Epsilon*cos(double(N)*phi)*2.0*r;
528  }
529 
530  /// Deriv of vertical deflection w.r.t. angle
531  double dwdphi(const double& r, const double& phi) const
532  {
533  return -Epsilon*double(N)*sin(double(N)*phi)*pow(r,2);
534  }
535 
536  /// Amplitude of non-axisymmetric deformation
537  double Epsilon;
538 
539  /// Wavenumber of non-axisymmetric deformation
540  unsigned N;
541 
542  /// Vertical offset
543  double Z_offset;
544 
545 };
546 
547 /////////////////////////////////////////////////////////////////////
548 /////////////////////////////////////////////////////////////////////
549 /////////////////////////////////////////////////////////////////////
550 
551 
552 
553 //=========================================================================
554 /// \short Warped disk in 3d: zeta[0]=x; zeta[1]=y (so it doesn't have
555 /// coordinate singularities), with specification of two boundaries (b=0,1)
556 /// that turn the whole thing into a circular disk. In addition
557 /// has two internal boundaries (b=2,3), a distance h_annulus from
558 /// the outer edge. Annual (outer) region is region 1.
559 //=========================================================================
561 public virtual WarpedCircularDisk
562 {
563 
564 public:
565 
566  /// Constructor. Pass amplitude and azimuthal wavenumber of
567  /// warping as arguments. Can specify vertical offset as final, optional
568  /// argument.
570  (const double& h_annulus,
571  const double& epsilon,
572  const unsigned& n,
573  const double& z_offset=0.0) :
574  WarpedCircularDisk(epsilon,n,z_offset), H_annulus(h_annulus)
575  {
576  // We have two more boundaries!
578  Zeta_boundary_start.resize(4);
579  Zeta_boundary_end.resize(4);
580 
581  // Radius of the internal annular boundary
582  double r_annulus=1.0-h_annulus;
583 
584  // GeomObject<1,2> representing the third boundary
585  Boundary_parametrising_geom_object_pt[2]=new Ellipse(r_annulus,r_annulus);
586  Zeta_boundary_start[2]=0.0;
588 
589  // GeomObject<1,2> representing the fourth boundary
590  Boundary_parametrising_geom_object_pt[3]=new Ellipse(r_annulus,r_annulus);
593 
594  // Region 1 is the annular region; identify it by a point in
595  // this region.
596  unsigned r=1;
598  zeta_in_region[0]=0.0;
599  zeta_in_region[0]=1.0-0.5*h_annulus;
600  add_region_coordinates(r,zeta_in_region);
601  }
602 
603  /// Broken copy constructor
606  {
607  BrokenCopy::broken_copy("WarpedCircularDiskWithAnnularInternalBoundary");
608  }
609 
610  /// Broken assignment operator
612  {
613  BrokenCopy::broken_assign("WarpedCircularDiskWithAnnularInternalBoundary");
614  }
615 
616  /// Destructor (empty; cleanup happens in base class)
618  {}
619 
620 
621  /// \short Thickness of annular region (distance of internal boundary
622  /// from outer edge of unit circle)
623  double h_annulus() const
624  {
625  return H_annulus;
626  }
627 
628  protected:
629 
630  /// \short Thickness of annular region (distance of internal boundary
631  /// from outer edge of unit circle)
632  double H_annulus;
633 
634 
635 };
636 
637 
638 }
639 
640 #endif
void add_region_coordinates(const unsigned &r, Vector< double > &zeta_in_region)
Specify intrinsic coordinates of a point within a specified region – region ID, r, should be positive.
std::map< unsigned, Vector< double > > Zeta_in_region
Map to store zeta coordinates of points that identify regions.
Warped disk in 3d: zeta[0]=x; zeta[1]=y (so it doesn&#39;t have coordinate singularities), with specification of two boundaries (b=0,1) that turn the whole thing into a circular disk.
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
void zeta_on_boundary(const unsigned &b, const double &zeta_bound, Vector< double > &zeta) const
Compute 2D vector of intrinsic coordinates at 1D boundary coordinate zeta_bound on boundary b: ...
WarpedCircularDisk()
Empty default constructor.
double zeta_boundary_start(const unsigned &b) const
Initial value of 1D boundary coordinate zeta_bound on boundary b:
virtual void boundary_triad(const unsigned &b, const double &zeta_bound, Vector< double > &r, Vector< double > &tangent, Vector< double > &normal, Vector< double > &binormal)
Boundary triad on boundary b at boundary coordinate zeta_bound. Broken virtual.
cstr elem_len * i
Definition: cfortran.h:607
void output_boundaries_and_triads(const unsigned &nplot, std::ofstream &two_d_boundaries_file, std::ofstream &three_d_boundaries_file, std::ofstream &boundaries_tangent_file, std::ofstream &boundaries_normal_file, std::ofstream &boundaries_binormal_file)
Output boundaries and triad at nplot plot points. Streams:
const double Pi
50 digits from maple
Vector< double > Zeta_boundary_start
Storage for initial value of 1D boundary coordinate on boundary b:
void operator=(const WarpedCircularDiskWithAnnularInternalBoundary &)
Broken assignment operator.
Vector< double > Zeta_boundary_end
Storage for final value of 1D boundary coordinate on boundary b:
double w(const double &r, const double &phi) const
Vertical deflection.
char t
Definition: cfortran.h:572
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
std::map< unsigned, Vector< double > > zeta_in_region() const
Return map that stores zeta coordinates of points that identify regions.
double zeta_boundary_end(const unsigned &b) const
Final value of 1D boundary coordinate zeta_bound on boundary b:
GeomObject * boundary_parametrising_geom_object_pt(const unsigned &b) const
Pointer to GeomObject<1,2> that parametrises intrinisc coordinates along boundary b...
double h_annulus() const
Thickness of annular region (distance of internal boundary from outer edge of unit circle) ...
WarpedCircularDisk(const WarpedCircularDisk &dummy)
Broken copy constructor.
unsigned N
Wavenumber of non-axisymmetric deformation.
double dwdr(const double &r, const double &phi) const
Deriv of vertical deflection w.r.t. radius.
Steady ellipse with half axes A and B as geometric object: .
Definition: geom_objects.h:629
void output_boundaries(const unsigned &nplot, std::ofstream &two_d_boundaries_file, std::ofstream &three_d_boundaries_file)
Output boundaries at nplot plot points. Streams:
unsigned nlagrangian() const
Access function to # of Lagrangian coordinates.
Definition: geom_objects.h:182
void operator=(const WarpedCircularDisk &)
Broken assignment operator.
double Epsilon
Amplitude of non-axisymmetric deformation.
void position(const Vector< double > &zeta, Vector< double > &r) const
Position Vector at Lagrangian coordinate zeta.
void boundary_triad(const unsigned &b, const double &zeta_bound, Vector< double > &r, Vector< double > &tangent, Vector< double > &normal, Vector< double > &binormal)
Boundary triad on boundary b at boundary coordinate zeta_bound.
Vector< GeomObject * > Boundary_parametrising_geom_object_pt
Pointer to GeomObject<1,2> that parametrises intrinisc coordinates along boundary b; essentially prov...
Warped disk in 3d: zeta[0]=x; zeta[1]=y (so it doesn&#39;t have coordinate singularities), with specification of two boundaries (b=0,1) that turn the whole thing into a circular disk. In addition has two internal boundaries (b=2,3), a distance h_annulus from the outer edge. Annual (outer) region is region 1.
virtual ~WarpedCircularDiskWithAnnularInternalBoundary()
Destructor (empty; cleanup happens in base class)
void position(const unsigned &t, const Vector< double > &zeta, Vector< double > &r) const
Parametrised position on object: r(zeta). Evaluated at previous timestep. t=0: current time; t>0: pre...
double H_annulus
Thickness of annular region (distance of internal boundary from outer edge of unit circle) ...
WarpedCircularDisk(const double &epsilon, const unsigned &n, const double &z_offset=0.0)
unsigned ndim() const
Access function to # of Eulerian coordinates.
Definition: geom_objects.h:185
double & epsilon()
Access fct to amplitude of disk warping.
void position_on_boundary(const unsigned &b, const double &zeta_bound, Vector< double > &r) const
Compute 3D vector of Eulerian coordinates at 1D boundary coordinate zeta_bound on boundary b: ...
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
virtual ~WarpedCircularDisk()
Destructor.
double dwdphi(const double &r, const double &phi) const
Deriv of vertical deflection w.r.t. angle.
double Z_offset
Vertical offset.
unsigned nboundary() const
How many boundaries do we have?