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,
106 template <
class 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,
129 nleft,nright,ny1,ny2,
133 this->setup_quadtree_forest();
158 template<
class ELEMENT>
176 const double& lright,
const double& hleaflet,
178 const unsigned& nleft,
const unsigned& nright,
179 const unsigned& ny1,
const unsigned& ny2,
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()
199 "MacroElementNodeUpdateChannelWithLeafletMesh::\n";
201 "MacroElementNodeUpdateChannelWithLeafletMesh()";
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));
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();
233 "MacroElementNodeUpdateChannelWithLeafletMesh::\n";
235 "MacroElementNodeUpdateChannelWithLeafletMesh()";
238 OOMPH_CURRENT_FUNCTION,
239 OOMPH_EXCEPTION_LOCATION);
249 el_pt->set_node_update_info(geom_object_pt);
280 template<
class ELEMENT>
298 const double& lright,
const double& hleaflet,
300 const unsigned& nleft,
const unsigned& nright,
301 const unsigned& ny1,
const unsigned& ny2,
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,
354 nleft,nright,ny1,ny2,
372 setup_algebraic_node_update();
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>
450 const double& lright,
451 const double& hleaflet,
453 const unsigned& nleft,
const unsigned& nright,
454 const unsigned& ny1,
const unsigned& ny2,
457 nleft,nright,ny1,ny2,
460 htot,nleft,nright,ny1,ny2,
464 this->setup_quadtree_forest();
482 template <
class ELEMENT>
499 const double& lright,
500 const double& hleaflet,
502 const unsigned& nleft,
503 const unsigned& nright,
509 nleft,nright,ny1,ny2,
514 bool update_all_solid_nodes=
true;
520 set_lagrangian_nodal_coordinates();
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors. ...
Channel with leaflet mesh upgraded to (pseudo-)solid mesh.
ChannelWithLeafletDomain * domain_pt()
Access function to domain.
Refineable version of ChannelWithLeafletMesh.
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...
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...
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
GeomObject * Leaflet_pt
Pointer to GeomObject that represents the leaflet.
unsigned long nelement() const
Return number of elements in the mesh.
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...
Domain *& macro_domain_pt()
Broken assignment operator.
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...
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
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...
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(...) function for FiniteElements and doesn't do anything for other element types. If a MacroElement pointer has been set for a FiniteElement, the MacroElement representation is used to update the nodal positions; if not get_x(...) uses the FE interpolation and thus leaves the nodal positions unchanged. Virtual, so it can be overloaded by specific meshes, such as AlgebraicMeshes or SpineMeshes. Generally, this function updates the position of all nodes in response to changes in the boundary position. However, we ignore all SolidNodes since their position is computed as part of the solution – unless the bool flag is set to true. Such calls are typically made when the initial mesh is created and/or after a mesh has been refined repeatedly before the start of the computation.
Base class for elements that allow MacroElement-based node update.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
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.
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...
Channel with leaflet mesh.
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
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.