29 #ifndef OOMPH_REFINEABLE_TIME_HARMONIC_LINEAR_ELASTICITY_ELEMENTS_HEADER
30 #define OOMPH_REFINEABLE_TIME_HARMONIC_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(2 *
DIM, 0.0);
71 unsigned n_node = this->
nnode();
78 for (
unsigned i = 0;
i <
DIM;
i++)
81 std::complex<unsigned> u_nodal_index =
83 for (
unsigned l = 0; l < n_node; l++)
85 values[
i] += this->
nodal_value(t, l, u_nodal_index.real()) * psi(l);
87 this->
nodal_value(t, l, u_nodal_index.imag()) * psi(l);
114 unsigned num_entries = 2 * (
DIM + ((
DIM *
DIM) -
DIM) / 2);
115 if (
flux.size() != num_entries)
117 std::ostringstream error_message;
118 error_message <<
"The flux vector has the wrong number of entries, "
119 <<
flux.size() <<
", whereas it should be " << num_entries
135 for (
unsigned i = 0;
i <
DIM;
i++)
137 flux[icount] = strain(
i,
i).real();
139 flux[icount] = strain(
i,
i).imag();
144 for (
unsigned i = 0;
i <
DIM;
i++)
146 for (
unsigned j =
i + 1;
j <
DIM;
j++)
148 flux[icount] = strain(
i,
j).real();
150 flux[icount] = strain(
i,
j).imag();
166 cast_father_element_pt =
196 template<
unsigned DIM,
unsigned NNODE_1D>
245 template<
unsigned NNODE_1D>
248 :
public virtual QElement<1, NNODE_1D>
260 template<
unsigned NNODE_1D>
276 template<
unsigned NNODE_1D>
279 :
public virtual QElement<2, NNODE_1D>
291 template<
unsigned NNODE_1D>
294 :
public virtual QElement<1, NNODE_1D>
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Definition: matrices.h:386
Definition: error_estimator.h:79
FaceGeometry()
Definition: refineable_time_harmonic_linear_elasticity_elements.h:268
FaceGeometry()
Definition: refineable_time_harmonic_linear_elasticity_elements.h:299
FaceGeometry()
Definition: refineable_time_harmonic_linear_elasticity_elements.h:253
FaceGeometry()
Definition: refineable_time_harmonic_linear_elasticity_elements.h:284
Definition: elements.h:4998
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593
virtual void shape(const Vector< double > &s, Shape &psi) const =0
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
Definition: oomph_definitions.h:222
Definition: elements.h:3439
Definition: Qelements.h:459
Definition: time_harmonic_linear_elasticity_elements.h:404
Definition: refineable_elements.h:97
virtual RefineableElement * father_element_pt() const
Return a pointer to the father element.
Definition: refineable_elements.h:539
Definition: Qelements.h:2259
Class for refineable QTimeHarmonicLinearElasticityElement elements.
Definition: refineable_time_harmonic_linear_elasticity_elements.h:201
void further_setup_hanging_nodes()
No additional hanging node procedures are required.
Definition: refineable_time_harmonic_linear_elasticity_elements.h:237
RefineableQTimeHarmonicLinearElasticityElement()
Constructor:
Definition: refineable_time_harmonic_linear_elasticity_elements.h:204
unsigned nvertex_node() const
Number of vertex nodes in the element.
Definition: refineable_time_harmonic_linear_elasticity_elements.h:216
unsigned nrecovery_order()
Definition: refineable_time_harmonic_linear_elasticity_elements.h:231
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
Definition: refineable_time_harmonic_linear_elasticity_elements.h:223
void rebuild_from_sons(Mesh *&mesh_pt)
Empty rebuild from sons, no need to reconstruct anything here.
Definition: refineable_time_harmonic_linear_elasticity_elements.h:213
Class for Refineable TimeHarmonicLinearElasticity equations.
Definition: refineable_time_harmonic_linear_elasticity_elements.h:48
unsigned ncont_interpolated_values() const
Number of continuously interpolated values: 2*DIM.
Definition: refineable_time_harmonic_linear_elasticity_elements.h:157
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: refineable_time_harmonic_linear_elasticity_elements.h:111
void get_interpolated_values(const unsigned &t, const Vector< double > &s, Vector< double > &values)
Definition: refineable_time_harmonic_linear_elasticity_elements.h:63
void further_build()
Further build function, pass the pointers down to the sons.
Definition: refineable_time_harmonic_linear_elasticity_elements.h:163
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
Definition: refineable_time_harmonic_linear_elasticity_elements.h:103
RefineableTimeHarmonicLinearElasticityEquations()
Constructor.
Definition: refineable_time_harmonic_linear_elasticity_elements.h:51
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Definition: refineable_time_harmonic_linear_elasticity_elements.h:96
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.
Definition: refineable_time_harmonic_linear_elasticity_elements.cc:39
TimeHarmonicElasticityTensor *& elasticity_tensor_pt()
Return the pointer to the elasticity_tensor.
Definition: time_harmonic_linear_elasticity_elements.h:161
double * Omega_sq_pt
Square of nondim frequency.
Definition: time_harmonic_linear_elasticity_elements.h:294
TimeHarmonicElasticityTensor * Elasticity_tensor_pt
Pointer to the elasticity tensor.
Definition: time_harmonic_linear_elasticity_elements.h:291
BodyForceFctPt & body_force_fct_pt()
Access function: Pointer to body force function.
Definition: time_harmonic_linear_elasticity_elements.h:188
virtual std::complex< unsigned > u_index_time_harmonic_linear_elasticity(const unsigned i) const
Definition: time_harmonic_linear_elasticity_elements.h:69
double *& omega_sq_pt()
Access function for square of non-dim frequency.
Definition: time_harmonic_linear_elasticity_elements.h:182
BodyForceFctPt Body_force_fct_pt
Pointer to body force function.
Definition: time_harmonic_linear_elasticity_elements.h:297
void get_strain(const Vector< double > &s, DenseMatrix< std::complex< double >> &strain) const
Return the strain tensor.
Definition: time_harmonic_linear_elasticity_elements.cc:49
Definition: time_harmonic_linear_elasticity_elements.h:316
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
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