26#ifndef OOMPH_PSEUDO_BUCKLING_RING_HEADER
27#define OOMPH_PSEUDO_BUCKLING_RING_HEADER
32#include <oomph-lib-config.h>
62 "Don't call empty constructor for PseudoBucklingRing!",
85 std::ostringstream error_message;
86 error_message <<
"geom_data_pt should be of size 1, but is of size"
95 std::ostringstream error_message;
96 error_message <<
"geom_data_pt[0] should have 5 values, but has"
168 const unsigned&
imode,
349 throw OomphLibError(
"The position vector r has the wrong dimension",
421 throw OomphLibError(
"The vector accel has the wrong dimension",
459 throw OomphLibError(
"The position vector r has the wrong dimension",
466 "The time value t is greater than the number of previous steps",
483 for (
unsigned i = 0;
i <
t;
i++)
527 std::ostringstream error_message;
528 error_message <<
j <<
"th derivative not implemented\n";
651 const unsigned&
imode,
754 jacobian.initialise(0.0);
A class that represents a collection of data; each Data object may contain many different individual ...
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
double value(const unsigned &i) const
Return i-th stored value. This function is not virtual so that it can be inlined. This means that if ...
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
A Generalised Element class.
Data *& external_data_pt(const unsigned &i)
Return a pointer to i-th external data object.
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Add a (pointer to an) internal data object to the element and return the index required to obtain it ...
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Return the local equation number corresponding to the j-th value stored at the i-th internal data.
int external_local_eqn(const unsigned &i, const unsigned &j)
Return the local equation number corresponding to the j-th value stored at the i-th external data.
void flush_external_data()
Flush all external data.
unsigned add_external_data(Data *const &data_pt, const bool &fd=true)
Add a (pointer to an) external data object to the element and return its index (i....
A geometric object is an object that provides a parametrised description of its shape via the functio...
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
TimeStepper * Geom_object_time_stepper_pt
Timestepper (used to handle access to geometry at previous timesteps)
unsigned Ndim
Number of Eulerian coordinates.
An OomphLibError object which should be thrown when an run-time error is encountered....
Pseudo buckling ring: Circular ring deformed by the N-th buckling mode of a thin-wall elastic ring.
Data * External_reference_pressure_pt
Pointer to the data object that represents the external reference pressure.
int reference_pressure_local_eqn()
Return the local equation number of the reference pressure variable.
unsigned External_reference_pressure_index
The Data object that represents the reference pressure is stored at the location indexed by this inte...
virtual void get_residuals_generic(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Compute element residual Vector (only if flag=0) and also element Jacobian matrix (if flag=1)
int geometric_local_eqn()
Return the local equation number of the internal geometric variable.
void set_reference_pressure_pt(Data *const &data_pt)
Set the pressure data that is used as reference pressure.
virtual ~PseudoBucklingRingElement()
Destructor: Kill internal data and set to NULL.
PseudoBucklingRingElement(const double &eps_buckl, const double &HoR, const unsigned &n_buckl, const unsigned &imode, TimeStepper *time_stepper_pt)
Constructor: Pass buckling amplitude, h/R, buckling wavenumbe and pointer to global timestepper....
unsigned Internal_geometric_variable_index
Index of the value stored in the single geometric object that has become an unknown.
PseudoBucklingRingElement(const PseudoBucklingRingElement &dummy)=delete
Broken copy constructor.
Data *const & reference_pressure_pt() const
Pointer to pressure data that is used as reference pressure.
virtual void get_residuals(Vector< double > &residuals)
Compute element residual Vector (wrapper)
PseudoBucklingRingElement(const double &eps_buckl, const double &l_ratio, const unsigned n_buckl, const double &r_0, const double &T, TimeStepper *time_stepper_pt)
Constructor: Build pseudo buckling ring from doubles that describe the geometry.
void operator=(const PseudoBucklingRingElement &)=delete
Broken assignment operator.
virtual void get_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Compute element residual Vector and element Jacobian matrix (wrapper)
double reference_pressure() const
Return the reference pressure.
Pseudo buckling ring: Circular ring deformed by the N-th buckling mode of a thin-wall elastic ring.
void position(const unsigned &t, const Vector< double > &zeta, Vector< double > &r) const
Position Vector at Lagrangian coordinate zeta at discrete previous time (t=0: present time; t>0: prev...
~PseudoBucklingRing()
Destructor: Clean up if necessary.
void position(const Vector< double > &zeta, Vector< double > &r) const
Position Vector at Lagrangian coordinate zeta at present time.
void set_R_0(const double &r_0)
Set undeformed radius of ring.
bool Must_clean_up
Do I need to clean up?
void set_T(const double &T)
Set period of oscillation.
void set_ampl_ratio(const double &l_ratio)
Set amplitude ratio between radial and azimuthal buckling displacements.
PseudoBucklingRing(const double &eps_buckl, const double &l_ratio, const unsigned n_buckl, const double &r_0, const double &T, TimeStepper *time_stepper_pt)
Constructor: 1 Lagrangian coordinate, 2 Eulerian coords. Pass buckling amplitude, ratio of of bucklin...
double n_buckl_float()
Access function for buckling wavenumber (as float)
PseudoBucklingRing(const double &eps_buckl, const double &HoR, const unsigned &n_buckl, const unsigned &imode, TimeStepper *time_stepper_pt)
Constructor: 1 Lagrangian coordinate, 2 Eulerian coords. Pass buckling amplitude, h/R,...
Vector< Data * > Geom_data_pt
Vector of pointers to Data items that affects the object's shape.
PseudoBucklingRing()
Default constructor (empty and broken)
void veloc(const Vector< double > &zeta, Vector< double > &veloc)
Parametrised velocity on object at current time: veloc = d r(zeta)/dt.
unsigned ngeom_data() const
How many items of Data does the shape of the object depend on?
void dposition_dt(const Vector< double > &zeta, const unsigned &j, Vector< double > &drdt)
j-th time-derivative on object at current time: .
PseudoBucklingRing(const Vector< Data * > &geom_data_pt, TimeStepper *time_stepper_pt)
Constructor: 1 Lagrangian coordinate, 2 Eulerian coords. Pass buckling amplitude, ratio of of bucklin...
PseudoBucklingRing(const PseudoBucklingRing &node)=delete
Broken copy constructor.
void set_n_buckl(const unsigned &n_buckl)
Set buckling wavenumber.
double r_0()
Access function for undeformed radius.
double eps_buckl()
Access function for buckling amplitude.
void operator=(const PseudoBucklingRing &)=delete
Broken assignment operator.
void set_eps_buckl(const double &eps_buckl)
Set buckling amplitude.
double ampl_ratio()
Access function for amplitude ratio.
void accel(const Vector< double > &zeta, Vector< double > &accel)
Parametrised acceleration on object at current time: accel = d^2 r(zeta)/dt^2.
Data * geom_data_pt(const unsigned &j)
Return pointer to the j-th Data item that the object's shape depends on.
double T()
Access function for period of oscillation.
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
virtual unsigned nprev_values() const =0
Number of previous values available: 0 for static, 1 for BDF<1>,...
Time *const & time_pt() const
Access function for the pointer to time (const version)
double & time()
Return the current value of the continuous time.
double & dt(const unsigned &t=0)
Return the value of the t-th stored timestep (t=0: present; t>0: previous).
const double Pi
50 digits from maple
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...