34 #ifndef OOMPH_STORED_SHAPE_FUNCTION_ELEMENTS_HEADER 35 #define OOMPH_STORED_SHAPE_FUNCTION_ELEMENTS_HEADER 40 #include <oomph-lib-config.h> 50 #define OOMPH_STORED_SHAPE_FUNCTIONS_VERBOSE 51 #undef OOMPH_STORED_SHAPE_FUNCTIONS_VERBOSE 108 DShape_local_stored_pt(0), D2Shape_local_stored_pt(0),
109 Can_delete_shape_local_stored(true),
110 DShape_eulerian_stored_pt(0), D2Shape_eulerian_stored_pt(0),
111 Jacobian_eulerian_stored_pt(0), Can_delete_dshape_eulerian_stored(true)
180 {
return (*Shape_stored_pt)[ipt];}
185 {
return (*Shape_stored_pt)[ipt];}
377 DShape_lagrangian_stored_pt(0),
378 D2Shape_lagrangian_stored_pt(0), Jacobian_lagrangian_stored_pt(0),
379 Can_delete_dshape_lagrangian_stored(true)
384 {delete_all_dshape_lagrangian_stored();}
400 void delete_all_dshape_lagrangian_stored();
404 void delete_dshape_lagrangian_stored();
408 void delete_d2shape_lagrangian_stored();
412 void delete_J_lagrangian_stored();
421 if(D2Shape_lagrangian_stored_pt!=0)
423 pre_compute_d2shape_lagrangian_at_knots();
426 else if(DShape_lagrangian_stored_pt!=0)
428 pre_compute_dshape_lagrangian_at_knots();
436 {
return DShape_lagrangian_stored_pt;}
442 {
return DShape_lagrangian_stored_pt;}
448 {
return D2Shape_lagrangian_stored_pt;}
454 {
return D2Shape_lagrangian_stored_pt;}
459 {
return Jacobian_lagrangian_stored_pt;}
465 {
return Jacobian_lagrangian_stored_pt;}
471 void pre_compute_dshape_lagrangian_at_knots();
477 double dshape_lagrangian_at_knot(
const unsigned &ipt,
484 void pre_compute_d2shape_lagrangian_at_knots();
491 double d2shape_lagrangian_at_knot(
const unsigned &ipt,
519 template<
class ELEMENT>
521 public virtual ELEMENT
567 template<
class ELEMENT>
569 public virtual ELEMENT
double J_eulerian_at_knot(const unsigned &ipt) const
Return the Jacobian of the mapping from local to global coordinates at the ipt-th integration point...
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
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...
void pre_compute_dshape_eulerian_at_knots()
Calculate the first derivatives of the shape functions w.r.t the global coordinates at the integratio...
Vector< DShape * > *const & d2shape_lagrangian_stored_pt() const
Return a pointer to the vector of pointers to the stored second derivatives of the shape functions w...
StorableShapeElementBase()
Constructor, set most storage pointers to NULL.
StorableShapeSolidElementBase(const StorableShapeSolidElementBase &)
Broken copy constructor.
Vector< double > * Jacobian_eulerian_stored_pt
Pointer to storage for the Jacobian of the element w.r.t global coordinates.
Vector< Shape * > *& shape_stored_pt()
Return a pointer to the vector of pointers to the stored shape functions.
Vector< DShape * > *& dshape_eulerian_stored_pt()
Return a pointer to the vector of pointers to the stored first derivatives of the shape functions w...
StorableShapeSolidElement(const StorableShapeSolidElement &)
Broken copy constructor.
void delete_dshape_eulerian_stored()
Delete stored deriatives of shape fcts w.r.t. to global Eulerian coords.
Vector< DShape * > *const & d2shape_local_stored_pt() const
Return a pointer to the vector of pointers to the stored second derivatives of the shape functions w...
void d2shape_local_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsids, DShape &d2psids) const
Return the geometric shape function and its first and second derivatives w.r.t. the local coordinates...
Vector< DShape * > * DShape_local_stored_pt
Pointer to storage for the pointers to the derivatives of the nodal shape functions w...
void operator=(const StorableShapeElementBase &)
Broken assignment operator.
A general Finite Element class.
Shape *const & shape_stored_pt(const unsigned &ipt) const
Return a pointer to the stored shape function at the ipt-th integration point (const version) ...
Vector< DShape * > *& dshape_lagrangian_stored_pt()
Return a pointer to the vector of pointers to the stored first derivatives of the shape functions w...
virtual ~StorableShapeElementBase()
The destructor cleans up the static memory allocated for shape function storage. Internal and externa...
bool Can_delete_dshape_eulerian_stored
Boolean to determine whether the element can delete the stored derivatives of shape functions w...
Vector< DShape * > * DShape_eulerian_stored_pt
Pointer to storage for the derivatives of the shape functions w.r.t. global coordinates at integratio...
void delete_dshape_local_stored()
Delete stored derivatives of shape functions w.r.t. to local coordinates.
void set_dshape_eulerian_stored_from_element(StorableShapeElementBase *const &element_pt)
Set the derivatives of stored shape functions with respect to the global coordinates to be the same a...
StorableShapeElement()
Constructor, set most storage pointers to zero.
Vector< DShape * > *& d2shape_lagrangian_stored_pt()
Return a pointer to the vector of pointers to the stored second derivatives of the shape functions w...
Vector< DShape * > *const & dshape_local_stored_pt() const
Return a pointer to the vector of pointers to the stored first derivatives of the shape functions w...
Vector< DShape * > *& dshape_local_stored_pt()
Return a pointer to the vector of pointers to the stored first derivatives of the shape functions w...
Vector< DShape * > * DShape_lagrangian_stored_pt
Pointer to storage for the pointers to the derivatives of the shape functions w.r.t. Lagrangian coordinates at integration points.
Vector< DShape * > *& d2shape_eulerian_stored_pt()
Return a pointer to the vector of pointers to the stored second derivatives of the shape functions w...
Vector< Shape * > * Shape_stored_pt
Pointer to storage for the pointers to the nodal shape functions at the integration points (knots) ...
Vector< double > * Jacobian_lagrangian_stored_pt
Pointer to storage for the Jacobian of the mapping between the local and the global Lagrangian coordi...
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
double d2shape_eulerian_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsidx, DShape &d2psidx) const
Return the geometric shape functions and also first and second derivatives w.r.t. global coordinates ...
Vector< double > *const & jacobian_lagrangian_stored_pt() const
Return a pointer to the vector of Jacobians of the mapping between the local and global (eulerian) co...
StorableShapeSolidElement()
Constructor: Set defaults.
Vector< DShape * > *const & dshape_lagrangian_stored_pt() const
Return a pointer to the vector of pointers to the stored first derivatives of the shape functions w...
void pre_compute_d2shape_local_at_knots()
Calculate the second derivatives of the shape functions w.r.t. local coordinates at the integration p...
StorableShapeElement(const StorableShapeElement &)
Broken copy constructor.
void pre_compute_J_eulerian_at_knots()
Calculate the Jacobian of the mapping from local to global coordinates at the integration points and ...
Vector< DShape * > * D2Shape_eulerian_stored_pt
Pointer to storage for the second derivatives of the shape functions w.r.t. global coordinates at int...
Vector< double > *& jacobian_eulerian_stored_pt()
Return a pointer to the vector of Jacobians of the mapping between the local and global (eulerian) co...
Vector< DShape * > * D2Shape_lagrangian_stored_pt
Pointer to storage for the pointers to the second derivatives of the shape functions w...
StorableShapeSolidElementBase()
Constructor: Set defaults: Nothing is stored.
void delete_all_dshape_eulerian_stored()
Delete all storage related to deriatives of shape fcts w.r.t. to global Eulerian coords.
void pre_compute_d2shape_eulerian_at_knots()
Calculate the first and second derivatives of the shape functions w.r.t global coordinates at the int...
bool Can_delete_dshape_lagrangian_stored
Boolean to determine whether the element can delete the stored shape function derivatives w...
Vector< double > *& jacobian_lagrangian_stored_pt()
Return a pointer to the vector of Jacobians of the mapping between the local and global (eulerian) co...
Vector< DShape * > *const & d2shape_eulerian_stored_pt() const
Return a pointer to the vector of pointers to the stored second derivatives of the shape functions w...
virtual ~StorableShapeSolidElement()
Destructor to clean up any allocated memory.
double dshape_eulerian_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsidx) const
Return the geometric shape functions and also first derivatives w.r.t. global coordinates at the ipt-...
Vector< double > *const & jacobian_eulerian_stored_pt() const
Return a pointer to the vector of Jacobians of the mapping between the local and global (eulerian) co...
void set_integration_scheme(Integral *const &integral_pt)
Overload the set_integration_scheme to recompute any stored derivatives w.r.t. Lagrangian coordinates...
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
void delete_d2shape_local_stored()
Delete stored 2nd derivatives of shape functions w.r.t. to local coordinates.
void delete_d2shape_eulerian_stored()
Delete stored second derivatives of shape functions w.r.t. to global Eulerian coordinates.
Vector< DShape * > *const & dshape_eulerian_stored_pt() const
Return a pointer to the vector of pointers to the stored first derivatives of the shape functions w...
void delete_J_eulerian_stored()
Delete stored Jacobian of mapping between local and global (Eulerian) coordinates.
void pre_compute_dshape_local_at_knots()
Calculate the shape functions and first derivatives w.r.t. local coordinatess at the integration poin...
Vector< DShape * > * D2Shape_local_stored_pt
Pointer to storage for the pointers to the second derivatives of the nodal shape functions w...
void delete_all_shape_local_stored()
Delete all the objects stored in the [...]_local_stored_pt vectors and delete the vectors themselves...
virtual void set_integration_scheme(Integral *const &integral_pt)
Set the spatial integration scheme – overloaded from the finite element base class since a change in...
virtual ~StorableShapeSolidElementBase()
Destructor to clean up any allocated memory.
StorableShapeElementBase(const StorableShapeElementBase &)
Broken copy constructor.
void operator=(const StorableShapeSolidElementBase &)
Broken assignment operator.
void pre_compute_shape_at_knots()
Calculate the shape functions at the integration points and store the results internally.
void operator=(const StorableShapeElement &)
Broken assignment operator.
Shape *& shape_stored_pt(const unsigned &ipt)
Return a pointer to the stored shape function at the ipt-th integration point.
void operator=(const StorableShapeSolidElement &)
Broken assignment operator.
bool Can_delete_shape_local_stored
Boolean to determine whether the element can delete the stored local shape functions.
void shape_at_knot(const unsigned &ipt, Shape &psi) const
Return the geometric shape function at the ipt-th integration point.
void delete_shape_local_stored()
Delete stored shape functions.
SolidFiniteElement class.
virtual ~StorableShapeElement()
Empty virtual destructor.
Vector< Shape * > *const & shape_stored_pt() const
Return a pointer to the vector of pointers to the stored shape functions (const version) ...
void set_shape_local_stored_from_element(StorableShapeElementBase *const &element_pt)
Set the shape functions pointed to internally to be those pointed to by the FiniteElement element_pt ...
Vector< DShape * > *& d2shape_local_stored_pt()
Return a pointer to the vector of pointers to the stored second derivatives of the shape functions w...