29#ifndef OOMPH_LINEAR_ELASTICITY_TRACTION_ELEMENTS_HEADER
30#define OOMPH_LINEAR_ELASTICITY_TRACTION_ELEMENTS_HEADER
34#include <oomph-lib-config.h>
47 namespace TimeHarmonicLinearElasticityTractionElementHelper
59 load[
i] = std::complex<double>(0.0, 0.0);
73 template<
class ELEMENT>
132 for (
unsigned i = 0;
i <
n_dim;
i++)
135 cast_element_pt->u_index_time_harmonic_linear_elasticity(
i);
145 ELEMENT*
elem_pt =
dynamic_cast<ELEMENT*
>(element_pt);
156 throw OomphLibError(
"This flux element will not work correctly "
157 "if nodes are hanging\n",
201 const unsigned&
i)
const
236 for (
unsigned i = 0;
i <
ndim + 1;
i++)
242 for (
unsigned i = 0;
i <
ndim + 1;
i++)
248 for (
unsigned i = 0;
i <
ndim + 1;
i++)
289 template<
class ELEMENT>
315 template<
class ELEMENT>
326 if (n_position_type != 1)
328 throw OomphLibError(
"TimeHarmonicLinearElasticity is not yet implemented "
329 "for more than one position type",
340 for (
unsigned i = 0;
i <
n_dim;
i++)
349 this->U_index_time_harmonic_linear_elasticity_traction[
i];
383 for (
unsigned i = 0;
i <
n_dim;
i++)
390 for (
unsigned j = 0;
j <
n_dim - 1;
j++)
399 for (
unsigned i = 0;
i <
n_dim - 1;
i++)
401 for (
unsigned j = 0;
j <
n_dim - 1;
j++)
407 for (
unsigned k = 0;
k <
n_dim;
k++)
426 Adet = A(0, 0) * A(1, 1) - A(0, 1) * A(1, 0);
430 "Wrong dimension in TimeHarmonicLinearElasticityTractionElement",
431 "TimeHarmonicLinearElasticityTractionElement::fill_in_contribution_"
448 for (
unsigned i = 0;
i <
n_dim;
i++)
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
FaceElements are elements that coincide with the faces of higher-dimensional "bulk" elements....
int & face_index()
Index of the face (a number that uniquely identifies the face in the element)
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
In a FaceElement, the "global" intrinsic coordinate of the element along the boundary,...
double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s. Overloaded to get information from bulk...
FaceGeometry class definition: This policy class is used to allow construction of face elements that ...
A general Finite Element class.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
virtual void dshape_local_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsids) const
Return the geometric shape function and its derivative w.r.t. the local coordinates at the ipt-th int...
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")
unsigned nnodal_position_type() const
Return the number of coordinate types that the element requires to interpolate the geometry between t...
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
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 dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
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 ...
virtual void build_face_element(const int &face_index, FaceElement *face_element_pt)
Function for building a lower dimensional FaceElement on the specified face of the FiniteElement....
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
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"...
bool has_hanging_nodes() const
Return boolean to indicate if any of the element's nodes are geometrically hanging.
unsigned ndim() const
Access function to # of Eulerian coordinates.
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.
An OomphLibError object which should be thrown when an run-time error is encountered....
RefineableElements are FiniteElements that may be subdivided into children to provide a better local ...
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...
TAdvectionDiffusionReactionElement()
Constructor: Call constructors for TElement and AdvectionDiffusionReaction equations.
A class for elements that allow the imposition of an applied traction in the equations of time-harmon...
void fill_in_contribution_to_residuals_time_harmonic_linear_elasticity_traction(Vector< double > &residuals)
Helper function that actually calculates the residuals.
void(*&)(const Vector< double > &x, const Vector< double > &n, Vector< std::complex< double > > &traction) traction_fct_pt()
Reference to the traction function pointer.
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function.
void traction(const Vector< double > &s, Vector< std::complex< double > > &traction)
Compute traction vector at specified local coordinate Should only be used for post-processing; ignore...
void(* Traction_fct_pt)(const Vector< double > &x, const Vector< double > &n, Vector< std::complex< double > > &result)
Pointer to an imposed traction function. Arguments: Eulerian coordinate; outer unit normal; applied t...
TimeHarmonicLinearElasticityTractionElement(FiniteElement *const &element_pt, const int &face_index)
Constructor, which takes a "bulk" element and the value of the index and its limit.
void output(std::ostream &outfile, const unsigned &nplot)
Output function.
void output(std::ostream &outfile)
Output function.
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
Specify the value of nodal zeta from the face geometry The "global" intrinsic coordinate of the eleme...
Vector< std::complex< unsigned > > U_index_time_harmonic_linear_elasticity_traction
Index at which the i-th displacement component is stored.
virtual void get_traction(const unsigned &intpt, const Vector< double > &x, const Vector< double > &n, Vector< std::complex< double > > &traction)
Get the traction vector: Pass number of integration point (dummy), Eulerian coordinate and normal vec...
void output(FILE *file_pt)
C_style output function.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in contribution from Jacobian.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Return the residuals.
A slight extension to the standard template vector class so that we can include "graceful" array rang...
void Zero_traction_fct(const Vector< double > &x, const Vector< double > &N, Vector< std::complex< double > > &load)
Default load function (zero traction)
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).