30 #ifndef OOMPH_CHANNEL_WITH_LEAFLET_MESH_HEADER 31 #define OOMPH_CHANNEL_WITH_LEAFLET_MESH_HEADER 34 #include "../generic/refineable_quad_mesh.h" 35 #include "../generic/macro_element.h" 36 #include "../generic/domain.h" 37 #include "../generic/quad_mesh.h" 44 #include "../generic/macro_element_node_update_element.h" 47 #include "../generic/algebraic_elements.h" 58 template <
class ELEMENT>
73 const double& lright,
const double& hleaflet,
75 const unsigned& nleft,
const unsigned& nright,
76 const unsigned& ny1,
const unsigned& ny2,
77 TimeStepper* time_stepper_pt=
78 &Mesh::Default_TimeStepper);
106 template <
class ELEMENT>
109 public RefineableQuadMesh<ELEMENT>
122 const double& lleft,
const double& lright,
123 const double& hleaflet,
const double& htot,
124 const unsigned& nleft,
const unsigned& nright,
125 const unsigned& ny1,
const unsigned& ny2,
126 TimeStepper* time_stepper_pt=
127 &Mesh::Default_TimeStepper):
129 nleft,nright,ny1,ny2,
133 this->setup_quadtree_forest();
158 template<
class ELEMENT>
160 public virtual MacroElementNodeUpdateMesh,
175 GeomObject* leaflet_pt,
const double& lleft,
176 const double& lright,
const double& hleaflet,
178 const unsigned& nleft,
const unsigned& nright,
179 const unsigned& ny1,
const unsigned& ny2,
180 TimeStepper* time_stepper_pt=&Mesh::Default_TimeStepper) :
182 nleft,nright,ny1,ny2,
186 ELEMENT* el_pt=
new ELEMENT;
187 if (dynamic_cast<MacroElementNodeUpdateElementBase*>(el_pt)==0)
189 std::ostringstream error_message;
191 <<
"Base class for ELEMENT in " 192 <<
"MacroElementNodeUpdateChannelWithLeafletMesh needs" 193 <<
"to be of type MacroElementNodeUpdateElement!\n";
194 error_message <<
"Whereas it is: typeid(el_pt).name()" 195 <<
typeid(el_pt).name()
198 std::string function_name =
199 "MacroElementNodeUpdateChannelWithLeafletMesh::\n";
201 "MacroElementNodeUpdateChannelWithLeafletMesh()";
203 throw OomphLibError(error_message.str(),
204 OOMPH_CURRENT_FUNCTION,
205 OOMPH_EXCEPTION_LOCATION);
213 unsigned n_element = this->nelement();
214 for(
unsigned i=0;i<n_element;i++)
217 ELEMENT *el_pt =
dynamic_cast<ELEMENT*
>(this->element_pt(i));
221 MacroElementNodeUpdateElementBase* m_el_pt=
dynamic_cast< 222 MacroElementNodeUpdateElementBase*
>(el_pt);
225 std::ostringstream error_message;
227 <<
"Failed to upcast to MacroElementNodeUpdateElementBase\n";
229 <<
"Element must be derived from MacroElementNodeUpdateElementBase\n";
230 error_message <<
"but it is of type " <<
typeid(el_pt).name();
232 std::string function_name =
233 "MacroElementNodeUpdateChannelWithLeafletMesh::\n";
235 "MacroElementNodeUpdateChannelWithLeafletMesh()";
237 throw OomphLibError(error_message.str(),
238 OOMPH_CURRENT_FUNCTION,
239 OOMPH_EXCEPTION_LOCATION);
244 Vector<GeomObject*> geom_object_pt(1);
249 el_pt->set_node_update_info(geom_object_pt);
253 Vector<GeomObject*> geom_object_pt(1);
255 MacroElementNodeUpdateMesh::set_geom_object_vector_pt(geom_object_pt);
258 MacroElementNodeUpdateMesh::macro_domain_pt()=this->
domain_pt();
280 template<
class ELEMENT>
283 public virtual RefineableQuadMesh<ELEMENT>
297 GeomObject* leaflet_pt,
const double& lleft,
298 const double& lright,
const double& hleaflet,
300 const unsigned& nleft,
const unsigned& nright,
301 const unsigned& ny1,
const unsigned& ny2,
302 TimeStepper* time_stepper_pt=&Mesh::Default_TimeStepper) :
304 nleft,nright,ny1,ny2,
307 leaflet_pt,lleft,lright,hleaflet,htot,
308 nleft,nright,ny1,ny2,
312 this->setup_quadtree_forest();
332 template<
class ELEMENT>
347 const double& lright,
const double& hleaflet,
349 const unsigned& nleft,
const unsigned& nright,
350 const unsigned& ny1,
const unsigned& ny2,
351 TimeStepper* time_stepper_pt=
352 &Mesh::Default_TimeStepper) :
354 nleft,nright,ny1,ny2,
358 Vector<double> zeta(1);
369 AlgebraicMesh::add_geom_object_list_pt(leaflet_pt);
372 setup_algebraic_node_update();
387 void algebraic_node_update(
const unsigned& t, AlgebraicNode*& node_pt);
392 void setup_algebraic_node_update();
395 void node_update_I(
const unsigned& t, AlgebraicNode*& node_pt);
398 void node_update_II(
const unsigned& t, AlgebraicNode*& node_pt);
401 void node_update_III(
const unsigned& t, AlgebraicNode*& node_pt);
404 void node_update_IV(
const unsigned& t,AlgebraicNode*& node_pt);
407 void slanted_bound_up(
const unsigned& t,
const Vector<double>& zeta,
431 template<
class ELEMENT>
433 public RefineableQuadMesh<ELEMENT>,
448 GeomObject* leaflet_pt,
450 const double& lright,
451 const double& hleaflet,
453 const unsigned& nleft,
const unsigned& nright,
454 const unsigned& ny1,
const unsigned& ny2,
455 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper) :
457 nleft,nright,ny1,ny2,
460 htot,nleft,nright,ny1,ny2,
464 this->setup_quadtree_forest();
469 void update_node_update(AlgebraicNode*& node_pt);
482 template <
class ELEMENT>
499 const double& lright,
500 const double& hleaflet,
502 const unsigned& nleft,
503 const unsigned& nright,
506 TimeStepper* time_stepper_pt=
507 &Mesh::Default_TimeStepper) :
509 nleft,nright,ny1,ny2,
514 bool update_all_solid_nodes=
true;
515 node_update(update_all_solid_nodes);
520 set_lagrangian_nodal_coordinates();
double X_0
Orientation (x-coordinate of step plane)
Channel with leaflet mesh upgraded to (pseudo-)solid mesh.
ChannelWithLeafletDomain * domain_pt()
Access function to domain.
Refineable version of ChannelWithLeafletMesh.
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...
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...
GeomObject * Leaflet_pt
Pointer to GeomObject that represents the leaflet.
virtual ~RefineableChannelWithLeafletMesh()
Destructor (empty)
virtual ~ChannelWithLeafletMesh()
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 ~MacroElementNodeUpdateChannelWithLeafletMesh()
Destructor: empty.
Refineable mesh with MacroElement-based node update.
void update_node_update(AlgebraicNode *&node_pt)
Update the geometric references that are used to update node after mesh adaptation. Empty – no update of node update required without adaptivity.
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...
Refineable version of algebraic ChannelWithLeafletMesh.
ChannelWithLeafletDomain * Domain_pt
Pointer to domain.
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...
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...
virtual ~MacroElementNodeUpdateRefineableChannelWithLeafletMesh()
Destructor: empty.
Channel with leaflet mesh.
virtual ~AlgebraicChannelWithLeafletMesh()
Destructor: empty.
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 ~PseudoElasticChannelWithLeafletMesh()
Destructor : empty.