30 #ifndef OOMPH_SUPG_ADV_DIFF_ELEMENTS_HEADER 31 #define OOMPH_SUPG_ADV_DIFF_ELEMENTS_HEADER 33 #include "../advection_diffusion/refineable_advection_diffusion_elements.h" 46 template <
unsigned DIM,
unsigned NNODE_1D>
80 unsigned n_node = this->
nnode();
83 Shape psi(n_node), test(n_node);
96 for(
unsigned l=0;l<n_node;l++)
99 for(
unsigned j=0;j<DIM;j++)
130 for (
unsigned i=0;
i<4;
i++)
151 for(
unsigned j=0;j<DIM;j++)
153 abs_wind += wind[j]*wind[j];
155 abs_wind=sqrt(abs_wind);
158 double Pe_mesh=0.5*this->
pe()*h*abs_wind;
163 Tau_SUPG=h/(2.0*abs_wind)*(1.0-1.0/Pe_mesh);
176 void output(std::ostream &outfile,
const unsigned &nplot)
187 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
197 for(
unsigned i=0;
i<DIM;
i++)
199 outfile << x[
i] <<
" ";
208 for(
unsigned i=0;
i<DIM;
i++)
210 outfile << wind[
i] <<
" ";
231 void output(FILE* file_pt,
const unsigned &n_plot)
268 template <
unsigned DIM,
unsigned NNODE_1D>
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction") ...
void operator=(const RefineableQSUPGAdvectionDiffusionElement< DIM, NNODE_1D > &)
Broken assignment operator.
void output(FILE *file_pt)
C-style output.
double get_Tau_SUPG()
Get stabilisation parameter for the element.
unsigned nvertex_node() const
Number of vertex nodes in the element.
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
double Tau_SUPG
SUPG stabilisation parameter.
void output(std::ostream &outfile)
Output at default number of plot points.
Refineable version of QSUPGAdvectionDiffusionElement. Inherit from the standard QSUPGAdvectionDiffusi...
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 void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing...
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 ...
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
void output(FILE *file_pt, const unsigned &n_plot)
C_style output at n_plot points.
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...
QAdvectionDiffusionElement elements are linear/quadrilateral/brick-shaped Advection Diffusion element...
void further_setup_hanging_nodes()
Perform additional hanging node procedures for variables that are not interpolated by all nodes...
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
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...
void switch_off_stabilisation()
Set stabilisation parameter for the element to zero.
virtual unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction") ...
QSUPGAdvectionDiffusionElement<DIM,NNODE_1D> elements are SUPG-stabilised Advection Diffusion element...
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
virtual unsigned nvertex_node() const
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"...
RefineableQSUPGAdvectionDiffusionElement()
Constructor: Pass refinement level to refineable quad element (default 0 = root)
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 broken_assign(const std::string &class_name)
Issue error message and terminate execution.
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...
RefineableQSUPGAdvectionDiffusionElement(const RefineableQSUPGAdvectionDiffusionElement< DIM, NNODE_1D > &dummy)
Broken copy constructor.
double interpolated_u_adv_diff(const Vector< double > &s) const
Return FE representation of function value u(s) at local coordinate s.
QSUPGAdvectionDiffusionElement()
Constructor: Call constructors for underlying QAdvectionDiffusion element. Initialise stabilisation p...
const double & pe() const
Peclet number.
void compute_stabilisation_parameter()
Compute stabilisation parameter for the element.
unsigned nnode() const
Return the number of nodes.
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: empty.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
unsigned ncont_interpolated_values() const
Number of continuously interpolated values: 1.
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...