32 #ifndef OOMPH_AXISYMMETRIC_LINEAR_ELASTICITY_ELEMENTS_HEADER 33 #define OOMPH_AXISYMMETRIC_LINEAR_ELASTICITY_ELEMENTS_HEADER 37 #include <oomph-lib-config.h> 66 virtual inline unsigned 74 const unsigned &
i)
const 89 const unsigned n_time=time_stepper_pt->
ntstorage();
92 for(
unsigned t=0;
t<n_time;
t++)
105 const unsigned &
i)
const 120 const unsigned n_time=time_stepper_pt->
ntstorage();
123 for(
unsigned t=0;
t<n_time;
t++)
139 unsigned n_node =
nnode();
147 for (
unsigned i=0;
i<3;
i++)
150 unsigned u_nodal_index =
157 for(
unsigned l=0;l<n_node;l++)
159 const double u_value =
nodal_value(l,u_nodal_index);
161 disp[
i] += u_value*psi[l];
169 const unsigned &
i)
const 172 unsigned n_node =
nnode();
181 unsigned u_nodal_index =
185 double interpolated_u = 0.0;
188 for(
unsigned l=0;l<n_node;l++)
190 const double u_value =
nodal_value(l,u_nodal_index);
192 interpolated_u += u_value*psi[l];
195 return(interpolated_u);
205 unsigned n_node =
nnode();
214 for (
unsigned i=0;
i<3;
i++)
220 for(
unsigned l=0;l<n_node;l++)
232 unsigned n_node =
nnode();
241 for (
unsigned i=0;
i<3;
i++)
247 for(
unsigned l=0;l<n_node;l++)
284 std::ostringstream error_message;
285 error_message <<
"No pointer to Poisson's ratio set. Please set one!\n";
288 OOMPH_CURRENT_FUNCTION,
289 OOMPH_EXCEPTION_LOCATION);
321 for (
unsigned i=0;
i<n;
i++)
328 (*Body_force_fct_pt)(time,x,b);
347 std::list<std::pair<unsigned long,unsigned> >& dof_lookup_list)
const 352 std::pair<unsigned long,unsigned> dof_lookup;
355 const unsigned n_node = this->
nnode();
361 for(
unsigned n=0;n<n_node;n++)
364 for(
unsigned i=0;
i<3;
i++)
370 if (local_unknown >= 0)
374 dof_lookup.first = this->
eqn_number(local_unknown);
375 dof_lookup.second = 0;
378 dof_lookup_list.push_front(dof_lookup);
436 fill_in_generic_contribution_to_residuals_axisymmetric_linear_elasticity(
449 fill_in_generic_contribution_to_residuals_axisymmetric_linear_elasticity(
450 residuals,jacobian,1);
460 const unsigned &nplot,
466 const unsigned &nplot,
478 void output(std::ostream &outfile,
const unsigned &n_plot);
488 void output(FILE* file_pt,
const unsigned &n_plot);
496 double& error,
double& norm);
502 const double& time,
double& error,
double& norm);
509 virtual void fill_in_generic_contribution_to_residuals_axisymmetric_linear_elasticity(
524 template<
unsigned NNODE_1D>
526 public virtual QElement<2,NNODE_1D>,
541 void output(std::ostream &outfile,
const unsigned &n_plot)
551 void output(FILE* file_pt,
const unsigned &n_plot)
562 template<
unsigned NNODE_1D>
638 template<
class AXISYM_LINEAR_ELAST_ELEMENT>
661 unsigned nnod=this->
nnode();
662 for (
unsigned j=0;j<nnod;j++)
665 data_values.push_back(std::make_pair(this->
node_pt(j),fld));
687 std::stringstream error_stream;
689 <<
"Elements only store two fields so fld can't be" 690 <<
" " << fld << std::endl;
693 OOMPH_CURRENT_FUNCTION,
694 OOMPH_EXCEPTION_LOCATION);
713 unsigned n_dim=this->
dim();
714 unsigned n_node=this->
nnode();
715 DShape dpsidx(n_node,n_dim);
730 unsigned n_node=this->
nnode();
739 double interpolated_u = 0.0;
742 for(
unsigned l=0;l<n_node;l++)
744 interpolated_u += this->
nodal_value(t,l,fld)*psi[l];
746 return interpolated_u;
753 return this->
nnode();
772 template<
class ELEMENT>
785 template<
class ELEMENT>
Vector< std::pair< Data *, unsigned > > data_values_of_field(const unsigned &fld)
Specify the values associated with field fld. The information is returned in a vector of pairs which ...
BodyForceFctPt body_force_fct_pt() const
Access function: Pointer to body force function (const version)
static double Default_lambda_sq_value
Static default value for timescale ratio (1.0 for natural scaling)
static double Default_youngs_modulus_value
Static default value for Young's modulus (1.0 – for natural scaling, i.e. all stresses have been non...
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing...
const double & lambda_sq() const
Access function for timescale ratio (nondim density)
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function.
unsigned ndof_types() const
The number of "DOF types" that degrees of freedom in this element are sub-divided into: for now lump ...
A general Finite Element class.
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Function pointer for function that computes Vector-valued time-dependent function as ...
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
void output(std::ostream &outfile)
Output: r,z, u_r, u_z, u_theta.
AxisymmetricLinearElasticityEquations()
Constructor.
void body_force(const double &time, const Vector< double > &x, Vector< double > &b) const
Evaluate body force at Eulerian coordinate x at present time (returns zero vector if no body force fu...
double & nu() const
Access function for Poisson's ratio.
double d2u_dt2_axisymmetric_linear_elasticity(const unsigned &n, const unsigned &i) const
d^2u/dt^2 at local node n
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.
double *& nu_pt()
Access function for pointer to Poisson's ratio.
unsigned nhistory_values_for_projection(const unsigned &fld)
Number of history values to be stored for fld-th field. (includes present value!) ...
double du_dt_axisymmetric_linear_elasticity(const unsigned &n, const unsigned &i) const
du/dt at local node n
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.
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.
virtual unsigned u_index_axisymmetric_linear_elasticity(const unsigned &i) const
Return the index at which the i-th (i=0: r, i=1: z; i=2: theta) unknown displacement component is sto...
double youngs_modulus() const
Access function to Young's modulus.
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
double *& youngs_modulus_pt()
Return the pointer to Young's modulus.
Axisym linear elasticity upgraded to become projectable.
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Function pointer for function that computes vector-valued steady "exact solution" as ...
void output(FILE *file_pt)
C-style output: r,z, u_r, u_z, u_theta.
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Compute the geometric shape functions and also first derivatives w.r.t. global coordinates at local c...
double get_field(const unsigned &t, const unsigned &fld, const Vector< double > &s)
Return interpolated field fld at local coordinate s, at time level t (t=0: present; t>0: history valu...
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
AxisymmetricLinearElasticityEquationsBase()
Constructor: Set null pointers for constitutive law. Set physical parameter values to default values...
unsigned long eqn_number(const unsigned &ieqn_local) const
Return the global equation number corresponding to the ieqn_local-th local equation number...
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Return the residuals for the equations (the discretised principle of virtual displacements) ...
BodyForceFctPt Body_force_fct_pt
Pointer to body force function.
virtual void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output an exact solution over the element.
double * Youngs_modulus_pt
Pointer to the Young's modulus.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned > > &dof_lookup_list) const
Create a list of pairs for all unknowns in this element, so that the first entry in each pair contain...
ProjectableAxisymLinearElasticityElement()
Constructor [this was only required explicitly from gcc 4.5.2 onwards...].
double nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n. Produces suitably interpolated values for hanging nodes...
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
unsigned ntstorage() const
Return total number of doubles stored per value to record time history of each value (one for steady ...
FaceGeometry()
Constructor must call the constructor of the underlying element.
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
void(* BodyForceFctPt)(const double &time, const Vector< double > &x, Vector< double > &b)
Function pointer to function that specifies the body force as a function of the Cartesian coordinates...
double interpolated_u_axisymmetric_linear_elasticity(const Vector< double > &s, const unsigned &i) const
Return FE interpolated displacement u[i] (i=0: r, i=1: z; i=2: theta) at local coordinate s...
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
double jacobian_and_shape_of_field(const unsigned &fld, const Vector< double > &s, Shape &psi)
Return Jacobian of mapping and shape functions of field fld at local coordinate s.
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
double *& lambda_sq_pt()
Access function for pointer to timescale ratio (nondim density)
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
bool is_steady() const
Flag to indicate if a timestepper has been made steady (possibly temporarily to switch off time-depen...
unsigned nfields_for_projection()
Number of fields to be projected: 3, corresponding to the displacement components.
void output(FILE *file_pt)
C-style output function.
unsigned nnode() const
Return the number of nodes.
double * Lambda_sq_pt
Timescale ratio (non-dim. density)
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
virtual void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Plot the error when compared against a given exact solution . Also calculates the norm of the error a...
virtual double weight(const unsigned &i, const unsigned &j) const
Access function for j-th weight for the i-th derivative.
QAxisymmetricLinearElasticityElement()
Constructor.
double * Nu_pt
Pointer to Poisson's ratio.
virtual void shape(const Vector< double > &s, Shape &psi) const =0
Calculate the geometric shape functions at local coordinate s. This function must be overloaded for e...
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
BodyForceFctPt & body_force_fct_pt()
Access function: Pointer to body force function.
void output(std::ostream &outfile)
Output function.
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Return the local equation number corresponding to the i-th value at the n-th local node...
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values: Read out from positional timestepper (Note: count includes curre...
unsigned required_nvalue(const unsigned &n) const
Number of values required at node n.