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// Copyright (C) 2006-2026 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#ifndef OOMPH_GEOM_OBJ_WITH_BOUNDARY_HEADER
27#define OOMPH_GEOM_OBJ_WITH_BOUNDARY_HEADER
28
29
30// Config header
31#ifdef HAVE_CONFIG_H
32#include <oomph-lib-config.h>
33#endif
34
35
36// oomph-lib headers
37#include "geom_objects.h"
38
39
40namespace oomph
41{
42 //===========================================================================
43 /// Base class for upgraded disk-like GeomObject (i.e. 2D surface in 3D space)
44 /// with specification of boundaries. The GeomObject's position(...)
45 /// function computes the 3D (Eulerian) position vector r as a function of the
46 /// 2D intrinsic (Lagrangian) coordinates, zeta, without reference to
47 /// any boundaries. This class specifies the boundaries by specifying
48 /// a mapping from a 1D intrinsic boundary coordinate, zeta_bound,
49 /// to the 2D intrinsic (Lagrangian) coordinates, zeta. Here, zeta_bound
50 /// is a local parameter defined on each boundary segment, while a new global
51 /// boundary coordinate, zeta_global, is defined over the entire boundary of
52 /// the object, taking values in [0, 2π]. The class also establishes a mapping
53 /// between zeta_bound (local) and zeta_global.
54 ///
55 /// The class is made functional by provision (in the derived class!) of:
56 /// - a pointer to a GeomObject<1,2> that parametrises the 2D intrinisic
57 /// coordinates zeta along boundary b in terms of the 1D boundary
58 /// coordinate, zeta_bound,
59 /// - the initial value of the 1D boundary coordinate zeta_bound on boundary
60 /// b,
61 /// - the final value of the 1D boundary coordinate zeta_bound on boundary b
62 /// .
63 /// for each of these boundaries. All three containers for these
64 /// must be resized (consistently) and populated in the derived class.
65 /// Number of boundaries is inferred from their size.
66 ///
67 /// Class also provides broken virtual function to specify boundary triads,
68 /// and various output functions.
69 //===========================================================================
71 {
72 public:
73 /// Constructor
75
76 /// How many boundaries do we have?
77 unsigned nboundary() const
78 {
80 }
81
82 /// Compute 3D vector of Eulerian coordinates at 1D boundary
83 /// coordinate zeta_bound on boundary b:
84 void position_on_boundary(const unsigned& b,
85 const double& zeta_bound,
86 Vector<double>& r) const
87 {
90 position(zeta, r);
91 }
92
93 /// Compute 2D vector of intrinsic coordinates at 1D boundary
94 /// coordinate zeta_bound on boundary b:
95 void zeta_on_boundary(const unsigned& b,
96 const double& zeta_bound,
97 Vector<double>& zeta) const
98 {
99#ifdef PARANOID
101 {
102 std::ostringstream error_message;
103 error_message << "You must create a <1,2> Geom Object that provides a\n"
104 << "mapping from the 1D boundary coordinate to the 2D\n"
105 << "intrinsic Lagrangian coordinate of disk-like object\n"
106 << std::endl;
107 throw OomphLibError(error_message.str(),
110 }
112 {
113 std::ostringstream error_message;
114 error_message << "Boundary_parametrising_geom_object_pt must point to\n"
115 << "GeomObject with one Lagrangian coordinate. Yours has "
117 << std::endl;
118 throw OomphLibError(error_message.str(),
121 }
123 {
124 std::ostringstream error_message;
125 error_message << "Boundary_parametrising_geom_object_pt must point to\n"
126 << "GeomObject with two Eulerian coordinates. Yours has "
128 << std::endl;
129 throw OomphLibError(error_message.str(),
132 }
133#endif
136 zeta);
137 }
138
139 /// Pointer to GeomObject<1,2> that parametrises intrinisc
140 /// coordinates along boundary b
145
146 /// Initial value of 1D boundary coordinate
147 /// zeta_bound on boundary b:
148 double zeta_boundary_start(const unsigned& b) const
149 {
150 return Zeta_boundary_start[b];
151 }
152
153 /// Final value of 1D boundary coordinate
154 /// zeta_bound on boundary b:
155 double zeta_boundary_end(const unsigned& b) const
156 {
157 return Zeta_boundary_end[b];
158 }
159
160 /// Initial value of 1D global boundary coordinate on boundary b
161 double zeta_global_boundary_start(const unsigned& b) const
162 {
164 }
165
166 /// Final value of 1D global boundary coordinate on boundary b
167 double zeta_global_boundary_end(const unsigned& b) const
168 {
169 return Zeta_global_boundary_end[b];
170 }
171
172
173 /// Boundary triad on boundary b at boundary coordinate zeta_bound.
174 /// Broken virtual.
175 virtual void boundary_triad(const unsigned& b,
176 const double& zeta_bound,
181 {
182 std::ostringstream error_message;
183 error_message << "Broken virtual function; please implement for your\n"
184 << "derived version of this class!" << std::endl;
185 throw OomphLibError(
187 }
188
189 /// Output boundaries at nplot plot points. Streams:
190 /// - two_d_boundaries_file: zeta_0, zeta_1, zeta_bound
191 /// - three_d_boundaries_file : x, y, z, zeta_0, zeta_1, zeta_bound
206
207
208 /// Output boundaries and triad at nplot plot points. Streams:
209 /// - two_d_boundaries_file: zeta_0, zeta_1, zeta_bound
210 /// - three_d_boundaries_file : x, y, z, zeta_0, zeta_1, zeta_bound
211 /// - boundaries_tangent_file : x, y, z, t_x, t_y, t_z
212 /// - boundaries_normal_file : x, y, z, n_x, n_y, n_z
213 /// - boundaries_binormal_file: x, y, z, N_x, N_y, N_z
215 std::ofstream& two_d_boundaries_file,
216 std::ofstream& three_d_boundaries_file,
217 std::ofstream& boundaries_tangent_file,
218 std::ofstream& boundaries_normal_file,
219 std::ofstream& boundaries_binormal_file)
220 {
221 Vector<double> r(3);
223 double zeta_bound = 0.0;
227 unsigned nb = nboundary();
228 for (unsigned b = 0; b < nb; b++)
229 {
230 two_d_boundaries_file << "ZONE" << std::endl;
231 three_d_boundaries_file << "ZONE" << std::endl;
232 boundaries_tangent_file << "ZONE" << std::endl;
233 boundaries_normal_file << "ZONE" << std::endl;
234 boundaries_binormal_file << "ZONE" << std::endl;
235
236 double zeta_min = zeta_boundary_start(b);
237 double zeta_max = zeta_boundary_end(b);
238 unsigned n = 100;
239 for (unsigned i = 0; i < n; i++)
240 {
241 zeta_bound =
242 zeta_min + (zeta_max - zeta_min) * double(i) / double(n - 1);
246
247 two_d_boundaries_file << zeta[0] << " " << zeta[1] << " "
248 << zeta_bound << " " << std::endl;
249
250 three_d_boundaries_file << r[0] << " " << r[1] << " " << r[2] << " "
251 << zeta[0] << " " << zeta[1] << " "
252 << zeta_bound << " " << std::endl;
253
254 boundaries_tangent_file << r[0] << " " << r[1] << " " << r[2] << " "
255 << tangent[0] << " " << tangent[1] << " "
256 << tangent[2] << " " << std::endl;
257
258 boundaries_normal_file << r[0] << " " << r[1] << " " << r[2] << " "
259 << normal[0] << " " << normal[1] << " "
260 << normal[2] << " " << std::endl;
261
262 boundaries_binormal_file << r[0] << " " << r[1] << " " << r[2] << " "
263 << binormal[0] << " " << binormal[1] << " "
264 << binormal[2] << " " << std::endl;
265 }
266 }
267 }
268
269
270 /// Specify intrinsic coordinates of a point within a specified
271 /// region -- region ID, r, should be positive.
272 void add_region_coordinates(const unsigned& r,
274 {
275 // Verify if not using the default region number (zero)
276 if (r == 0)
277 {
278 std::ostringstream error_message;
279 error_message
280 << "Please use another region id different from zero.\n"
281 << "It is internally used as the default region number.\n";
282 throw OomphLibError(error_message.str(),
285 }
286 // Need two coordinates
287 unsigned n = zeta_in_region.size();
288 if (n != 2)
289 {
290 std::ostringstream error_message;
291 error_message << "Vector specifying zeta coordinates of point in\n"
292 << "region has be length 2; yours has length " << n
293 << std::endl;
294 throw OomphLibError(error_message.str(),
297 }
298
299 // First check if the region with the specified id does not already exist
300 std::map<unsigned, Vector<double>>::iterator it;
301 it = Zeta_in_region.find(r);
302
303 // If it is already a region defined with that id throw an error
304 if (it != Zeta_in_region.end())
305 {
306 std::ostringstream error_message;
307 error_message << "The region id (" << r << ") that you are using for"
308 << "defining\n"
309 << "your region is already in use. Use another\n"
310 << "region id and verify that you are not re-using\n"
311 << " previously defined regions ids.\n"
312 << std::endl;
313 OomphLibWarning(error_message.str(),
316 }
317
318 // If it does not exist then create the map
320 }
321
322 /// Return map that stores zeta coordinates of points that identify regions
323 std::map<unsigned, Vector<double>> zeta_in_region() const
324 {
325 return Zeta_in_region;
326 }
327
328
329 /// Lagrangian coordinates on the boundary
330 /// (zeta_1(zeta_bound),zeta_2(zeta_bound)) As described in the class
331 /// description, zeta_global is enforced to lie between 0 and 2pi
333 Vector<double>& zeta) const
334 {
335 // The number of the boundaries
336 unsigned n_boundary = nboundary();
337
338 // Loop over all boundary segments
339 for (unsigned b = 0; b < n_boundary; b++)
340 {
341 // Flag indicating whether implements the process to obtain the
342 // Lagriangian coordinates
343 bool do_it = false;
344
345 // Check if zeta_global is to the right of (or equal to)
346 // the start of boundary segment b
348 {
349 // For all segments except the last one, require
350 // zeta_global < Zeta_global_boundary_end[b]
351 // so that segments are half-open intervals [start, end)
352 if (b < n_boundary - 1)
353 {
355 {
356 do_it = true;
357 }
358 }
359 // For the last boundary segment, accept all remaining values
360 // (in particular, this includes the endpoint zeta_global = 2*pi)
361 else
362 {
363 do_it = true;
364 }
365 }
366
367 // If the correct boundary segment has been identified
368 if (do_it == true)
369 {
370 // Compute the linear mapping ratio between the global
371 // zeta and the zeta_bound (local)
372 double ratio =
375
376 // Map the global zeta to the zeta_bound (local) on boundary segment b
377 double zeta_bound =
380
381 // Obtain the Lagrangian coordinates corresponding to
382 // boundary segment b at the zeta_bound (local)
384
385 // Exit the loop since the correct boundary segment is identified
386 break;
387 }
388 }
389 }
390
391
392 protected:
393 /// Storage for initial value of 1D local boundary coordinate
394 /// on boundary b:
396
397 /// Storage for final value of 1D local boundary coordinate
398 /// on boundary b:
400
401 /// Storage for initial value of 1D global boundary coordinate
402 /// As described in the class description, the global coordinate
403 /// is enforced to lie between 0 and 2pi
405
406 /// Storage for final value of 1D global boundary coordinate
407 /// As described in the class description, the global coordinate
408 /// is enforced to lie between 0 and 2pi
410
411 /// Pointer to GeomObject<1,2> that parametrises intrinisc
412 /// coordinates along boundary b; essentially provides a wrapper to
413 /// zeta_on_boundary(...)
415
416 /// Map to store zeta coordinates of points that identify regions
417 std::map<unsigned, Vector<double>> Zeta_in_region;
418 };
419
420
421 /////////////////////////////////////////////////////////////////////
422 /////////////////////////////////////////////////////////////////////
423 /////////////////////////////////////////////////////////////////////
424
425
426 //=========================================================================
427 /// Warped disk in 3d: zeta[0]=x; zeta[1]=y (so it doesn't have
428 /// coordinate singularities), with specification of two boundaries (b=0,1)
429 /// that turn the whole thing into a circular disk.
430 //=========================================================================
432 {
433 public:
434 /// Constructor. Pass amplitude and azimuthal wavenumber of
435 /// warping as arguments. Can specify vertical offset as final, optional
436 /// argument.
438 const unsigned& n,
439 const double& z_offset = 0.0)
441 {
442 // How many boundaries do we have?
443 unsigned nb = 2;
445 Zeta_boundary_start.resize(nb, 0.0);
446 Zeta_boundary_end.resize(nb, 0.0);
447
448 // GeomObject<1,2> representing the first boundary
450 Zeta_boundary_start[0] = 0.0;
452
453 // GeomObject<1,2> representing the second boundary
457 }
458
459 /// Empty default constructor.
461 {
462 throw OomphLibError("Don't call default constructor!",
465 }
466
467
468 /// Broken copy constructor
470
471 /// Broken assignment operator
472 void operator=(const WarpedCircularDisk&) = delete;
473
474 /// Destructor
476 {
477 unsigned n = nboundary();
478 for (unsigned b = 0; b < n; b++)
479 {
482 }
483 }
484
485 /// Access fct to amplitude of disk warping
486 double& epsilon()
487 {
488 return Epsilon;
489 }
490
491 /// Position Vector at Lagrangian coordinate zeta
493 {
494 // Position Vector
495 r[0] = zeta[0];
496 r[1] = zeta[1];
497 double radius = sqrt(r[0] * r[0] + r[1] * r[1]);
498 double phi = atan2(r[1], r[0]);
499 r[2] = Z_offset + w(radius, phi);
500 }
501
502
503 /// Parametrised position on object: r(zeta). Evaluated at
504 /// previous timestep. t=0: current time; t>0: previous
505 /// timestep. Object is steady so calls time-independent version
506 void position(const unsigned& t,
507 const Vector<double>& zeta,
508 Vector<double>& r) const
509 {
510 position(zeta, r);
511 }
512
513
514 /// Boundary triad on boundary b at boundary coordinate zeta_bound
515 void boundary_triad(const unsigned& b,
516 const double& zeta_bound,
521 {
522 double phi = zeta_bound;
523
524 // Position Vector
525 r[0] = cos(phi);
526 r[1] = sin(phi);
527 r[2] = Z_offset + w(1.0, phi);
528
530 dr_dr[0] = cos(phi);
531 dr_dr[1] = sin(phi);
532 dr_dr[2] = dwdr(1.0, phi);
533 double inv_norm = 1.0 / sqrt(dr_dr[0] * dr_dr[0] + dr_dr[1] * dr_dr[1] +
534 dr_dr[2] * dr_dr[2]);
535
536 normal[0] = dr_dr[0] * inv_norm;
537 normal[1] = dr_dr[1] * inv_norm;
538 normal[2] = dr_dr[2] * inv_norm;
539
541 dr_dphi[0] = -sin(phi);
542 dr_dphi[1] = cos(phi);
543 dr_dphi[2] = dwdphi(1.0, phi);
544
545 inv_norm = 1.0 / sqrt(dr_dphi[0] * dr_dphi[0] + dr_dphi[1] * dr_dphi[1] +
546 dr_dphi[2] * dr_dphi[2]);
547
548 tangent[0] = dr_dphi[0] * inv_norm;
549 tangent[1] = dr_dphi[1] * inv_norm;
550 tangent[2] = dr_dphi[2] * inv_norm;
551
552 binormal[0] = tangent[1] * normal[2] - tangent[2] * normal[1];
553 binormal[1] = tangent[2] * normal[0] - tangent[0] * normal[2];
554 binormal[2] = tangent[0] * normal[1] - tangent[1] * normal[0];
555 }
556
557 private:
558 /// Vertical deflection
559 double w(const double& r, const double& phi) const
560 {
561 return Epsilon * cos(double(N) * phi) * pow(r, 2);
562 }
563
564 /// Deriv of vertical deflection w.r.t. radius
565 double dwdr(const double& r, const double& phi) const
566 {
567 return Epsilon * cos(double(N) * phi) * 2.0 * r;
568 }
569
570 /// Deriv of vertical deflection w.r.t. angle
571 double dwdphi(const double& r, const double& phi) const
572 {
573 return -Epsilon * double(N) * sin(double(N) * phi) * pow(r, 2);
574 }
575
576 /// Amplitude of non-axisymmetric deformation
577 double Epsilon;
578
579 /// Wavenumber of non-axisymmetric deformation
580 unsigned N;
581
582 /// Vertical offset
583 double Z_offset;
584 };
585
586 /////////////////////////////////////////////////////////////////////
587 /////////////////////////////////////////////////////////////////////
588 /////////////////////////////////////////////////////////////////////
589
590
591 //=========================================================================
592 /// Warped disk in 3d: zeta[0]=x; zeta[1]=y (so it doesn't have
593 /// coordinate singularities), with specification of two boundaries (b=0,1)
594 /// that turn the whole thing into a circular disk. In addition
595 /// has two internal boundaries (b=2,3), a distance h_annulus from
596 /// the outer edge. Annual (outer) region is region 1.
597 //=========================================================================
599 : public virtual WarpedCircularDisk
600 {
601 public:
602 /// Constructor. Pass amplitude and azimuthal wavenumber of
603 /// warping as arguments. Can specify vertical offset as final, optional
604 /// argument.
606 const double& epsilon,
607 const unsigned& n,
608 const double& z_offset = 0.0)
610 {
611 // We have two more boundaries!
613 Zeta_boundary_start.resize(4);
614 Zeta_boundary_end.resize(4);
615
616 // Radius of the internal annular boundary
617 double r_annulus = 1.0 - h_annulus;
618
619 // GeomObject<1,2> representing the third boundary
622 Zeta_boundary_start[2] = 0.0;
624
625 // GeomObject<1,2> representing the fourth boundary
630
631 // Region 1 is the annular region; identify it by a point in
632 // this region.
633 unsigned r = 1;
635 zeta_in_region[0] = 0.0;
636 zeta_in_region[0] = 1.0 - 0.5 * h_annulus;
638 }
639
640 /// Broken copy constructor
643
644 /// Broken assignment operator
646 delete;
647
648 /// Destructor (empty; cleanup happens in base class)
650
651
652 /// Thickness of annular region (distance of internal boundary
653 /// from outer edge of unit circle)
654 double h_annulus() const
655 {
656 return H_annulus;
657 }
658
659 protected:
660 /// Thickness of annular region (distance of internal boundary
661 /// from outer edge of unit circle)
662 double H_annulus;
663 };
664
665
666} // namespace oomph
667
668#endif
cstr elem_len * i
Definition cfortran.h:603
char t
Definition cfortran.h:568
Base class for upgraded disk-like GeomObject (i.e. 2D surface in 3D space) with specification of boun...
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,...
double zeta_global_boundary_end(const unsigned &b) const
Final value of 1D global boundary coordinate on boundary b.
Vector< double > Zeta_global_boundary_end
Storage for final value of 1D global boundary coordinate As described in the class description,...
GeomObject * boundary_parametrising_geom_object_pt(const unsigned &b) const
Pointer to GeomObject<1,2> that parametrises intrinisc coordinates along boundary b.
Vector< double > Zeta_boundary_start
Storage for initial value of 1D local boundary coordinate on boundary b:
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:
std::map< unsigned, Vector< double > > zeta_in_region() const
Return map that stores zeta coordinates of points that identify regions.
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:
double zeta_global_boundary_start(const unsigned &b) const
Initial value of 1D global boundary coordinate on boundary b.
Vector< double > Zeta_global_boundary_start
Storage for initial value of 1D global boundary coordinate As described in the class description,...
virtual void boundary_lagrangian_coordinates(const double &zeta_global, Vector< double > &zeta) const
Lagrangian coordinates on the boundary (zeta_1(zeta_bound),zeta_2(zeta_bound)) As described in the cl...
std::map< unsigned, Vector< double > > Zeta_in_region
Map to store zeta coordinates of points that identify regions.
Vector< GeomObject * > Boundary_parametrising_geom_object_pt
Pointer to GeomObject<1,2> that parametrises intrinisc coordinates along boundary b; essentially prov...
double zeta_boundary_end(const unsigned &b) const
Final 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.
unsigned nboundary() const
How many boundaries do we have?
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:
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:
double zeta_boundary_start(const unsigned &b) const
Initial value of 1D boundary coordinate zeta_bound on boundary b:
Vector< double > Zeta_boundary_end
Storage for final value of 1D local boundary coordinate on boundary b:
Steady ellipse with half axes A and B as geometric object:
void position(const Vector< double > &zeta, Vector< double > &r) const
Return the parametrised position of the FiniteElement in its incarnation as a GeomObject,...
Definition elements.h:2680
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
Definition elements.cc:4320
A geometric object is an object that provides a parametrised description of its shape via the functio...
unsigned ndim() const
Access function to # of Eulerian coordinates.
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
unsigned nlagrangian() const
Access function to # of Lagrangian coordinates.
An OomphLibError object which should be thrown when an run-time error is encountered....
An OomphLibWarning object which should be created as a temporary object to issue a warning....
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
Warped disk in 3d: zeta[0]=x; zeta[1]=y (so it doesn't have coordinate singularities),...
virtual ~WarpedCircularDiskWithAnnularInternalBoundary()
Destructor (empty; cleanup happens in base class)
double H_annulus
Thickness of annular region (distance of internal boundary from outer edge of unit circle)
WarpedCircularDiskWithAnnularInternalBoundary(const WarpedCircularDiskWithAnnularInternalBoundary &dummy)=delete
Broken copy constructor.
void operator=(const WarpedCircularDiskWithAnnularInternalBoundary &)=delete
Broken assignment operator.
WarpedCircularDiskWithAnnularInternalBoundary(const double &h_annulus, const double &epsilon, const unsigned &n, const double &z_offset=0.0)
Constructor. Pass amplitude and azimuthal wavenumber of warping as arguments. Can specify vertical of...
double h_annulus() const
Thickness of annular region (distance of internal boundary from outer edge of unit circle)
Warped disk in 3d: zeta[0]=x; zeta[1]=y (so it doesn't have coordinate singularities),...
double dwdphi(const double &r, const double &phi) const
Deriv of vertical deflection w.r.t. angle.
void operator=(const WarpedCircularDisk &)=delete
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.
WarpedCircularDisk(const WarpedCircularDisk &dummy)=delete
Broken copy constructor.
WarpedCircularDisk()
Empty default constructor.
WarpedCircularDisk(const double &epsilon, const unsigned &n, const double &z_offset=0.0)
Constructor. Pass amplitude and azimuthal wavenumber of warping as arguments. Can specify vertical of...
double Z_offset
Vertical offset.
double & epsilon()
Access fct to amplitude of disk warping.
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.
unsigned N
Wavenumber of non-axisymmetric deformation.
double w(const double &r, const double &phi) const
Vertical deflection.
virtual ~WarpedCircularDisk()
Destructor.
double dwdr(const double &r, const double &phi) const
Deriv of vertical deflection w.r.t. radius.
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...
const double Pi
50 digits from maple
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).