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>
67 GeomObject* leaflet_pt,
70 const double& hleaflet,
72 const unsigned& nleft,
73 const unsigned& nright,
76 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper);
104 template<
class ELEMENT>
107 public RefineableQuadMesh<ELEMENT>
120 GeomObject* leaflet_pt,
122 const double& lright,
123 const double& hleaflet,
125 const unsigned& nleft,
126 const unsigned& nright,
129 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
142 this->setup_quadtree_forest();
165 template<
class ELEMENT>
167 :
public virtual MacroElementNodeUpdateMesh,
181 GeomObject* leaflet_pt,
183 const double& lright,
184 const double& hleaflet,
186 const unsigned& nleft,
187 const unsigned& nright,
190 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
203 ELEMENT* el_pt =
new ELEMENT;
204 if (
dynamic_cast<MacroElementNodeUpdateElementBase*
>(el_pt) == 0)
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;
213 std::string function_name =
214 "MacroElementNodeUpdateChannelWithLeafletMesh::\n";
215 function_name +=
"MacroElementNodeUpdateChannelWithLeafletMesh()";
217 throw OomphLibError(error_message.str(),
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));
235 MacroElementNodeUpdateElementBase* m_el_pt =
236 dynamic_cast<MacroElementNodeUpdateElementBase*
>(el_pt);
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();
246 std::string function_name =
247 "MacroElementNodeUpdateChannelWithLeafletMesh::\n";
248 function_name +=
"MacroElementNodeUpdateChannelWithLeafletMesh()";
250 throw OomphLibError(error_message.str(),
251 OOMPH_CURRENT_FUNCTION,
252 OOMPH_EXCEPTION_LOCATION);
257 Vector<GeomObject*> geom_object_pt(1);
262 el_pt->set_node_update_info(geom_object_pt);
266 Vector<GeomObject*> geom_object_pt(1);
268 MacroElementNodeUpdateMesh::set_geom_object_vector_pt(geom_object_pt);
271 MacroElementNodeUpdateMesh::macro_domain_pt() = this->
domain_pt();
291 template<
class ELEMENT>
294 public virtual RefineableQuadMesh<ELEMENT>
307 GeomObject* leaflet_pt,
309 const double& lright,
310 const double& hleaflet,
312 const unsigned& nleft,
313 const unsigned& nright,
316 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
339 this->setup_quadtree_forest();
359 template<
class ELEMENT>
361 :
public AlgebraicMesh,
375 GeomObject* leaflet_pt,
377 const double& lright,
378 const double& hleaflet,
380 const unsigned& nleft,
381 const unsigned& nright,
384 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
397 Vector<double> zeta(1);
408 AlgebraicMesh::add_geom_object_list_pt(leaflet_pt);
433 void node_update_I(
const unsigned& t, AlgebraicNode*& node_pt);
446 const Vector<double>& zeta,
468 template<
class ELEMENT>
470 :
public RefineableQuadMesh<ELEMENT>,
484 GeomObject* leaflet_pt,
486 const double& lright,
487 const double& hleaflet,
489 const unsigned& nleft,
490 const unsigned& nright,
493 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
516 this->setup_quadtree_forest();
533 template<
class ELEMENT>
536 public virtual SolidMesh
548 GeomObject* leaflet_pt,
550 const double& lright,
551 const double& hleaflet,
553 const unsigned& nleft,
554 const unsigned& nright,
557 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
571 bool update_all_solid_nodes =
true;
572 node_update(update_all_solid_nodes);
577 set_lagrangian_nodal_coordinates();
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
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....
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 ~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...
///////////////////////////////////////////////////////////////////////// ///////////////////////////...
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.
////////////////////////////////////////////////////////////////// //////////////////////////////////...
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)
Simple rectangular 2D Quad mesh class. Nx : number of elements in the x direction.
////////////////////////////////////////////////////////////////////// //////////////////////////////...