36 template<
unsigned DIM,
unsigned NNODE_1D>
48 template<
unsigned DIM>
75 double J = dshape_and_dtest_eulerian_at_knot_helmholtz(
83 std::complex<double> interpolated_u(0.0, 0.0);
93 for (
unsigned j = 0;
j <
DIM;
j++)
99 const std::complex<double>
u_value(
107 for (
unsigned j = 0;
j <
DIM;
j++)
115 std::complex<double> source(0.0, 0.0);
135 (source.real() - k_squared() * interpolated_u.real()) *
test(
l) * W;
138 for (
unsigned k = 0;
k <
DIM;
k++)
141 interpolated_dudx[
k].real() *
dtestdx(
l,
k) * W;
157 for (
unsigned i = 0;
i <
DIM;
i++)
181 (source.imag() - k_squared() * interpolated_u.imag()) *
test(
l) * W;
184 for (
unsigned k = 0;
k <
DIM;
k++)
187 interpolated_dudx[
k].imag() *
dtestdx(
l,
k) * W;
203 for (
unsigned i = 0;
i <
DIM;
i++)
223 template<
unsigned DIM>
253 template<
unsigned DIM>
255 const unsigned&
nplot)
269 std::complex<double> u(interpolated_u_helmholtz(
s));
270 for (
unsigned i = 0;
i <
DIM;
i++)
274 outfile << u.real() <<
" " << u.imag() << std::endl;
293 template<
unsigned DIM>
296 const unsigned&
nplot)
310 std::complex<double> u(interpolated_u_helmholtz(
s));
311 for (
unsigned i = 0;
i <
DIM;
i++)
330 template<
unsigned DIM>
345 std::complex<double> u(interpolated_u_helmholtz(
s));
347 for (
unsigned i = 0;
i <
DIM;
i++)
352 for (
unsigned i = 0;
i <
DIM;
i++)
373 template<
unsigned DIM>
376 const unsigned&
nplot,
405 for (
unsigned i = 0;
i <
DIM;
i++)
428 template<
unsigned DIM>
432 const unsigned&
nplot,
461 for (
unsigned i = 0;
i <
DIM;
i++)
481 template<
unsigned DIM>
507 outfile <<
"ZONE" << std::endl;
516 for (
unsigned i = 0;
i <
DIM;
i++)
534 std::complex<double>
u_fe = interpolated_u_helmholtz(
s);
540 for (
unsigned i = 0;
i <
DIM;
i++)
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.
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.
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_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) at...
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_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(std::ostream &outfile)
Output with default number of plot points.
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.
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).