33 #ifndef OOMPH_REFINEABLE_LINEAR_ELASTICITY_ELEMENTS_HEADER 34 #define OOMPH_REFINEABLE_LINEAR_ELASTICITY_ELEMENTS_HEADER 38 #include "../generic/refineable_quad_element.h" 39 #include "../generic/refineable_brick_element.h" 40 #include "../generic/error_estimator.h" 48 template<
unsigned DIM>
71 values.resize(DIM,0.0);
74 unsigned n_node = this->
nnode();
81 for(
unsigned i=0;
i<DIM;
i++)
85 for(
unsigned l=0;l<n_node;l++)
107 return DIM + DIM*(DIM-1)/2;
115 unsigned num_entries=DIM+((DIM*DIM)-DIM)/2;
116 if (flux.size()!=num_entries)
118 std::ostringstream error_message;
119 error_message <<
"The flux vector has the wrong number of entries, " 120 << flux.size() <<
", whereas it should be " 121 << num_entries << std::endl;
123 OOMPH_CURRENT_FUNCTION,
124 OOMPH_EXCEPTION_LOCATION);
136 for(
unsigned i=0;
i<DIM;
i++)
138 flux[icount]=strain(
i,
i);
143 for(
unsigned i=0;
i<DIM;
i++)
145 for(
unsigned j=
i+1;j<DIM;j++)
147 flux[icount]=strain(
i,j);
194 template<
unsigned DIM,
unsigned NNODE_1D>
233 template<
unsigned DIM>
295 void compute_energy_error(std::ostream &outfile,
297 double& error,
double& norm);
305 template<
unsigned NNODE_1D>
319 template<
unsigned NNODE_1D>
334 template<
unsigned NNODE_1D>
348 template<
unsigned NNODE_1D>
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
Base class for finite elements that can compute the quantities that are required for the Z2 error est...
bool is_inertia_enabled() const
Access function to flag that switches inertia on/off (const version)
virtual RefineableElement * father_element_pt() const
Return a pointer to the father element.
~PRefineableQLinearElasticityElement()
Destructor (to avoid memory leaks)
Class for Refineable LinearElasticity equations.
void further_setup_hanging_nodes()
No additional hanging node procedures are required.
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Get 'flux' for Z2 error recovery: Upper triangular entries in strain tensor.
virtual void set_integration_scheme(Integral *const &integral_pt)
Set the spatial integration scheme.
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation:
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
ElasticityTensor * Elasticity_tensor_pt
Pointer to the elasticity tensor.
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Get the current interpolated values (displacements). Note: Given the generality of the interface (thi...
p-refineable version of 2D QLinearElasticityElement elements
RefineableLinearElasticityEquations()
Constructor.
void rebuild_from_sons(Mesh *&mesh_pt)
Empty rebuild from sons, no need to reconstruct anything here.
void interpolated_u_linear_elasticity(const Vector< double > &s, Vector< double > &disp) const
Compute vector of FE interpolated displacement u at local coordinate s.
bool Unsteady
Flag that switches inertia on/off.
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Function pointer for function that computes vector-valued steady "exact solution" as ...
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
virtual unsigned nvertex_node() const
BodyForceFctPt & body_force_fct_pt()
Access function: Pointer to body force function.
unsigned ncont_interpolated_values() const
Number of continuously interpolated values: 1.
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...
void get_strain(const Vector< double > &s, DenseMatrix< double > &strain) const
Return the strain tensor.
PRefineableQLinearElasticityElement()
Constructor, simply call the other constructors.
double * Lambda_sq_pt
Timescale ratio (non-dim. density)
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.
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...
unsigned ncont_interpolated_values() const
Number of continuously interpolated values: DIM.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
RefineableQLinearElasticityElement()
Constructor:
double *& lambda_sq_pt()
Access function for pointer to timescale ratio (nondim density)
Class for refineable QLinearElasticityElement elements.
PRefineableQLinearElasticityElement(const PRefineableQLinearElasticityElement< DIM > &dummy)
Broken copy constructor.
unsigned nvertex_node() const
Number of vertex nodes in the element.
unsigned nvertex_node() const
Number of vertex nodes in the element.
void get_interpolated_values(const unsigned &t, const Vector< double > &s, Vector< double > &values)
Get the function value u in Vector. Note: Given the generality of the interface (this function is usu...
unsigned nnode() const
Return the number of nodes.
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
BodyForceFctPt Body_force_fct_pt
Pointer to body force function.
virtual void shape(const Vector< double > &s, Shape &psi) const =0
Calculate the geometric shape functions at local coordinate s. This function must be overloaded for e...
virtual unsigned u_index_linear_elasticity(const unsigned i) const
Return the index at which the i-th unknown displacement component is stored. The default value...
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
void further_build()
Further build function, pass the pointers down to the sons.
ElasticityTensor *& elasticity_tensor_pt()
Return the pointer to the elasticity_tensor.