57 const unsigned&
nplot,
88 for (
unsigned i = 0;
i <
DIM;
i++)
101 for (
unsigned i = 0;
i < (2 *
DIM);
i++)
107 interpolated_u[
i] = 0.0;
117 for (
unsigned i = 0;
i <
DIM;
i++)
123 for (
unsigned i = 0;
i < (2 *
DIM);
i++)
125 outfile << interpolated_u[
i] <<
" ";
144 const unsigned&
nplot)
162 for (
unsigned i = 0;
i <
DIM;
i++)
168 for (
unsigned i = 0;
i < (4 *
DIM);
i++)
174 for (
unsigned i = 0;
i < 2;
i++)
195 const unsigned&
nplot)
213 for (
unsigned i = 0;
i < 2;
i++)
219 for (
unsigned i = 0;
i < (2 *
DIM);
i++)
225 for (
unsigned i = 0;
i < 2;
i++)
251 const unsigned&
real)
const
256 std::ostringstream error_message;
257 error_message <<
"The strain rate has incorrect dimensions "
259 <<
" Not " <<
DIM << std::endl;
287 for (
unsigned i = 0;
i <
DIM; ++
i)
290 for (
unsigned j = 0;
j <
DIM; ++
j)
309 for (
unsigned i = 0;
i <
DIM;
i++)
312 const std::complex<double>
u_value(
317 for (
unsigned j = 0;
j <
DIM;
j++)
337 for (
unsigned i = 0;
i <
DIM; ++
i)
339 for (
unsigned j = 0;
j <
DIM; ++
j)
349 for (
unsigned i = 0;
i <
DIM;
i++)
352 for (
unsigned j = 0;
j <
DIM;
j++)
422 for (
unsigned i = 0;
i <
DIM;
i++)
440 const double W = w *
J;
453 for (
unsigned i = 0;
i <
DIM; ++
i)
455 interpolated_u[
i].real(0.0);
456 interpolated_u[
i].imag(0.0);
462 std::complex<double> interpolated_p(0.0, 0.0);
468 for (
unsigned i = 0;
i <
DIM; ++
i)
470 interpolated_dudx[
i].resize(
DIM);
471 for (
unsigned j = 0;
j <
DIM; ++
j)
473 interpolated_dudx[
i][
j].real(0.0);
474 interpolated_dudx[
i][
j].imag(0.0);
493 interpolated_p += p_value *
psip_;
512 for (
unsigned i = 0;
i <
DIM;
i++)
518 for (
unsigned i = 0;
i <
DIM;
i++)
521 const std::complex<double>
u_value(
532 for (
unsigned j = 0;
j <
DIM;
j++)
588 for (
unsigned i = 0;
i <
DIM;
i++)
597 for (
unsigned k = 0;
k <
DIM; ++
k)
601 (interpolated_dudx[
i][
k] +
Gamma[
i] * interpolated_dudx[
k][
i]) *
606 for (
unsigned k = 0;
k <
DIM; ++
k)
726 for (
unsigned k = 1;
k <
DIM; ++
k)
750 for (
unsigned k = 0;
k <
DIM; ++
k)
786 8, 8, 8, 8, 8, 8, 8, 8, 8};
793 const unsigned&
n)
const
812 12, 8, 12, 8, 8, 8, 12, 8, 12};
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
double nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n. Produces suitably interpolated values for hanging nodes...
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 void shape(const Vector< double > &s, Shape &psi) const =0
Calculate the geometric shape functions at local coordinate s. This function must be overloaded for e...
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.
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 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 ...
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Compute the geometric shape functions and also first derivatives w.r.t. global coordinates at local c...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
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 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.
const double & viscosity_ratio() const
Viscosity ratio for element: element's viscosity relative to the viscosity used in the definition of ...
virtual unsigned u_index_linearised_nst(const unsigned &i) const
Return the index at which the i-th unknown velocity component is stored. The default value,...
const double & omega() const
static Vector< double > Gamma
Vector to decide whether the stress-divergence form is used or not.
virtual unsigned npres_linearised_nst() const =0
Return the number of pressure degrees of freedom associated with a single pressure component in the e...
const double & lambda() const
const double & re() const
Reynolds number.
const double & density_ratio() const
Density ratio for element: element's density relative to the viscosity used in the definition of the ...
virtual int p_local_eqn(const unsigned &n, const unsigned &i)=0
Access function for the local equation number information for the i-th component of the pressure....
void strain_rate(const Vector< double > &s, DenseMatrix< double > &strain_rate, const unsigned &real) const
Strain-rate tensor: where (in that order)
void output_veloc(std::ostream &outfile, const unsigned &nplot, const unsigned &t)
Output function: r, z, U^C, U^S, V^C, V^S, W^C, W^S, in tecplot format. nplot points in each coordina...
virtual void pshape_linearised_nst(const Vector< double > &s, Shape &psi) const =0
Compute the pressure shape functions at local coordinate s.
virtual void get_base_flow_u(const double &time, const unsigned &ipt, const Vector< double > &x, Vector< double > &result) const
Calculate the velocity components of the base flow solution at a given time and Eulerian position.
virtual double p_linearised_nst(const unsigned &n_p, const unsigned &i) const =0
Return the i-th pressure value at local pressure "node" n_p. Uses suitably interpolated value for han...
static int Pressure_not_stored_at_node
Static "magic" number that indicates that the pressure is not stored at a node.
virtual double dshape_and_dtest_eulerian_at_knot_linearised_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
Compute the shape functions and their derivatives w.r.t. global coordinates at the ipt-th integration...
void output(std::ostream &outfile)
Output function: r, z, U^C, U^S, V^C, V^S, W^C, W^S, P^C, P^S in tecplot format. Default number of pl...
int eigenvalue_local_eqn(const unsigned &i)
virtual void fill_in_generic_residual_contribution_linearised_nst(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, unsigned flag)
Compute the residuals for the Navier-Stokes equations; flag=1(or 0): do (or don't) compute the Jacobi...
double interpolated_p_linearised_nst(const Vector< double > &s, const unsigned &i) const
Return the i-th component of the FE interpolated pressure p[i] at local coordinate s.
virtual void get_base_flow_dudx(const double &time, const unsigned &ipt, const Vector< double > &x, DenseMatrix< double > &result) const
Calculate the derivatives of the velocity components of the base flow solution w.r....
const double & re_st() const
Product of Reynolds and Strouhal number (=Womersley number)
static double Default_Physical_Constant_Value
Static default value for the physical constants (all initialised to zero)
double interpolated_u_linearised_nst(const Vector< double > &s, const unsigned &i) const
Compute the element's residual Vector and the jacobian matrix. Virtual function can be overloaded by ...
static double Default_Physical_Ratio_Value
Static default value for the physical ratios (all initialised to one)
static const unsigned Initial_Nvalue[]
Static array of ints to hold required number of variables at nodes.
virtual unsigned required_nvalue(const unsigned &n) const
Return number of values (pinned or dofs) required at local node n.
static const unsigned Pconv[]
Static array of ints to hold conversion from pressure node numbers to actual node numbers.
static const unsigned Initial_Nvalue[]
Static array of ints to hold number of variables at node.
An OomphLibError object which should be thrown when an run-time error is encountered....
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...
double & time()
Return current value of continous time.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).