axisym_cylindrical_solid_with_pressure_elements.h
Go to the documentation of this file.
1// LIC// ====================================================================
2// LIC// This file forms part of oomph-lib, the object-oriented,
3// LIC// multi-physics finite-element library, available
4// LIC// at http://www.oomph-lib.org.
5// LIC//
6// LIC// Copyright (C) 2006-2026 Matthias Heil and Andrew Hazel
7// LIC//
8// LIC// This library is free software; you can redistribute it and/or
9// LIC// modify it under the terms of the GNU Lesser General Public
10// LIC// License as published by the Free Software Foundation; either
11// LIC// version 2.1 of the License, or (at your option) any later version.
12// LIC//
13// LIC// This library is distributed in the hope that it will be useful,
14// LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16// LIC// Lesser General Public License for more details.
17// LIC//
18// LIC// You should have received a copy of the GNU Lesser General Public
19// LIC// License along with this library; if not, write to the Free Software
20// LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21// LIC// 02110-1301 USA.
22// LIC//
23// LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
24// LIC//
25// LIC//====================================================================
26
27// Header file for axisymmetric solid mechanics elements
28#ifndef OOMPH_AXISYM_CYLINDRICAL_ELASTICITY_WITH_PRESSURE_ELEMENTS_HEADER
29#define OOMPH_AXISYM_CYLINDRICAL_ELASTICITY_WITH_PRESSURE_ELEMENTS_HEADER
30
31// Config header generated by autoconfig
32#ifdef HAVE_CONFIG_H
33#include <oomph-lib-config.h>
34#endif
35
36// OOMPH-LIB headers
37#include "../generic/Telements.h"
38#include "../constitutive/constitutive_laws.h"
39#include "../generic/error_estimator.h"
40#include "../generic/projection.h"
41
42namespace oomph
43{
44 //=====================================================================
45 /// A class for elements that solve the equations of solid mechanics,
46 /// based on the principle of virtual displacements in
47 /// an axisymmetric formulation. In this case x[0] is the component of
48 /// displacement in the radial direction and x[1] is that in the theta
49 /// direction.
50 //=====================================================================
52 : public virtual SolidFiniteElement
53 {
54 private:
55 /// Static default value for timescale ratio (1.0 -- for natural scaling)
57
58 /// Static default value for damping parameters
59 static double Default_eta_value;
60
61 public:
62 /// Function pointer to function that specifies the body force
63 /// as a function of the Lagrangian coordinates and time FCT(t,xi,b) --
64 /// xi and b are Vectors!
65 typedef void (*BodyForceFctPt)(const double& t,
66 const Vector<double>& xi,
68
69 /// Constructor
78
79 /// Return the constitutive law pointer
84
85 /// Return whether the material is incompressible
86 bool is_incompressible() const
87 {
88 return Incompressible;
89 }
90
91 /// Set the material to be incompressible
93 {
94 Incompressible = true;
95 }
96
97 /// Set the material to be compressible
99 {
100 Incompressible = false;
101 }
102
103 /// Access function for timescale ratio (nondim density)
104 const double& lambda_sq() const
105 {
106 return *Lambda_sq_pt;
107 }
108
109 /// Access function for pointer to timescale ratio (nondim density)
110 double*& lambda_sq_pt()
111 {
112 return Lambda_sq_pt;
113 }
114
115 /// Access function: Pointer to body force function
120
121 /// Access function: Pointer to body force function (const version)
123 {
124 return Body_force_fct_pt;
125 }
126
127 /// Return the mass damping parameter
128 double eta_mass()
129 {
130 return *Eta_mass_pt;
131 }
132
133 /// Access function for mass damping parameter
134 double*& eta_mass_pt()
135 {
136 return Eta_mass_pt;
137 }
138
139 /// Evaluate body force at Lagrangian coordinate xi at present time
140 /// (returns zero vector if no body force function pointer has been set)
141 inline void body_force(const Vector<double>& xi, Vector<double>& b) const
142 {
143 // If no function has been set, return zero vector
144 if (Body_force_fct_pt == 0)
145 {
146 for (unsigned i = 0; i < 2; i++)
147 {
148 b[i] = 0.0;
149 }
150 }
151 else
152 {
153 // Get time from timestepper of first node (note that this must
154 // work -- body force only makes sense for elements that can be
155 // deformed and given that the deformation of solid finite elements
156 // is controlled by their nodes, nodes must exist!)
157 double time = node_pt(0)->time_stepper_pt()->time_pt()->time();
158
159 // Now evaluate the body force
160 (*Body_force_fct_pt)(time, xi, b);
161 }
162 }
163
164 /// Return the stress tensor, as calculated from the constitutive law
165 /// in the Near-incompresible formulation
167 const DenseMatrix<double>& G,
168 DenseMatrix<double>& sigma,
170 double& pressure_stress,
171 double& kappa)
172 {
173#ifdef PARANOID
174 // If the pointer to the constitutive law hasn't been set, issue an error
175 if (Constitutive_law_pt == 0)
176 {
177 std::string error_message =
178 "Elements derived from AxisymmetricPVDEquationsWithPressure";
179 error_message += " must have a constitutive law :\n ";
180 error_message +=
181 "set one using the constitutive_law_pt() member function\n";
182
183 throw OomphLibError(
185 }
186#endif
188 g, G, sigma, Gup, pressure_stress, kappa);
189 }
190
191 /// Return the stress tensor, as calculated from the constitutive law
192 /// in the "true" incompresible formulation
194 const DenseMatrix<double>& G,
195 DenseMatrix<double>& sigma,
197 double& detG)
198 {
199#ifdef PARANOID
200 // If the pointer to the constitutive law hasn't been set, issue an error
201 if (Constitutive_law_pt == 0)
202 {
203 std::string error_message =
204 "Elements derived from AxisymmetricPVDEquationsWithPressure";
205 error_message += " must have a constitutive law :\n ";
206 error_message +=
207 "set one using the constitutive_law_pt() member function\n";
208
209 throw OomphLibError(
211 }
212#endif
214 g, G, sigma, Gup, detG);
215 }
216
217 /// Return the derivative of the
218 /// deviatoric part of the 2nd Piola Kirchhoff stress
219 /// tensor, as calculated from the constitutive law in the nearly
220 /// incompresible formulation. Also return the derivative of the
221 /// generalised dilatation.
223 const DenseMatrix<double>& G,
224 const DenseMatrix<double>& sigma,
225 const double& gen_dil,
226 const double& inv_kappa,
227 const double& interpolated_solid_p,
230
231 {
232#ifdef PARANOID
233 // If the pointer to the constitutive law hasn't been set, issue an error
234 if (this->Constitutive_law_pt == 0)
235 {
236 // Write an error message
237 std::string error_message =
238 "Elements derived from PVDEquationsWithPressure \n";
239 error_message += "must have a constitutive law:\n";
240 error_message +=
241 "set one using the constitutive_law_pt() member function";
242 // Throw the error
243 throw OomphLibError(
245 }
246#endif
247 // Only bother with the symmetric part by passing false as last entry
249 g,
250 G,
251 sigma,
252 gen_dil,
253 inv_kappa,
257 false);
258 }
259
260 /// Return the derivative of the 2nd Piola Kirchhoff stress
261 /// tensor, as calculated from the constitutive law in the
262 /// incompresible formulation. Also return
263 /// derivative of the determinant of the deformed covariant metric tensor
264 /// (likely to be needed in the incompressibility constraint)
266 const DenseMatrix<double>& G,
267 const DenseMatrix<double>& sigma,
268 const double& detG,
269 const double& interpolated_solid_p,
272 {
273#ifdef PARANOID
274 // If the pointer to the constitutive law hasn't been set, issue an error
275 if (this->Constitutive_law_pt == 0)
276 {
277 // Write an error message
278 std::string error_message =
279 "Elements derived from PVDEquationsWithPressure \n";
280 error_message += "must have a constitutive law:\n";
281 error_message +=
282 "set one using the constitutive_law_pt() member function";
283 // Throw the error
284 throw OomphLibError(
286 }
287#endif
288 // Only bother with the symmetric part by passing false as last entry
290 g, G, sigma, detG, interpolated_solid_p, d_sigma_dG, d_detG_dG, false);
291 }
292
293 /// Fill in the residuals by calling the generic function
299
300 /// Fill in the jacobian
307
308 /// Get the strain
310 {
311 // Find out how many nodes there are in the element
312 const unsigned n_node = nnode();
313
314 // Set up memory for the shape and test functions
317
318 // Call the derivatives of the shape functions
320
321 // Calculate the local Lagrangian coordinates, position components
322 // and the derivatives of global position components
323 // wrt lagrangian coordinates, as well as acceleration
327
328 // Calculate displacements and derivatives
329 for (unsigned l = 0; l < n_node; l++)
330 {
331 // Loop over displacement components (deformed position)
332 for (unsigned i = 0; i < 2; i++)
333 {
334 // Set the value of the lagrangian coordinate
336 // Set the value of the position component
338 // Loop over Lagrangian derivative directions
339 for (unsigned j = 0; j < 2; j++)
340 {
341 // Calculate dX[i]/dxi_{j}
343 }
344 }
345 }
346
347 // We are now in a position to calculate the undeformed metric tensor
349 // r row
350 g(0, 0) = 1.0;
351 g(0, 1) = 0.0;
352 g(0, 2) = 0.0;
353 // z row
354 g(1, 0) = 0.0;
355 g(1, 1) = 1.0;
356 g(1, 2) = 0.0;
357 // phi row
358 g(2, 0) = 0.0;
359 g(2, 1) = 0.0;
360 g(2, 2) = interpolated_xi[0] * interpolated_xi[0];
361
362 // Now calculate the deformed metric tensor
364 // r row
365 G(0, 0) = interpolated_dXdxi(0, 0) * interpolated_dXdxi(0, 0) +
367 G(0, 1) = interpolated_dXdxi(0, 0) * interpolated_dXdxi(0, 1) +
369 G(0, 2) = 0.0;
370 // z row
371 G(1, 0) = G(0, 1);
372 G(1, 1) = interpolated_dXdxi(0, 1) * interpolated_dXdxi(0, 1) +
374 G(1, 2) = 0.0;
375 // phi row
376 G(2, 0) = 0.0;
377 G(2, 1) = 0.0;
378 G(2, 2) = interpolated_X[0] * interpolated_X[0];
379
380 // Initialise all entries to zero
381 for (unsigned i = 0; i < 3; i++)
382 {
383 for (unsigned j = 0; j < 3; j++)
384 {
385 strain(i, j) = 0.0;
386 }
387 }
388
389 // Fill in the strain tensor (r and z entries)
390 for (unsigned i = 0; i < 2; i++)
391 {
392 for (unsigned j = 0; j < 2; j++)
393 {
394 strain(i, j) = 0.5 * (G(i, j) - g(i, j));
395 }
396 }
397
398 // Add the phi-phi entry if we're not at the origin
399 if (std::fabs(interpolated_xi[0]) > 1.0e-16 &&
400 std::fabs(interpolated_X[0]) > 1.0e-16)
401 {
402 strain(2, 2) = 0.5 * (G(2, 2) - g(2, 2));
403 }
404 }
405
406 /// Get potential (strain) and kinetic energy
407 void get_energy(double& pot_en, double& kin_en)
408 {
409 // Initialise
410 pot_en = 0;
411 kin_en = 0;
412
413 // Set the value of n_intpt
414 unsigned n_intpt = this->integral_pt()->nweight();
415
416 // Set the Vector to hold local coordinates
417 Vector<double> s(2);
418
419 // Find out how many nodes there are
420 const unsigned n_node = this->nnode();
421
422 // Find out how many pressure dofs there are
423 unsigned n_solid_pres = nsolid_pres();
424
425 // Set up memory for the shape functions
428
429 // Set up memory for the pressure shape functions
431
432 // Timescale ratio (non-dim density)
433 double lambda_sq = this->lambda_sq();
434
435 // Loop over the integration points
436 for (unsigned ipt = 0; ipt < n_intpt; ipt++)
437 {
438 // Assign values of s
439 for (unsigned i = 0; i < 2; i++)
440 {
441 s[i] = this->integral_pt()->knot(ipt, i);
442 }
443
444 // Get the integral weight
445 double w = this->integral_pt()->weight(ipt);
446
447 // Call the derivatives of the shape functions and get Jacobian
448 double J = this->dshape_lagrangian_at_knot(ipt, psi, dpsidxi);
449
450 // Call the pressure shape functions
452
453 // Storage for Lagrangian coordinates and velocity (initialised to zero)
457 Vector<double> veloc(2, 0.0);
458 double interpolated_solid_p = 0.0;
459
460 // Calculate lagrangian coordinates
461 for (unsigned l = 0; l < n_node; l++)
462 {
463 // Loop over displacement components (deformed position)
464 for (unsigned i = 0; i < 2; i++)
465 {
466 // Calculate the Lagrangian coordinates
468
469 // Set the value of the position component
471 // Loop over Lagrangian derivative directions
472 for (unsigned j = 0; j < 2; j++)
473 {
474 // Calculate dX[i]/dxi_{j}
476 }
477
478 // Calculate the velocity components
479 veloc[i] += this->dnodal_position_dt(l, i) * psi(l);
480 }
481 }
482
483 // Calculate the local internal pressure
484 for (unsigned l = 0; l < n_solid_pres; l++)
485 {
487 }
488
489 // We are now in a position to calculate the undeformed metric tensor
491 // r row
492 g(0, 0) = 1.0;
493 g(0, 1) = 0.0;
494 g(0, 2) = 0.0;
495 // z row
496 g(1, 0) = 0.0;
497 g(1, 1) = 1.0;
498 g(1, 2) = 0.0;
499 // phi row
500 g(2, 0) = 0.0;
501 g(2, 1) = 0.0;
502 g(2, 2) = interpolated_xi[0] * interpolated_xi[0];
503
504 // Now multiply the weight by the square-root of the undeformed metric
505 // tensor r
506 double W = w * J * sqrt(g(0, 0) * g(1, 1) * g(2, 2));
507
508 // Now calculate the deformed metric tensor
510 // r row
511 G(0, 0) = interpolated_dXdxi(0, 0) * interpolated_dXdxi(0, 0) +
513 G(0, 1) = interpolated_dXdxi(0, 0) * interpolated_dXdxi(0, 1) +
515 G(0, 2) = 0.0;
516 // z row
517 G(1, 0) = G(0, 1);
518 G(1, 1) = interpolated_dXdxi(0, 1) * interpolated_dXdxi(0, 1) +
520 G(1, 2) = 0.0;
521 // phi row
522 G(2, 0) = 0.0;
523 G(2, 1) = 0.0;
524 G(2, 2) = interpolated_X[0] * interpolated_X[0];
525
526 // Now calculate the deviatoric stress tensor from the constitutive law
528 double detG = 0.0, pressure_stress = 0.0, kappa = 0.0;
529 // If it's incompressible call one form of the constitutive law
530 if (Incompressible)
531 {
533 }
534 // Otherwise call another form
535 else
536 {
538 }
539
540 // Build the stress tensor up from its pressure and deviatoric
541 // components
542 DenseMatrix<double> sigma(3, 3, 0.0);
543 for (unsigned i = 0; i < 3; i++)
544 {
545 for (unsigned j = 0; j < 3; j++)
546 {
547 sigma(i, j) =
548 -1.0 * interpolated_solid_p * Gup(i, j) + sigma_dev(i, j);
549 }
550 }
551
552 // Get the strain
553 DenseMatrix<double> strain(3, 3, 0.0);
554 this->get_strain(s, strain);
555
556 // Initialise
557 double local_pot_en = 0;
558 double veloc_sq = 0;
559
560 // Compute integrals
561 for (unsigned i = 0; i < 3; i++)
562 {
563 for (unsigned j = 0; j < 3; j++)
564 {
565 local_pot_en += sigma(i, j) * strain(i, j);
566 }
567 }
568 veloc_sq = veloc[0] * veloc[0] + veloc[1] * veloc[1];
569
570 pot_en += 0.5 * local_pot_en * W;
571 kin_en += lambda_sq * 0.5 * veloc_sq * W;
572 }
573 }
574
575 /// Return the number of solid pressure degrees of freedom
576 virtual unsigned nsolid_pres() const = 0;
577
578 /// Return the lth solid pressures
579 virtual double solid_p(const unsigned& l) const = 0;
580
581 /// Return the index at which the solid pressure is stored
582 virtual int solid_p_nodal_index() const
583 {
584 return 0;
585 }
586
587 /// Return the residuals for the equations of solid mechanics
590 DenseMatrix<double>& jacobian,
591 const unsigned& flag);
592
593 /// Return the interpolated_solid_pressure
595 {
596 // Find number of nodes
597 unsigned n_solid_pres = nsolid_pres();
598 // Local shape function
600 // Find values of shape function
602
603 // Initialise value of solid_p
604 double interpolated_solid_p = 0.0;
605 // Loop over the local nodes and sum
606 for (unsigned l = 0; l < n_solid_pres; l++)
607 {
609 }
610
611 return (interpolated_solid_p);
612 }
613
614 /// Overload the output function
615 void output(std::ostream& outfile)
616 {
617 // If n_plot is not provided, assume equal to 5 by default
618 const unsigned n_plot = 5;
620 }
621
622 /// Output function
623 void output(std::ostream& outfile, const unsigned& n_plot)
624 {
625 Vector<double> x(2);
626 Vector<double> xi(2);
627 Vector<double> s(2);
629
630 // Tecplot header info
631 outfile << this->tecplot_zone_string(n_plot);
632
633 // Loop over plot points
634 unsigned num_plot_points = this->nplot_points(n_plot);
635 for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
636 {
637 // Get local coordinates of plot point
638 this->get_s_plot(iplot, n_plot, s);
639
640 // Get Eulerian and Lagrangian coordinates
641 this->interpolated_x(s, x);
642 this->interpolated_xi(s, xi);
643
644 // Get the strain matrix
646
647 // Output the r,z
648 for (unsigned i = 0; i < 2; i++)
649 {
650 outfile << x[i] << " ";
651 }
652
653 // Output xi0,xi1
654 for (unsigned i = 0; i < 2; i++)
655 {
656 outfile << xi[i] << " ";
657 }
658
659 // Output unique non-zero components of strain
660 outfile << strain(0, 0) << " " << strain(1, 1) << " " << strain(1, 0)
661 << " " << strain(2, 2) << " ";
662
663 // Output the solid pressure
665
666 outfile << std::endl;
667 }
668
669 // Write tecplot footer (e.g. FE connectivity lists)
670 this->write_tecplot_zone_footer(outfile, n_plot);
671 }
672
673 /// Overload the output function
675 {
676 // If n_plot is not provided, assume equal to 5 by default
677 const unsigned n_plot = 5;
679 }
680
681 /// Output function
682 void output(FILE* file_pt, const unsigned& n_plot) {}
683
684 /// returns the number of DOF types associated with this element.
685 unsigned ndof_types() const
686 {
687 return 3;
688 }
689
690 ///--------Paraview stuff------------------------------------------///
691 /// Number of scalars/fields output by this element. Reimplements
692 /// broken virtual function in base class.
693 unsigned nscalar_paraview() const
694 {
695 return 7;
696 }
697
698 /// Write values of the i-th scalar field at the plot points. Needs
699 /// to be implemented for each new specific element type.
700 void scalar_value_paraview(std::ofstream& file_out,
701 const unsigned& i,
702 const unsigned& nplot) const
703 {
704 // Vector of local coordinates
705 Vector<double> s(2);
706
707 // Lagrangian coordinates
708 Vector<double> xi(2);
709
710 // Container for strain
712
713 // Loop over plot points
715 for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
716 {
717 // Get local coordinates of plot point
719
720 // Get the Lagrangian coordinate
721 interpolated_xi(s, xi);
722
723 // Get the strain
725
726 // Output the Lagrangian coordinates
727 if (i < 2)
728 {
729 file_out << xi[i] << std::endl;
730 }
731 // Strain components
732 else if (i == 2)
733 {
734 file_out << strain(0, 0) << std::endl;
735 }
736 else if (i == 3)
737 {
738 file_out << strain(1, 1) << std::endl;
739 }
740 else if (i == 4)
741 {
742 file_out << strain(0, 1) << std::endl;
743 }
744 else if (i == 5)
745 {
746 file_out << strain(2, 2) << std::endl;
747 }
748 // Solid pressure
749 else if (i == 6)
750 {
751 file_out << interpolated_solid_p(s) << std::endl;
752 }
753 // Never get here
754 else
755 {
756#ifdef PARANOID
757 std::stringstream error_stream;
758 error_stream << "These elements only store " << 5 << " fields, "
759 << "but i is currently " << i << std::endl;
760 throw OomphLibError(error_stream.str(),
763#endif
764 }
765 }
766 }
767
768 /// Name of the i-th scalar field. Default implementation
769 /// returns V1 for the first one, V2 for the second etc. Can (should!) be
770 /// overloaded with more meaningful names in specific elements.
771 std::string scalar_name_paraview(const unsigned& i) const
772 {
773 if (i == 0)
774 {
775 return "Lagrangian coord. r";
776 }
777 else if (i == 1)
778 {
779 return "Lagrangian coord. z";
780 }
781 // Strain components
782 else if (i == 2)
783 {
784 return "Strain r-r";
785 }
786 else if (i == 3)
787 {
788 return "Strain z-z";
789 }
790 else if (i == 4)
791 {
792 return "Strain r-z";
793 }
794 else if (i == 5)
795 {
796 return "Strain phi-phi";
797 }
798 // Solid pressure
799 else if (i == 6)
800 {
801 return "Solid pressure";
802 }
803 // Never get here
804 else
805 {
806 std::stringstream error_stream;
807 error_stream << "These elements only output " << 7 << " fields,\n"
808 << "but i is currently " << i << std::endl;
809 throw OomphLibError(
811 // Dummy return
812 return " ";
813 }
814 }
815
816 protected:
817 /// Pointer to constitutive law
819
820 /// Boolean to determine whether the solid is incompressible or not
822
823 /// Timescale ratio (non-dim. density)
825
826 /// Pointer to the mass damping parameter
827 double* Eta_mass_pt;
828
829 /// Pointer to body force function
831
832 /// Access function that returns the local equation number for
833 /// the n-th solid pressure value.
834 virtual int solid_p_local_eqn(const unsigned& i) const = 0;
835
836 /// Return the solid pressure shape functions
837 virtual void solid_pshape(const Vector<double>& s, Shape& psi) const = 0;
838
839 /// Return the stored solid shape functions at the knots
840 void solid_pshape_at_knot(const unsigned& ipt, Shape& psi) const;
841 };
842
843 //============================================================
844 /// AxisymCylindricalPVDWithPressureElement upgraded to become projectable
845 //============================================================
846 template<class PVD_ELEMENT>
848 : public virtual ProjectableElement<PVD_ELEMENT>
849 {
850 public:
851 /// Constructor [this was only required explicitly
852 /// from gcc 4.5.2 onwards...]
854
855 /// Specify the values associated with field fld.
856 /// The information is returned in a vector of pairs which comprise
857 /// the Data object and the value within it, that correspond to field
858 /// fld. In the underlying PVD elements there are no field values
860 {
861 // Create the vector
863
864 // Loop over all vertex nodes
865 const unsigned n_solid_pres = this->nsolid_pres();
866 for (unsigned j = 0; j < n_solid_pres; j++)
867 {
868 // Add the data value associated with the pressure components
869 unsigned vertex_index = this->Pconv[j];
870 data_values.push_back(std::make_pair(this->node_pt(vertex_index), 0));
871 }
872
873 // Return the vector
874 return data_values;
875 }
876
877 /// Number of fields to be projected: 1 (pressure)
879 {
880 return 1;
881 }
882
883 /// Number of history values to be stored for fld-th field
884 /// (Includes the current value!). No nodal data.
885 unsigned nhistory_values_for_projection(const unsigned& fld)
886 {
887 return 1;
888 }
889
890 /// Number of positional history values (Includes the current value!)
895
896 /// Return Jacobian of mapping and shape functions of field fld
897 /// at local coordinate s
898 double jacobian_and_shape_of_field(const unsigned& fld,
899 const Vector<double>& s,
900 Shape& psi)
901 {
902 // Get the solid pressure shape function
903 this->solid_pshape(s, psi);
904 // Return the Jacobian of the eulerian mapping
905 return this->J_eulerian(s);
906 }
907
908 /// Return interpolated field fld at local coordinate s, at time
909 /// level t (t=0: present; t>0: history values)
910 double get_field(const unsigned& t,
911 const unsigned& fld,
912 const Vector<double>& s)
913 {
914 return this->interpolated_solid_p(s);
915 }
916
917
918 /// Return number of values in field fld
919 unsigned nvalue_of_field(const unsigned& fld)
920 {
921 return this->nsolid_pres();
922 }
923
924
925 /// Return local equation number of value j in field fld.
926 int local_equation(const unsigned& fld, const unsigned& j)
927 {
928 return this->solid_p_local_eqn(j);
929 }
930 };
931
932
933 //=======================================================================
934 /// Face geometry for element is the same as that for the underlying
935 /// wrapped element
936 //=======================================================================
937 template<class ELEMENT>
940 : public virtual FaceGeometry<ELEMENT>
941 {
942 public:
943 FaceGeometry() : FaceGeometry<ELEMENT>() {}
944 };
945
946
947 //=======================================================================
948 /// Face geometry of the Face Geometry for element is the same as
949 /// that for the underlying wrapped element
950 //=======================================================================
951 template<class ELEMENT>
954 : public virtual FaceGeometry<FaceGeometry<ELEMENT>>
955 {
956 public:
958 };
959
960
961 //===========================================================================
962 /// QElements
963 //===========================================================================
965 : public virtual SolidQElement<2, 3>,
967 {
968 private:
969 /// Static array of ints to hold number of variables at node
970 static const unsigned Initial_Nvalue[];
971
972 /// Unpin all solid pressure dofs in the element
974 {
975 // find the index at which the pressure is stored
976 int p_index = this->solid_p_nodal_index();
977 unsigned n_node = this->nnode();
978 // loop over nodes
979 for (unsigned n = 0; n < n_node; n++)
980 {
981 this->node_pt(n)->unpin(p_index);
982 }
983 }
984
985 protected:
986 /// Static array of ints to hold conversion from pressure node
987 /// numbers to actual node numbers
988 static const unsigned Pconv[];
989
990 /// Overload the access function
991 /// that is used to return local equation corresponding to the i-th
992 /// solid pressure value
993 inline int solid_p_local_eqn(const unsigned& i) const
994 {
995 return this->nodal_local_eqn(Pconv[i], this->solid_p_nodal_index());
996 }
997
998 /// Pressure shape functions at local coordinate s
999 inline void solid_pshape(const Vector<double>& s, Shape& psi) const;
1000
1001 public:
1002 /// Constructor, there are no internal data points
1007
1008 /// Set the value at which the solid pressure is stored in the nodes
1009 inline int solid_p_nodal_index() const
1010 {
1011 return 0;
1012 }
1013
1014 /// Number of values (pinned or dofs) required at node n. Can
1015 /// be overwritten for hanging node version
1016 inline virtual unsigned required_nvalue(const unsigned& n) const
1017 {
1018 return Initial_Nvalue[n];
1019 }
1020
1021 /// Return the l-th pressure value, make sure to use the hanging
1022 /// representation if there is one!
1023 double solid_p(const unsigned& l) const
1024 {
1025 return this->nodal_value(Pconv[l], this->solid_p_nodal_index());
1026 }
1027
1028 /// Set the l-th solid pressure value to p_value
1029 void set_solid_p(const unsigned& l, const double& p_value)
1030 {
1031 this->node_pt(Pconv[l])->set_value(this->solid_p_nodal_index(), p_value);
1032 }
1033
1034 /// Return number of pressure values
1035 unsigned nsolid_pres() const
1036 {
1037 return 4;
1038 }
1039
1040 /// Fix the pressure dof l to be the value pvalue
1041 void fix_solid_pressure(const unsigned& l, const double& pvalue)
1042 {
1043 this->node_pt(Pconv[l])->pin(this->solid_p_nodal_index());
1044 this->node_pt(Pconv[l])->set_value(this->solid_p_nodal_index(), pvalue);
1045 }
1046
1047 /// Output function
1052
1053 /// Output function
1054 void output(std::ostream& outfile, const unsigned& n_plot)
1055 {
1057 }
1058
1059 /// C-style output function
1064
1065 /// C-style output function
1070 };
1071
1072 //===============================================================
1073 /// Pressure shape functions for QElements
1074 //===============================================================
1076 const Vector<double>& s, Shape& psi) const
1077 {
1078 // Local storage
1079 double psi1[2], psi2[2];
1080 // Call the OneDimensional Shape functions
1083
1084 // Now let's loop over the nodal points in the element
1085 // s1 is the "x" coordinate, s2 the "y"
1086 for (unsigned i = 0; i < 2; i++)
1087 {
1088 for (unsigned j = 0; j < 2; j++)
1089 {
1090 /*Multiply the two 1D functions together to get the 2D function*/
1091 psi[2 * i + j] = psi2[i] * psi1[j];
1092 }
1093 }
1094 }
1095
1096 //============================================================================
1097 /// FaceGeometry of a QAxisymCylindricalPVDElement
1098 //============================================================================
1099 template<>
1101 : public virtual SolidQElement<1, 3>
1102 {
1103 public:
1104 /// Constructor must call the constructor of the underlying solid element
1106 };
1107
1108
1109 //============================================================================
1110 /// FaceGeometry of the FaceGeometry of a QAxisymCylindricalPVDElement
1111 //============================================================================
1112 template<>
1115 : public virtual PointElement
1116 {
1117 public:
1118 // Make sure that we call the constructor of the SolidQElement
1119 // Only the Intel compiler seems to need this!
1121 };
1122
1123
1124 //===========================================================================
1125 /// An Element that solves the axisymmetric solid mechanics equations,
1126 /// based on the principle of virtual displacements in cylindrical polar
1127 /// coordinates, using SolidTElements for the interpolation of the
1128 /// variable positions.
1129 //============================================================================
1131 : public virtual SolidTElement<2, 3>,
1133 public virtual ElementWithZ2ErrorEstimator
1134 {
1135 private:
1136 /// Static array of ints to hold number of variables at node
1137 static const unsigned Initial_Nvalue[];
1138
1139 /// Unpin all solid pressure dofs in the element
1141 {
1142 // find the index at which the pressure is stored
1143 int p_index = this->solid_p_nodal_index();
1144 unsigned n_node = this->nnode();
1145 // loop over nodes
1146 for (unsigned n = 0; n < n_node; n++)
1147 {
1148 this->node_pt(n)->unpin(p_index);
1149 }
1150 }
1151
1152 protected:
1153 /// Static array of ints to hold conversion from pressure
1154 /// node numbers to actual node numbers
1155 static const unsigned Pconv[];
1156
1157 /// Overload the access function
1158 /// that is used to return local equation corresponding to the i-th
1159 /// solid pressure value
1160 inline int solid_p_local_eqn(const unsigned& i) const
1161 {
1162 return this->nodal_local_eqn(Pconv[i], this->solid_p_nodal_index());
1163 }
1164
1165 /// Pressure shape functions at local coordinate s
1166 inline void solid_pshape(const Vector<double>& s, Shape& psi) const;
1167
1168 public:
1169 /// Constructor, there are no internal data points
1174
1175 /// Set the value at which the solid pressure is stored in the nodes
1176 inline int solid_p_nodal_index() const
1177 {
1178 return 0;
1179 }
1180
1181 /// Number of values (pinned or dofs) required at node n. Can
1182 /// be overwritten for hanging node version
1183 inline virtual unsigned required_nvalue(const unsigned& n) const
1184 {
1185 return Initial_Nvalue[n];
1186 }
1187
1188 /// Return the l-th pressure value, make sure to use the hanging
1189 /// representation if there is one!
1190 double solid_p(const unsigned& l) const
1191 {
1192 return this->nodal_value(Pconv[l], this->solid_p_nodal_index());
1193 }
1194
1195 /// Set the l-th solid pressure value to p_value
1196 void set_solid_p(const unsigned& l, const double& p_value)
1197 {
1198 this->node_pt(Pconv[l])->set_value(this->solid_p_nodal_index(), p_value);
1199 }
1200
1201 /// Return number of pressure values
1202 unsigned nsolid_pres() const
1203 {
1204 return 3;
1205 }
1206
1207 /// Fix the pressure dof l to be the value pvalue
1208 void fix_solid_pressure(const unsigned& l, const double& pvalue)
1209 {
1210 this->node_pt(Pconv[l])->pin(this->solid_p_nodal_index());
1211 this->node_pt(Pconv[l])->set_value(this->solid_p_nodal_index(), pvalue);
1212 }
1213
1214 /// Output function
1219
1220 /// Output function
1221 void output(std::ostream& outfile, const unsigned& n_plot)
1222 {
1224 }
1225
1226
1227 /// C-style output function
1232
1233 /// C-style output function
1238
1239 /// Order of recovery shape functions for Z2 error estimation:
1240 /// Same order as shape functions.
1242 {
1243 return 2;
1244 }
1245
1246 /// Number of vertex nodes in the element
1247 unsigned nvertex_node() const
1248 {
1250 }
1251
1252 /// Pointer to the j-th vertex node in the element
1253 Node* vertex_node_pt(const unsigned& j) const
1254 {
1256 }
1257
1258 /// Function to describe the local dofs of the element. The ostream
1259 /// specifies the output stream to which the description
1260 /// is written; the string stores the currently
1261 /// assembled output that is ultimately written to the
1262 /// output stream by Data::desribe_dofs(...); it is typically
1263 /// built up incrementally as we descend through the
1264 /// call hierarchy of this function when called from
1265 /// Problem::describe_dofs(...)
1267
1268 /// Number of 'flux' terms for Z2 error estimation
1270 {
1271 // Six flux terms
1272 return 4;
1273 }
1274
1275 /// Get 'flux' for Z2 error recovery: Upper triangular entries
1276 /// in strain tensor.
1278 {
1279#ifdef PARANOID
1280 unsigned num_entries = 4;
1281 if (flux.size() != num_entries)
1282 {
1283 std::ostringstream error_message;
1284 error_message << "The flux vector has the wrong number of entries, "
1285 << flux.size() << ", whereas it should be " << num_entries
1286 << std::endl;
1287 throw OomphLibError(error_message.str(),
1290 }
1291#endif
1292
1293 // Get strain matrix
1295 this->get_strain(s, strain);
1296
1297 // Pack into flux Vector
1298 unsigned icount = 0;
1299
1300 // Start with diagonal terms
1301 for (unsigned i = 0; i < 3; i++)
1302 {
1303 flux[icount] = strain(i, i);
1304 icount++;
1305 }
1306
1307 // Only non-zero off-diagonal
1308 flux[icount] = strain(0, 1);
1309 }
1310 };
1311
1312 //==========================================================================
1313 /// Pressure shape functions
1314 //==========================================================================
1316 const Vector<double>& s, Shape& psi) const
1317 {
1318 psi[0] = s[0];
1319 psi[1] = s[1];
1320 psi[2] = 1.0 - s[0] - s[1];
1321 }
1322
1323
1324 //============================================================================
1325 /// FaceGeometry of a TAxisymCylindricalPVDElement
1326 //============================================================================
1327 template<>
1329 : public virtual SolidTElement<1, 3>
1330 {
1331 public:
1332 /// Constructor must call the constructor of the underlying solid
1333 /// element
1335 };
1336
1337
1338 //============================================================================
1339 /// FaceGeometry of the FaceGeometry of the TAxisymCylindricalPVDElement
1340 //============================================================================
1341 template<>
1343 : public virtual PointElement
1344 {
1345 public:
1346 // Make sure that we call the constructor of the SolidQElement
1347 // Only the Intel compiler seems to need this!
1349 };
1350} // namespace oomph
1351
1352#endif
static char t char * s
Definition cfortran.h:568
cstr elem_len * i
Definition cfortran.h:603
char t
Definition cfortran.h:568
A class for elements that solve the equations of solid mechanics, based on the principle of virtual d...
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 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...
unsigned ndof_types() const
returns the number of DOF types associated with this element.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the residuals by calling the generic function.
virtual void solid_pshape(const Vector< double > &s, Shape &psi) const =0
Return the solid pressure shape functions.
std::string scalar_name_paraview(const unsigned &i) const
Name of the i-th scalar field. Default implementation returns V1 for the first one,...
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 get_strain(const Vector< double > &s, DenseMatrix< double > &strain) const
Get the strain.
BodyForceFctPt body_force_fct_pt() const
Access function: Pointer to body force function (const version)
BodyForceFctPt & body_force_fct_pt()
Access function: Pointer to body force function.
double interpolated_solid_p(const Vector< double > &s) const
Return the interpolated_solid_pressure.
void solid_pshape_at_knot(const unsigned &ipt, Shape &psi) const
Return the stored solid shape functions at the knots.
bool is_incompressible() const
Return whether the material is incompressible.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in the jacobian.
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...
virtual int solid_p_local_eqn(const unsigned &i) const =0
Access function that returns the local equation number for the n-th solid pressure value.
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 double solid_p(const unsigned &l) const =0
Return the lth solid pressures.
double *& lambda_sq_pt()
Access function for pointer to timescale ratio (nondim density)
ConstitutiveLaw *& constitutive_law_pt()
Return the constitutive law pointer.
static double Default_eta_value
Static default value for damping parameters.
void get_energy(double &pot_en, double &kin_en)
Get potential (strain) and kinetic energy.
bool Incompressible
Boolean to determine whether the solid is incompressible or not.
unsigned nscalar_paraview() const
-----—Paraview stuff---------------------------------------—/// Number of scalars/fields output by th...
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
void scalar_value_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specif...
static double Default_lambda_sq_value
Static default value for timescale ratio (1.0 – for natural scaling)
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...
virtual void fill_in_contribution_to_residuals_axisym_pvd_with_pressure(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Return the residuals for the equations of solid mechanics.
virtual int solid_p_nodal_index() const
Return the index at which the solid pressure is stored.
virtual unsigned nsolid_pres() const =0
Return the number of solid pressure degrees of freedom.
void output(FILE *file_pt, const unsigned &n_plot)
Output function.
const double & lambda_sq() const
Access function for timescale ratio (nondim density)
A class for constitutive laws for elements that solve the equations of solid mechanics based upon the...
virtual void calculate_d_second_piola_kirchhoff_stress_dG(const DenseMatrix< double > &g, const DenseMatrix< double > &G, const DenseMatrix< double > &sigma, RankFourTensor< double > &d_sigma_dG, const bool &symmetrize_tensor=true)
Calculate the derivatives of the contravariant 2nd Piola Kirchhoff stress tensor with respect to the ...
virtual void calculate_second_piola_kirchhoff_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma)=0
Calculate the contravariant 2nd Piola Kirchhoff stress tensor. Arguments are the covariant undeformed...
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
Definition shape.h:278
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
Definition nodes.h:238
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
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...
Definition nodes.h:271
Base class for finite elements that can compute the quantities that are required for the Z2 error est...
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
FaceGeometry()
Constructor must call the constructor of the underlying solid element.
FaceGeometry class definition: This policy class is used to allow construction of face elements that ...
Definition elements.h:5002
virtual unsigned nplot_points_paraview(const unsigned &nplot) const
Return the number of actual plot points for paraview plot with parameter nplot. Broken virtual; can b...
Definition elements.h:2866
virtual double J_eulerian(const Vector< double > &s) const
Return the Jacobian of mapping from local to global coordinates at local position s.
Definition elements.cc:4133
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition elements.h:1967
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...
Definition elements.h:2597
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction")
Definition elements.h:3165
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
Definition elements.cc:4320
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
Definition elements.cc:3992
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.
Definition elements.h:1436
unsigned nnode() const
Return the number of nodes.
Definition elements.h:2214
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
Definition elements.h:3152
virtual unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction")
Definition elements.h:3190
double nodal_position(const unsigned &n, const unsigned &i) const
Return the i-th coordinate at local node n. If the node is hanging, the appropriate interpolation is ...
Definition elements.h:2321
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition elements.h:2179
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Add tecplot zone "footer" to output stream (when plotting nplot points in each "coordinate direction"...
Definition elements.h:3178
double dnodal_position_dt(const unsigned &n, const unsigned &i) const
Return the i-th component of nodal velocity: dx/dt at local node n.
Definition elements.h:2337
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
Definition elements.h:227
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...
Definition nodes.h:906
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
Definition nodes.h:1022
An OomphLibError object which should be thrown when an run-time error is encountered....
Point element has just a single node and a single shape function which is identically equal to one.
Definition elements.h:3443
AxisymCylindricalPVDWithPressureElement upgraded to become projectable.
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.
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 nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
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.
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 nfields_for_projection()
Number of fields to be projected: 1 (pressure)
ProjectableAxisymCylindricalPVDWithPressureElement()
Constructor [this was only required explicitly from gcc 4.5.2 onwards...].
unsigned nhistory_values_for_projection(const unsigned &fld)
Number of history values to be stored for fld-th field (Includes the current value!...
Wrapper class for projectable elements. Adds "projectability" to the underlying ELEMENT.
Definition projection.h:183
void set_solid_p(const unsigned &l, const double &p_value)
Set the l-th solid pressure value to p_value.
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 fix_solid_pressure(const unsigned &l, const double &pvalue)
Fix the pressure dof l to be the value pvalue.
void solid_pshape(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
void unpin_elemental_solid_pressure_dofs()
Unpin all solid pressure dofs in the element.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
double solid_p(const unsigned &l) const
Return the l-th pressure value, make sure to use the hanging representation if there is one!
int solid_p_nodal_index() const
Set the value at which the solid pressure is stored in the nodes.
static const unsigned Initial_Nvalue[]
Static array of ints to hold number of variables at node.
static const unsigned Pconv[]
Static array of ints to hold conversion from pressure node numbers to actual node numbers.
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 output(FILE *file_pt, const unsigned &n_plot)
C-style output function.
QAxisymmetricCylindricalPVDWithPressureElement()
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...
Definition shape.h:76
SolidFiniteElement class.
Definition elements.h:3565
double lagrangian_position(const unsigned &n, const unsigned &i) const
Return i-th Lagrangian coordinate at local node n.
Definition elements.h:3909
double dshape_lagrangian(const Vector< double > &s, Shape &psi, DShape &dpsidxi) const
Calculate shape functions and derivatives w.r.t. Lagrangian coordinates at local coordinate s....
Definition elements.cc:6741
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.
Definition elements.cc:7135
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-...
Definition elements.cc:6768
void describe_local_dofs(std::ostream &out, const std::string &current_string) const
Function to describe the local dofs of the element. The ostream specifies the output stream to which ...
Definition elements.cc:6545
SolidQElement elements are quadrilateral elements whose derivatives also include those based upon the...
Definition Qelements.h:1742
SolidTElement elements are triangular/tet elements whose derivatives also include those based upon th...
Definition Telements.h:3728
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
An Element that solves the axisymmetric solid mechanics equations, based on the principle of virtual ...
void unpin_elemental_solid_pressure_dofs()
Unpin all solid pressure dofs in the element.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
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 solid_pshape(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
void output(FILE *file_pt, const unsigned &n_plot)
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.
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...
TAxisymCylindricalPVDWithPressureElement()
Constructor, there are no internal data points.
void set_solid_p(const unsigned &l, const double &p_value)
Set the l-th solid pressure value to p_value.
unsigned nvertex_node() const
Number of vertex nodes in the element.
static const unsigned Initial_Nvalue[]
Static array of ints to hold number of variables at node.
int solid_p_nodal_index() const
Set the value at which the solid pressure is stored in the nodes.
void fix_solid_pressure(const unsigned &l, const double &pvalue)
Fix the pressure dof l to be the value pvalue.
double solid_p(const unsigned &l) const
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)
Output function.
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
static const unsigned Pconv[]
Static array of ints to hold conversion from pressure node numbers to actual node numbers.
General TElement class.
Definition Telements.h:1208
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)
Definition shape.h:608
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).