GeneralCircle Class Reference
+ Inheritance diagram for GeneralCircle:

Public Member Functions

 GeneralCircle (const double &centre_y, const double &radius)
 
virtual ~GeneralCircle ()
 Destructor. More...
 
void position (const Vector< double > &xi, Vector< double > &r) const
 Lagrangian coordinate xi. More...
 
bool interpolated_history (const unsigned &t)
 
void position (const unsigned &t, const Vector< double > &xi, Vector< double > &r) const
 
unsigned ngeom_data () const
 
Datageom_data_pt (const unsigned &j)
 
 GeneralCircle (const double &centre_x, const double &centre_y, const double &radius)
 
virtual ~GeneralCircle ()
 Destructor. More...
 
void position (const Vector< double > &xi, Vector< double > &r) const
 Lagrangian coordinate xi. More...
 
void position (const unsigned &t, const Vector< double > &xi, Vector< double > &r) const
 
- Public Member Functions inherited from oomph::GeomObject
 GeomObject ()
 Default constructor. More...
 
 GeomObject (const unsigned &ndim)
 
 GeomObject (const unsigned &nlagrangian, const unsigned &ndim)
 
 GeomObject (const unsigned &nlagrangian, const unsigned &ndim, TimeStepper *time_stepper_pt)
 
 GeomObject (const GeomObject &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const GeomObject &)=delete
 Broken assignment operator. More...
 
virtual ~GeomObject ()
 (Empty) destructor More...
 
unsigned nlagrangian () const
 Access function to # of Lagrangian coordinates. More...
 
unsigned ndim () const
 Access function to # of Eulerian coordinates. More...
 
void set_nlagrangian_and_ndim (const unsigned &n_lagrangian, const unsigned &n_dim)
 Set # of Lagrangian and Eulerian coordinates. More...
 
TimeStepper *& time_stepper_pt ()
 
TimeSteppertime_stepper_pt () const
 
virtual void position (const double &t, const Vector< double > &zeta, Vector< double > &r) const
 
virtual void dposition_dt (const Vector< double > &zeta, const unsigned &j, Vector< double > &drdt)
 
virtual void dposition (const Vector< double > &zeta, DenseMatrix< double > &drdzeta) const
 
virtual void d2position (const Vector< double > &zeta, RankThreeTensor< double > &ddrdzeta) const
 
virtual void d2position (const Vector< double > &zeta, Vector< double > &r, DenseMatrix< double > &drdzeta, RankThreeTensor< double > &ddrdzeta) const
 
virtual void locate_zeta (const Vector< double > &zeta, GeomObject *&sub_geom_object_pt, Vector< double > &s, const bool &use_coordinate_as_initial_guess=false)
 
virtual void interpolated_zeta (const Vector< double > &s, Vector< double > &zeta) const
 

Private Attributes

double Centre_y
 Storage for the y-coordinate of the centre. More...
 
double Radius
 Storage for the radius of the circle. More...
 
double Centre_x
 Storage for the x-coordinate of the centre. More...
 

Additional Inherited Members

- Protected Attributes inherited from oomph::GeomObject
unsigned NLagrangian
 Number of Lagrangian (intrinsic) coordinates. More...
 
unsigned Ndim
 Number of Eulerian coordinates. More...
 
TimeStepperGeom_object_time_stepper_pt
 

Constructor & Destructor Documentation

◆ GeneralCircle() [1/2]

GeneralCircle::GeneralCircle ( const double centre_y,
const double radius 
)
inline

Constructor that takes the centre position and radius of the circle as its arguments

227  :
228  GeomObject(1,2), Centre_y(centre_y), Radius(radius) { }
double Radius
Storage for the radius of the circle.
Definition: pressure_driven_torus.cc:310
double Centre_y
Storage for the y-coordinate of the centre.
Definition: pressure_driven_torus.cc:307
GeomObject()
Default constructor.
Definition: geom_objects.h:104
radius
Definition: UniformPSDSelfTest.py:15

◆ ~GeneralCircle() [1/2]

virtual GeneralCircle::~GeneralCircle ( )
inlinevirtual

Destructor.

231 {}

◆ GeneralCircle() [2/2]

GeneralCircle::GeneralCircle ( const double centre_x,
const double centre_y,
const double radius 
)
inline

Constructor that takes the centre position and raidus of the circle as its arguments

68  :
69  GeomObject(1,2), Centre_x(centre_x), Centre_y(centre_y), Radius(radius) { }
double Centre_x
Storage for the x-coordinate of the centre.
Definition: unstructured_torus.cc:93

◆ ~GeneralCircle() [2/2]

virtual GeneralCircle::~GeneralCircle ( )
inlinevirtual

Destructor.

72 {}

Member Function Documentation

◆ geom_data_pt()

Data* GeneralCircle::geom_data_pt ( const unsigned j)
inlinevirtual

Return pointer to the j-th (only) Data item that the object's shape depends on.

Reimplemented from oomph::GeomObject.

300  {return 0;}

◆ interpolated_history()

bool GeneralCircle::interpolated_history ( const unsigned t)
inline
282  {
283  if(t==0) {return true;}
284  else {return false;}
285  }
t
Definition: plotPSD.py:36

References plotPSD::t.

◆ ngeom_data()

unsigned GeneralCircle::ngeom_data ( ) const
inlinevirtual

How many items of Data does the shape of the object depend on? This is implemented as a broken virtual function. You must overload this for GeomObjects that contain geometric Data, i.e. GeomObjects whose shape depends on Data that may contain unknowns in the overall Problem.

Reimplemented from oomph::GeomObject.

295 {return 0;}

◆ position() [1/4]

void GeneralCircle::position ( const unsigned t,
const Vector< double > &  xi,
Vector< double > &  r 
) const
inlinevirtual

Return the position of the circle as a function of time (doesn't move as a function of time)

Reimplemented from oomph::GeomObject.

291  {
292  position(xi,r);
293  }
void position(const Vector< double > &xi, Vector< double > &r) const
Lagrangian coordinate xi.
Definition: pressure_driven_torus.cc:234
r
Definition: UniformPSDSelfTest.py:20

References UniformPSDSelfTest::r.

◆ position() [2/4]

void GeneralCircle::position ( const unsigned t,
const Vector< double > &  xi,
Vector< double > &  r 
) const
inlinevirtual

Return the position of the circle as a function of time (doesn't move as a function of time)

Reimplemented from oomph::GeomObject.

86  {
87  position(xi,r);
88  }

References UniformPSDSelfTest::r.

◆ position() [3/4]

void GeneralCircle::position ( const Vector< double > &  xi,
Vector< double > &  r 
) const
inlinevirtual

Lagrangian coordinate xi.

Implements oomph::GeomObject.

235 {
236  Vector<double> r_circle(2);
237 
238  r_circle[0] = 1.0/Global_Physical_Variables::Delta + Radius*cos(xi[0]);
239  r_circle[1] = Centre_y + Radius*sin(xi[0]);
240 
241 
242  Vector<double> r_square(2);
243  const double pi = MathematicalConstants::Pi;
244  if(std::fabs(xi[0]) < 0.25*pi)
245  {
246  r_square[0] = 1.0/Global_Physical_Variables::Delta + Radius;
247  r_square[1] = Centre_y + Radius*tan(xi[0]);
248  }
249  else if((xi[0] >= 0.25*pi) && (xi[0] < 0.75*pi))
250  {
251  r_square[0] = 1.0/Global_Physical_Variables::Delta
252  + Radius*tan(0.5*pi - xi[0]);
253  r_square[1] = Centre_y + Radius;
254  }
255  else if(std::fabs(xi[0]) >= 0.75*pi)
256  {
257  r_square[0] = 1.0/Global_Physical_Variables::Delta - Radius;
258  r_square[1] = Centre_y + Radius*tan(pi - xi[0]);
259  }
260  else
261  {
262  r_square[0] = 1.0/Global_Physical_Variables::Delta
263  + Radius*tan(0.5*pi + xi[0]);
264  r_square[1] = Centre_y - Radius;
265  }
266 
267 
268  //Now smoothly match between the two
269  for(unsigned i=0;i<2;i++)
270  {
271  r[i] = Global_Physical_Variables::Mu*r_circle[i] +
272  (1.0 - Global_Physical_Variables::Mu)*r_square[i];
273  }
274 
275 
276 }
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
int i
Definition: BiCGSTAB_step_by_step.cpp:9
double Pi
Definition: two_d_biharmonic.cc:235
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 tan(const bfloat16 &a)
Definition: BFloat16.h:633
double Mu
Definition: pressure_driven_torus.cc:70
double Delta
The curvature of the torus.
Definition: torus.cc:51
Real fabs(const Real &a)
Definition: boostmultiprec.cpp:117
const Mdouble pi
Definition: ExtendedMath.h:23

References Global_Parameters::Centre_y, cos(), Global_Physical_Variables::Delta, boost::multiprecision::fabs(), i, Global_Physical_Variables::Mu, constants::pi, BiharmonicTestFunctions2::Pi, UniformPSDSelfTest::r, Global_Physical_Variables::Radius, sin(), and Eigen::bfloat16_impl::tan().

◆ position() [4/4]

void GeneralCircle::position ( const Vector< double > &  xi,
Vector< double > &  r 
) const
inlinevirtual

Lagrangian coordinate xi.

Implements oomph::GeomObject.

76 {
77  r[0] = Centre_x + Radius*cos(xi[0]);
78  r[1] = Centre_y + Radius*sin(xi[0]);
79 }

References Global_Parameters::Centre_x, Global_Parameters::Centre_y, cos(), UniformPSDSelfTest::r, Global_Physical_Variables::Radius, and sin().

Member Data Documentation

◆ Centre_x

double GeneralCircle::Centre_x
private

Storage for the x-coordinate of the centre.

◆ Centre_y

double GeneralCircle::Centre_y
private

Storage for the y-coordinate of the centre.

◆ Radius

double GeneralCircle::Radius
private

Storage for the radius of the circle.


The documentation for this class was generated from the following files: