27#ifndef OOMPH_AXISYMM_ELASTICITY_ELEMENTS_HEADER
28#define OOMPH_AXISYMM_ELASTICITY_ELEMENTS_HEADER
32#include <oomph-lib-config.h>
38#include "../constitutive/constitutive_laws.h"
74 std::string error_message =
75 "Elements derived from AxisymmetricPVDEquations";
76 error_message +=
" must have a constitutive law :\n ";
78 "set one using the constitutive_law_pt() member function\n";
132 for (
unsigned i = 0;
i < 2;
i++)
134 for (
unsigned j = 0;
j < 2;
j++)
147 for (
unsigned i = 0;
i < 2;
i++)
155 for (
unsigned j = 0;
j < 2;
j++)
183 W *=
sqrt(g(0, 0) * g(1, 1) * g(2, 2));
240 for (
unsigned j = 0;
j < 2;
j++)
266 for (
unsigned j = 0;
j < 2;
j++)
317 for (
unsigned i = 0;
i < 2;
i++)
319 for (
unsigned j = 0;
j < 2;
j++)
332 for (
unsigned i = 0;
i < 2;
i++)
340 for (
unsigned j = 0;
j < 2;
j++)
376 double detG =
G(0, 0) *
G(1, 1) *
G(2, 2) -
G(0, 1) *
G(1, 0) *
G(2, 2);
436 for (
unsigned i = 0;
i < 2;
i++)
438 for (
unsigned i = 0;
i < 2;
i++)
483 for (
unsigned i = 0;
i < 2;
i++)
485 for (
unsigned i = 0;
i < 2;
i++)
584 for (
unsigned i = 0;
i < 2;
i++)
586 for (
unsigned i = 0;
i < 2;
i++)
631 for (
unsigned i = 0;
i < 2;
i++)
633 for (
unsigned i = 0;
i < 2;
i++)
706 std::string error_message =
707 "Elements derived from AxisymmetricPVDEquationsWithPressure";
708 error_message +=
" must have a constitutive law :\n ";
710 "set one using the constitutive_law_pt() member function\n";
732 std::string error_message =
733 "Elements derived from AxisymmetricPVDEquationsWithPressure";
734 error_message +=
" must have a constitutive law :\n ";
736 "set one using the constitutive_law_pt() member function\n";
839 for (
unsigned i = 0;
i < 2;
i++)
841 for (
unsigned j = 0;
j < 2;
j++)
854 for (
unsigned i = 0;
i < 2;
i++)
862 for (
unsigned j = 0;
j < 2;
j++)
895 double detg = g(0, 0) * g(1, 1) * g(2, 2);
970 for (
unsigned j = 0;
j < 2;
j++)
1000 for (
unsigned j = 0;
j < 2;
j++)
1032 for (
unsigned j = 0;
j < 2;
j++)
1063 for (
unsigned j = 0;
j < 2;
j++)
1165 for (
unsigned i = 0;
i < 2;
i++)
1167 for (
unsigned j = 0;
j < 2;
j++)
1180 for (
unsigned i = 0;
i < 2;
i++)
1188 for (
unsigned j = 0;
j < 2;
j++)
1224 double detG =
G(0, 0) *
G(1, 1) *
G(2, 2) -
G(0, 1) *
G(1, 0) *
G(2, 2);
1287 for (
unsigned i = 0;
i < 2;
i++)
1289 for (
unsigned i = 0;
i < 2;
i++)
1333 for (
unsigned i = 0;
i < 2;
i++)
1335 for (
unsigned i = 0;
i < 2;
i++)
An element that solved the AxisymmetricPVDEquations with (diagonal) Hermite interpolation for the pos...
void output(std::ostream &outfile)
Overload the output function.
void output(FILE *file_pt)
Overload the output function.
void output(FILE *file_pt, const unsigned &n_plot)
Output function.
AxisymDiagHermitePVDElement()
Constructor, there are no internal data points.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
An Element that solves the Axisymmetric principle of virtual displacements with separately interpolat...
unsigned P_solid_internal_index
Internal index that indicates at which internal data value the solid pressure is stored.
void output(std::ostream &outfile)
Overload the output function.
void output(FILE *file_pt, const unsigned &n_plot)
Output function.
double solid_p(const unsigned &l)
Return the l-th pressure value.
AxisymQPVDElementWithPressure()
Constructor, there are 3 internal data items.
int solid_p_local_eqn(const unsigned &i)
Overload the access function for the solid pressure equation numbers.
void output(FILE *file_pt)
Overload the output function.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
unsigned nsolid_pres() const
Return number of pressure values.
void solid_pshape(const Vector< double > &s, Shape &psi) const
Return the pressure shape functions.
void fix_solid_pressure(const unsigned &l, const double &pvalue)
Fix the pressure dof l to the value pvalue.
bool has_internal_solid_data()
There is internal solid data so we can't use the automatic assignment of consistent initial condition...
An element that solved the AxisymmetricPVDEquations with quadratic interpolation for the positions.
AxisymQPVDElement()
Constructor, there are no internal data points.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
void output(FILE *file_pt)
Overload the output function.
void output(std::ostream &outfile)
Overload the output function.
void output(FILE *file_pt, const unsigned &n_plot)
Output function.
A class for elements that solve the equations of solid mechanics, based on the principle of virtual d...
ConstitutiveLaw *& constitutive_law_pt()
Return the constitutive law pointer.
void solid_pshape_at_knot(const unsigned &ipt, Shape &psi) const
Return the stored solid shape functions at the knots.
bool Incompressible
Boolean to determine whether the solid is incompressible or not.
void fill_in_generic_residual_contribution_axisym_pvd_with_pressure(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Return the residuals for the equations of solid mechanics formulated in the incompressible case!
void output(FILE *file_pt, const unsigned &n_plot)
Output function.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Return the residuals and the jacobian.
virtual unsigned nsolid_pres() const =0
Return the number of solid pressure degrees of freedom.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
AxisymmetricPVDEquationsWithPressure()
Constructor, by default the element is not incompressible.
void set_incompressible()
Set the material to be incompressible.
ConstitutiveLaw * Constitutive_law_pt
Pointer to constitutive law.
virtual int solid_p_local_eqn(const unsigned &i)=0
Access function that returns the local equation number for the n-th solid pressure value.
bool is_incompressible() const
Return whether the material is incompressible.
double compute_physical_size() const
Overload/implement the size function.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Return the residuals.
virtual void solid_pshape(const Vector< double > &s, Shape &psi) const =0
Return the solid pressure shape functions.
void output(std::ostream &outfile)
Overload the output function.
void output(FILE *file_pt)
Overload the output function.
double interpolated_solid_p(const Vector< double > &s)
Return the interpolated_solid_pressure.
virtual double solid_p(const unsigned &l)=0
Return the lth solid pressures.
void get_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma, DenseMatrix< double > &Gup, double &pressure_stress, double &kappa)
Return the stress tensor, as calculated from the constitutive law in the Near-incompresible formulati...
void get_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma, DenseMatrix< double > &Gup, double &detG)
Return the stress tensor, as calculated from the constitutive law in the "true" incompresible formula...
void set_compressible()
Set the material to be compressible.
A class for elements that solve the equations of solid mechanics, based on the principle of virtual d...
void fill_in_contribution_to_residuals_axisym_pvd(Vector< double > &residuals)
Return the residuals for the equations of solid mechanics.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
void output(FILE *file_pt)
Overload the output function.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the residuals by calling the generic function.
ConstitutiveLaw * Constitutive_law_pt
Pointer to constitutive law.
void output(std::ostream &outfile)
Overload the output function.
void output(FILE *file_pt, const unsigned &n_plot)
Output function.
ConstitutiveLaw *& constitutive_law_pt()
Return the constitutive law pointer.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Assign the contribution to the residual using only finite differences.
double compute_physical_size() const
Overload/implement the function to calculate the volume of the element.
AxisymmetricPVDEquations()
Constructor.
void get_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma)
Return the stress tensor, as calculated from the constitutive law.
A class for constitutive laws for elements that solve the equations of solid mechanics based upon 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,...
A class that represents a collection of data; each Data object may contain many different individual ...
void pin(const unsigned &i)
Pin the i-th stored variable.
void set_value(const unsigned &i, const double &value_)
Set the i-th stored data value to specified value. The only reason that we require an explicit set fu...
double value(const unsigned &i) const
Return i-th stored value. This function is not virtual so that it can be inlined. This means that if ...
FaceGeometry class definition: This policy class is used to allow construction of face elements that ...
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing.
unsigned nnodal_position_type() const
Return the number of coordinate types that the element requires to interpolate the geometry between t...
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
double nodal_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Return the value of the k-th type of the i-th positional variable at the local node n.
unsigned nnode() const
Return the number of nodes.
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Add a (pointer to an) internal data object to the element and return the index required to obtain it ...
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Return the local equation number corresponding to the j-th value stored at the i-th internal data.
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.
An OomphLibError object which should be thrown when an run-time error is encountered....
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
SolidQHermiteElements in which we assume the local and global coordinates to be aligned so that the J...
SolidFiniteElement class.
double lagrangian_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Return Generalised Lagrangian coordinate at local node n. ‘Direction’ i, ‘Type’ k.
bool Solve_for_consistent_newmark_accel_flag
Flag to indicate which system of equations to solve when assigning initial conditions for time-depend...
int position_local_eqn(const unsigned &n, const unsigned &k, const unsigned &j) const
Access function that returns the local equation number that corresponds to the j-th coordinate of the...
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-...
virtual void fill_in_jacobian_from_solid_position_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Use finite differences to calculate the Jacobian entries corresponding to the solid positions....
void fill_in_jacobian_for_newmark_accel(DenseMatrix< double > &jacobian)
Fill in the contributions of the Jacobian matrix for the consistent assignment of the initial "accele...
SolidQElement elements are quadrilateral elements whose derivatives also include those based upon the...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
const double Pi
50 digits from maple
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).