28#ifndef OOMPH_AXISYM_CYLINDRICAL_ELASTICITY_ELEMENTS_HEADER
29#define OOMPH_AXISYM_CYLINDRICAL_ELASTICITY_ELEMENTS_HEADER
33#include <oomph-lib-config.h>
37#include "../generic/Telements.h"
38#include "../constitutive/constitutive_laws.h"
39#include "../generic/error_estimator.h"
40#include "../generic/projection.h"
126 for (
unsigned i = 0;
i < 2;
i++)
140 (*Body_force_fct_pt)(time, xi, b);
153 std::string error_message =
154 "Elements derived from AxisymmetricCylindricalPVDEquations";
155 error_message +=
" must have a constitutive law :\n ";
157 "set one using the constitutive_law_pt() member function\n";
180 std::string error_message =
181 "Elements derived from PVDEquations must have a constitutive law:\n";
183 "set one using the constitutive_law_pt() member function";
232 for (
unsigned i = 0;
i < 2;
i++)
239 for (
unsigned j = 0;
j < 2;
j++)
281 for (
unsigned i = 0;
i < 3;
i++)
283 for (
unsigned j = 0;
j < 3;
j++)
317 for (
unsigned i = 0;
i < 2;
i++)
338 for (
unsigned i = 0;
i < 2;
i++)
346 for (
unsigned j = 0;
j < 2;
j++)
374 double W = w *
J *
sqrt(g(0, 0) * g(1, 1) * g(2, 2));
407 for (
unsigned i = 0;
i < 3;
i++)
409 for (
unsigned j = 0;
j < 3;
j++)
414 veloc_sq = veloc[0] * veloc[0] + veloc[1] * veloc[1];
425 const unsigned&
flag);
431 const unsigned n_plot = 5;
461 for (
unsigned i = 0;
i < 2;
i++)
467 for (
unsigned i = 0;
i < 2;
i++)
487 const unsigned n_plot = 5;
512 const unsigned&
nplot)
const
564 error_stream <<
"These elements only output " << 6 <<
" fields, "
565 <<
"but i is currently " <<
i << std::endl;
582 return "Lagrangian coord. r";
586 return "Lagrangian coord. z";
603 return "Strain phi-phi";
609 error_stream <<
"These elements only output " << 6 <<
" fields,\n"
610 <<
"but i is currently " <<
i << std::endl;
636 template<
class PVD_ELEMENT>
717 template<
class ELEMENT>
730 template<
class ELEMENT>
743 template<
unsigned NNODE_1D>
783 template<
unsigned NNODE_1D>
796 template<
unsigned NNODE_1D>
812 template<
unsigned NNODE_1D>
894 std::ostringstream error_message;
895 error_message <<
"The flux vector has the wrong number of entries, "
912 for (
unsigned i = 0;
i < 3;
i++)
918 for (
unsigned i = 0;
i < 3;
i++)
920 for (
unsigned j =
i + 1;
j < 3;
j++)
933 template<
unsigned NNODE_1D>
947 template<
unsigned NNODE_1D>
A class for elements that solve the equations of solid mechanics, based on the principle of virtual d...
void scalar_value_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specif...
ConstitutiveLaw * Constitutive_law_pt
Pointer to constitutive law.
void get_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma)
Return the stress tensor, as calculated from the constitutive law.
static double Default_lambda_sq_value
Static default value for timescale ratio (1.0 – for natural scaling)
unsigned nscalar_paraview() const
-----—Paraview stuff---------------------------------------—/// Number of scalars/fields output by th...
void output(FILE *file_pt, const unsigned &n_plot)
Output function.
void output(std::ostream &outfile)
Overload the output function.
double eta_mass()
Return the mass damping parameter.
void body_force(const Vector< double > &xi, Vector< double > &b) const
Evaluate body force at Lagrangian coordinate xi at present time (returns zero vector if no body force...
BodyForceFctPt body_force_fct_pt() const
Access function: Pointer to body force function (const version)
std::string scalar_name_paraview(const unsigned &i) const
Name of the i-th scalar field. Default implementation returns V1 for the first one,...
virtual void fill_in_contribution_to_residuals_axisym_pvd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Return the residuals for the equations of solid mechanics.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the residuals by calling the generic function.
BodyForceFctPt & body_force_fct_pt()
Access function: Pointer to body force function.
unsigned ndof_types() const
returns the number of DOF types associated with this element.
void output(FILE *file_pt)
Overload the output function.
void get_strain(const Vector< double > &s, DenseMatrix< double > &strain) const
Get the strain.
BodyForceFctPt Body_force_fct_pt
Pointer to body force function.
double * Eta_mass_pt
Pointer to the mass damping parameter.
ConstitutiveLaw *& constitutive_law_pt()
Return the constitutive law pointer.
const double & lambda_sq() const
Access function for timescale ratio (nondim density)
void get_d_stress_dG_upper(const DenseMatrix< double > &g, const DenseMatrix< double > &G, const DenseMatrix< double > &sigma, RankFourTensor< double > &d_sigma_dG)
Return the derivatives of the 2nd Piola Kirchhoff stress tensor, as calculated from the constitutive ...
AxisymmetricCylindricalPVDEquations()
Constructor.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
double *& lambda_sq_pt()
Access function for pointer to timescale ratio (nondim density)
void get_energy(double &pot_en, double &kin_en)
Get potential (strain) and kinetic energy.
static double Default_eta_value
Static default value for damping parameters.
double * Lambda_sq_pt
Timescale ratio (non-dim. density)
void(* BodyForceFctPt)(const double &t, const Vector< double > &xi, Vector< double > &b)
Function pointer to function that specifies the body force as a function of the Lagrangian coordinate...
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in the jacobian.
double *& eta_mass_pt()
Access function for mass damping parameter.
A class for constitutive laws for elements that solve the equations of solid mechanics based upon the...
virtual void calculate_d_second_piola_kirchhoff_stress_dG(const DenseMatrix< double > &g, const DenseMatrix< double > &G, const DenseMatrix< double > &sigma, RankFourTensor< double > &d_sigma_dG, const bool &symmetrize_tensor=true)
Calculate the derivatives of the contravariant 2nd Piola Kirchhoff stress tensor with respect to the ...
virtual void calculate_second_piola_kirchhoff_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma)=0
Calculate the contravariant 2nd Piola Kirchhoff stress tensor. Arguments are the covariant undeformed...
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
Base class for finite elements that can compute the quantities that are required for the Z2 error est...
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
FaceGeometry class definition: This policy class is used to allow construction of face elements that ...
virtual unsigned nplot_points_paraview(const unsigned &nplot) const
Return the number of actual plot points for paraview plot with parameter nplot. Broken virtual; can b...
virtual double J_eulerian(const Vector< double > &s) const
Return the Jacobian of mapping from local to global coordinates at local position s.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction")
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
unsigned nnode() const
Return the number of nodes.
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
virtual unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction")
double nodal_position(const unsigned &n, const unsigned &i) const
Return the i-th coordinate at local node n. If the node is hanging, the appropriate interpolation is ...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Add tecplot zone "footer" to output stream (when plotting nplot points in each "coordinate direction"...
double dnodal_position_dt(const unsigned &n, const unsigned &i) const
Return the i-th component of nodal velocity: dx/dt at local node n.
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
An OomphLibError object which should be thrown when an run-time error is encountered....
Point element has just a single node and a single shape function which is identically equal to one.
AxisymCylindricalPVDElement upgraded to become projectable.
unsigned nfields_for_projection()
Number of fields to be projected: 0.
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values (Includes the current value!)
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.
ProjectableAxisymCylindricalPVDElement()
Constructor [this was only required explicitly from gcc 4.5.2 onwards...].
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
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 ...
unsigned nhistory_values_for_projection(const unsigned &fld)
Number of history values to be stored for fld-th field (Includes the current value!...
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...
Wrapper class for projectable elements. Adds "projectability" to the underlying ELEMENT.
void output(FILE *file_pt)
C-style output function.
QAxisymmetricCylindricalPVDElement()
Constructor, there are no internal data points.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function.
void output(std::ostream &outfile)
Output function.
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
SolidFiniteElement class.
double lagrangian_position(const unsigned &n, const unsigned &i) const
Return i-th Lagrangian coordinate at local node n.
double dshape_lagrangian(const Vector< double > &s, Shape &psi, DShape &dpsidxi) const
Calculate shape functions and derivatives w.r.t. Lagrangian coordinates at local coordinate s....
virtual double interpolated_xi(const Vector< double > &s, const unsigned &i) const
Return i-th FE-interpolated Lagrangian coordinate xi[i] at local coordinate s.
virtual double dshape_lagrangian_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsidxi) const
Return the geometric shape functions and also first derivatives w.r.t. Lagrangian coordinates at ipt-...
void describe_local_dofs(std::ostream &out, const std::string ¤t_string) const
Function to describe the local dofs of the element. The ostream specifies the output stream to which ...
SolidQElement elements are quadrilateral elements whose derivatives also include those based upon the...
SolidTElement elements are triangular/tet elements whose derivatives also include those based upon th...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
An Element that solves the axisymmetric solid mechanics equations, based on the principle of virtual ...
TAxisymCylindricalPVDElement()
Constructor, there are no internal data points.
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Get 'flux' for Z2 error recovery: Upper triangular entries in strain tensor.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
void output(std::ostream &outfile)
Output function.
void output(FILE *file_pt)
C-style output function.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
unsigned nvertex_node() const
Number of vertex nodes in the element.
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function.
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
Time *const & time_pt() const
Access function for the pointer to time (const version)
double & time()
Return the current value of the continuous time.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).