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"
118 const unsigned n_buckl,
135 for (
unsigned itime = 0; itime <= n_time; itime++)
167 const unsigned& n_buckl,
168 const unsigned& imode,
173 double K1 = (
pow(
double(n_buckl), 2) + 1.0) *
174 (1.0 / 12.0 *
pow(
double(n_buckl), 2) *
pow(HoR, 2) + 1.0);
177 1.0 / 12.0 *
pow(HoR, 2) *
pow(
double(n_buckl), 2) *
178 pow((
pow(
double(n_buckl), 2) - 1.0), 2) /
179 (
pow((
pow(
double(n_buckl), 2) + 1.0), 2) *
180 pow((1.0 / 12.0 *
pow(
double(n_buckl), 2) *
pow(HoR, 2) + 1.0), 2));
183 double omega1 =
sqrt(0.5 * K1 * (1.0 +
sqrt(1.0 - 4 * K2oK1sq)));
184 double omega2 =
sqrt(0.5 * K1 * (1.0 -
sqrt(1.0 - 4 * K2oK1sq)));
189 (1.0 / 12.0 *
pow(
double(n_buckl), 2) *
pow(HoR, 2) + 1.0)) /
191 pow(
double(n_buckl), 2) * (1.0 / 12.0 *
pow(HoR, 2) + 1.0));
195 (1.0 / 12.0 *
pow(
double(n_buckl), 2) *
pow(HoR, 2) + 1.0) /
197 pow(
double(n_buckl), 2) * (1.0 / 12.0 *
pow(HoR, 2) + 1.0));
218 oomph_info <<
"wrong imode " << imode << std::endl;
238 for (
unsigned itime = 0; itime <= n_time; itime++)
347 if (
r.size() !=
Ndim)
349 throw OomphLibError(
"The position vector r has the wrong dimension",
401 veloc[0] = Eps_buckl *
406 veloc[1] = Eps_buckl *
421 throw OomphLibError(
"The vector accel has the wrong dimension",
436 accel[0] = -Eps_buckl *
442 accel[1] = -Eps_buckl *
457 if (
r.size() !=
Ndim)
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";
616 const unsigned n_buckl,
636 for (
unsigned i = 0;
i < n_geom_data;
i++)
650 const unsigned& n_buckl,
651 const unsigned& imode,
668 for (
unsigned i = 0;
i < n_geom_data;
i++)
772 jacobian(local_eqn, local_eqn) = -1.0;
775 if (local_unknown >= 0)
777 jacobian(local_eqn, local_unknown) = 1.0;
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Definition: nodes.h:483
double value(const unsigned &i) const
Definition: nodes.h:293
void initialise(const T &val)
Initialize all values in the matrix to val.
Definition: matrices.h:514
Definition: elements.h:73
void flush_external_data()
Flush all external data.
Definition: elements.cc:387
Data *& external_data_pt(const unsigned &i)
Return a pointer to i-th external data object.
Definition: elements.h:659
unsigned add_external_data(Data *const &data_pt, const bool &fd=true)
Definition: elements.cc:307
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Definition: elements.h:267
int external_local_eqn(const unsigned &i, const unsigned &j)
Definition: elements.h:311
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Definition: elements.cc:62
Definition: geom_objects.h:101
TimeStepper * Geom_object_time_stepper_pt
Definition: geom_objects.h:435
TimeStepper *& time_stepper_pt()
Definition: geom_objects.h:192
unsigned Ndim
Number of Eulerian coordinates.
Definition: geom_objects.h:431
Definition: oomph_definitions.h:222
Definition: pseudo_buckling_ring.h:584
Data * External_reference_pressure_pt
Definition: pseudo_buckling_ring.h:596
int reference_pressure_local_eqn()
Return the local equation number of the reference pressure variable.
Definition: pseudo_buckling_ring.h:605
unsigned External_reference_pressure_index
Definition: pseudo_buckling_ring.h:592
virtual void get_residuals_generic(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Definition: pseudo_buckling_ring.h:745
int geometric_local_eqn()
Return the local equation number of the internal geometric variable.
Definition: pseudo_buckling_ring.h:599
void set_reference_pressure_pt(Data *const &data_pt)
Set the pressure data that is used as reference pressure.
Definition: pseudo_buckling_ring.h:732
virtual ~PseudoBucklingRingElement()
Destructor: Kill internal data and set to NULL.
Definition: pseudo_buckling_ring.h:682
PseudoBucklingRingElement(const double &eps_buckl, const double &HoR, const unsigned &n_buckl, const unsigned &imode, TimeStepper *time_stepper_pt)
Definition: pseudo_buckling_ring.h:648
unsigned Internal_geometric_variable_index
Definition: pseudo_buckling_ring.h:588
PseudoBucklingRingElement(const PseudoBucklingRingElement &dummy)=delete
Broken copy constructor.
virtual void get_residuals(Vector< double > &residuals)
Compute element residual Vector (wrapper)
Definition: pseudo_buckling_ring.h:693
PseudoBucklingRingElement(const double &eps_buckl, const double &l_ratio, const unsigned n_buckl, const double &r_0, const double &T, TimeStepper *time_stepper_pt)
Definition: pseudo_buckling_ring.h:614
Data *const & reference_pressure_pt() const
Pointer to pressure data that is used as reference pressure.
Definition: pseudo_buckling_ring.h:712
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)
Definition: pseudo_buckling_ring.h:704
double reference_pressure() const
Return the reference pressure.
Definition: pseudo_buckling_ring.h:718
Definition: pseudo_buckling_ring.h:56
void position(const unsigned &t, const Vector< double > &zeta, Vector< double > &r) const
Definition: pseudo_buckling_ring.h:452
~PseudoBucklingRing()
Destructor: Clean up if necessary.
Definition: pseudo_buckling_ring.h:269
void position(const Vector< double > &zeta, Vector< double > &r) const
Definition: pseudo_buckling_ring.h:344
void set_R_0(const double &r_0)
Set undeformed radius of ring.
Definition: pseudo_buckling_ring.h:330
bool Must_clean_up
Do I need to clean up?
Definition: pseudo_buckling_ring.h:556
void set_T(const double &T)
Set period of oscillation.
Definition: pseudo_buckling_ring.h:336
void set_ampl_ratio(const double &l_ratio)
Definition: pseudo_buckling_ring.h:318
PseudoBucklingRing(const double &eps_buckl, const double &l_ratio, const unsigned n_buckl, const double &r_0, const double &T, TimeStepper *time_stepper_pt)
Definition: pseudo_buckling_ring.h:116
Data * geom_data_pt(const unsigned &j)
Definition: pseudo_buckling_ring.h:545
double n_buckl_float()
Access function for buckling wavenumber (as float)
Definition: pseudo_buckling_ring.h:305
PseudoBucklingRing(const double &eps_buckl, const double &HoR, const unsigned &n_buckl, const unsigned &imode, TimeStepper *time_stepper_pt)
Definition: pseudo_buckling_ring.h:165
Vector< Data * > Geom_data_pt
Vector of pointers to Data items that affects the object's shape.
Definition: pseudo_buckling_ring.h:553
PseudoBucklingRing()
Default constructor (empty and broken)
Definition: pseudo_buckling_ring.h:59
void veloc(const Vector< double > &zeta, Vector< double > &veloc)
Definition: pseudo_buckling_ring.h:381
unsigned ngeom_data() const
How many items of Data does the shape of the object depend on?
Definition: pseudo_buckling_ring.h:538
void dposition_dt(const Vector< double > &zeta, const unsigned &j, Vector< double > &drdt)
Definition: pseudo_buckling_ring.h:505
PseudoBucklingRing(const Vector< Data * > &geom_data_pt, TimeStepper *time_stepper_pt)
Definition: pseudo_buckling_ring.h:78
PseudoBucklingRing(const PseudoBucklingRing &node)=delete
Broken copy constructor.
void set_n_buckl(const unsigned &n_buckl)
Set buckling wavenumber.
Definition: pseudo_buckling_ring.h:324
double r_0()
Access function for undeformed radius.
Definition: pseudo_buckling_ring.h:293
double eps_buckl()
Access function for buckling amplitude.
Definition: pseudo_buckling_ring.h:281
void operator=(const PseudoBucklingRing &)=delete
Broken assignment operator.
void set_eps_buckl(const double &eps_buckl)
Set buckling amplitude.
Definition: pseudo_buckling_ring.h:311
double ampl_ratio()
Access function for amplitude ratio.
Definition: pseudo_buckling_ring.h:287
void accel(const Vector< double > &zeta, Vector< double > &accel)
Definition: pseudo_buckling_ring.h:416
double T()
Access function for period of oscillation.
Definition: pseudo_buckling_ring.h:299
Definition: timesteppers.h:231
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)
Definition: timesteppers.h:572
double & dt(const unsigned &t=0)
Definition: timesteppers.h:136
double & time()
Return the current value of the continuous time.
Definition: timesteppers.h:123
void initialise(const _Tp &__value)
Iterate over all values and set to the desired value.
Definition: oomph-lib/src/generic/Vector.h:167
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152
const double Pi
50 digits from maple
Definition: oomph_utilities.h:157
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
t
Definition: plotPSD.py:36
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2