GeneralEllipse Class Reference

My own Ellipse class. More...

+ Inheritance diagram for GeneralEllipse:

Public Member Functions

 GeneralEllipse (const double &centre_x, const double &centre_y, const double &a, const double &b)
 Constructor. More...
 
 ~GeneralEllipse ()
 Destructor (empty) More...
 
void position (const Vector< double > &xi, Vector< double > &r) const
 Return the position. More...
 
doublecentre_x ()
 Access to x-coordinate of centre. More...
 
doublecentre_y ()
 Access to y-coordinate of centre. More...
 
doublea ()
 Access to x-half axis. More...
 
doubleb ()
 Access to y-half axis. More...
 
 GeneralEllipse (const double &centre_x, const double &centre_y, const double &a, const double &b)
 Constructor. More...
 
 ~GeneralEllipse ()
 Destructor (empty) More...
 
void position (const Vector< double > &xi, Vector< double > &r) const
 Return the position. More...
 
doublecentre_x ()
 Access to x-coordinate of centre. More...
 
doublecentre_y ()
 Access to y-coordinate of centre. More...
 
doublea ()
 Access to x-half axis. More...
 
doubleb ()
 Access to y-half axis. More...
 
 GeneralEllipse (const double &centre_x, const double &centre_y, const double &a, const double &b)
 
 ~GeneralEllipse ()
 
void position (const Vector< double > &xi, Vector< double > &r) const
 Parametrised position on object at current time: r(zeta). More...
 
 GeneralEllipse (const double &centre_x, const double &centre_y, const double &a, const double &b)
 Constructor. More...
 
 ~GeneralEllipse ()
 Destructor (empty) More...
 
void position (const Vector< double > &xi, Vector< double > &r) const
 Return the position. More...
 
doublecentre_x ()
 Access to x-coordinate of centre. More...
 
doublecentre_y ()
 Access to y-coordinate of centre. More...
 
doublea ()
 Access to x-half axis. More...
 
doubleb ()
 Access to y-half axis. More...
 
 GeneralEllipse (const double &centre_x, const double &centre_y, const double &a, const double &b)
 
 ~GeneralEllipse ()
 Empty Destructor. More...
 
void position (const Vector< double > &xi, Vector< double > &r) const
 
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 unsigned ngeom_data () const
 
virtual Datageom_data_pt (const unsigned &j)
 
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_x
 x-coordinate of centre More...
 
double Centre_y
 y-coordinate of centre More...
 
double A
 x-half axis More...
 
double B
 y-half axis More...
 
doublecentre_x_pt
 
doublecentre_y_pt
 
doublea_pt
 
doubleb_pt
 

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
 

Detailed Description

My own Ellipse class.

//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////// //////////////////////////////////////////////////////// //////////////////////////////////////////////////////// A geometric object for an ellipse with initial centre of mass at (centre_x, centre_y) with axis in the x direction given by 2a and in the y-direction given by 2b. The boundary of the ellipse is parametrised by its angle.

Constructor & Destructor Documentation

◆ GeneralEllipse() [1/5]

GeneralEllipse::GeneralEllipse ( const double centre_x,
const double centre_y,
const double a,
const double b 
)
inline

Constructor.

88  {}
double B
y-half axis
Definition: adaptive_hopf.cc:126
double & a()
Access to x-half axis.
Definition: adaptive_hopf.cc:108
double & centre_y()
Access to y-coordinate of centre.
Definition: adaptive_hopf.cc:105
double & b()
Access to y-half axis.
Definition: adaptive_hopf.cc:111
double Centre_y
y-coordinate of centre
Definition: adaptive_hopf.cc:120
double & centre_x()
Access to x-coordinate of centre.
Definition: adaptive_hopf.cc:102
double A
x-half axis
Definition: adaptive_hopf.cc:123
double Centre_x
x-coordinate of centre
Definition: adaptive_hopf.cc:117
GeomObject()
Default constructor.
Definition: geom_objects.h:104

◆ ~GeneralEllipse() [1/5]

GeneralEllipse::~GeneralEllipse ( )
inline

Destructor (empty)

91 {}

◆ GeneralEllipse() [2/5]

GeneralEllipse::GeneralEllipse ( const double centre_x,
const double centre_y,
const double a,
const double b 
)
inline

Constructor.

92  {}

◆ ~GeneralEllipse() [2/5]

GeneralEllipse::~GeneralEllipse ( )
inline

Destructor (empty)

95 {}

◆ GeneralEllipse() [3/5]

GeneralEllipse::GeneralEllipse ( const double centre_x,
const double centre_y,
const double a,
const double b 
)
inline
71  : GeomObject(1,2), centre_x_pt(0), centre_y_pt(0), a_pt(0), b_pt(0)
72  {
75  a_pt = new double(a);
76  b_pt = new double(b);
77  }
double * centre_y_pt
Definition: adaptive_interface.cc:64
double * centre_x_pt
Definition: adaptive_interface.cc:64
double * a_pt
Definition: adaptive_interface.cc:64
double * b_pt
Definition: adaptive_interface.cc:64

References a, and b.

◆ ~GeneralEllipse() [3/5]

GeneralEllipse::~GeneralEllipse ( )
inline
81  {
82  delete centre_x_pt;
83  delete centre_y_pt;
84  delete a_pt;
85  delete b_pt;
86  }

◆ GeneralEllipse() [4/5]

GeneralEllipse::GeneralEllipse ( const double centre_x,
const double centre_y,
const double a,
const double b 
)
inline

Constructor.

80  {}

◆ ~GeneralEllipse() [4/5]

GeneralEllipse::~GeneralEllipse ( )
inline

Destructor (empty)

83 {}

◆ GeneralEllipse() [5/5]

GeneralEllipse::GeneralEllipse ( const double centre_x,
const double centre_y,
const double a,
const double b 
)
inline

Simple Constructor that transfers appropriate geometric parameters into internal data

159  {}

◆ ~GeneralEllipse() [5/5]

GeneralEllipse::~GeneralEllipse ( )
inline

Empty Destructor.

162 {}

Member Function Documentation

◆ a() [1/3]

double& GeneralEllipse::a ( )
inline

Access to x-half axis.

108 {return A;}

◆ a() [2/3]

double& GeneralEllipse::a ( )
inline

Access to x-half axis.

112 {return A;}

◆ a() [3/3]

double& GeneralEllipse::a ( )
inline

Access to x-half axis.

100 {return A;}

◆ b() [1/3]

double& GeneralEllipse::b ( )
inline

Access to y-half axis.

111 {return B;}

References Global_Parameters::B.

◆ b() [2/3]

double& GeneralEllipse::b ( )
inline

Access to y-half axis.

115 {return B;}

◆ b() [3/3]

double& GeneralEllipse::b ( )
inline

Access to y-half axis.

103 {return B;}

◆ centre_x() [1/3]

double& GeneralEllipse::centre_x ( )
inline

Access to x-coordinate of centre.

102 {return Centre_x;}

References Global_Parameters::Centre_x.

◆ centre_x() [2/3]

double& GeneralEllipse::centre_x ( )
inline

Access to x-coordinate of centre.

106 {return Centre_x;}

References Global_Parameters::Centre_x.

◆ centre_x() [3/3]

double& GeneralEllipse::centre_x ( )
inline

Access to x-coordinate of centre.

94 {return Centre_x;}

References Global_Parameters::Centre_x.

◆ centre_y() [1/3]

double& GeneralEllipse::centre_y ( )
inline

Access to y-coordinate of centre.

105 {return Centre_y;}

References Global_Parameters::Centre_y.

◆ centre_y() [2/3]

double& GeneralEllipse::centre_y ( )
inline

Access to y-coordinate of centre.

109 {return Centre_y;}

References Global_Parameters::Centre_y.

◆ centre_y() [3/3]

double& GeneralEllipse::centre_y ( )
inline

Access to y-coordinate of centre.

97 {return Centre_y;}

References Global_Parameters::Centre_y.

◆ position() [1/6]

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

Parametrised position on object: r(zeta). Evaluated at previous timestep. t=0: current time; t>0: previous timestep. Works for t=0 but needs to be overloaded if genuine time-dependence is required.

Reimplemented from oomph::GeomObject.

175  {
176  return position(xi,r);
177  }
void position(const Vector< double > &xi, Vector< double > &r) const
Return the position.
Definition: adaptive_hopf.cc:94
r
Definition: UniformPSDSelfTest.py:20

References UniformPSDSelfTest::r.

◆ position() [2/6]

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

Return the position.

Implements oomph::GeomObject.

95  {
96  r[0] = Centre_x + A*cos(xi[0]);
97  r[1] = Centre_y + B*sin(xi[0]);
98  }
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
Definition: matrices.h:74

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

◆ position() [3/6]

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

Return the position.

Implements oomph::GeomObject.

99  {
100  r[0] = Centre_x + A*cos(xi[0]);
101  r[1] = Centre_y + B*sin(xi[0]);
102  }

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

◆ position() [4/6]

void GeneralEllipse::position ( const Vector< double > &  zeta,
Vector< double > &  r 
) const
inlinevirtual

Parametrised position on object at current time: r(zeta).

Implements oomph::GeomObject.

90  {
91  r[0] = *centre_x_pt + *a_pt*cos(xi[0]);
92  r[1] = *centre_y_pt + *b_pt*sin(xi[0]);
93  }

References cos(), UniformPSDSelfTest::r, and sin().

◆ position() [5/6]

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

Return the position.

Implements oomph::GeomObject.

87  {
88  r[0] = Centre_x + A*cos(xi[0]);
89  r[1] = Centre_y + B*sin(xi[0]);
90  }

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

◆ position() [6/6]

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

Return the position of the ellipse boundary as a function of the angle xi[0]

Implements oomph::GeomObject.

167  {
168  r[0] = Centre_x + A*cos(xi[0]);
169  r[1] = Centre_y + B*sin(xi[0]);
170  }

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

Member Data Documentation

◆ A

double GeneralEllipse::A
private

x-half axis

◆ a_pt

double * GeneralEllipse::a_pt
private

◆ B

double GeneralEllipse::B
private

y-half axis

◆ b_pt

double * GeneralEllipse::b_pt
private

◆ Centre_x

double GeneralEllipse::Centre_x
private

x-coordinate of centre

◆ centre_x_pt

double* GeneralEllipse::centre_x_pt
private

◆ Centre_y

double GeneralEllipse::Centre_y
private

y-coordinate of centre

◆ centre_y_pt

double * GeneralEllipse::centre_y_pt
private

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