33 #ifndef OOMPH_REFINEABLE_TIME_HARMONIC_LINEAR_ELASTICITY_ELEMENTS_HEADER 34 #define OOMPH_REFINEABLE_TIME_HARMONIC_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>
72 values.resize(2*DIM,0.0);
75 unsigned n_node = this->
nnode();
82 for(
unsigned i=0;
i<DIM;
i++)
85 std::complex<unsigned> u_nodal_index =
87 for(
unsigned l=0;l<n_node;l++)
89 values[
i]+=this->
nodal_value(t,l,u_nodal_index.real())*psi(l);
90 values[
i+DIM]+=this->
nodal_value(t,l,u_nodal_index.imag())*psi(l);
109 return 2*(DIM + DIM*(DIM-1)/2);
117 unsigned num_entries=2*(DIM+((DIM*DIM)-DIM)/2);
118 if (flux.size()!=num_entries)
120 std::ostringstream error_message;
121 error_message <<
"The flux vector has the wrong number of entries, " 122 << flux.size() <<
", whereas it should be " 123 << num_entries << std::endl;
126 OOMPH_CURRENT_FUNCTION,
127 OOMPH_EXCEPTION_LOCATION);
139 for(
unsigned i=0;
i<DIM;
i++)
141 flux[icount]=strain(
i,
i).real();
143 flux[icount]=strain(
i,
i).imag();
148 for(
unsigned i=0;
i<DIM;
i++)
150 for(
unsigned j=
i+1;j<DIM;j++)
152 flux[icount]=strain(
i,j).real();
154 flux[icount]=strain(
i,j).imag();
198 template<
unsigned DIM,
unsigned NNODE_1D>
242 template<
unsigned NNODE_1D>
256 template<
unsigned NNODE_1D>
272 template<
unsigned NNODE_1D>
286 template<
unsigned NNODE_1D>
void further_setup_hanging_nodes()
No additional hanging node procedures are required.
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
TimeHarmonicElasticityTensor *& elasticity_tensor_pt()
Return the pointer to the elasticity_tensor.
Base class for finite elements that can compute the quantities that are required for the Z2 error est...
unsigned nvertex_node() const
Number of vertex nodes in the element.
virtual RefineableElement * father_element_pt() const
Return a pointer to the father element.
BodyForceFctPt & body_force_fct_pt()
Access function: Pointer to body force function.
RefineableTimeHarmonicLinearElasticityEquations()
Constructor.
Class for refineable QTimeHarmonicLinearElasticityElement elements.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
void fill_in_generic_contribution_to_residuals_time_harmonic_linear_elasticity(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Overloaded helper function to take hanging nodes into account.
void rebuild_from_sons(Mesh *&mesh_pt)
Empty rebuild from sons, no need to reconstruct anything here.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
unsigned ncont_interpolated_values() const
Number of continuously interpolated values: 2*DIM.
double *& omega_sq_pt()
Access function for square of non-dim frequency.
virtual unsigned nvertex_node() const
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...
BodyForceFctPt Body_force_fct_pt
Pointer to body force function.
double * Omega_sq_pt
Square of nondim frequency.
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...
TimeHarmonicElasticityTensor * Elasticity_tensor_pt
Pointer to the elasticity tensor.
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...
void get_strain(const Vector< double > &s, DenseMatrix< std::complex< double > > &strain) const
Return the strain tensor.
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...
Class for dense matrices, storing all the values of the matrix as a pointer to a pointer with assorte...
Class for Refineable TimeHarmonicLinearElasticity equations.
RefineableQTimeHarmonicLinearElasticityElement()
Constructor:
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Get 'flux' for Z2 error recovery: Upper triangular entries in strain tensor.
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
void further_build()
Further build function, pass the pointers down to the sons.
unsigned nnode() const
Return the number of nodes.
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 std::complex< unsigned > u_index_time_harmonic_linear_elasticity(const unsigned i) const
Return the index at which the i-th real or imag unknown displacement component is stored...