35 template<
unsigned DIM>
48 template<
unsigned DIM>
55 std::ostringstream error_message;
56 error_message <<
"Strain matrix is " <<
strain.ncol() <<
" x "
57 <<
strain.nrow() <<
", but dimension of the equations is "
66 if (n_position_type != 1)
68 std::ostringstream error_message;
69 error_message <<
"PMLTimeHarmonicLinearElasticity is not yet "
70 <<
"implemented for more than one position type"
83 for (
unsigned i = 0;
i <
DIM;
i++)
97 DIM,
DIM, std::complex<double>(0.0, 0.0));
103 for (
unsigned i = 0;
i <
DIM;
i++)
106 const std::complex<double>
u_value =
111 for (
unsigned j = 0;
j <
DIM;
j++)
119 for (
unsigned i = 0;
i <
DIM;
i++)
124 for (
int j = (
DIM - 1);
j >=
static_cast<int>(
i);
j--)
127 if (
static_cast<int>(
i) !=
j)
130 0.5 * (interpolated_dudx(
i,
j) + interpolated_dudx(
j,
i));
139 for (
int j = (
i - 1);
j >= 0;
j--)
151 template<
unsigned DIM>
158 std::ostringstream error_message;
159 error_message <<
"Stress matrix is " <<
stress.ncol() <<
" x "
160 <<
stress.nrow() <<
", but dimension of the equations is "
174 for (
unsigned i = 0;
i <
DIM;
i++)
176 for (
unsigned j = 0;
j <
DIM;
j++)
179 for (
unsigned k = 0;
k <
DIM;
k++)
181 for (
unsigned l = 0;
l <
DIM;
l++)
195 template<
unsigned DIM>
207 if (n_position_type != 1)
209 std::ostringstream error_message;
210 error_message <<
"PMLTimeHarmonicLinearElasticity is not yet "
211 <<
"implemented for more than one position type"
218 if (this->Elasticity_tensor_pt == 0)
228 for (
unsigned i = 0;
i <
DIM;
i++)
255 for (
unsigned i = 0;
i <
DIM; ++
i)
271 DIM, std::complex<double>(0.0, 0.0));
276 DIM,
DIM, std::complex<double>(0.0, 0.0));
282 for (
unsigned i = 0;
i <
DIM;
i++)
289 const std::complex<double>
u_value = std::complex<double>(
296 for (
unsigned j = 0;
j <
DIM;
j++)
320 this->compute_pml_coefficients(
327 for (
unsigned a = 0; a <
DIM; a++)
347 for (
unsigned b = 0; b <
DIM; b++)
350 for (
unsigned c = 0; c <
DIM; c++)
352 for (
unsigned d = 0; d <
DIM; d++)
361 interpolated_dudx(c, d);
376 for (
unsigned b = 0; b <
DIM; b++)
390 for (
unsigned c = 0; c <
DIM; c++)
408 for (
unsigned b = 0; b <
DIM; b++)
410 for (
unsigned d = 0; d <
DIM; d++)
431 for (
unsigned b = 0; b <
DIM; b++)
433 for (
unsigned d = 0; d <
DIM; d++)
457 for (
unsigned b = 0; b <
DIM; b++)
471 for (
unsigned c = 0; c <
DIM; c++)
489 for (
unsigned b = 0; b <
DIM; b++)
491 for (
unsigned d = 0; d <
DIM; d++)
512 for (
unsigned b = 0; b <
DIM; b++)
514 for (
unsigned d = 0; d <
DIM; d++)
537 template<
unsigned DIM>
540 const unsigned&
nplot,
569 for (
unsigned i = 0;
i <
DIM;
i++)
573 for (
unsigned i = 0;
i < 2 *
DIM;
i++)
588 template<
unsigned DIM>
609 this->interpolated_u_time_harmonic_linear_elasticity(
s, u);
612 for (
unsigned i = 0;
i <
DIM;
i++)
618 for (
unsigned i = 0;
i <
DIM;
i++)
624 for (
unsigned i = 0;
i <
DIM;
i++)
650 template<
unsigned DIM>
655 const unsigned&
nplot)
677 this->interpolated_u_time_harmonic_linear_elasticity(
s, u);
683 for (
unsigned i = 0;
i <
DIM;
i++)
689 for (
unsigned i = 0;
i <
DIM;
i++)
714 template<
unsigned DIM>
735 this->interpolated_u_time_harmonic_linear_elasticity(
s, u);
738 for (
unsigned i = 0;
i <
DIM;
i++)
744 for (
unsigned i = 0;
i <
DIM;
i++)
767 template<
unsigned DIM>
788 this->interpolated_u_time_harmonic_linear_elasticity(
s, u);
791 for (
unsigned i = 0;
i <
DIM;
i++)
797 for (
unsigned i = 0;
i <
DIM;
i++)
813 template<
unsigned DIM>
831 for (
unsigned i = 0;
i <
DIM;
i++)
837 for (
unsigned i = 0;
i <
DIM;
i++)
842 this->interpolated_u_time_harmonic_linear_elasticity(
s,
i).
real());
844 for (
unsigned i = 0;
i <
DIM;
i++)
849 this->interpolated_u_time_harmonic_linear_elasticity(
s,
i).
imag());
862 template<
unsigned DIM>
889 for (
unsigned i = 0;
i <
DIM;
i++)
904 this->interpolated_u_time_harmonic_linear_elasticity(
s,
disp);
922 template<
unsigned DIM>
957 for (
unsigned i = 0;
i <
DIM;
i++)
978 this->interpolated_u_time_harmonic_linear_elasticity(
s,
disp);
1005 template<
unsigned DIM>
A mapping function proposed by Bermudez et al, similar to the one above but is continuous across the ...
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 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 base class for elements that solve the equations of time-harmonic linear elasticity in Cartesian co...
static double Default_omega_sq_value
Static default value for square of frequency.
void get_strain(const Vector< double > &s, DenseMatrix< std::complex< double > > &strain) const
Return the strain tensor.
void output_imag(std::ostream &outfile, const double &phi, const unsigned &n_plot)
Output function for imaginary part of full time-dependent solution u = Im( (u_r +i u_i) exp(-i omega ...
void get_stress(const Vector< double > &s, DenseMatrix< std::complex< double > > &sigma) const
Return the Cauchy stress tensor, as calculated from the elasticity tensor at specified local coordina...
void compute_norm(double &norm)
Compute norm of solution: square of the L2 norm.
void output(std::ostream &outfile)
Output: x,y,[z],u_r,v_r,[w_r],u_i,v_i,[w_i].
virtual void fill_in_generic_contribution_to_residuals_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 output_total_real(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt incoming_wave_fct_pt, const double &phi, const unsigned &nplot)
Output function for real part of full time-dependent solution constructed by adding the scattered fie...
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output exact solution x,y,[z],u_r,v_r,[w_r],u_i,v_i,[w_i].
void output_real(std::ostream &outfile, const double &phi, const unsigned &n_plot)
Output function for real part of full time-dependent solution u = Re( (u_r +i u_i) exp(-i omega t)) a...
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Get error against and norm of exact solution.
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...
TAdvectionDiffusionReactionElement()
Constructor: Call constructors for TElement and AdvectionDiffusionReaction equations.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).