29#ifndef OOMPH_ELASTICITY_ELEMENTS_HEADER
30#define OOMPH_ELASTICITY_ELEMENTS_HEADER
34#include <oomph-lib-config.h>
43#include "../constitutive/constitutive_laws.h"
56 template<
unsigned DIM>
280 (*Isotropic_growth_fct_pt)(xi, gamma);
294 for (
unsigned i = 0;
i <
n;
i++)
308 (*Body_force_fct_pt)(time, xi, b);
438 template<
unsigned DIM>
538 const unsigned&
flag);
552 std::string error_message =
553 "Elements derived from PVDEquations must have a constitutive law:\n";
555 "set one using the constitutive_law_pt() member function";
579 std::string error_message =
580 "Elements derived from PVDEquations must have a constitutive law:\n";
582 "set one using the constitutive_law_pt() member function";
605 template<
unsigned DIM,
unsigned NNODE_1D>
643 template<
unsigned NNODE_1D>
656 template<
unsigned NNODE_1D>
670 template<
unsigned NNODE_1D>
682 template<
unsigned NNODE_1D>
695 template<
unsigned DIM>
732 template<
class PVD_ELEMENT>
822 template<
class ELEMENT>
835 template<
class ELEMENT>
859 template<
unsigned DIM>
896 virtual void set_solid_p(
const unsigned&
l,
const double& p_value) = 0;
922 std::string error_message =
"Can't assign consistent Newmark history\n";
923 error_message +=
" values for solid element with pressure dofs\n";
968 std::string error_message =
"Can't assign consistent Newmark history\n";
969 error_message +=
" values for solid element with pressure dofs\n";
999 for (
unsigned i = 0;
i < n_dof;
i++)
1002 for (
unsigned j = 0;
j <
n_dof;
j++)
1004 jacobian(
i,
j) *= -1.0;
1122 for (
unsigned j = 0;
j <
np;
j++)
1157 std::string error_message =
1158 "Elements derived from PVDEquationsWithPressure \n";
1159 error_message +=
"must have a constitutive law:\n";
1161 "set one using the constitutive_law_pt() member function";
1192 std::string error_message =
1193 "Elements derived from PVDEquationsWithPressure \n";
1194 error_message +=
"must have a constitutive law:\n";
1196 "set one using the constitutive_law_pt() member function";
1223 unsigned Dim = this->
dim();
1227 for (
unsigned i = 0;
i < Dim;
i++)
1250 const unsigned&
flag);
1269 std::string error_message =
1270 "Elements derived from PVDEquationsWithPressure \n";
1271 error_message +=
"must have a constitutive law:\n";
1273 "set one using the constitutive_law_pt() member function";
1301 std::string error_message =
1302 "Elements derived from PVDEquationsWithPressure \n";
1303 error_message +=
"must have a constitutive law:\n";
1305 "set one using the constitutive_law_pt() member function";
1329 template<
unsigned DIM>
1519 template<
unsigned DIM>
1594 return static_cast<unsigned>(
pow(2.0,
static_cast<int>(
DIM)));
1647 for (
unsigned i = 0;
i < 2;
i++)
1649 for (
unsigned j = 0;
j < 2;
j++)
1674 for (
unsigned i = 0;
i < 2;
i++)
1676 for (
unsigned j = 0;
j < 2;
j++)
1678 for (
unsigned k = 0;
k < 2;
k++)
1752 template<
unsigned DIM,
unsigned NNODE_1D>
1830 std::ostringstream error_message;
1831 error_message <<
"The flux vector has the wrong number of entries, "
1848 for (
unsigned i = 0;
i <
DIM;
i++)
1854 for (
unsigned i = 0;
i <
DIM;
i++)
1856 for (
unsigned j =
i + 1;
j <
DIM;
j++)
1869 template<
unsigned NNODE_1D>
1882 template<
unsigned NNODE_1D>
1896 template<
unsigned NNODE_1D>
1908 template<
unsigned NNODE_1D>
1930 template<
unsigned DIM,
unsigned NNODE_1D>
2003 std::ostringstream error_message;
2004 error_message <<
"The flux vector has the wrong number of entries, "
2021 for (
unsigned i = 0;
i <
DIM;
i++)
2027 for (
unsigned i = 0;
i <
DIM;
i++)
2029 for (
unsigned j =
i + 1;
j <
DIM;
j++)
2042 template<
unsigned NNODE_1D>
2055 template<
unsigned NNODE_1D>
2069 template<
unsigned NNODE_1D>
2081 template<
unsigned NNODE_1D>
2098 template<
unsigned DIM>
2252 std::ostringstream error_message;
2253 error_message <<
"The flux vector has the wrong number of entries, "
2270 for (
unsigned i = 0;
i <
DIM;
i++)
2276 for (
unsigned i = 0;
i <
DIM;
i++)
2278 for (
unsigned j =
i + 1;
j <
DIM;
j++)
2321 psi[2] = 1.0 -
s[0] -
s[1];
2335 psi[3] = 1.0 -
s[0] -
s[1] -
s[2];
2372 namespace SolidHelpers
2378 template<
class ELEMENT>
2386 << doc_info.
number() <<
".dat";
2390 << doc_info.
number() <<
".dat";
2394 pos_file << 0.0 <<
" " << 0.0 <<
" " << 0.0 <<
" " << 0.0 <<
" "
2396 neg_file << 0.0 <<
" " << 0.0 <<
" " << 0.0 <<
" " << 0.0 <<
" "
2412 el_pt->get_principal_stress(
2432 double Cos =
cos(0.25 * 3.14159);
2433 double Sin =
sin(0.25 * 3.14159);
2446 for (
unsigned i = 0;
i < 2;
i++)
2450 pos_file << x[0] <<
" " << x[1] <<
" "
2453 pos_file << x[0] <<
" " << x[1] <<
" "
2458 pos_file << x[0] <<
" " << x[1] <<
" " <<
rot(
i, 0) <<
" "
2459 <<
rot(
i, 1) << std::endl;
2460 pos_file << x[0] <<
" " << x[1] <<
" " << -
rot(
i, 0) <<
" "
2461 << -
rot(
i, 1) << std::endl;
2466 neg_file << x[0] <<
" " << x[1] <<
" "
2469 neg_file << x[0] <<
" " << x[1] <<
" "
2474 neg_file << x[0] <<
" " << x[1] <<
" " <<
rot(
i, 0) <<
" "
2475 <<
rot(
i, 1) << std::endl;
2476 neg_file << x[0] <<
" " << x[1] <<
" " << -
rot(
i, 0) <<
" "
2477 << -
rot(
i, 1) << std::endl;
2493 template<
class PVD_ELEMENT>
2555 this->solid_pshape(
s,
psi);
2563 const unsigned&
fld,
2566 return this->interpolated_solid_p(
s);
2573 return this->npres_solid();
2580 return this->solid_p_local_eqn(
j);
2589 template<
class ELEMENT>
2602 template<
class ELEMENT>
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 that represents a collection of data; each Data object may contain many different individual ...
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
void pin(const unsigned &i)
Pin the i-th stored variable.
void unpin(const unsigned &i)
Unpin 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 ...
Information for documentation of results: Directory and file number to enable output in the form RESL...
std::string directory() const
Output directory.
unsigned & number()
Number used (e.g.) for labeling output files.
Base class for finite elements that can compute the quantities that are required for the Z2 error est...
FaceGeometry()
Constructor must call constructor of the underlying Point element.
FaceGeometry()
Constructor must call constructor of the underlying element.
FaceGeometry()
Constructor must call constructor of underlying solid element.
FaceGeometry()
Constructor must call constructor of underlying solid element.
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
FaceGeometry()
Constructor must call constructor of the underlying Solid element.
FaceGeometry()
Constructor must call constructor of the underlying Solid element.
FaceGeometry()
Constructor must call constructor of underlying solid element.
FaceGeometry()
Constructor must call constructor of underlying solid element.
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
FaceGeometry()
Constructor: Call constructor of base.
FaceGeometry()
Constructor: Call constructor of base.
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 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)
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...
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...
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.
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 dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
unsigned nnode() const
Return the number of nodes.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
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 ...
unsigned ndof() const
Return the number of equations/dofs in the element.
unsigned long eqn_number(const unsigned &ieqn_local) const
Return the global equation number corresponding to the ieqn_local-th local equation number.
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.
An Element that solves the principle of virtual diplacements using Hermite interpolation for the vari...
void output(FILE *file_pt, const unsigned &n_plot)
C-style SolidQHermiteElement output function.
void output(FILE *file_pt)
C-style SolidQHermiteElement output function.
void output(std::ostream &outfile, const unsigned &n_plot)
SolidQHermiteElement output function.
void output(std::ostream &outfile)
SolidQHermiteElement output function.
HermitePVDElement()
Constructor, there are no internal data points.
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
unsigned long nelement() const
Return number of elements in the mesh.
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....
A base class for elements that solve the equations of solid mechanics, based on the principle of virt...
bool Unsteady
Flag that switches inertia on/off.
ConstitutiveLaw *& constitutive_law_pt()
Return the constitutive law pointer.
static void unpin_all_solid_pressure_dofs(const Vector< GeneralisedElement * > &element_pt)
Unpin all pressure dofs in elements listed in vector.
BodyForceFctPt & body_force_fct_pt()
Access function: Pointer to body force function.
void get_energy(double &pot_en, double &kin_en)
Get potential (strain) and kinetic energy.
virtual void pin_elemental_redundant_nodal_solid_pressures()
Pin the element's redundant solid pressures (needed for refinement)
void disable_evaluate_jacobian_by_fd()
Set Jacobian to be evaluated analytically Else: by FD.
static double Default_lambda_sq_value
Static default value for timescale ratio (1.0 – for natural scaling)
BodyForceFctPt Body_force_fct_pt
Pointer to body force function.
virtual int solid_p_nodal_index() const
Return the index at which the solid pressure is stored if it is stored at the nodes....
virtual int solid_p_local_eqn(const unsigned &i) const
Return the local degree of freedom associated with the i-th solid pressure. Default is that there are...
void get_principal_stress(const Vector< double > &s, DenseMatrix< double > &principal_stress_vector, Vector< double > &principal_stress)
Compute principal stress vectors and (scalar) principal stresses at specified local coordinate....
bool is_jacobian_evaluated_by_fd() const
Return the flag indicating whether the jacobian is evaluated by fd.
const double & lambda_sq() const
Access function for timescale ratio (nondim density)
double(* PrestressFctPt)(const unsigned &i, const unsigned &j, const Vector< double > &xi)
Function pointer to function that specifies the pre-stress sigma_0(i,j) as a function of the Lagrangi...
ConstitutiveLaw * Constitutive_law_pt
Pointer to the constitutive law.
double prestress(const unsigned &i, const unsigned &j, const Vector< double > xi)
Return (i,j)-th component of second Piola Kirchhoff membrane prestress at Lagrangian coordinate xi.
void(* IsotropicGrowthFctPt)(const Vector< double > &xi, double &gamma)
Function pointer to function that specifies the isotropic growth as a function of the Lagrangian coor...
PrestressFctPt & prestress_fct_pt()
Access function: Pointer to pre-stress function.
virtual void get_isotropic_growth(const unsigned &ipt, const Vector< double > &s, const Vector< double > &xi, double &gamma) const
Evaluate isotropic growth function at Lagrangian coordinate xi and/or local coordinate s....
IsotropicGrowthFctPt & isotropic_growth_fct_pt()
Access function: Pointer to isotropic growth function.
void disable_inertia()
Switch off solid inertia.
virtual unsigned npres_solid() const
Return the number of solid pressure degrees of freedom Default is that there are no solid pressures.
unsigned ndof_types() const
returns the number of DOF types associated with this element.
bool is_inertia_enabled() const
Access function to flag that switches inertia on/off (const version)
BodyForceFctPt body_force_fct_pt() const
Access function: Pointer to body force function (const version)
static int Solid_pressure_not_stored_at_node
Static "magic" number that indicates that the solid pressure is not stored at a node.
void get_deformed_covariant_basis_vectors(const Vector< double > &s, DenseMatrix< double > &def_covariant_basis)
Return the deformed covariant basis vectors at specified local coordinate: def_covariant_basis(i,...
IsotropicGrowthFctPt isotropic_growth_fct_pt() const
Access function: Pointer to isotropic growth function (const version)
void get_strain(const Vector< double > &s, DenseMatrix< double > &strain) const
Return the strain tensor.
IsotropicGrowthFctPt Isotropic_growth_fct_pt
Pointer to isotropic growth function.
double *& lambda_sq_pt()
Access function for pointer to timescale ratio (nondim 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...
PVDEquationsBase()
Constructor: Set null pointers for constitutive law and for isotropic growth function....
PrestressFctPt Prestress_fct_pt
Pointer to prestress function.
bool Evaluate_jacobian_by_fd
Use FD to evaluate Jacobian.
virtual void unpin_elemental_solid_pressure_dofs()=0
Unpin all solid pressure dofs in the element.
virtual void get_stress(const Vector< double > &s, DenseMatrix< double > &sigma)=0
Return the 2nd Piola Kirchoff stress tensor, as calculated from the constitutive law at specified loc...
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...
void enable_evaluate_jacobian_by_fd()
Set Jacobian to be evaluated by FD? Else: Analytically.
static void pin_redundant_nodal_solid_pressures(const Vector< GeneralisedElement * > &element_pt)
Loop over all elements in Vector (which typically contains all the elements in a refineable solid mes...
double * Lambda_sq_pt
Timescale ratio (non-dim. density)
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...
void enable_inertia()
Switch on solid inertia.
A class for elements that solve the equations of solid mechanics, based on the principle of virtual d...
void get_stress(const Vector< double > &s, DenseMatrix< double > &sigma)
Return the 2nd Piola Kirchoff stress tensor, as calculated from the constitutive law at specified loc...
void output(std::ostream &outfile)
Output: x,y,[z],xi0,xi1,[xi2],p,gamma.
void set_compressible()
Set the material to be compressible.
virtual double solid_p(const unsigned &l)=0
Return the lth solid pressure.
void get_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma_dev, DenseMatrix< double > &Gcontra, double &detG)
Return the deviatoric part of the 2nd Piola Kirchhoff stress tensor, as calculated from the constitut...
void get_d_stress_dG_upper(const DenseMatrix< double > &g, const DenseMatrix< double > &G, const DenseMatrix< double > &sigma, const double &gen_dil, const double &inv_kappa, const double &interpolated_solid_p, RankFourTensor< double > &d_sigma_dG, DenseMatrix< double > &d_gen_dil_dG)
Return the derivative of the deviatoric part of the 2nd Piola Kirchhoff stress tensor,...
virtual void set_solid_p(const unsigned &l, const double &p_value)=0
Set the lth solid pressure to p_value.
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...
void get_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma_dev, DenseMatrix< double > &Gcontra, double &gen_dil, double &inv_kappa)
Return the deviatoric part of the 2nd Piola Kirchhoff stress tensor, as calculated from the constitut...
virtual void fill_in_generic_residual_contribution_pvd_with_pressure(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, const unsigned &flag)
Returns the residuals for the discretised principle of virtual displacements, formulated in the incom...
void get_d_stress_dG_upper(const DenseMatrix< double > &g, const DenseMatrix< double > &G, const DenseMatrix< double > &sigma, const double &detG, const double &interpolated_solid_p, RankFourTensor< double > &d_sigma_dG, DenseMatrix< double > &d_detG_dG)
Return the derivative of the 2nd Piola Kirchhoff stress tensor, as calculated from the constitutive l...
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the residuals.
void solid_pshape_at_knot(const unsigned &ipt, Shape &psi) const
Return the stored solid shape functions at the knots.
void extended_output(std::ostream &outfile, const unsigned &n_plot)
Output: x,y,[z],xi0,xi1,[xi2],gamma and the strain and stress components.
double interpolated_solid_p(const Vector< double > &s)
Return the interpolated_solid_pressure.
bool Incompressible
Boolean to determine whether the solid is incompressible or not.
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Fill in contribution to Mass matrix and Jacobian (either by FD or analytically, for the positional va...
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in contribution to Jacobian (either by FD or analytically, for the positional variables; control...
unsigned ndof_types() const
returns the number of DOF types associated with this element: displacement components and pressure
bool is_incompressible() const
Return whether the material is incompressible.
void get_mass_matrix_diagonal(Vector< double > &mass_diag)
Compute the diagonal of the displacement mass matrix for LSC preconditioner.
virtual void solid_pshape(const Vector< double > &s, Shape &psi) const =0
Return the solid pressure shape functions.
void set_incompressible()
Set the material to be incompressible.
void output(FILE *file_pt)
C-style output: x,y,[z],xi0,xi1,[xi2],p,gamma.
PVDEquationsWithPressure()
Constructor, by default the element is NOT incompressible.
A class for elements that solve the equations of solid mechanics, based on the principle of virtual d...
virtual void fill_in_generic_contribution_to_residuals_pvd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Compute element residual Vector only (if flag=and/or element Jacobian matrix.
void unpin_elemental_solid_pressure_dofs()
Unpin all solid pressure dofs – empty as there are no pressures.
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 ...
void extended_output(std::ostream &outfile, const unsigned &n_plot)
Output: x,y,[z],xi0,xi1,[xi2],gamma and the strain and stress components.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in contribution to Jacobian (either by FD or analytically, control this via evaluate_jacobian_by...
PVDEquations()
Constructor.
void output(std::ostream &outfile)
Output: x,y,[z],xi0,xi1,[xi2],gamma.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the residuals for the solid equations (the discretised principle of virtual displacements)
void get_stress(const Vector< double > &s, DenseMatrix< double > &sigma)
Return the 2nd Piola Kirchoff stress tensor, as calculated from the constitutive law at specified loc...
void output(FILE *file_pt)
C-style output: x,y,[z],xi0,xi1,[xi2],gamma.
void get_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma)
Return the 2nd Piola Kirchhoff stress tensor, as calculated from the constitutive law: Pass metric te...
Point element has just a single node and a single shape function which is identically equal to one.
Wrapper class for projectable elements. Adds "projectability" to the underlying ELEMENT.
PVDElementWithContinuousPressure upgraded to become projectable.
unsigned nfields_for_projection()
Number of fields to be projected: 1, corresponding to the pressure only.
unsigned nvalue_of_field(const unsigned &fld)
Return number of values 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 ...
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...
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values (Includes the current value!)
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
ProjectablePVDElementWithContinuousPressure()
Constructor [this was only required explicitly from gcc 4.5.2 onwards...].
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.
unsigned nhistory_values_for_projection(const unsigned &fld)
Number of history values to be stored for fld-th field. (Includes the current value!...
PVDElementWithContinuousPressure upgraded to become projectable.
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 nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
unsigned nhistory_values_for_projection(const unsigned &fld)
Number of history values to be stored for fld-th field (Includes the current value!...
unsigned nfields_for_projection()
Number of fields to be projected: 0.
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...
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values (Includes the current value!)
ProjectablePVDElement()
Constructor [this was only required explicitly from gcc 4.5.2 onwards...].
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j 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.
An Element that solves the equations of solid mechanics, based on the discretised principle of virtua...
QPVDElementWithContinuousPressure()
Constructor.
double solid_p(const unsigned &l)
Return the l-th pressure value, make sure to use the hanging representation if there is one!
void output(std::ostream &outfile, const unsigned &n_plot)
PVDEquationsWithPressure output function.
void unpin_elemental_solid_pressure_dofs()
Unpin all solid pressure dofs in the element.
static const unsigned Initial_Nvalue[]
Static array of ints to hold number of solid pressure values at each node.
virtual unsigned required_nvalue(const unsigned &n) const
Number of values (pinned or dofs) required at node n. Can be overwritten for hanging node version.
void set_solid_p(const unsigned &l, const double &p_value)
Set the l-th solid pressure value to p_value.
unsigned npres_solid() const
Return number of pressure values.
void solid_pshape(const Vector< double > &s, Shape &psi) const
Return the pressure shape functions.
int solid_p_local_eqn(const unsigned &i) const
Overload the access function that is used to return local equation corresponding to the i-th solid pr...
int solid_p_nodal_index() const
Set the value at which the solid pressure is stored in the nodes.
static const unsigned Pconv[]
Static array of ints to hold conversion from pressure node numbers to actual node numbers.
void fix_solid_pressure(const unsigned &l, const double &pvalue)
Fix the pressure dof l to be the value pvalue.
void output(std::ostream &outfile)
Generic FiniteElement output function.
void output(FILE *file_pt)
C-style generic FiniteElement output function.
void output(FILE *file_pt, const unsigned &n_plot)
C-style PVDEquationsWithPressure output function.
An Element that solves the equations of solid mechanics, using the principle of virtual displacements...
void output(FILE *file_pt, const unsigned &n_plot)
C-style PVDEquationsWithPressure output function.
void solid_pshape(const Vector< double > &s, Shape &psi) const
Return the pressure shape functions.
unsigned npres_solid() const
Return number of pressure values.
void output(std::ostream &outfile)
Generic FiniteElement output function.
void set_solid_p(const unsigned &l, const double &p_value)
Set the l-th pressure value to p_value.
void fix_solid_pressure(const unsigned &l, const double &pvalue)
Fix the pressure dof l to be the value pvalue.
int solid_p_local_eqn(const unsigned &i) const
Overload the access function that is used to return local equation corresponding to the i-th solid pr...
void output(std::ostream &outfile, const unsigned &n_plot)
PVDEquationsWithPressure output function.
bool has_internal_solid_data()
There is internal solid data so we can't use the automatic assignment of consistent initial condition...
void output(FILE *file_pt)
C-style Generic FiniteElement output function.
void unpin_elemental_solid_pressure_dofs()
Unpin all solid pressure dofs in the element.
double solid_p(const unsigned &l)
Return the lth pressure value.
QPVDElementWithPressure()
Constructor, there are DIM+1 internal data points.
unsigned P_solid_internal_index
Internal index that indicates at which internal data value the solid presure is stored.
An Element that solves the solid mechanics equations, based on the principle of virtual displacements...
void output(std::ostream &outfile)
Output function.
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
void output(FILE *file_pt)
C-style output function.
QPVDElement()
Constructor, there are no internal data points.
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
Pure virtual base class for elements that can be used with PressureBasedSolidLSCPreconditioner.
SolidFiniteElement class.
bool Solve_for_consistent_newmark_accel_flag
Flag to indicate which system of equations to solve when assigning initial conditions for time-depend...
SolidInitialCondition * Solid_ic_pt
Pointer to object that specifies the initial condition.
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 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_solid_ic(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in the residuals and Jacobian for the setup of an initial condition. The global equations are:
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 ...
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...
SolidQHermiteElement elements are Hermite elements whose Jacobian matrices include derivatives w....
void output(std::ostream &outfile)
Overload the output function.
SolidTBubbleEnrichedElement elements are the enriched version of the SolidTElements....
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...
TAdvectionDiffusionReactionElement()
Constructor: Call constructors for TElement and AdvectionDiffusionReaction equations.
An Element that solves the solid mechanics equations, based on the principle of virtual displacements...
void output(std::ostream &outfile)
Output function.
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function.
TPVDBubbleEnrichedElement()
Constructor, there are no internal data points.
void output(FILE *file_pt)
C-style output function.
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Get 'flux' for Z2 error recovery: Upper triangular entries in strain tensor.
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
unsigned nvertex_node() const
Number of vertex nodes in the element.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
An Element that solves the solid mechanics equations in an (near) incompressible formulation with qua...
TPVDElementWithContinuousPressure(const TPVDElementWithContinuousPressure< DIM > &dummy)=delete
Broken copy constructor.
void output(FILE *file_pt)
C-style generic FiniteElement output function.
int solid_p_local_eqn(const unsigned &i) const
Overload the access function that is used to return local equation corresponding to the i-th solid pr...
TPVDElementWithContinuousPressure()
Constructor.
void output(std::ostream &outfile)
Generic FiniteElement output function.
unsigned nvertex_node() const
Number of vertex nodes in the element.
void unpin_elemental_solid_pressure_dofs()
Unpin all solid pressure dofs in the element.
unsigned npres_solid() const
Return number of pressure values.
void set_solid_p(const unsigned &l, const double &p_value)
Set the l-th solid pressure value to p_value.
virtual unsigned required_nvalue(const unsigned &n) const
Number of values (pinned or dofs) required at node n. Can be overwritten for hanging node version.
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
void solid_pshape(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
static const unsigned Initial_Nvalue[]
Static array of ints to hold number of variables at node.
void fix_solid_pressure(const unsigned &l, const double &pvalue)
Fix the pressure dof l to be the value pvalue.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
void output(FILE *file_pt, const unsigned &n_plot)
C-style PVDEquationsWithPressure output function.
double solid_p(const unsigned &l)
Return the l-th pressure value, make sure to use the hanging representation if there is one!
int solid_p_nodal_index() const
Broken assignment operator.
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Get 'flux' for Z2 error recovery: Upper triangular entries in strain tensor.
static const unsigned Pconv[]
Static array of ints to hold conversion from pressure node numbers to actual node numbers.
void output(std::ostream &outfile, const unsigned &n_plot)
PVDEquationsWithPressure output function.
An Element that solves the solid mechanics equations, based on the principle of virtual displacements...
void output(std::ostream &outfile)
Output function.
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.
TPVDElement()
Constructor, there are no internal data points.
void output(FILE *file_pt)
C-style output function.
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function.
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.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
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.
void shape< 2 >(const double &s, double *Psi)
1D shape functions specialised to linear order (2 Nodes)
void doc_2D_principal_stress(DocInfo &doc_info, SolidMesh *mesh_pt)
Document the principal stresses in a 2D SolidMesh pointed to by mesh_pt, in the directory specified b...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).