28 #ifndef OOMPH_AXISYMMETRIC_LINEAR_ELASTICITY_ELEMENTS_HEADER
29 #define OOMPH_AXISYMMETRIC_LINEAR_ELASTICITY_ELEMENTS_HEADER
33 #include <oomph-lib-config.h>
61 const unsigned&
i)
const
68 const unsigned&
i)
const
80 const unsigned u_nodal_index =
87 for (
unsigned t = 0;
t < n_time;
t++)
101 const unsigned&
i)
const
113 const unsigned u_nodal_index =
120 for (
unsigned t = 0;
t < n_time;
t++)
135 unsigned n_node =
nnode();
143 for (
unsigned i = 0;
i < 3;
i++)
152 for (
unsigned l = 0; l < n_node; l++)
154 const double u_value =
nodal_value(l, u_nodal_index);
156 disp[
i] += u_value * psi[l];
167 unsigned n_node =
nnode();
179 double interpolated_u = 0.0;
182 for (
unsigned l = 0; l < n_node; l++)
184 const double u_value =
nodal_value(l, u_nodal_index);
186 interpolated_u += u_value * psi[l];
189 return (interpolated_u);
198 unsigned n_node =
nnode();
207 for (
unsigned i = 0;
i < 3;
i++)
213 for (
unsigned l = 0; l < n_node; l++)
225 unsigned n_node =
nnode();
234 for (
unsigned i = 0;
i < 3;
i++)
240 for (
unsigned l = 0; l < n_node; l++)
283 std::ostringstream error_message;
284 error_message <<
"No pointer to Poisson's ratio set. Please set one!\n";
334 for (
unsigned i = 0;
i <
n;
i++)
341 (*Body_force_fct_pt)(time,
x,
b);
360 std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list)
const
364 std::pair<unsigned long, unsigned> dof_lookup;
367 const unsigned n_node = this->
nnode();
370 int local_unknown = 0;
373 for (
unsigned n = 0;
n < n_node;
n++)
376 for (
unsigned i = 0;
i < 3;
i++)
382 if (local_unknown >= 0)
386 dof_lookup.first = this->
eqn_number(local_unknown);
387 dof_lookup.second = 0;
390 dof_lookup_list.push_front(dof_lookup);
462 ->fill_in_generic_contribution_to_residuals_axisymmetric_linear_elasticity(
463 residuals, jacobian, 1);
472 const unsigned& nplot,
478 const unsigned& nplot,
490 void output(std::ostream& outfile,
const unsigned& n_plot);
500 void output(FILE* file_pt,
const unsigned& n_plot);
537 template<
unsigned NNODE_1D>
539 :
public virtual QElement<2, NNODE_1D>,
556 void output(std::ostream& outfile,
const unsigned& n_plot)
569 void output(FILE* file_pt,
const unsigned& n_plot)
580 template<
unsigned NNODE_1D>
582 :
public virtual QElement<1, NNODE_1D>
658 template<
class AXISYM_LINEAR_ELAST_ELEMENT>
679 unsigned nnod = this->
nnode();
680 for (
unsigned j = 0;
j < nnod;
j++)
683 data_values.push_back(std::make_pair(this->
node_pt(
j), fld));
704 std::stringstream error_stream;
705 error_stream <<
"Elements only store two fields so fld can't be"
706 <<
" " << fld << std::endl;
727 unsigned n_dim = this->
dim();
728 unsigned n_node = this->
nnode();
729 DShape dpsidx(n_node, n_dim);
743 unsigned n_node = this->
nnode();
752 double interpolated_u = 0.0;
755 for (
unsigned l = 0; l < n_node; l++)
757 interpolated_u += this->
nodal_value(t, l, fld) * psi[l];
759 return interpolated_u;
766 return this->
nnode();
782 template<
class ELEMENT>
795 template<
class ELEMENT>
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Scalar * b
Definition: benchVecAdd.cpp:17
Definition: axisym_linear_elasticity_elements.h:54
double * Youngs_modulus_pt
Pointer to the Young's modulus.
Definition: axisym_linear_elasticity_elements.h:399
double d2u_dt2_axisymmetric_linear_elasticity(const unsigned &n, const unsigned &i) const
d^2u/dt^2 at local node n
Definition: axisym_linear_elasticity_elements.h:67
unsigned ndof_types() const
Definition: axisym_linear_elasticity_elements.h:348
void interpolated_d2u_dt2_axisymmetric_linear_elasticity(const Vector< double > &s, Vector< double > &d2u_dt2) const
Compute vector of FE interpolated accel d2u/dt2 at local coordinate s.
Definition: axisym_linear_elasticity_elements.h:221
double & nu() const
Access function for Poisson's ratio.
Definition: axisym_linear_elasticity_elements.h:278
const double & lambda_sq() const
Access function for timescale ratio (nondim density)
Definition: axisym_linear_elasticity_elements.h:306
virtual unsigned u_index_axisymmetric_linear_elasticity(const unsigned &i) const
Definition: axisym_linear_elasticity_elements.h:60
double * Nu_pt
Pointer to Poisson's ratio.
Definition: axisym_linear_elasticity_elements.h:402
double *& nu_pt()
Access function for pointer to Poisson's ratio.
Definition: axisym_linear_elasticity_elements.h:294
double youngs_modulus() const
Access function to Young's modulus.
Definition: axisym_linear_elasticity_elements.h:272
static double Default_lambda_sq_value
Static default value for timescale ratio (1.0 for natural scaling)
Definition: axisym_linear_elasticity_elements.h:419
void interpolated_du_dt_axisymmetric_linear_elasticity(const Vector< double > &s, Vector< double > &du_dt) const
Compute vector of FE interpolated velocity du/dt at local coordinate s.
Definition: axisym_linear_elasticity_elements.h:194
double du_dt_axisymmetric_linear_elasticity(const unsigned &n, const unsigned &i) const
du/dt at local node n
Definition: axisym_linear_elasticity_elements.h:100
AxisymmetricLinearElasticityEquationsBase()
Definition: axisym_linear_elasticity_elements.h:257
double *& youngs_modulus_pt()
Return the pointer to Young's modulus.
Definition: axisym_linear_elasticity_elements.h:266
double *& lambda_sq_pt()
Access function for pointer to timescale ratio (nondim density)
Definition: axisym_linear_elasticity_elements.h:300
static double Default_youngs_modulus_value
Definition: axisym_linear_elasticity_elements.h:416
void body_force(const double &time, const Vector< double > &x, Vector< double > &b) const
Definition: axisym_linear_elasticity_elements.h:325
BodyForceFctPt body_force_fct_pt() const
Access function: Pointer to body force function (const version)
Definition: axisym_linear_elasticity_elements.h:318
BodyForceFctPt Body_force_fct_pt
Pointer to body force function.
Definition: axisym_linear_elasticity_elements.h:408
BodyForceFctPt & body_force_fct_pt()
Access function: Pointer to body force function.
Definition: axisym_linear_elasticity_elements.h:312
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Definition: axisym_linear_elasticity_elements.h:359
double * Lambda_sq_pt
Timescale ratio (non-dim. density)
Definition: axisym_linear_elasticity_elements.h:405
double interpolated_u_axisymmetric_linear_elasticity(const Vector< double > &s, const unsigned &i) const
Definition: axisym_linear_elasticity_elements.h:163
void(* BodyForceFctPt)(const double &time, const Vector< double > &x, Vector< double > &b)
Definition: axisym_linear_elasticity_elements.h:250
void interpolated_u_axisymmetric_linear_elasticity(const Vector< double > &s, Vector< double > &disp) const
Compute vector of FE interpolated displacement u at local coordinate s.
Definition: axisym_linear_elasticity_elements.h:131
Definition: axisym_linear_elasticity_elements.h:434
void get_strain(const Vector< double > &s, DenseMatrix< double > &strain)
Get strain (3x3 entries; r, z, phi)
Definition: axisym_linear_elasticity_elements.cc:55
virtual void fill_in_generic_contribution_to_residuals_axisymmetric_linear_elasticity(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Definition: axisym_linear_elasticity_elements.cc:163
void output(std::ostream &outfile)
Output: r,z, u_r, u_z, u_theta.
Definition: axisym_linear_elasticity_elements.h:483
AxisymmetricLinearElasticityEquations()
Constructor.
Definition: axisym_linear_elasticity_elements.h:437
void output(FILE *file_pt)
C-style output: r,z, u_r, u_z, u_theta.
Definition: axisym_linear_elasticity_elements.h:493
unsigned required_nvalue(const unsigned &n) const
Number of values required at node n.
Definition: axisym_linear_elasticity_elements.h:440
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: axisym_linear_elasticity_elements.h:457
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Definition: axisym_linear_elasticity_elements.cc:662
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Definition: axisym_linear_elasticity_elements.h:447
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output exact solution: r,z, u_r, u_z, u_theta.
Definition: axisym_linear_elasticity_elements.cc:456
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
Definition: nodes.h:238
unsigned ntstorage() const
Definition: nodes.cc:879
FaceGeometry()
Definition: axisym_linear_elasticity_elements.h:801
FaceGeometry()
Definition: axisym_linear_elasticity_elements.h:787
FaceGeometry()
Constructor must call the constructor of the underlying element.
Definition: axisym_linear_elasticity_elements.h:586
Definition: elements.h:4998
Definition: elements.h:1313
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593
virtual void shape(const Vector< double > &s, Shape &psi) const =0
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432
unsigned dim() const
Definition: elements.h:2611
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Definition: elements.h:1759
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Definition: elements.h:1765
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Definition: elements.cc:3298
unsigned long eqn_number(const unsigned &ieqn_local) const
Definition: elements.h:704
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227
TimeStepper *& time_stepper_pt()
Definition: geom_objects.h:192
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
Definition: nodes.h:1022
Definition: oomph_definitions.h:222
Axisym linear elasticity upgraded to become projectable.
Definition: axisym_linear_elasticity_elements.h:661
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
Definition: axisym_linear_elasticity_elements.h:764
double get_field(const unsigned &t, const unsigned &fld, const Vector< double > &s)
Definition: axisym_linear_elasticity_elements.h:739
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
Definition: axisym_linear_elasticity_elements.h:771
unsigned nhistory_values_for_coordinate_projection()
Definition: axisym_linear_elasticity_elements.h:716
Vector< std::pair< Data *, unsigned > > data_values_of_field(const unsigned &fld)
Definition: axisym_linear_elasticity_elements.h:673
ProjectableAxisymLinearElasticityElement()
Definition: axisym_linear_elasticity_elements.h:665
double jacobian_and_shape_of_field(const unsigned &fld, const Vector< double > &s, Shape &psi)
Definition: axisym_linear_elasticity_elements.h:723
unsigned nhistory_values_for_projection(const unsigned &fld)
Definition: axisym_linear_elasticity_elements.h:699
unsigned nfields_for_projection()
Definition: axisym_linear_elasticity_elements.h:692
Definition: projection.h:183
Definition: axisym_linear_elasticity_elements.h:541
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
Definition: axisym_linear_elasticity_elements.h:556
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function.
Definition: axisym_linear_elasticity_elements.h:569
QAxisymmetricLinearElasticityElement()
Constructor.
Definition: axisym_linear_elasticity_elements.h:544
void output(FILE *file_pt)
C-style output function.
Definition: axisym_linear_elasticity_elements.h:563
void output(std::ostream &outfile)
Output function.
Definition: axisym_linear_elasticity_elements.h:550
Definition: Qelements.h:459
Definition: timesteppers.h:231
unsigned ntstorage() const
Definition: timesteppers.h:601
virtual double weight(const unsigned &i, const unsigned &j) const
Access function for j-th weight for the i-th derivative.
Definition: timesteppers.h:594
bool is_steady() const
Definition: timesteppers.h:389
RealScalar s
Definition: level1_cplx_impl.h:130
int error
Definition: calibrate.py:297
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
list x
Definition: plotDoE.py:28
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