29 #ifndef OOMPH_ELASTICITY_ELEMENTS_HEADER
30 #define OOMPH_ELASTICITY_ELEMENTS_HEADER
34 #include <oomph-lib-config.h>
39 #include "../generic/Qelements.h"
40 #include "../generic/Telements.h"
41 #include "../generic/mesh.h"
42 #include "../generic/hermite_elements.h"
43 #include "../constitutive/constitutive_laws.h"
44 #include "../generic/error_estimator.h"
45 #include "../generic/projection.h"
56 template<
unsigned DIM>
212 unsigned n_element = element_pt.size();
213 for (
unsigned e = 0;
e < n_element;
e++)
225 unsigned n_element = element_pt.size();
226 for (
unsigned e = 0;
e < n_element;
e++)
244 void get_energy(
double& pot_en,
double& kin_en);
280 (*Isotropic_growth_fct_pt)(xi,
gamma);
294 for (
unsigned i = 0;
i <
n;
i++)
308 (*Body_force_fct_pt)(time, xi,
b);
330 std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list)
const
333 std::pair<unsigned, unsigned> dof_lookup;
336 const unsigned n_node = this->
nnode();
343 int local_unknown = 0;
346 for (
unsigned n = 0;
n < n_node;
n++)
349 for (
unsigned k = 0;
k < n_position_type;
k++)
352 for (
unsigned i = 0;
i < nodal_dim;
i++)
358 if (local_unknown >= 0)
362 dof_lookup.first = this->
eqn_number(local_unknown);
363 dof_lookup.second =
i;
366 dof_lookup_list.push_front(dof_lookup);
438 template<
unsigned DIM>
513 void output(std::ostream& outfile,
const unsigned& n_plot);
524 void output(FILE* file_pt,
const unsigned& n_plot);
538 const unsigned& flag);
553 "Elements derived from PVDEquations must have a constitutive law:\n";
555 "set one using the constitutive_law_pt() member function";
580 "Elements derived from PVDEquations must have a constitutive law:\n";
582 "set one using the constitutive_law_pt() member function";
590 g,
G,
sigma, d_sigma_dG,
false);
605 template<
unsigned DIM,
unsigned NNODE_1D>
620 void output(std::ostream& outfile,
const unsigned& n_plot)
633 void output(FILE* file_pt,
const unsigned& n_plot)
643 template<
unsigned NNODE_1D>
656 template<
unsigned NNODE_1D>
670 template<
unsigned NNODE_1D>
682 template<
unsigned NNODE_1D>
695 template<
unsigned DIM>
710 void output(std::ostream& outfile,
const unsigned& n_plot)
722 void output(FILE* file_pt,
const unsigned& n_plot)
732 template<
class PVD_ELEMENT>
822 template<
class ELEMENT>
835 template<
class ELEMENT>
859 template<
unsigned DIM>
893 virtual double solid_p(
const unsigned& l) = 0;
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";
982 residuals, jacobian, mass_matrix, 4);
994 residuals, jacobian, mass_matrix, 3);
998 const unsigned n_dof = this->
ndof();
999 for (
unsigned i = 0;
i < n_dof;
i++)
1001 residuals[
i] *= -1.0;
1002 for (
unsigned j = 0;
j < n_dof;
j++)
1004 jacobian(
i,
j) *= -1.0;
1016 Shape psisp(n_solid_pres);
1023 for (
unsigned l = 0; l < n_solid_pres; l++)
1035 unsigned n_plot = 5;
1040 void output(std::ostream& outfile,
const unsigned& n_plot);
1046 unsigned n_plot = 5;
1051 void output(FILE* file_pt,
const unsigned& n_plot);
1078 std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list)
const
1081 std::pair<unsigned, unsigned> dof_lookup;
1084 const unsigned n_node = this->
nnode();
1091 int local_unknown = 0;
1094 for (
unsigned n = 0;
n < n_node;
n++)
1097 for (
unsigned k = 0;
k < n_position_type;
k++)
1100 for (
unsigned i = 0;
i < nodal_dim;
i++)
1106 if (local_unknown >= 0)
1110 dof_lookup.first = this->
eqn_number(local_unknown);
1111 dof_lookup.second =
i;
1114 dof_lookup_list.push_front(dof_lookup);
1122 for (
unsigned j = 0;
j < np;
j++)
1126 if (local_unknown >= 0)
1130 dof_lookup.first = this->
eqn_number(local_unknown);
1131 dof_lookup.second =
DIM;
1134 dof_lookup_list.push_front(dof_lookup);
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";
1168 g,
G, sigma_dev, Gcontra, gen_dil, inv_kappa);
1180 const double& gen_dil,
1181 const double& inv_kappa,
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);
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";
1280 g,
G, sigma_dev, Gcontra, detG);
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>
1338 for (
unsigned l = 0; l < n_pres; l++)
1409 void output(std::ostream& outfile,
const unsigned& n_plot)
1422 void output(FILE* file_pt,
const unsigned& n_plot)
1519 template<
unsigned DIM>
1534 unsigned n_node = this->
nnode();
1536 for (
unsigned n = 0;
n < n_node;
n++)
1594 return static_cast<unsigned>(
pow(2.0,
static_cast<int>(
DIM)));
1611 void output(std::ostream& outfile,
const unsigned& n_plot)
1624 void output(FILE* file_pt,
const unsigned& n_plot)
1640 double psi1[2], psi2[2];
1647 for (
unsigned i = 0;
i < 2;
i++)
1649 for (
unsigned j = 0;
j < 2;
j++)
1652 psi[2 *
i +
j] = psi2[
i] * psi1[
j];
1666 double psi1[2], psi2[2], psi3[2];
1674 for (
unsigned i = 0;
i < 2;
i++)
1676 for (
unsigned j = 0;
j < 2;
j++)
1678 for (
unsigned k = 0;
k < 2;
k++)
1681 psi[4 *
i + 2 *
j +
k] = psi3[
i] * psi2[
j] * psi1[
k];
1752 template<
unsigned DIM,
unsigned NNODE_1D>
1768 void output(std::ostream& outfile,
const unsigned& n_plot)
1781 void output(FILE* file_pt,
const unsigned& n_plot)
1790 return (NNODE_1D - 1);
1828 if (
flux.size() != num_entries)
1830 std::ostringstream error_message;
1831 error_message <<
"The flux vector has the wrong number of entries, "
1832 <<
flux.size() <<
", whereas it should be " << num_entries
1845 unsigned icount = 0;
1848 for (
unsigned i = 0;
i <
DIM;
i++)
1850 flux[icount] = strain(
i,
i);
1854 for (
unsigned i = 0;
i <
DIM;
i++)
1856 for (
unsigned j =
i + 1;
j <
DIM;
j++)
1858 flux[icount] = strain(
i,
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>
1950 void output(std::ostream& outfile,
const unsigned& n_plot)
1963 void output(FILE* file_pt,
const unsigned& n_plot)
1973 return (NNODE_1D - 1);
2001 if (
flux.size() != num_entries)
2003 std::ostringstream error_message;
2004 error_message <<
"The flux vector has the wrong number of entries, "
2005 <<
flux.size() <<
", whereas it should be " << num_entries
2018 unsigned icount = 0;
2021 for (
unsigned i = 0;
i <
DIM;
i++)
2023 flux[icount] = strain(
i,
i);
2027 for (
unsigned i = 0;
i <
DIM;
i++)
2029 for (
unsigned j =
i + 1;
j <
DIM;
j++)
2031 flux[icount] = strain(
i,
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>
2113 unsigned n_node = this->
nnode();
2115 for (
unsigned n = 0;
n < n_node;
n++)
2200 void output(std::ostream& outfile,
const unsigned& n_plot)
2213 void output(FILE* file_pt,
const unsigned& n_plot)
2250 if (
flux.size() != num_entries)
2252 std::ostringstream error_message;
2253 error_message <<
"The flux vector has the wrong number of entries, "
2254 <<
flux.size() <<
", whereas it should be " << num_entries
2267 unsigned icount = 0;
2270 for (
unsigned i = 0;
i <
DIM;
i++)
2272 flux[icount] = strain(
i,
i);
2276 for (
unsigned i = 0;
i <
DIM;
i++)
2278 for (
unsigned j =
i + 1;
j <
DIM;
j++)
2280 flux[icount] = strain(
i,
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>
2382 std::ofstream pos_file;
2383 std::ofstream neg_file;
2386 << doc_info.
number() <<
".dat";
2387 pos_file.open(
filename.str().c_str());
2390 << doc_info.
number() <<
".dat";
2391 neg_file.open(
filename.str().c_str());
2394 pos_file << 0.0 <<
" " << 0.0 <<
" " << 0.0 <<
" " << 0.0 <<
" "
2396 neg_file << 0.0 <<
" " << 0.0 <<
" " << 0.0 <<
" " << 0.0 <<
" "
2404 unsigned n_solid_element = mesh_pt->
nelement();
2405 for (
unsigned e = 0;
e < n_solid_element;
e++)
2407 ELEMENT* el_pt =
dynamic_cast<ELEMENT*
>(mesh_pt->
element_pt(
e));
2412 el_pt->get_principal_stress(
2413 s, principal_stress_vector, principal_stress);
2416 el_pt->interpolated_x(
s,
x);
2421 bool hydrostat =
false;
2425 double dev_max = 1.0e-2;
2426 if (principal_stress[0] != 0.0)
2428 if (
std::fabs((principal_stress[0] - principal_stress[1]) /
2429 principal_stress[0]) < dev_max)
2432 double Cos =
cos(0.25 * 3.14159);
2433 double Sin =
sin(0.25 * 3.14159);
2434 rot(0, 0) = Cos * principal_stress_vector(0, 0) -
2435 Sin * principal_stress_vector(0, 1);
2436 rot(0, 1) = Sin * principal_stress_vector(0, 0) +
2437 Cos * principal_stress_vector(0, 1);
2438 rot(1, 0) = Cos * principal_stress_vector(1, 0) -
2439 Sin * principal_stress_vector(1, 1);
2440 rot(1, 1) = Sin * principal_stress_vector(1, 0) +
2441 Cos * principal_stress_vector(1, 1);
2446 for (
unsigned i = 0;
i < 2;
i++)
2448 if (principal_stress[
i] > 0.0)
2450 pos_file <<
x[0] <<
" " <<
x[1] <<
" "
2451 << principal_stress_vector(
i, 0) <<
" "
2452 << principal_stress_vector(
i, 1) << std::endl;
2453 pos_file <<
x[0] <<
" " <<
x[1] <<
" "
2454 << -principal_stress_vector(
i, 0) <<
" "
2455 << -principal_stress_vector(
i, 1) << std::endl;
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] <<
" "
2467 << principal_stress_vector(
i, 0) <<
" "
2468 << principal_stress_vector(
i, 1) << std::endl;
2469 neg_file <<
x[0] <<
" " <<
x[1] <<
" "
2470 << -principal_stress_vector(
i, 0) <<
" "
2471 << -principal_stress_vector(
i, 1) << std::endl;
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>
2514 const unsigned n_solid_pres = this->npres_solid();
2515 for (
unsigned j = 0;
j < n_solid_pres;
j++)
2518 unsigned vertex_index = this->Pconv[
j];
2519 data_values.push_back(std::make_pair(this->
node_pt(vertex_index), 0));
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>
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
JacobiRotation< float > G
Definition: Jacobi_makeGivens.cpp:2
Scalar * b
Definition: benchVecAdd.cpp:17
Definition: constitutive_laws.h:471
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)
Definition: constitutive_laws.cc:352
virtual void calculate_second_piola_kirchhoff_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma)=0
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
void unpin(const unsigned &i)
Unpin the i-th stored variable.
Definition: nodes.h:391
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
Definition: nodes.h:238
void set_value(const unsigned &i, const double &value_)
Definition: nodes.h:271
double value(const unsigned &i) const
Definition: nodes.h:293
Definition: oomph_utilities.h:499
std::string directory() const
Output directory.
Definition: oomph_utilities.h:524
unsigned & number()
Number used (e.g.) for labeling output files.
Definition: oomph_utilities.h:554
Definition: error_estimator.h:79
FaceGeometry()
Definition: solid_elements.h:2608
FaceGeometry()
Definition: solid_elements.h:840
FaceGeometry()
Constructor must call constructor of the underlying Point element.
Definition: solid_elements.h:1711
FaceGeometry()
Constructor must call constructor of the underlying element.
Definition: solid_elements.h:1738
FaceGeometry()
Constructor must call constructor of underlying solid element.
Definition: solid_elements.h:1478
FaceGeometry()
Constructor must call constructor of underlying solid element.
Definition: solid_elements.h:1503
FaceGeometry()
Definition: solid_elements.h:663
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
Definition: solid_elements.h:688
FaceGeometry()
Definition: solid_elements.h:2062
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
Definition: solid_elements.h:2087
FaceGeometry()
Definition: solid_elements.h:1889
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
Definition: solid_elements.h:1914
FaceGeometry()
Definition: solid_elements.h:2594
FaceGeometry()
Definition: solid_elements.h:827
FaceGeometry()
Constructor must call constructor of the underlying Solid element.
Definition: solid_elements.h:1697
FaceGeometry()
Constructor must call constructor of the underlying Solid element.
Definition: solid_elements.h:1724
FaceGeometry()
Constructor must call constructor of underlying solid element.
Definition: solid_elements.h:1465
FaceGeometry()
Constructor must call constructor of underlying solid element.
Definition: solid_elements.h:1490
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
Definition: solid_elements.h:649
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
Definition: solid_elements.h:676
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
Definition: solid_elements.h:2048
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
Definition: solid_elements.h:2075
FaceGeometry()
Constructor: Call constructor of base.
Definition: solid_elements.h:2348
FaceGeometry()
Constructor: Call constructor of base.
Definition: solid_elements.h:2360
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
Definition: solid_elements.h:1875
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
Definition: solid_elements.h:1902
Definition: elements.h:4998
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 output(std::ostream &outfile)
Definition: elements.h:3050
unsigned nnodal_position_type() const
Definition: elements.h:2463
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
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
Definition: elements.h:2484
virtual double J_eulerian(const Vector< double > &s) const
Definition: elements.cc:4103
unsigned ndof() const
Return the number of equations/dofs in the element.
Definition: elements.h:835
unsigned long eqn_number(const unsigned &ieqn_local) const
Definition: elements.h:704
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
Definition: elements.h:622
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Definition: elements.h:267
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Definition: elements.cc:62
Definition: solid_elements.h:698
void output(FILE *file_pt, const unsigned &n_plot)
C-style SolidQHermiteElement output function.
Definition: solid_elements.h:722
void output(FILE *file_pt)
C-style SolidQHermiteElement output function.
Definition: solid_elements.h:716
void output(std::ostream &outfile, const unsigned &n_plot)
SolidQHermiteElement output function.
Definition: solid_elements.h:710
void output(std::ostream &outfile)
SolidQHermiteElement output function.
Definition: solid_elements.h:704
HermitePVDElement()
Constructor, there are no internal data points.
Definition: solid_elements.h:701
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.
Definition: mesh.h:448
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
Definition: nodes.h:1022
Definition: oomph_definitions.h:222
Definition: solid_elements.h:58
bool Unsteady
Flag that switches inertia on/off.
Definition: solid_elements.h:421
static void unpin_all_solid_pressure_dofs(const Vector< GeneralisedElement * > &element_pt)
Unpin all pressure dofs in elements listed in vector.
Definition: solid_elements.h:221
void get_energy(double &pot_en, double &kin_en)
Get potential (strain) and kinetic energy.
Definition: solid_elements.cc:829
virtual void pin_elemental_redundant_nodal_solid_pressures()
Pin the element's redundant solid pressures (needed for refinement)
Definition: solid_elements.h:196
PrestressFctPt & prestress_fct_pt()
Access function: Pointer to pre-stress function.
Definition: solid_elements.h:128
void disable_evaluate_jacobian_by_fd()
Set Jacobian to be evaluated analytically Else: by FD.
Definition: solid_elements.h:380
static double Default_lambda_sq_value
Static default value for timescale ratio (1.0 – for natural scaling)
Definition: solid_elements.h:427
BodyForceFctPt Body_force_fct_pt
Pointer to body force function.
Definition: solid_elements.h:424
virtual int solid_p_nodal_index() const
Definition: solid_elements.h:186
virtual int solid_p_local_eqn(const unsigned &i) const
Definition: solid_elements.h:178
void get_principal_stress(const Vector< double > &s, DenseMatrix< double > &principal_stress_vector, Vector< double > &principal_stress)
Definition: solid_elements.cc:1071
bool is_jacobian_evaluated_by_fd() const
Return the flag indicating whether the jacobian is evaluated by fd.
Definition: solid_elements.h:386
BodyForceFctPt & body_force_fct_pt()
Access function: Pointer to body force function.
Definition: solid_elements.h:140
ConstitutiveLaw *& constitutive_law_pt()
Return the constitutive law pointer.
Definition: solid_elements.h:101
double(* PrestressFctPt)(const unsigned &i, const unsigned &j, const Vector< double > &xi)
Definition: solid_elements.h:74
ConstitutiveLaw * Constitutive_law_pt
Pointer to the constitutive law.
Definition: solid_elements.h:415
double prestress(const unsigned &i, const unsigned &j, const Vector< double > xi)
Definition: solid_elements.h:393
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Definition: solid_elements.h:329
void(* IsotropicGrowthFctPt)(const Vector< double > &xi, double &gamma)
Definition: solid_elements.h:68
virtual void get_isotropic_growth(const unsigned &ipt, const Vector< double > &s, const Vector< double > &xi, double &gamma) const
Definition: solid_elements.h:267
void disable_inertia()
Switch off solid inertia.
Definition: solid_elements.h:158
virtual unsigned npres_solid() const
Definition: solid_elements.h:171
unsigned ndof_types() const
returns the number of DOF types associated with this element.
Definition: solid_elements.h:314
bool is_inertia_enabled() const
Access function to flag that switches inertia on/off (const version)
Definition: solid_elements.h:164
double *& lambda_sq_pt()
Access function for pointer to timescale ratio (nondim density)
Definition: solid_elements.h:115
BodyForceFctPt body_force_fct_pt() const
Access function: Pointer to body force function (const version)
Definition: solid_elements.h:146
static int Solid_pressure_not_stored_at_node
Definition: solid_elements.h:62
void get_deformed_covariant_basis_vectors(const Vector< double > &s, DenseMatrix< double > &def_covariant_basis)
Definition: solid_elements.cc:1197
IsotropicGrowthFctPt isotropic_growth_fct_pt() const
Access function: Pointer to isotropic growth function (const version)
Definition: solid_elements.h:134
void get_strain(const Vector< double > &s, DenseMatrix< double > &strain) const
Return the strain tensor.
Definition: solid_elements.cc:47
IsotropicGrowthFctPt Isotropic_growth_fct_pt
Pointer to isotropic growth function.
Definition: solid_elements.h:409
void(* BodyForceFctPt)(const double &t, const Vector< double > &xi, Vector< double > &b)
Definition: solid_elements.h:81
PVDEquationsBase()
Definition: solid_elements.h:89
PrestressFctPt Prestress_fct_pt
Pointer to prestress function.
Definition: solid_elements.h:412
bool Evaluate_jacobian_by_fd
Use FD to evaluate Jacobian.
Definition: solid_elements.h:430
IsotropicGrowthFctPt & isotropic_growth_fct_pt()
Access function: Pointer to isotropic growth function.
Definition: solid_elements.h:122
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
void body_force(const Vector< double > &xi, Vector< double > &b) const
Definition: solid_elements.h:287
void enable_evaluate_jacobian_by_fd()
Set Jacobian to be evaluated by FD? Else: Analytically.
Definition: solid_elements.h:374
static void pin_redundant_nodal_solid_pressures(const Vector< GeneralisedElement * > &element_pt)
Definition: solid_elements.h:208
double * Lambda_sq_pt
Timescale ratio (non-dim. density)
Definition: solid_elements.h:418
void enable_inertia()
Switch on solid inertia.
Definition: solid_elements.h:152
const double & lambda_sq() const
Access function for timescale ratio (nondim density)
Definition: solid_elements.h:108
Definition: solid_elements.h:863
void get_stress(const Vector< double > &s, DenseMatrix< double > &sigma)
Definition: solid_elements.cc:2267
void output(std::ostream &outfile)
Output: x,y,[z],xi0,xi1,[xi2],p,gamma.
Definition: solid_elements.h:1033
void set_compressible()
Set the material to be compressible.
Definition: solid_elements.h:887
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)
Definition: solid_elements.h:1258
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)
Definition: solid_elements.h:1177
virtual void set_solid_p(const unsigned &l, const double &p_value)=0
Set the lth solid pressure to p_value.
void get_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma_dev, DenseMatrix< double > &Gcontra, double &gen_dil, double &inv_kappa)
Definition: solid_elements.h:1145
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Definition: solid_elements.h:1077
virtual void fill_in_generic_residual_contribution_pvd_with_pressure(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, const unsigned &flag)
Definition: solid_elements.cc:1271
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)
Definition: solid_elements.h:1288
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the residuals.
Definition: solid_elements.h:899
void solid_pshape_at_knot(const unsigned &ipt, Shape &psi) const
Return the stored solid shape functions at the knots.
Definition: solid_elements.h:1220
void extended_output(std::ostream &outfile, const unsigned &n_plot)
Output: x,y,[z],xi0,xi1,[xi2],gamma strain and stress components.
Definition: solid_elements.cc:2116
double interpolated_solid_p(const Vector< double > &s)
Return the interpolated_solid_pressure.
Definition: solid_elements.h:1011
bool Incompressible
Boolean to determine whether the solid is incompressible or not.
Definition: solid_elements.h:1237
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: solid_elements.h:958
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: solid_elements.h:914
unsigned ndof_types() const
Definition: solid_elements.h:1064
bool is_incompressible() const
Return whether the material is incompressible.
Definition: solid_elements.h:875
void get_mass_matrix_diagonal(Vector< double > &mass_diag)
Definition: solid_elements.cc:2198
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.
Definition: solid_elements.h:881
void output(FILE *file_pt)
C-style output: x,y,[z],xi0,xi1,[xi2],p,gamma.
Definition: solid_elements.h:1044
PVDEquationsWithPressure()
Constructor, by default the element is NOT incompressible.
Definition: solid_elements.h:866
Definition: solid_elements.h:440
virtual void fill_in_generic_contribution_to_residuals_pvd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Definition: solid_elements.cc:179
void unpin_elemental_solid_pressure_dofs()
Unpin all solid pressure dofs – empty as there are no pressures.
Definition: solid_elements.h:596
void get_d_stress_dG_upper(const DenseMatrix< double > &g, const DenseMatrix< double > &G, const DenseMatrix< double > &sigma, RankFourTensor< double > &d_sigma_dG)
Definition: solid_elements.h:569
void extended_output(std::ostream &outfile, const unsigned &n_plot)
Output: x,y,[z],xi0,xi1,[xi2],gamma strain and stress components.
Definition: solid_elements.cc:751
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: solid_elements.h:459
PVDEquations()
Constructor.
Definition: solid_elements.h:443
void output(std::ostream &outfile)
Output: x,y,[z],xi0,xi1,[xi2],gamma.
Definition: solid_elements.h:506
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Definition: solid_elements.h:451
void get_stress(const Vector< double > &s, DenseMatrix< double > &sigma)
Definition: solid_elements.cc:951
void output(FILE *file_pt)
C-style output: x,y,[z],xi0,xi1,[xi2],gamma.
Definition: solid_elements.h:517
void get_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma)
Definition: solid_elements.h:543
Definition: elements.h:3439
Definition: projection.h:183
PVDElementWithContinuousPressure upgraded to become projectable.
Definition: solid_elements.h:2496
unsigned nfields_for_projection()
Definition: solid_elements.h:2528
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
Definition: solid_elements.h:2571
double get_field(const unsigned &t, const unsigned &fld, const Vector< double > &s)
Definition: solid_elements.h:2562
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values (Includes the current value!)
Definition: solid_elements.h:2543
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
Definition: solid_elements.h:2578
ProjectablePVDElementWithContinuousPressure()
Definition: solid_elements.h:2500
double jacobian_and_shape_of_field(const unsigned &fld, const Vector< double > &s, Shape &psi)
Definition: solid_elements.h:2550
Vector< std::pair< Data *, unsigned > > data_values_of_field(const unsigned &fld)
Definition: solid_elements.h:2508
unsigned nhistory_values_for_projection(const unsigned &fld)
Definition: solid_elements.h:2535
PVDElementWithContinuousPressure upgraded to become projectable.
Definition: solid_elements.h:734
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
Definition: solid_elements.h:804
unsigned nhistory_values_for_projection(const unsigned &fld)
Definition: solid_elements.h:771
unsigned nfields_for_projection()
Number of fields to be projected: 0.
Definition: solid_elements.h:764
double get_field(const unsigned &t, const unsigned &fld, const Vector< double > &s)
Definition: solid_elements.h:794
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values (Includes the current value!)
Definition: solid_elements.h:777
Vector< std::pair< Data *, unsigned > > data_values_of_field(const unsigned &fld)
Definition: solid_elements.h:745
ProjectablePVDElement()
Definition: solid_elements.h:738
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
Definition: solid_elements.h:811
double jacobian_and_shape_of_field(const unsigned &fld, const Vector< double > &s, Shape &psi)
Definition: solid_elements.h:784
Definition: solid_elements.h:1523
QPVDElementWithContinuousPressure()
Constructor.
Definition: solid_elements.h:1560
double solid_p(const unsigned &l)
Definition: solid_elements.h:1580
void output(std::ostream &outfile, const unsigned &n_plot)
PVDEquationsWithPressure output function.
Definition: solid_elements.h:1611
void unpin_elemental_solid_pressure_dofs()
Unpin all solid pressure dofs in the element.
Definition: solid_elements.h:1530
static const unsigned Initial_Nvalue[]
Definition: solid_elements.h:1527
virtual unsigned required_nvalue(const unsigned &n) const
Definition: solid_elements.h:1573
void set_solid_p(const unsigned &l, const double &p_value)
Set the l-th solid pressure value to p_value.
Definition: solid_elements.h:1586
unsigned npres_solid() const
Return number of pressure values.
Definition: solid_elements.h:1592
void solid_pshape(const Vector< double > &s, Shape &psi) const
Return the pressure shape functions.
int solid_p_local_eqn(const unsigned &i) const
Definition: solid_elements.h:1550
int solid_p_nodal_index() const
Set the value at which the solid pressure is stored in the nodes.
Definition: solid_elements.h:1566
static const unsigned Pconv[]
Definition: solid_elements.h:1545
void fix_solid_pressure(const unsigned &l, const double &pvalue)
Fix the pressure dof l to be the value pvalue.
Definition: solid_elements.h:1598
void output(std::ostream &outfile)
Generic FiniteElement output function.
Definition: solid_elements.h:1605
void output(FILE *file_pt)
C-style generic FiniteElement output function.
Definition: solid_elements.h:1618
void output(FILE *file_pt, const unsigned &n_plot)
C-style PVDEquationsWithPressure output function.
Definition: solid_elements.h:1624
Definition: solid_elements.h:1332
void output(FILE *file_pt, const unsigned &n_plot)
C-style PVDEquationsWithPressure output function.
Definition: solid_elements.h:1422
void solid_pshape(const Vector< double > &s, Shape &psi) const
Return the pressure shape functions.
unsigned npres_solid() const
Return number of pressure values.
Definition: solid_elements.h:1390
void output(std::ostream &outfile)
Generic FiniteElement output function.
Definition: solid_elements.h:1403
void set_solid_p(const unsigned &l, const double &p_value)
Set the l-th pressure value to p_value.
Definition: solid_elements.h:1384
void fix_solid_pressure(const unsigned &l, const double &pvalue)
Fix the pressure dof l to be the value pvalue.
Definition: solid_elements.h:1396
int solid_p_local_eqn(const unsigned &i) const
Definition: solid_elements.h:1352
void output(std::ostream &outfile, const unsigned &n_plot)
PVDEquationsWithPressure output function.
Definition: solid_elements.h:1409
bool has_internal_solid_data()
Definition: solid_elements.h:1363
void output(FILE *file_pt)
C-style Generic FiniteElement output function.
Definition: solid_elements.h:1416
void unpin_elemental_solid_pressure_dofs()
Unpin all solid pressure dofs in the element.
Definition: solid_elements.h:1334
double solid_p(const unsigned &l)
Return the lth pressure value.
Definition: solid_elements.h:1378
QPVDElementWithPressure()
Constructor, there are DIM+1 internal data points.
Definition: solid_elements.h:1369
unsigned P_solid_internal_index
Definition: solid_elements.h:1347
Definition: solid_elements.h:608
void output(std::ostream &outfile)
Output function.
Definition: solid_elements.h:614
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function.
Definition: solid_elements.h:633
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
Definition: solid_elements.h:620
void output(FILE *file_pt)
C-style output function.
Definition: solid_elements.h:627
QPVDElement()
Constructor, there are no internal data points.
Definition: solid_elements.h:611
A Rank 4 Tensor class.
Definition: matrices.h:1701
Definition: elements.h:5193
Definition: elements.h:3561
bool Solve_for_consistent_newmark_accel_flag
Definition: elements.h:4302
SolidInitialCondition * Solid_ic_pt
Pointer to object that specifies the initial condition.
Definition: elements.h:4131
int position_local_eqn(const unsigned &n, const unsigned &k, const unsigned &j) const
Definition: elements.h:4137
virtual void fill_in_jacobian_from_solid_position_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: elements.cc:6985
void fill_in_jacobian_for_solid_ic(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: elements.h:4035
void describe_local_dofs(std::ostream &out, const std::string ¤t_string) const
Definition: elements.cc:6514
void fill_in_jacobian_for_newmark_accel(DenseMatrix< double > &jacobian)
Definition: elements.cc:7227
Definition: Qelements.h:1742
Definition: hermite_elements.h:504
void output(std::ostream &outfile)
Overload the output function.
Definition: hermite_elements.cc:1072
Definition: Telements.h:3926
Definition: Telements.h:3728
Definition: Telements.h:1208
Definition: solid_elements.h:1935
void output(std::ostream &outfile)
Output function.
Definition: solid_elements.h:1944
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
Definition: solid_elements.h:1989
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function.
Definition: solid_elements.h:1963
TPVDBubbleEnrichedElement()
Constructor, there are no internal data points.
Definition: solid_elements.h:1938
void output(FILE *file_pt)
C-style output function.
Definition: solid_elements.h:1957
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: solid_elements.h:1997
unsigned nrecovery_order()
Definition: solid_elements.h:1971
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
Definition: solid_elements.h:1950
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
Definition: solid_elements.h:1983
unsigned nvertex_node() const
Number of vertex nodes in the element.
Definition: solid_elements.h:1977
Definition: solid_elements.h:2103
TPVDElementWithContinuousPressure(const TPVDElementWithContinuousPressure< DIM > &dummy)=delete
Broken copy constructor.
void output(FILE *file_pt)
C-style generic FiniteElement output function.
Definition: solid_elements.h:2207
int solid_p_local_eqn(const unsigned &i) const
Definition: solid_elements.h:2129
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
Definition: solid_elements.h:2232
TPVDElementWithContinuousPressure()
Constructor.
Definition: solid_elements.h:2139
void output(std::ostream &outfile)
Generic FiniteElement output function.
Definition: solid_elements.h:2194
unsigned nvertex_node() const
Number of vertex nodes in the element.
Definition: solid_elements.h:2226
void unpin_elemental_solid_pressure_dofs()
Unpin all solid pressure dofs in the element.
Definition: solid_elements.h:2109
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.
Definition: solid_elements.h:2178
virtual unsigned required_nvalue(const unsigned &n) const
Definition: solid_elements.h:2165
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
Definition: solid_elements.h:2238
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.
Definition: solid_elements.h:2106
void fix_solid_pressure(const unsigned &l, const double &pvalue)
Fix the pressure dof l to be the value pvalue.
Definition: solid_elements.h:2187
void output(FILE *file_pt, const unsigned &n_plot)
C-style PVDEquationsWithPressure output function.
Definition: solid_elements.h:2213
double solid_p(const unsigned &l)
Definition: solid_elements.h:2172
int solid_p_nodal_index() const
Broken assignment operator.
Definition: solid_elements.h:2158
unsigned nrecovery_order()
Definition: solid_elements.h:2220
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: solid_elements.h:2246
static const unsigned Pconv[]
Definition: solid_elements.h:2124
void output(std::ostream &outfile, const unsigned &n_plot)
PVDEquationsWithPressure output function.
Definition: solid_elements.h:2200
Definition: solid_elements.h:1756
void output(std::ostream &outfile)
Output function.
Definition: solid_elements.h:1762
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: solid_elements.h:1824
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
Definition: solid_elements.h:1768
TPVDElement()
Constructor, there are no internal data points.
Definition: solid_elements.h:1759
void output(FILE *file_pt)
C-style output function.
Definition: solid_elements.h:1775
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
Definition: solid_elements.h:1816
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
Definition: solid_elements.h:1800
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function.
Definition: solid_elements.h:1781
unsigned nrecovery_order()
Definition: solid_elements.h:1788
unsigned nvertex_node() const
Number of vertex nodes in the element.
Definition: solid_elements.h:1794
unsigned ntstorage() const
Definition: timesteppers.h:601
Time *const & time_pt() const
Access function for the pointer to time (const version)
Definition: timesteppers.h:572
double & time()
Return the current value of the continuous time.
Definition: timesteppers.h:123
RealScalar s
Definition: level1_cplx_impl.h:130
EIGEN_BLAS_FUNC() rot(int *n, Scalar *px, int *incx, Scalar *py, int *incy, Scalar *pc, Scalar *ps)
Definition: level1_real_impl.h:88
char char char int int * k
Definition: level2_impl.h:374
#define DIM
Definition: linearised_navier_stokes_elements.h:44
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
static const unsigned Dim
Problem dimension.
Definition: two_d_tilted_square.cc:62
string filename
Definition: MergeRestartFiles.py:39
void flux(const double &time, const Vector< double > &x, double &flux)
Get flux applied along boundary x=0.
Definition: pretend_melt.cc:59
Real fabs(const Real &a)
Definition: boostmultiprec.cpp:117
int sigma
Definition: calibrate.py:179
Mdouble gamma(Mdouble gamma_in)
This is the gamma function returns the true value for the half integer value.
Definition: ExtendedMath.cc:116
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
void shape< 2 >(const double &s, double *Psi)
1D shape functions specialised to linear order (2 Nodes)
Definition: shape.h:608
void doc_2D_principal_stress(DocInfo &doc_info, SolidMesh *mesh_pt)
Definition: solid_elements.h:2379
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