29 #ifndef OOMPH_POLAR_STREAMFUNCTION_TRACTION_ELEMENTS
30 #define OOMPH_POLAR_STREAMFUNCTION_TRACTION_ELEMENTS
42 template <
class ELEMENT>
69 unsigned n_node =
nnode();
73 for(
unsigned i=0;
i<n_node;
i++) {
test[
i] = psi[
i];}
117 ELEMENT* elem_pt =
new ELEMENT;
119 if(elem_pt->dim()==3)
126 "This flux element will not work correctly if nodes are hanging\n",
127 "PolarNavierStokesTractionElement::Constructor",
176 void output(std::ostream &outfile,
const unsigned &nplot)
180 double s(
const unsigned &l )
184 double x(
const unsigned &l,
const unsigned &
i )
201 template<
class ELEMENT>
209 unsigned n_node = nnode();
212 Shape psif(n_node), testf(n_node);
215 unsigned n_intpt = integral_pt()->nweight();
229 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
232 double w = integral_pt()->weight(ipt);
236 double J = shape_and_test_at_knot(ipt,psif,testf);
243 double interpolated_v;
246 interpolated_v = 0.0;
247 for(
unsigned i=0;
i<
Dim;
i++) interpolated_x[
i] = 0.0;
251 for(
unsigned l=0;l<n_node;l++)
255 interpolated_v += this->nodal_value(l,2)*psif[l];
257 for(
unsigned i=0;
i<
Dim;
i++) interpolated_x[
i] += this->nodal_position(l,
i)*psif[l];
263 for(
unsigned l=0;l<n_node;l++)
265 local_eqn = s_local_eqn(l);
271 residuals[local_eqn] +=
multiplier*interpolated_v*testf[l]*interpolated_x[0]*
Alpha*
W;
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
RowVector3d w
Definition: Matrix_resize_int.cpp:3
Definition: elements.h:4338
int & face_index()
Definition: elements.h:4626
double J_eulerian_at_knot(const unsigned &ipt) const
Definition: elements.cc:5328
Definition: elements.h:4998
Definition: elements.h:1313
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593
virtual void output(std::ostream &outfile)
Definition: elements.h:3050
virtual void build_face_element(const int &face_index, FaceElement *face_element_pt)
Definition: elements.cc:5132
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
double nodal_position(const unsigned &n, const unsigned &i) const
Definition: elements.h:2317
virtual void shape_at_knot(const unsigned &ipt, Shape &psi) const
Definition: elements.cc:3220
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
Definition: nodes.h:1054
Definition: oomph_definitions.h:267
Definition: polar_streamfunction_traction_elements.h:45
const int boundary() const
Boundary.
Definition: polar_streamfunction_traction_elements.h:103
double s(const unsigned &l)
local streamfunction
Definition: polar_streamfunction_traction_elements.h:180
unsigned Dim
The highest dimension of the problem.
Definition: polar_streamfunction_traction_elements.h:50
int Boundary
Definition: polar_streamfunction_traction_elements.h:92
void output(std::ostream &outfile, const unsigned &nplot)
Output function: x,y,[z],u,v,[w],p in tecplot format.
Definition: polar_streamfunction_traction_elements.h:176
double * Alpha_pt
Pointer to the angle alpha.
Definition: polar_streamfunction_traction_elements.h:86
void set_boundary(int bound)
Function to set boundary.
Definition: polar_streamfunction_traction_elements.h:106
void fill_in_contribution_to_residuals(Vector< double > &residuals)
This function returns just the residuals.
Definition: polar_streamfunction_traction_elements.h:146
~PolarStreamfunctionTractionElement()
Destructor should not delete anything.
Definition: polar_streamfunction_traction_elements.h:143
void output(std::ostream &outfile)
Overload the output function.
Definition: polar_streamfunction_traction_elements.h:173
double shape_and_test_at_knot(const unsigned &ipt, Shape &psi, Shape &test) const
Definition: polar_streamfunction_traction_elements.h:64
const double & alpha() const
Alpha.
Definition: polar_streamfunction_traction_elements.h:97
double *& alpha_pt()
Pointer to Alpha.
Definition: polar_streamfunction_traction_elements.h:100
void fill_in_generic_residual_contribution(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, unsigned flag)
Definition: polar_streamfunction_traction_elements.h:203
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: polar_streamfunction_traction_elements.h:164
PolarStreamfunctionTractionElement(FiniteElement *const &element_pt, const int &face_index)
Definition: polar_streamfunction_traction_elements.h:110
double x(const unsigned &l, const unsigned &i)
local position
Definition: polar_streamfunction_traction_elements.h:184
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
This function returns the residuals and the jacobian.
Definition: polar_streamfunction_traction_elements.h:155
virtual int s_local_eqn(const unsigned &n)
Definition: polar_streamfunction_traction_elements.h:59
Definition: refineable_elements.h:97
RealScalar alpha
Definition: level1_cplx_impl.h:151
double multiplier(const Vector< double > &xi)
Definition: disk_oscillation.cc:63
static const unsigned Dim
Problem dimension.
Definition: two_d_tilted_square.cc:62
double Alpha
Parameter for steepness of step.
Definition: two_d_adv_diff_adapt.cc:53
@ W
Definition: quadtree.h:63
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
Definition: indexed_view.cpp:20
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61