34 template<
unsigned DIM>
55 const unsigned n_q_basis = this->nq_basis();
61 for (
unsigned i = 0;
i <
DIM;
i++)
69 for (
unsigned i = 0;
i <
DIM;
i++)
72 for (
unsigned j = 0;
j <
DIM;
j++)
97 template<
unsigned DIM>
100 const unsigned&
nplot,
118 for (
unsigned i = 0;
i <
DIM;
i++)
124 for (
unsigned i = 0;
i <
DIM;
i++)
126 outfile << this->interpolated_q(
s,
i) <<
" ";
130 outfile << this->interpolated_div_q(
s) <<
" ";
133 outfile << this->interpolated_p(
s) <<
" ";
137 for (
unsigned i = 0;
i < 2;
i++)
155 template<
unsigned DIM>
173 for (
unsigned i = 0;
i <
DIM;
i++)
179 for (
unsigned i = 0;
i <
DIM;
i++)
185 outfile << interpolated_div_q(
s) <<
" ";
188 outfile << interpolated_p(
s) <<
" ";
201 template<
unsigned DIM>
204 const unsigned&
nplot,
234 for (
unsigned i = 0;
i <
DIM;
i++)
238 for (
unsigned i = 0;
i <
DIM + 2;
i++)
253 template<
unsigned DIM>
260 for (
unsigned i = 0;
i < 2;
i++)
275 outfile <<
"ZONE" << std::endl;
284 for (
unsigned i = 0;
i <
DIM;
i++)
305 for (
unsigned i = 0;
i <
DIM;
i++)
324 for (
unsigned i = 0;
i <
DIM;
i++)
330 for (
unsigned i = 0;
i <
DIM;
i++)
345 template<
unsigned DIM>
380 for (
unsigned i = 0;
i <
DIM;
i++)
390 double J = shape_basis_test_local_at_knot(
ipt,
403 double interpolated_p = 0.0;
408 for (
unsigned i = 0;
i <
DIM;
i++)
416 for (
unsigned i = 0;
i <
DIM;
i++)
433 interpolated_p += p_value(
l) *
p_basis(
l);
469 for (
unsigned i = 0;
i <
DIM;
i++)
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output FE representation of exact soln: x,y,q1,q2,div_q,p at Nplot^DIM plot points.
void output_with_projected_flux(std::ostream &outfile, const unsigned &nplot, const Vector< double > unit_normal)
Output incl. projection of fluxes into direction of the specified unit vector.
virtual void fill_in_generic_residual_contribution(Vector< double > &residuals, DenseMatrix< double > &jacobian, bool flag)
Fill in residuals and, if flag==true, jacobian.
double transform_basis(const Vector< double > &s, const Shape &q_basis_local, Shape &psi, Shape &q_basis) const
Performs a div-conserving transformation of the vector basis functions from the reference element to ...
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
Compute the error between the FE solution and the exact solution using the H(div) norm for q and L^2 ...
void output(std::ostream &outfile)
Output with default number of plot points.
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.
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 double local_to_eulerian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Calculate the mapping from local to Eulerian coordinates, given the derivatives of the shape function...
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 ...
virtual void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Function to compute the geometric shape functions and derivatives w.r.t. local coordinates at local c...
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.
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).