26 #ifndef CIRCLE_AS_GEN_ELEMENT_HEADER
27 #define CIRCLE_AS_GEN_ELEMENT_HEADER
103 std::ostringstream error_stream;
104 error_stream <<
"The data object that stores the load on the "
105 <<
"ElasticallySupportedRingElement\n"
106 <<
"should only contain a single data value\n"
107 <<
"This one contains " << load_pt->
nvalue() << std::endl;
202 unsigned n_dof =
ndof();
204 if (n_dof==0)
return;
213 int local_eqn_number_for_yc =
225 jacobian(local_eqn_number_for_yc,local_eqn_number_for_yc) = -
K_stiff;
235 int local_eqn_number_for_load =
239 if (local_eqn_number_for_load<0)
242 "Load is pinned and yet n_dof=2?\n This is very fishy!\n",
249 jacobian(local_eqn_number_for_yc,local_eqn_number_for_load) = 1.0;
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
void unpin(const unsigned &i)
Unpin the i-th stored variable.
Definition: nodes.h:391
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: circle_as_generalised_element.h:57
void get_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Compute element residual Vector and element Jacobian matrix (wrapper)
Definition: circle_as_generalised_element.h:179
virtual ~ElasticallySupportedRingElement()
Destructor:
Definition: circle_as_generalised_element.h:88
double load()
"Load" acting on the ring
Definition: circle_as_generalised_element.h:128
double & k_stiff()
Access function for the spring stiffness.
Definition: circle_as_generalised_element.h:144
unsigned Internal_geometric_data_index
Definition: circle_as_generalised_element.h:266
void fill_in_generic_residual_contribution(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Definition: circle_as_generalised_element.h:197
ElasticallySupportedRingElement(const double &x_c, const double &y_c, const double &r)
Definition: circle_as_generalised_element.h:64
unsigned External_load_index
Definition: circle_as_generalised_element.h:262
bool Load_data_has_been_set
Flag to indicate that load data has been set.
Definition: circle_as_generalised_element.h:269
double K_stiff
Stiffness of the ring's "elastic" support.
Definition: circle_as_generalised_element.h:258
void set_load_pt(Data *load_pt)
Definition: circle_as_generalised_element.h:98
void pin_yc()
Pin the vertical displacement.
Definition: circle_as_generalised_element.h:148
void unpin_yc()
Unpin the vertical displacement.
Definition: circle_as_generalised_element.h:157
void get_residuals(Vector< double > &residuals)
Compute element residual vector (wrapper)
Definition: circle_as_generalised_element.h:167
Vector< Data * > Geom_data_pt
Vector of pointers to Data items that affects the object's shape.
Definition: circle.h:224
bool Must_clean_up
Do I need to clean up?
Definition: circle.h:227
double & x_c()
Access function to x-coordinate of centre of circle.
Definition: circle.h:205
double & y_c()
Access function to y-coordinate of centre of circle.
Definition: circle.h:208
Definition: elements.h:73
unsigned ndof() const
Return the number of equations/dofs in the element.
Definition: elements.h:835
Data *& external_data_pt(const unsigned &i)
Return a pointer to i-th external data object.
Definition: elements.h:659
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
Definition: elements.h:622
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: oomph_definitions.h:222
void initialise(const _Tp &__value)
Iterate over all values and set to the desired value.
Definition: oomph-lib/src/generic/Vector.h:167
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86