29 #ifndef OOMPH_REFINEABLE_LINEAR_ELASTICITY_ELEMENTS_HEADER
30 #define OOMPH_REFINEABLE_LINEAR_ELASTICITY_ELEMENTS_HEADER
34 #include "../generic/refineable_quad_element.h"
35 #include "../generic/refineable_brick_element.h"
36 #include "../generic/error_estimator.h"
43 template<
unsigned DIM>
68 values.resize(
DIM, 0.0);
71 unsigned n_node = this->
nnode();
78 for (
unsigned i = 0;
i <
DIM;
i++)
82 for (
unsigned l = 0; l < n_node; l++)
84 values[
i] += this->
nodal_value(t, l, u_nodal_index) * psi(l);
113 if (
flux.size() != num_entries)
115 std::ostringstream error_message;
116 error_message <<
"The flux vector has the wrong number of entries, "
117 <<
flux.size() <<
", whereas it should be " << num_entries
133 for (
unsigned i = 0;
i <
DIM;
i++)
135 flux[icount] = strain(
i,
i);
140 for (
unsigned i = 0;
i <
DIM;
i++)
142 for (
unsigned j =
i + 1;
j <
DIM;
j++)
144 flux[icount] = strain(
i,
j);
192 template<
unsigned DIM,
unsigned NNODE_1D>
238 template<
unsigned DIM>
308 std::ostream& outfile,
318 template<
unsigned NNODE_1D>
320 :
public virtual QElement<1, NNODE_1D>
332 template<
unsigned NNODE_1D>
347 template<
unsigned NNODE_1D>
349 :
public virtual QElement<2, NNODE_1D>
361 template<
unsigned NNODE_1D>
364 :
public virtual QElement<1, NNODE_1D>
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Definition: error_estimator.h:79
FaceGeometry()
Definition: refineable_linear_elasticity_elements.h:340
FaceGeometry()
Definition: refineable_linear_elasticity_elements.h:369
FaceGeometry()
Definition: refineable_linear_elasticity_elements.h:325
FaceGeometry()
Definition: refineable_linear_elasticity_elements.h:354
Definition: elements.h:4998
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593
virtual unsigned nvertex_node() const
Definition: elements.h:2491
virtual void shape(const Vector< double > &s, Shape &psi) const =0
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Definition: elements.h:1759
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
virtual Node * vertex_node_pt(const unsigned &j) const
Definition: elements.h:2500
virtual void set_integration_scheme(Integral *const &integral_pt)
Set the spatial integration scheme.
Definition: elements.cc:3210
Definition: integral.h:1281
ElasticityTensor * Elasticity_tensor_pt
Pointer to the elasticity tensor.
Definition: linear_elasticity_elements.h:352
double *& lambda_sq_pt()
Access function for pointer to timescale ratio (nondim density)
Definition: linear_elasticity_elements.h:195
ElasticityTensor *& elasticity_tensor_pt()
Return the pointer to the elasticity_tensor.
Definition: linear_elasticity_elements.h:174
double * Lambda_sq_pt
Timescale ratio (non-dim. density)
Definition: linear_elasticity_elements.h:355
void get_strain(const Vector< double > &s, DenseMatrix< double > &strain) const
Return the strain tensor.
Definition: linear_elasticity_elements.cc:47
BodyForceFctPt Body_force_fct_pt
Pointer to body force function.
Definition: linear_elasticity_elements.h:361
bool is_inertia_enabled() const
Access function to flag that switches inertia on/off (const version)
Definition: linear_elasticity_elements.h:226
void interpolated_u_linear_elasticity(const Vector< double > &s, Vector< double > &disp) const
Compute vector of FE interpolated displacement u at local coordinate s.
Definition: linear_elasticity_elements.h:98
bool Unsteady
Flag that switches inertia on/off.
Definition: linear_elasticity_elements.h:358
BodyForceFctPt & body_force_fct_pt()
Access function: Pointer to body force function.
Definition: linear_elasticity_elements.h:201
virtual unsigned u_index_linear_elasticity(const unsigned i) const
Definition: linear_elasticity_elements.h:62
Definition: linear_elasticity_elements.h:380
Definition: oomph_definitions.h:222
Definition: Qelements.h:2274
p-refineable version of 2D QLinearElasticityElement elements
Definition: refineable_linear_elasticity_elements.h:243
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
Definition: refineable_linear_elasticity_elements.h:288
PRefineableQLinearElasticityElement()
Constructor, simply call the other constructors.
Definition: refineable_linear_elasticity_elements.h:246
PRefineableQLinearElasticityElement(const PRefineableQLinearElasticityElement< DIM > &dummy)=delete
Broken copy constructor.
unsigned nvertex_node() const
Number of vertex nodes in the element.
Definition: refineable_linear_elasticity_elements.h:282
void further_build()
Broken assignment operator.
Definition: refineable_linear_elasticity_elements.cc:383
void compute_energy_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_grad_pt, double &error, double &norm)
Get error against and norm of exact solution.
Definition: refineable_linear_elasticity_elements.cc:297
~PRefineableQLinearElasticityElement()
Destructor (to avoid memory leaks)
Definition: refineable_linear_elasticity_elements.h:259
unsigned ncont_interpolated_values() const
Number of continuously interpolated values: 1.
Definition: refineable_linear_elasticity_elements.h:276
unsigned nrecovery_order()
Definition: refineable_linear_elasticity_elements.h:302
Definition: elements.h:3439
Definition: Qelements.h:459
Definition: linear_elasticity_elements.h:487
Definition: refineable_elements.h:97
virtual RefineableElement * father_element_pt() const
Return a pointer to the father element.
Definition: refineable_elements.h:539
Class for Refineable LinearElasticity equations.
Definition: refineable_linear_elasticity_elements.h:48
unsigned ncont_interpolated_values() const
Number of continuously interpolated values: DIM.
Definition: refineable_linear_elasticity_elements.h:151
void further_build()
Further build function, pass the pointers down to the sons.
Definition: refineable_linear_elasticity_elements.h:157
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
Definition: refineable_linear_elasticity_elements.h:101
RefineableLinearElasticityEquations()
Constructor.
Definition: refineable_linear_elasticity_elements.h:51
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: refineable_linear_elasticity_elements.h:109
void get_interpolated_values(const unsigned &t, const Vector< double > &s, Vector< double > &values)
Definition: refineable_linear_elasticity_elements.h:63
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Definition: refineable_linear_elasticity_elements.h:93
void fill_in_generic_contribution_to_residuals_linear_elasticity(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Overloaded helper function to take hanging nodes into account.
Definition: refineable_linear_elasticity_elements.cc:39
Definition: Qelements.h:2259
Class for refineable QLinearElasticityElement elements.
Definition: refineable_linear_elasticity_elements.h:197
void further_setup_hanging_nodes()
No additional hanging node procedures are required.
Definition: refineable_linear_elasticity_elements.h:231
void rebuild_from_sons(Mesh *&mesh_pt)
Empty rebuild from sons, no need to reconstruct anything here.
Definition: refineable_linear_elasticity_elements.h:209
unsigned nrecovery_order()
Definition: refineable_linear_elasticity_elements.h:225
RefineableQLinearElasticityElement()
Constructor:
Definition: refineable_linear_elasticity_elements.h:200
unsigned nvertex_node() const
Number of vertex nodes in the element.
Definition: refineable_linear_elasticity_elements.h:212
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
Definition: refineable_linear_elasticity_elements.h:218
RealScalar s
Definition: level1_cplx_impl.h:130
#define DIM
Definition: linearised_navier_stokes_elements.h:44
void flux(const double &time, const Vector< double > &x, double &flux)
Get flux applied along boundary x=0.
Definition: pretend_melt.cc:59
int error
Definition: calibrate.py:297
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
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