29 #ifndef OOMPH_POLAR_STRESS_INTEGRAL_ELEMENTS_HEADER
30 #define OOMPH_POLAR_STRESS_INTEGRAL_ELEMENTS_HEADER
39 #include "../generic/Qelements.h"
50 template<
class ELEMENT>
81 unsigned n_node =
nnode();
85 for (
unsigned i = 0;
i < n_node;
i++)
143 ELEMENT* elem_pt =
dynamic_cast<ELEMENT*
>(element_pt);
146 if (elem_pt->dim() == 3)
155 throw OomphLibError(
"This flux element will not work correctly "
156 "if nodes are hanging\n",
202 void output(std::ostream& outfile,
const unsigned& nplot)
208 double u(
const unsigned& l,
const unsigned&
i)
214 double x(
const unsigned& l,
const unsigned&
i)
223 template<
class ELEMENT>
227 double dudphi, shear_contribution = 0.0;
230 unsigned n_intpt = integral_pt()->nweight();
238 unsigned n_node = nnode();
241 Shape psif(n_node), testf(n_node);
244 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
247 double w = integral_pt()->weight(ipt);
251 double J = shape_and_test_at_knot(ipt, psif, testf);
260 for (
unsigned i = 0;
i <
Dim;
i++)
262 interpolated_x[
i] = 0.0;
266 for (
unsigned l = 0; l < n_node; l++)
269 for (
unsigned i = 0;
i <
Dim;
i++)
271 interpolated_x[
i] += nodal_position(l,
i) * psif[l];
276 s_local[0] = integral_pt()->knot(ipt, 0);
279 s_bulk = this->local_coordinate_in_bulk(s_local);
282 ELEMENT* el_pt =
dynamic_cast<ELEMENT*
>(this->Bulk_element_pt);
285 dudphi = el_pt->interpolated_dudx_pnst(s_bulk, 0, 1);
288 shear_contribution += dudphi *
W;
293 return shear_contribution;
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
bool has_hanging_nodes() const
Definition: elements.h:2470
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
Definition: nodes.h:1054
Definition: oomph_definitions.h:222
Definition: polar_stress_integral_elements.h:53
void output(std::ostream &outfile)
Overload the output function.
Definition: polar_stress_integral_elements.h:196
double * Alpha_pt
Pointer to the angle alpha.
Definition: polar_stress_integral_elements.h:94
void fill_in_contribution_to_residuals(Vector< double > &residuals)
This function returns just the residuals.
Definition: polar_stress_integral_elements.h:173
const double & alpha() const
Alpha.
Definition: polar_stress_integral_elements.h:104
double u(const unsigned &l, const unsigned &i)
local velocities
Definition: polar_stress_integral_elements.h:208
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: polar_stress_integral_elements.h:187
double shape_and_test_at_knot(const unsigned &ipt, Shape &psi, Shape &test) const
Definition: polar_stress_integral_elements.h:76
~PolarStressIntegralElement()
Destructor should not delete anything.
Definition: polar_stress_integral_elements.h:170
void(* Traction_fct_pt)(const double &time, const Vector< double > &x, Vector< double > &result)
Pointer to an imposed traction function.
Definition: polar_stress_integral_elements.h:56
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
This function returns the residuals and the jacobian.
Definition: polar_stress_integral_elements.h:179
int Boundary
Definition: polar_stress_integral_elements.h:100
void output(std::ostream &outfile, const unsigned &nplot)
Output function: x,y,[z],u,v,[w],p in tecplot format.
Definition: polar_stress_integral_elements.h:202
void set_boundary(int bound)
Function to set boundary.
Definition: polar_stress_integral_elements.h:122
double x(const unsigned &l, const unsigned &i)
local position
Definition: polar_stress_integral_elements.h:214
double *& alpha_pt()
Pointer to Alpha.
Definition: polar_stress_integral_elements.h:110
const int boundary() const
Boundary.
Definition: polar_stress_integral_elements.h:116
virtual int u_local_eqn(const unsigned &n, const unsigned &i)
Definition: polar_stress_integral_elements.h:69
unsigned Dim
The highest dimension of the problem.
Definition: polar_stress_integral_elements.h:61
double get_shear_stress()
Function to calculate the shear stress along boundary.
Definition: polar_stress_integral_elements.h:224
PolarStressIntegralElement(FiniteElement *const &element_pt, const int &face_index)
Definition: polar_stress_integral_elements.h:132
Definition: refineable_elements.h:97
static const unsigned Dim
Problem dimension.
Definition: two_d_tilted_square.cc:62
@ 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
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86