Public Member Functions | Protected Member Functions | Private Attributes | List of all members
oomph::ElasticallySupportedRingElement Class Reference

GeneralCircle "upgraded" to a GeneralisedElement: Circular ring whose position is given by

\[ x = X_c + R \cos(\zeta) \]

\[ y = Y_c + R \sin(\zeta) \]

The ring's vertical position $ Y_c $ is determined by "pseudo elasticity":

\[ 0 = f_{load} - Y_c \ k_{stiff} \]

This simulates the case where the centre of the ring is mounted on an elastic spring of stiffness $ k_{stiff} $ and loaded by the force $ f_{load}. $ The "load" is specified by the Data object load_pt(). More...

#include <circle_as_generalised_element.h>

Inheritance diagram for oomph::ElasticallySupportedRingElement:
oomph::GeneralCircle

Public Member Functions

 ElasticallySupportedRingElement (const double &x_c, const double &y_c, const double &r)
 Constructor: Build ring from doubles that describe the geometry: x and y positions of centre and the radius. Initialise stiffness to 1.0. By default, no load is set. More...
 
virtual ~ElasticallySupportedRingElement ()
 Destructor: More...
 
void set_load_pt (Data *load_pt)
 Set pointer to Data object that specifies the "load" on the ElasticallySupportedRingElement. More...
 
double load ()
 "Load" acting on the ring More...
 
double & k_stiff ()
 Access function for the spring stiffness. More...
 
void pin_yc ()
 Pin the vertical displacement. More...
 
void unpin_yc ()
 Unpin the vertical displacement. More...
 
void get_residuals (Vector< double > &residuals)
 Compute element residual vector (wrapper) More...
 
void get_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 Compute element residual Vector and element Jacobian matrix (wrapper) More...
 
- Public Member Functions inherited from oomph::GeneralCircle
 GeneralCircle (const double &x_c, const double &y_c, const double &r)
 Constructor: Pass x and y-coords of centre and radius (all pinned) More...
 
 GeneralCircle (Data *geom_data_pt)
 Alternative constructor: Pass x and y-coords of centre and radius (all as part of Data) More...
 
virtual ~GeneralCircle ()
 Destructor: Clean up if necessary. More...
 
void position (const Vector< double > &zeta, Vector< double > &r) const
 Position Vector at Lagrangian coordinate zeta. More...
 
void position (const unsigned &t, const Vector< double > &zeta, Vector< double > &r) const
 Position Vector at Lagrangian coordinate zeta at time level t (t=0: present; t>0: previous level). Steady object, so we simply forward the call to the steady version. More...
 
double & x_c ()
 Access function to x-coordinate of centre of circle. More...
 
double & y_c ()
 Access function to y-coordinate of centre of circle. More...
 
double & R ()
 Access function to radius of circle. More...
 
unsigned ngeom_data () const
 How many items of Data does the shape of the object depend on? More...
 
Data * geom_data_pt (const unsigned &j)
 Return pointer to the j-th Data item that the object's shape depends on. More...
 

Protected Member Functions

void fill_in_generic_residual_contribution (Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
 Compute element residual Vector (only if flag=0) and also the element Jacobian matrix (if flag=1) More...
 

Private Attributes

double K_stiff
 Stiffness of the ring's "elastic" support. More...
 
unsigned External_load_index
 Index of the location of the load Data in the element's array of external data. More...
 
unsigned Internal_geometric_data_index
 Index of the location of the geometric Data in the element's array of internal data. More...
 
bool Load_data_has_been_set
 Flag to indicate that load data has been set. More...
 

Additional Inherited Members

- Protected Attributes inherited from oomph::GeneralCircle
Vector< Data * > Geom_data_pt
 Vector of pointers to Data items that affects the object's shape. More...
 
bool Must_clean_up
 Do I need to clean up? More...
 

Detailed Description

GeneralCircle "upgraded" to a GeneralisedElement: Circular ring whose position is given by

\[ x = X_c + R \cos(\zeta) \]

\[ y = Y_c + R \sin(\zeta) \]

The ring's vertical position $ Y_c $ is determined by "pseudo elasticity":

\[ 0 = f_{load} - Y_c \ k_{stiff} \]

This simulates the case where the centre of the ring is mounted on an elastic spring of stiffness $ k_{stiff} $ and loaded by the force $ f_{load}. $ The "load" is specified by the Data object load_pt().

Definition at line 59 of file circle_as_generalised_element.h.

Constructor & Destructor Documentation

◆ ElasticallySupportedRingElement()

oomph::ElasticallySupportedRingElement::ElasticallySupportedRingElement ( const double &  x_c,
const double &  y_c,
const double &  r 
)
inline

Constructor: Build ring from doubles that describe the geometry: x and y positions of centre and the radius. Initialise stiffness to 1.0. By default, no load is set.

Definition at line 68 of file circle_as_generalised_element.h.

References oomph::GeneralCircle::Geom_data_pt, Internal_geometric_data_index, and oomph::GeneralCircle::Must_clean_up.

◆ ~ElasticallySupportedRingElement()

virtual oomph::ElasticallySupportedRingElement::~ElasticallySupportedRingElement ( )
inlinevirtual

Destructor:

Definition at line 92 of file circle_as_generalised_element.h.

Member Function Documentation

◆ fill_in_generic_residual_contribution()

void oomph::ElasticallySupportedRingElement::fill_in_generic_residual_contribution ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
unsigned  flag 
)
inlineprotected

Compute element residual Vector (only if flag=0) and also the element Jacobian matrix (if flag=1)

Definition at line 201 of file circle_as_generalised_element.h.

References External_load_index, Internal_geometric_data_index, K_stiff, load(), and oomph::GeneralCircle::y_c().

Referenced by get_jacobian(), and get_residuals().

◆ get_jacobian()

void oomph::ElasticallySupportedRingElement::get_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inline

Compute element residual Vector and element Jacobian matrix (wrapper)

Definition at line 183 of file circle_as_generalised_element.h.

References fill_in_generic_residual_contribution().

◆ get_residuals()

void oomph::ElasticallySupportedRingElement::get_residuals ( Vector< double > &  residuals)
inline

Compute element residual vector (wrapper)

Definition at line 171 of file circle_as_generalised_element.h.

References fill_in_generic_residual_contribution().

◆ k_stiff()

double& oomph::ElasticallySupportedRingElement::k_stiff ( )
inline

Access function for the spring stiffness.

Definition at line 148 of file circle_as_generalised_element.h.

References K_stiff.

Referenced by GeomObjectAsGeneralisedElementProblem::GeomObjectAsGeneralisedElementProblem().

◆ load()

double oomph::ElasticallySupportedRingElement::load ( )
inline

"Load" acting on the ring

Definition at line 132 of file circle_as_generalised_element.h.

References External_load_index, and Load_data_has_been_set.

Referenced by fill_in_generic_residual_contribution().

◆ pin_yc()

void oomph::ElasticallySupportedRingElement::pin_yc ( )
inline

Pin the vertical displacement.

Definition at line 152 of file circle_as_generalised_element.h.

References Internal_geometric_data_index.

◆ set_load_pt()

void oomph::ElasticallySupportedRingElement::set_load_pt ( Data *  load_pt)
inline

Set pointer to Data object that specifies the "load" on the ElasticallySupportedRingElement.

Definition at line 102 of file circle_as_generalised_element.h.

References External_load_index, and Load_data_has_been_set.

Referenced by GeomObjectAsGeneralisedElementProblem::GeomObjectAsGeneralisedElementProblem().

◆ unpin_yc()

void oomph::ElasticallySupportedRingElement::unpin_yc ( )
inline

Unpin the vertical displacement.

Definition at line 161 of file circle_as_generalised_element.h.

References Internal_geometric_data_index.

Member Data Documentation

◆ External_load_index

unsigned oomph::ElasticallySupportedRingElement::External_load_index
private

Index of the location of the load Data in the element's array of external data.

Definition at line 266 of file circle_as_generalised_element.h.

Referenced by fill_in_generic_residual_contribution(), load(), and set_load_pt().

◆ Internal_geometric_data_index

unsigned oomph::ElasticallySupportedRingElement::Internal_geometric_data_index
private

Index of the location of the geometric Data in the element's array of internal data.

Definition at line 270 of file circle_as_generalised_element.h.

Referenced by ElasticallySupportedRingElement(), fill_in_generic_residual_contribution(), pin_yc(), and unpin_yc().

◆ K_stiff

double oomph::ElasticallySupportedRingElement::K_stiff
private

Stiffness of the ring's "elastic" support.

Definition at line 262 of file circle_as_generalised_element.h.

Referenced by fill_in_generic_residual_contribution(), and k_stiff().

◆ Load_data_has_been_set

bool oomph::ElasticallySupportedRingElement::Load_data_has_been_set
private

Flag to indicate that load data has been set.

Definition at line 273 of file circle_as_generalised_element.h.

Referenced by load(), and set_load_pt().


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