83 for (
unsigned i = 0;
i < 2;
i++)
102 for (
unsigned ii = 0;
ii < 3;
ii++)
124 if (n_position_type != 1)
126 throw OomphLibError(
"TimeHarmonicFourierDecomposedLinearElasticity is "
127 "not yet implemented for more than one position type",
135 for (
unsigned i = 0;
i < 3;
i++)
158 std::complex<double>(0.0, 0.0));
163 3, 2, std::complex<double>(0.0, 0.0));
169 for (
unsigned i = 0;
i < 2;
i++)
174 for (
unsigned i = 0;
i < 3;
i++)
176 const std::complex<double>
u_value =
183 for (
unsigned j = 0;
j < 2;
j++)
192 const std::complex<double> I(0.0, 1.0);
195 std::complex<double>
ur = interpolated_u[0];
198 std::complex<double>
uz = interpolated_u[1];
201 std::complex<double>
uth = interpolated_u[2];
204 std::complex<double>
durdr = interpolated_dudx(0, 0);
205 std::complex<double>
durdz = interpolated_dudx(0, 1);
206 std::complex<double>
duzdr = interpolated_dudx(1, 0);
207 std::complex<double>
duzdz = interpolated_dudx(1, 1);
208 std::complex<double>
duthdr = interpolated_dudx(2, 0);
209 std::complex<double>
duthdz = interpolated_dudx(2, 1);
242 if (n_position_type != 1)
244 throw OomphLibError(
"TimeHarmonicFourierDecomposedLinearElasticity is "
245 "not yet implemented for more than one position type",
253 for (
unsigned i = 0;
i < 3;
i++)
295 for (
unsigned i = 0;
i < 2; ++
i)
311 3, std::complex<double>(0.0, 0.0));
316 3, 2, std::complex<double>(0.0, 0.0));
322 for (
unsigned i = 0;
i < 2;
i++)
327 for (
unsigned i = 0;
i < 3;
i++)
329 const std::complex<double>
u_value = std::complex<double>(
336 for (
unsigned j = 0;
j < 2;
j++)
357 const std::complex<double> I(0.0, 1.0);
360 std::complex<double>
ur = interpolated_u[0];
363 std::complex<double>
uz = interpolated_u[1];
366 std::complex<double>
uth = interpolated_u[2];
369 std::complex<double>
durdr = interpolated_dudx(0, 0);
370 std::complex<double>
durdz = interpolated_dudx(0, 1);
371 std::complex<double>
duzdr = interpolated_dudx(1, 0);
372 std::complex<double>
duzdz = interpolated_dudx(1, 1);
373 std::complex<double>
duthdr = interpolated_dudx(2, 0);
374 std::complex<double>
duthdz = interpolated_dudx(2, 1);
383 for (
unsigned a = 0; a < 3; a++)
393 (-
omega_sq.real() * interpolated_u[a].real() +
394 omega_sq.imag() * interpolated_u[a].imag() - b[a].real()) *
456 (
n *
uth.real() +
ur.imag()) +
462 (-
n *
uth.imag() +
ur.real()) +
555 for (
unsigned c = 0; c < 3; c++)
617 (-
omega_sq.real() * interpolated_u[a].imag() -
618 omega_sq.imag() * interpolated_u[a].real() - b[a].imag()) *
680 (
n *
uth.imag() -
ur.real()) +
686 (
n *
uth.real() +
ur.imag()) +
779 for (
unsigned c = 0; c < 3; c++)
842 const unsigned&
nplot,
871 for (
unsigned i = 0;
i < 2;
i++)
875 for (
unsigned i = 0;
i < 6;
i++)
913 for (
unsigned i = 0;
i < 2;
i++)
919 for (
unsigned i = 0;
i < 3;
i++)
925 for (
unsigned i = 0;
i < 3;
i++)
958 for (
unsigned i = 0;
i < 2;
i++)
964 for (
unsigned i = 0;
i < 3;
i++)
974 for (
unsigned i = 0;
i < 3;
i++)
1015 outfile <<
"ZONE" << std::endl;
1024 for (
unsigned i = 0;
i < 2;
i++)
1045 for (
unsigned i = 0;
i < 3;
i++)
1053 ->interpolated_u_time_harmonic_fourier_decomposed_linear_elasticity(
1076 for (
unsigned i = 0;
i < 2;
i++)
1082 for (
unsigned i = 0;
i < 3;
i++)
1087 ->interpolated_u_time_harmonic_fourier_decomposed_linear_elasticity(
1092 for (
unsigned i = 0;
i < 3;
i++)
1097 ->interpolated_u_time_harmonic_fourier_decomposed_linear_elasticity(
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
Class for dense matrices, storing all the values of the matrix as a pointer to a pointer with assorte...
virtual double J_eulerian(const Vector< double > &s) const
Return the Jacobian of mapping from local to global coordinates at local position s.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
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...
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction")
virtual double dshape_eulerian_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsidx) const
Return the geometric shape functions and also first derivatives w.r.t. global coordinates at the ipt-...
unsigned nnodal_position_type() const
Return the number of coordinate types that the element requires to interpolate the geometry between t...
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Return the local equation number corresponding to the i-th value at the n-th local node.
unsigned nnode() const
Return the number of nodes.
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Function pointer for function that computes vector-valued steady "exact solution" as .
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
virtual unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction")
double nodal_position(const unsigned &n, const unsigned &i) const
Return the i-th coordinate at local node n. If the node is hanging, the appropriate interpolation is ...
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Compute the geometric shape functions and also first derivatives w.r.t. global coordinates at local c...
double raw_nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n but do NOT take hanging nodes into account.
double raw_nodal_position(const unsigned &n, const unsigned &i) const
Return the i-th coordinate at local node n. Do not use the hanging node representation....
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Add tecplot zone "footer" to output stream (when plotting nplot points in each "coordinate direction"...
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
An OomphLibError object which should be thrown when an run-time error is encountered....
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
void interpolated_u_time_harmonic_fourier_decomposed_linear_elasticity(const Vector< double > &s, Vector< std::complex< double > > &disp) const
Compute vector of FE interpolated displacement u at local coordinate s.
const std::complex< double > & omega_sq() const
Access function for square of non-dim frequency.
std::complex< double > & nu() const
Access function for Poisson's ratio.
static std::complex< double > Default_youngs_modulus_value
Static default value for Young's modulus (1.0 – for natural scaling, i.e. all stresses have been non-...
static std::complex< double > Default_omega_sq_value
Static default value for squared frequency.
void body_force(const Vector< double > &x, Vector< std::complex< double > > &b) const
Evaluate body force at Eulerian coordinate x at present time (returns zero vector if no body force fu...
virtual std::complex< unsigned > u_index_time_harmonic_fourier_decomposed_linear_elasticity(const unsigned i) const
Return the index at which the i-th (i=0: r, i=1: z; i=2: theta) real or imag unknown displacement com...
std::complex< double > youngs_modulus() const
Access function to Young's modulus.
int & fourier_wavenumber() const
Access function for Fourier wavenumber.
void output(std::ostream &outfile)
Output: r,z, u_r_real, u_z_real, ..., u_theta_imag.
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Validate against exact solution. Solution is provided via function pointer. Plot at a given number of...
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output exact solution: r,z, u_r_real, u_z_real, ..., u_theta_imag.
void compute_norm(double &norm)
Compute norm of solution: square of the L2 norm.
virtual void fill_in_generic_contribution_to_residuals_fourier_decomp_time_harmonic_linear_elasticity(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Private helper function to compute residuals and (if requested via flag) also the Jacobian matrix.
void get_strain(const Vector< double > &s, DenseMatrix< std::complex< double > > &strain)
Get strain tensor.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).