refineable_axisym_cylindrical_solid_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// Include guard to prevent multiple inclusions of this header
28#ifndef OOMPH_REFINEABLE_AXISYM_CYLINDRICAL_ELASTICITY_ELEMENTS_HEADER
29#define OOMPH_REFINEABLE_AXISYM_CYLINDRICAL_ELASTICITY_ELEMENTS_HEADER
30
31// oomph-lib headers
33#include "../generic/refineable_quad_element.h"
34#include "../generic/refineable_brick_element.h"
35#include "../generic/error_estimator.h"
36
37namespace oomph
38{
39 //========================================================================
40 /// Class for Refineable axisymmetric PVD equations in cylindrical coords
41 //========================================================================
44 public virtual RefineableSolidElement,
45 public virtual ElementWithZ2ErrorEstimator
46 {
47 public:
48 /// Constructor
56
57 /// Call the residuals including hanging node cases
60 DenseMatrix<double>& jacobian,
61 const unsigned& flag);
62
63 /// No values are interpolated in this element (pure solid)
64 void get_interpolated_values(const unsigned& t,
65 const Vector<double>& s,
66 Vector<double>& values)
67 {
68 values.clear();
69 }
70
71 /// No values are interpolated in this element (pure solid)
73 Vector<double>& values)
74 {
75 values.clear();
76 }
77
78 /// Number of 'flux' terms for Z2 error estimation
80 {
81 return 4;
82 }
83
84 /// Get 'flux' for Z2 error recovery: Upper triangular entries
85 /// in strain tensor.
87 {
88#ifdef PARANOID
89 unsigned num_entries = 4;
90 if (flux.size() != num_entries)
91 {
92 std::ostringstream error_message;
93 error_message << "The flux vector has the wrong number of entries, "
94 << flux.size() << ", whereas it should be " << num_entries
95 << std::endl;
96 throw OomphLibError(error_message.str(),
99 }
100#endif
101
102 // Get strain matrix
104 this->get_strain(s, strain);
105
106 // Pack into flux Vector
107 unsigned icount = 0;
108
109 // Start with diagonal terms
110 for (unsigned i = 0; i < 3; i++)
111 {
112 flux[icount] = strain(i, i);
113 icount++;
114 }
115
116 // Only non-zero off-diagonal
117 flux[icount] = strain(0, 1);
118 }
119
120 /// Number of continuously interpolated values: 0 (pure solid problem)
122 {
123 return 0;
124 }
125
126 /// Further build function, pass the pointers down to the sons
128 {
131 this->father_element_pt());
132
133 // Do whatever needs to be done in the base class
135
136 // Set pointer to body force function
137 this->Body_force_fct_pt = cast_father_element_pt->body_force_fct_pt();
138
139 // Set pointer to the contitutive law
140 this->Constitutive_law_pt = cast_father_element_pt->constitutive_law_pt();
141
142 // Set the timescale ratio (non-dim. density)
143 this->Lambda_sq_pt = cast_father_element_pt->lambda_sq_pt();
144
145 // Set the mass damping parameter
146 this->Eta_mass_pt = cast_father_element_pt->eta_mass_pt();
147 }
148 };
149
150 //========================================================================
151 /// Class for refineable QPVDElement elements
152 //========================================================================
153 template<unsigned NNODE_1D>
155 : public virtual QAxisymmetricCylindricalPVDElement<NNODE_1D>,
157 public virtual RefineableSolidQElement<2>
158 {
159 public:
160 /// Constructor:
169
170 /// Empty rebuild from sons, no need to reconstruct anything here
171 void rebuild_from_sons(Mesh*& mesh_pt) {}
172
173 /// Number of vertex nodes in the element
178
179 /// Pointer to the j-th vertex node in the element
184
185 /// Order of recovery shape functions for Z2 error estimation:
186 /// Same order as shape functions.
188 {
189 return NNODE_1D - 1;
190 }
191
192 /// No additional hanging node procedures are required
193 /// for the solid elements.
195 };
196
197 //==============================================================
198 /// FaceGeometry of the
199 /// RefineableQAxisymmetricPVDElement
200 //==============================================================
201 template<unsigned NNODE_1D>
203 : public virtual SolidQElement<1, NNODE_1D>
204 {
205 public:
206 // Make sure that we call the constructor of the SolidQElement
207 // Only the Intel compiler seems to need this!
209 };
210
211 //==============================================================
212 /// FaceGeometry of the FaceGeometry of the
213 /// RefineableQAxisymmetricPVDElement
214 //==============================================================
215 template<unsigned NNODE_1D>
218 : public virtual PointElement
219 {
220 public:
221 // Make sure that we call the constructor of the SolidQElement
222 // Only the Intel compiler seems to need this!
224 };
225
226} // namespace oomph
227
228#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...
ConstitutiveLaw * Constitutive_law_pt
Pointer to constitutive law.
BodyForceFctPt & body_force_fct_pt()
Access function: Pointer to body force function.
void get_strain(const Vector< double > &s, DenseMatrix< double > &strain) const
Get the strain.
BodyForceFctPt Body_force_fct_pt
Pointer to body force function.
double * Eta_mass_pt
Pointer to the mass damping parameter.
ConstitutiveLaw *& constitutive_law_pt()
Return the constitutive law pointer.
double *& lambda_sq_pt()
Access function for pointer to timescale ratio (nondim density)
double * Lambda_sq_pt
Timescale ratio (non-dim. density)
double *& eta_mass_pt()
Access function for mass damping parameter.
Base class for finite elements that can compute the quantities that are required for the Z2 error est...
FaceGeometry class definition: This policy class is used to allow construction of face elements that ...
Definition elements.h:5002
virtual unsigned nvertex_node() const
Return the number of vertex nodes in this element. Broken virtual function in "pure" finite elements.
Definition elements.h:2495
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
Definition elements.cc:4320
virtual Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element. Broken virtual function in "pure" finite elements.
Definition elements.h:2504
A general mesh class.
Definition mesh.h:67
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
Definition nodes.h:906
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
Class for Refineable axisymmetric PVD equations in cylindrical coords.
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Get 'flux' for Z2 error recovery: Upper triangular entries in strain tensor.
void get_interpolated_values(const unsigned &t, const Vector< double > &s, Vector< double > &values)
No values are interpolated in this element (pure solid)
void further_build()
Further build function, pass the pointers down to the sons.
unsigned ncont_interpolated_values() const
Number of continuously interpolated values: 0 (pure solid problem)
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
void fill_in_contribution_to_residuals_axisym_pvd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Call the residuals including hanging node cases.
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
No values are interpolated in this element (pure solid)
RefineableElements are FiniteElements that may be subdivided into children to provide a better local ...
virtual RefineableElement * father_element_pt() const
Return a pointer to the father element.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
unsigned nvertex_node() const
Number of vertex nodes in the element.
void rebuild_from_sons(Mesh *&mesh_pt)
Empty rebuild from sons, no need to reconstruct anything here.
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
void further_setup_hanging_nodes()
No additional hanging node procedures are required for the solid elements.
RefineableSolidElements are SolidFiniteElements that may be subdivided into children to provide a bet...
virtual void further_build()
Further build: Pass the father's Use_undeformed_macro_element_for_new_lagrangian_coords flag down,...
A class that is used to template the solid refineable Q elements by dimension. It's really nothing mo...
Definition Qelements.h:2286
SolidQElement elements are quadrilateral elements whose derivatives also include those based upon the...
Definition Qelements.h:1742
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).