36 template<
unsigned DIM>
47 throw OomphLibError(
"RefineablePVDEquations cannot be used with "
48 "incompressible constitutive laws.",
71 double lambda_sq = this->lambda_sq();
94 for (
unsigned i = 0;
i <
DIM; ++
i)
123 for (
unsigned i = 0;
i <
DIM;
i++)
126 interpolated_xi[
i] += lagrangian_position_gen(
l,
k,
i) *
psi_;
131 if ((lambda_sq > 0.0) && (this->Unsteady))
137 for (
unsigned j = 0;
j <
DIM;
j++)
148 this->get_isotropic_growth(
ipt,
s, interpolated_xi, gamma);
152 this->body_force(interpolated_xi, b);
159 for (
unsigned i = 0;
i <
DIM;
i++)
161 for (
unsigned j = 0;
j <
DIM;
j++)
176 double W = gamma * w *
J;
182 for (
unsigned i = 0;
i <
DIM;
i++)
185 for (
unsigned j =
i;
j <
DIM;
j++)
190 for (
unsigned k = 0;
k <
DIM;
k++)
196 for (
unsigned j = 0;
j <
i;
j++)
204 this->get_stress(g,
G, sigma);
250 for (
unsigned i = 0;
i <
DIM;
i++)
252 for (
unsigned j = 0;
j <
DIM;
j++)
254 sigma(
i,
j) += this->prestress(
i,
j, interpolated_xi);
309 for (
unsigned i = 0;
i <
DIM;
i++)
326 for (
unsigned i = 0;
i <
DIM;
i++)
337 sum += (lambda_sq * accel[
i] - b[
i]) *
psi(
l,
k);
340 for (
unsigned a = 0; a <
DIM; a++)
343 for (
unsigned b = 0; b <
DIM; b++)
412 position_local_eqn(
ll,
kk,
ii);
444 for (
unsigned a = 0; a <
DIM; a++)
449 for (
unsigned b = a; b <
DIM; b++)
453 if (a == b)
factor *= 0.5;
501 for (
unsigned a = 0; a <
DIM; a++)
509 for (
unsigned b = 0; b <
DIM; b++)
550 template<
unsigned DIM>
630 for (
unsigned i = 0;
i <
DIM;
i++)
644 for (
unsigned i = 0;
i <
DIM;
i++)
674 template<
unsigned DIM>
680 const unsigned&
flag)
686 (!
this->Incompressible))
688 throw OomphLibError(
"The constitutive law requires the use of the "
689 "incompressible formulation by setting the element's "
690 "member function set_incompressible()",
698 if (Solid_ic_pt != 0)
745 double lambda_sq = this->lambda_sq();
773 for (
unsigned i = 0;
i <
DIM; ++
i)
785 this->solid_pshape_at_knot(
ipt,
psisp);
804 for (
unsigned i = 0;
i <
DIM;
i++)
807 interpolated_xi[
i] += lagrangian_position_gen(
l,
k,
i) *
psi_;
812 if ((lambda_sq > 0.0) && (this->Unsteady))
818 for (
unsigned j = 0;
j <
DIM;
j++)
829 this->get_isotropic_growth(
ipt,
s, interpolated_xi, gamma);
833 this->body_force(interpolated_xi, b);
840 for (
unsigned i = 0;
i <
DIM;
i++)
842 for (
unsigned j = 0;
j <
DIM;
j++)
857 double W = gamma * w *
J;
860 double interpolated_solid_p = 0.0;
863 interpolated_solid_p += this->solid_p(
l) *
psisp[
l];
871 for (
unsigned i = 0;
i <
DIM;
i++)
874 for (
unsigned j =
i;
j <
DIM;
j++)
879 for (
unsigned k = 0;
k <
DIM;
k++)
885 for (
unsigned j = 0;
j <
i;
j++)
942 if (this->Incompressible)
947 for (
unsigned a = 0; a <
DIM; a++)
949 for (
unsigned b = 0; b <
DIM; b++)
951 sigma(a, b) =
sigma_dev(a, b) - interpolated_solid_p *
Gup(a, b);
961 this->get_d_stress_dG_upper(
973 for (
unsigned a = 0; a <
DIM; a++)
975 for (
unsigned b = 0; b <
DIM; b++)
977 sigma(a, b) =
sigma_dev(a, b) - interpolated_solid_p *
Gup(a, b);
987 this->get_d_stress_dG_upper(g,
992 interpolated_solid_p,
999 for (
unsigned i = 0;
i <
DIM;
i++)
1001 for (
unsigned j = 0;
j <
DIM;
j++)
1003 sigma(
i,
j) += this->prestress(
i,
j, interpolated_xi);
1056 for (
unsigned i = 0;
i <
DIM;
i++)
1074 for (
unsigned i = 0;
i <
DIM;
i++)
1085 sum += (lambda_sq * accel[
i] - b[
i]) *
psi(
l,
k);
1088 for (
unsigned a = 0; a <
DIM; a++)
1091 for (
unsigned b = 0; b <
DIM; b++)
1162 position_local_eqn(
ll,
kk,
ii);
1248 position_local_eqn(
ll,
kk,
ii);
1279 for (
unsigned a = 0; a <
DIM; a++)
1284 for (
unsigned b = a; b <
DIM; b++)
1288 if (a == b)
factor *= 0.5;
1336 for (
unsigned a = 0; a <
DIM; a++)
1344 for (
unsigned b = 0; b <
DIM; b++)
1418 for (
unsigned a = 0; a <
DIM; a++)
1420 for (
unsigned b = 0; b <
DIM; b++)
1491 if (this->Incompressible)
1550 position_local_eqn(
ll,
kk,
ii);
1576 unsigned count = offset;
1666 position_local_eqn(
ll,
kk,
ii);
1692 unsigned count = offset;
virtual bool requires_incompressibility_constraint()=0
Pure virtual function in which the user must declare if the constitutive equation requires an incompr...
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
unsigned nnodal_position_type() const
Return the number of coordinate types that the element requires to interpolate the geometry between t...
double dnodal_position_gen_dt(const unsigned &n, const unsigned &k, const unsigned &i) const
i-th component of time derivative (velocity) of the generalised position, dx(k,i)/dt at local node n....
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.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
unsigned ndof() const
Return the number of equations/dofs in the element.
Class that contains data for hanging nodes.
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....
void fill_in_generic_residual_contribution_pvd_with_pressure(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, const unsigned &flag)
Add element's contribution to elemental residual vector and/or Jacobian matrix flag=1: compute both f...
void get_mass_matrix_diagonal(Vector< double > &mass_diag)
Compute the diagonal of the displacement mass matrix for LSC preconditioner.
void fill_in_generic_contribution_to_residuals_pvd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Call the residuals including hanging node cases.
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
TAdvectionDiffusionReactionElement()
Constructor: Call constructors for TElement and AdvectionDiffusionReaction equations.
virtual double weight(const unsigned &i, const unsigned &j) const
Access function for j-th weight for the i-th derivative.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).