26 #ifndef OOMPH_SUPG_ADV_DIFF_ELEMENTS_HEADER
27 #define OOMPH_SUPG_ADV_DIFF_ELEMENTS_HEADER
29 #include "../advection_diffusion/refineable_advection_diffusion_elements.h"
41 template<
unsigned DIM,
unsigned NNODE_1D>
73 unsigned n_node = this->
nnode();
76 Shape psi(n_node), test(n_node);
77 DShape dpsidx(n_node, DIM);
89 for (
unsigned l = 0; l < n_node; l++)
92 for (
unsigned j = 0; j < DIM; j++)
123 for (
unsigned i = 0;
i < 4;
i++)
145 for (
unsigned j = 0; j < DIM; j++)
147 abs_wind += wind[j] * wind[j];
149 abs_wind = sqrt(abs_wind);
152 double Pe_mesh = 0.5 * this->
pe() * h * abs_wind;
157 Tau_SUPG = h / (2.0 * abs_wind) * (1.0 - 1.0 / Pe_mesh);
169 void output(std::ostream& outfile,
const unsigned& nplot)
179 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
188 for (
unsigned i = 0;
i < DIM;
i++)
190 outfile << x[
i] <<
" ";
199 for (
unsigned i = 0;
i < DIM;
i++)
201 outfile << wind[
i] <<
" ";
225 void output(FILE* file_pt,
const unsigned& n_plot)
264 template<
unsigned DIM,
unsigned NNODE_1D>
316 return (NNODE_1D - 1);
double interpolated_u_adv_diff(const Vector< double > &s) const
Return FE representation of function value u(s) at local coordinate s.
virtual void get_wind_adv_diff(const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &wind) const
Get wind at (Eulerian) position x and/or local coordinate s. This function is virtual to allow overlo...
const double & pe() const
Peclet number.
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing.
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 unsigned nvertex_node() const
Return the number of vertex nodes in this element. Broken virtual function in "pure" finite elements.
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.
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 Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element. Broken virtual function in "pure" finite elements.
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 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"...
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
//////////////////////////////////////////////////////////////////////// ////////////////////////////...
/////////////////////////////////////////////////////////////////////// /////////////////////////////...
QSUPGAdvectionDiffusionElement<DIM,NNODE_1D> elements are SUPG-stabilised Advection Diffusion element...
double dshape_and_dtest_eulerian_adv_diff(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Shape, test functions & derivs. w.r.t. to global coords. Return Jacobian.
void compute_stabilisation_parameter()
Compute stabilisation parameter for the element.
void output(std::ostream &outfile)
Output at default number of plot points.
void switch_off_stabilisation()
Set stabilisation parameter for the element to zero.
double get_Tau_SUPG()
Get stabilisation parameter for the element.
void output(FILE *file_pt)
C-style output.
void output(std::ostream &outfile, const unsigned &nplot)
Output function: x,y,u,w_x,w_y,tau_supg or x,y,z,u,w_x,w_y,w_z,tau_supg nplot points in each coordina...
double Tau_SUPG
SUPG stabilisation parameter.
void output(FILE *file_pt, const unsigned &n_plot)
C_style output at n_plot points.
QSUPGAdvectionDiffusionElement()
Constructor: Call constructors for underlying QAdvectionDiffusion element. Initialise stabilisation p...
double dshape_and_dtest_eulerian_at_knot_adv_diff(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Shape, test functions & derivs. w.r.t. to global coords. Return Jacobian.
A version of the Advection Diffusion equations that can be used with non-uniform mesh refinement....
RefineableElements are FiniteElements that may be subdivided into children to provide a better local ...
A class that is used to template the refineable Q elements by dimension. It's really nothing more tha...
////////////////////////////////////////////////////////////////////// //////////////////////////////...
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: empty.
unsigned nvertex_node() const
Number of vertex nodes in the element.
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
void operator=(const RefineableQSUPGAdvectionDiffusionElement< DIM, NNODE_1D > &)=delete
Broken assignment operator.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
RefineableQSUPGAdvectionDiffusionElement()
Constructor: Pass refinement level to refineable quad element (default 0 = root)
unsigned ncont_interpolated_values() const
Number of continuously interpolated values: 1.
void further_setup_hanging_nodes()
Perform additional hanging node procedures for variables that are not interpolated by all nodes....
RefineableQSUPGAdvectionDiffusionElement(const RefineableQSUPGAdvectionDiffusionElement< DIM, NNODE_1D > &dummy)=delete
Broken copy constructor.
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...