36 template<
unsigned DIM,
unsigned NNODE_1D>
41 template<
unsigned DIM>
54 template<
unsigned DIM>
82 double J = dshape_and_dtest_eulerian_at_knot_helmholtz(
90 std::complex<double> interpolated_u(0.0, 0.0);
100 for (
unsigned j = 0;
j <
DIM;
j++)
106 const std::complex<double>
u_value(
114 for (
unsigned j = 0;
j <
DIM;
j++)
122 std::complex<double> source(0.0, 0.0);
130 std::complex<double>(1.0, 0.0);
137 compute_pml_coefficients(
174 interpolated_u.real() -
176 interpolated_u.imag())) *
180 for (
unsigned k = 0;
k <
DIM;
k++)
204 for (
unsigned i = 0;
i <
DIM;
i++)
219 for (
unsigned i = 0;
i <
DIM;
i++)
247 interpolated_u.real() +
249 interpolated_u.imag())) *
253 for (
unsigned k = 0;
k <
DIM;
k++)
277 for (
unsigned i = 0;
i <
DIM;
i++)
291 for (
unsigned i = 0;
i <
DIM;
i++)
313 template<
unsigned DIM>
343 template<
unsigned DIM>
345 const unsigned&
nplot)
359 std::complex<double> u(interpolated_u_pml_helmholtz(
s));
360 for (
unsigned i = 0;
i <
DIM;
i++)
364 outfile << u.real() <<
" " << u.imag() << std::endl;
383 template<
unsigned DIM>
386 const unsigned&
nplot)
400 std::complex<double> u(interpolated_u_pml_helmholtz(
s));
401 for (
unsigned i = 0;
i <
DIM;
i++)
425 template<
unsigned DIM>
430 const unsigned&
nplot)
450 std::complex<double> u(interpolated_u_pml_helmholtz(
s));
458 for (
unsigned i = 0;
i <
DIM;
i++)
483 template<
unsigned DIM>
486 const unsigned&
nplot)
500 std::complex<double> u(interpolated_u_pml_helmholtz(
s));
501 for (
unsigned i = 0;
i <
DIM;
i++)
520 template<
unsigned DIM>
535 std::complex<double> u(interpolated_u_pml_helmholtz(
s));
537 for (
unsigned i = 0;
i <
DIM;
i++)
542 for (
unsigned i = 0;
i <
DIM;
i++)
563 template<
unsigned DIM>
566 const unsigned&
nplot,
595 for (
unsigned i = 0;
i <
DIM;
i++)
618 template<
unsigned DIM>
622 const unsigned&
nplot,
651 for (
unsigned i = 0;
i <
DIM;
i++)
674 template<
unsigned DIM>
678 const unsigned&
nplot,
707 for (
unsigned i = 0;
i <
DIM;
i++)
727 template<
unsigned DIM>
753 outfile <<
"ZONE" << std::endl;
762 for (
unsigned i = 0;
i <
DIM;
i++)
780 std::complex<double>
u_fe = interpolated_u_pml_helmholtz(
s);
786 for (
unsigned i = 0;
i <
DIM;
i++)
807 template<
unsigned DIM>
831 for (
unsigned i = 0;
i < 2;
i++)
846 std::complex<double>
u_fe = interpolated_u_pml_helmholtz(
s);
860 template<
unsigned DIM>
A mapping function propsed by Bermudez et al, appears to be the best for the Helmholtz equations and ...
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
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)
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 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 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 unsigned self_test()
Self-test: Check inversion of element & do self-test for GeneralisedElement. Return 0 if OK.
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.
A class for all isoparametric elements that solve the Helmholtz equations with pml capabilities....
virtual void fill_in_generic_residual_contribution_helmholtz(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Compute element residual Vector only (if flag=and/or element Jacobian matrix.
void output(std::ostream &outfile)
Output with default number of plot points.
void compute_norm(double &norm)
Compute norm of fe solution.
void output_imag_fct(std::ostream &outfile, const double &phi, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output function for imaginary part of full time-dependent fct u = Im( (u_r +i u_i) exp(-i omega t)) a...
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.
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 ...
static double Default_Physical_Constant_Value
Static default value for the physical constants (initialised to zero)
void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output exact soln: x,y,u_re_exact,u_im_exact or x,y,z,u_re_exact,u_im_exact at n_plot^DIM plot points...
unsigned self_test()
Self-test: Return 0 for OK.
void output_real_fct(std::ostream &outfile, const double &phi, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output function for real part of full time-dependent fct u = Re( (u_r +i u_i) exp(-i omega t) at phas...
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...
static const unsigned Initial_Nvalue
Static int that holds the number of variables at nodes: always the same.
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).