26 #ifndef OOMPH_CHANNEL_WITH_LEAFLET_MESH_HEADER
27 #define OOMPH_CHANNEL_WITH_LEAFLET_MESH_HEADER
30 #include "../generic/refineable_quad_mesh.h"
31 #include "../generic/macro_element.h"
32 #include "../generic/domain.h"
33 #include "../generic/quad_mesh.h"
40 #include "../generic/macro_element_node_update_element.h"
43 #include "../generic/algebraic_elements.h"
53 template<
class ELEMENT>
70 const double& hleaflet,
72 const unsigned& nleft,
73 const unsigned& nright,
104 template<
class ELEMENT>
122 const double& lright,
123 const double& hleaflet,
125 const unsigned& nleft,
126 const unsigned& nright,
165 template<
class ELEMENT>
183 const double& lright,
184 const double& hleaflet,
186 const unsigned& nleft,
187 const unsigned& nright,
203 ELEMENT* el_pt =
new ELEMENT;
206 std::ostringstream error_message;
207 error_message <<
"Base class for ELEMENT in "
208 <<
"MacroElementNodeUpdateChannelWithLeafletMesh needs"
209 <<
"to be of type MacroElementNodeUpdateElement!\n";
210 error_message <<
"Whereas it is: typeid(el_pt).name()"
211 <<
typeid(el_pt).name() << std::endl;
214 "MacroElementNodeUpdateChannelWithLeafletMesh::\n";
215 function_name +=
"MacroElementNodeUpdateChannelWithLeafletMesh()";
218 OOMPH_CURRENT_FUNCTION,
219 OOMPH_EXCEPTION_LOCATION);
227 unsigned n_element = this->
nelement();
228 for (
unsigned i = 0;
i < n_element;
i++)
231 ELEMENT* el_pt =
dynamic_cast<ELEMENT*
>(this->
element_pt(
i));
239 std::ostringstream error_message;
241 <<
"Failed to upcast to MacroElementNodeUpdateElementBase\n";
242 error_message <<
"Element must be derived from "
243 "MacroElementNodeUpdateElementBase\n";
244 error_message <<
"but it is of type " <<
typeid(el_pt).name();
247 "MacroElementNodeUpdateChannelWithLeafletMesh::\n";
248 function_name +=
"MacroElementNodeUpdateChannelWithLeafletMesh()";
251 OOMPH_CURRENT_FUNCTION,
252 OOMPH_EXCEPTION_LOCATION);
262 el_pt->set_node_update_info(geom_object_pt);
291 template<
class ELEMENT>
309 const double& lright,
310 const double& hleaflet,
312 const unsigned& nleft,
313 const unsigned& nright,
359 template<
class ELEMENT>
377 const double& lright,
378 const double& hleaflet,
380 const unsigned& nleft,
381 const unsigned& nright,
468 template<
class ELEMENT>
486 const double& lright,
487 const double& hleaflet,
489 const unsigned& nleft,
490 const unsigned& nright,
533 template<
class ELEMENT>
550 const double& lright,
551 const double& hleaflet,
553 const unsigned& nleft,
554 const unsigned& nright,
571 bool update_all_solid_nodes =
true;
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
void setup_algebraic_node_update()
Function to setup the algebraic node update.
double X_0
Origin of the wall (stored explicitly for reference in algebraic node update – it's also stored indep...
AlgebraicChannelWithLeafletMesh(GeomObject *leaflet_pt, const double &lleft, const double &lright, const double &hleaflet, const double &htot, const unsigned &nleft, const unsigned &nright, const unsigned &ny1, const unsigned &ny2, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to GeomObject that represents the leaflet, the length of the domain to left...
double Hleaflet
Length of the leaflet (stored explicitly for reference in algebraic node update – it's also stored in...
void algebraic_node_update(const unsigned &t, AlgebraicNode *&node_pt)
Update nodal position at time level t (t=0: present; t>0: previous)
void node_update_I(const unsigned &t, AlgebraicNode *&node_pt)
Update function for nodes in lower left region (I)
void node_update_III(const unsigned &t, AlgebraicNode *&node_pt)
Update function for nodes in upper left region (III)
virtual ~AlgebraicChannelWithLeafletMesh()
Destructor: empty.
void node_update_II(const unsigned &t, AlgebraicNode *&node_pt)
Update function for nodes in lower right region (II)
void slanted_bound_up(const unsigned &t, const Vector< double > &zeta, Vector< double > &r)
Helper function.
void node_update_IV(const unsigned &t, AlgebraicNode *&node_pt)
Update function for nodes in upper right region (IV)
void update_node_update(AlgebraicNode *&node_pt)
Update the geometric references that are used to update node after mesh adaptation....
////////////////////////////////////////////////////////////////////
void add_geom_object_list_pt(GeomObject *geom_object_pt)
Add the specified GeomObject to the list of geometric objects associated with this AlgebraicMesh; rem...
AlgebraicNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global AlgebraicNode.
////////////////////////////////////////////////////////////////////
Rectangular domain with a leaflet blocking the lower half.
Channel with leaflet mesh.
ChannelWithLeafletDomain * Domain_pt
Pointer to domain.
ChannelWithLeafletDomain * domain_pt()
Access function to domain.
GeomObject * Leaflet_pt
Pointer to GeomObject that represents the leaflet.
ChannelWithLeafletMesh(GeomObject *leaflet_pt, const double &lleft, const double &lright, const double &hleaflet, const double &htot, const unsigned &nleft, const unsigned &nright, const unsigned &ny1, const unsigned &ny2, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to GeomObject that represents the leaflet, the length of the domain to left...
virtual ~ChannelWithLeafletMesh()
Destructor : empty.
/////////////////////////////////////////////////////////////////////
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
////////////////////////////////////////////////////////////////// //////////////////////////////////...
virtual ~MacroElementNodeUpdateChannelWithLeafletMesh()
Destructor: empty.
MacroElementNodeUpdateChannelWithLeafletMesh(GeomObject *leaflet_pt, const double &lleft, const double &lright, const double &hleaflet, const double &htot, const unsigned &nleft, const unsigned &nright, const unsigned &ny1, const unsigned &ny2, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to GeomObject that represents the leaflet, the length of the domain to left...
////////////////////////////////////////////////////////////////////
MacroElementNodeUpdateMeshes contain MacroElementNodeUpdateNodes which have their own node update fun...
void set_geom_object_vector_pt(Vector< GeomObject * > geom_object_vector_pt)
Set geometric objects associated with MacroElementNodeUpdateMesh; this must also be called from the c...
Domain *& macro_domain_pt()
Broken assignment operator.
///////////////////////////////////////////////////////////////////////// ///////////////////////////...
MacroElementNodeUpdateRefineableChannelWithLeafletMesh(GeomObject *leaflet_pt, const double &lleft, const double &lright, const double &hleaflet, const double &htot, const unsigned &nleft, const unsigned &nright, const unsigned &ny1, const unsigned &ny2, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to GeomObject that represents the leaflet, the length of the domain to left...
virtual ~MacroElementNodeUpdateRefineableChannelWithLeafletMesh()
Destructor: empty.
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors.
virtual void node_update(const bool &update_all_solid_nodes=false)
Update nodal positions in response to changes in the domain shape. Uses the FiniteElement::get_x(....
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
unsigned long nelement() const
Return number of elements in the mesh.
An OomphLibError object which should be thrown when an run-time error is encountered....
////////////////////////////////////////////////////////////////// //////////////////////////////////...
PseudoElasticChannelWithLeafletMesh(GeomObject *leaflet_pt, const double &lleft, const double &lright, const double &hleaflet, const double &htot, const unsigned &nleft, const unsigned &nright, const unsigned &ny1, const unsigned &ny2, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to GeomObject that represents the leaflet, the length of the domain to left...
virtual ~PseudoElasticChannelWithLeafletMesh()
Destructor : empty.
//////////////////////////////////////////////////////////////////////// ////////////////////////////...
RefineableAlgebraicChannelWithLeafletMesh(GeomObject *leaflet_pt, const double &lleft, const double &lright, const double &hleaflet, const double &htot, const unsigned &nleft, const unsigned &nright, const unsigned &ny1, const unsigned &ny2, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to GeomObject that represents the leaflet, the length of the domain to left...
void update_node_update(AlgebraicNode *&node_pt)
Update the node update data for specified node following any mesh adapation.
////////////////////////////////////////////////////////////////// //////////////////////////////////...
RefineableChannelWithLeafletMesh(GeomObject *leaflet_pt, const double &lleft, const double &lright, const double &hleaflet, const double &htot, const unsigned &nleft, const unsigned &nright, const unsigned &ny1, const unsigned &ny2, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to GeomObject that represents the leaflet, the length of the domain to left...
virtual ~RefineableChannelWithLeafletMesh()
Destructor (empty)
Intermediate mesh class that implements the mesh adaptation functions specified in the TreeBasedRefin...
void setup_quadtree_forest()
Set up QuadTreeForest. Wipes any existing tree structure below the minimum refinement level and regar...
Simple rectangular 2D Quad mesh class. Nx : number of elements in the x direction.
void set_lagrangian_nodal_coordinates()
Make the current configuration the undeformed one by setting the nodal Lagrangian coordinates to thei...
////////////////////////////////////////////////////////////////////// //////////////////////////////...
A slight extension to the standard template vector class so that we can include "graceful" array rang...
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...