27#ifndef OOMPH_COLLAPSIBLE_CHANNEL_MESH_HEADER
28#define OOMPH_COLLAPSIBLE_CHANNEL_MESH_HEADER
62 template<
class ELEMENT>
73 const unsigned& ncollapsible,
74 const unsigned& ndown,
179 template<
class ELEMENT>
189 const unsigned& ncollapsible,
190 const unsigned& ndown,
232 template<
class ELEMENT>
244 const unsigned& ncollapsible,
245 const unsigned& ndown,
265 ELEMENT*
el_pt =
new ELEMENT;
268 std::ostringstream error_message;
269 error_message <<
"Base class for ELEMENT in "
270 <<
"MacroElementNodeUpdateCollapsibleChannelMesh needs"
271 <<
"to be of type MacroElementNodeUpdateElement!\n";
272 error_message <<
"Whereas it is: typeid(el_pt).name()"
276 "MacroElementNodeUpdateCollapsibleChannelMesh::\n";
277 function_name +=
"MacroElementNodeUpdateCollapsibleChannelMesh()";
290 for (
unsigned i = 0;
i < n_element;
i++)
301 std::ostringstream error_message;
303 <<
"Failed to upcast to MacroElementNodeUpdateElementBase\n";
304 error_message <<
"Element must be derived from "
305 "MacroElementNodeUpdateElementBase\n";
306 error_message <<
"but it is of type " <<
typeid(
el_pt).
name();
309 "MacroElementNodeUpdateCollapsibleChannelMesh::\n";
310 function_name +=
"MacroElementNodeUpdateCollapsibleChannelMesh()";
320 geom_object_pt[0] = this->
Wall_pt;
324 el_pt->set_node_update_info(geom_object_pt);
329 geom_object_pt[0] = this->
Wall_pt;
358 template<
class ELEMENT>
370 const unsigned& ncollapsible,
371 const unsigned& ndown,
417 template<
class ELEMENT>
430 const unsigned& ncollapsible,
431 const unsigned& ndown,
468 const unsigned& ncollapsible,
469 const unsigned& ndown,
511 std::ostringstream error_message;
513 <<
"It does not make sense to set the bl_squash_fct_pt \n"
514 <<
"outside the constructor as it's only used to set up the \n"
515 <<
"algebraic remesh data when the algebraic mesh is first built. \n";
517 "AlgebraicCollapsibleChannelMesh::bl_squash_fct_pt()\n";
536 std::ostringstream error_message;
538 <<
"It does not make sense to set the axial_spacing_fct_pt \n"
539 <<
"outside the constructor as it's only used to set up the \n"
540 <<
"algebraic remesh data when the algebraic mesh is first built. \n";
542 "AlgebraicCollapsibleChannelMesh::axial_spacing_fct_pt()\n";
578 template<
class ELEMENT>
591 const unsigned& ncollapsible,
592 const unsigned& ndown,
633 const unsigned& ncollapsible,
634 const unsigned& ndown,
Collapsible channel mesh with algebraic node update.
AlgebraicCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, CollapsibleChannelDomain::BLSquashFctPt bl_squash_function_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in upstream/collapsible/ downstream segment and across the chann...
void setup_algebraic_node_update()
Function to setup the algebraic node update.
CollapsibleChannelDomain::BLSquashFctPt Dummy_fct_pt
Dummy function pointer.
virtual ~AlgebraicCollapsibleChannelMesh()
Destructor: empty.
void update_node_update(AlgebraicNode *&node_pt)
Update the node-udate data after mesh adaptation. Empty – no update of node update required as this i...
AlgebraicCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in upstream/collapsible/ downstream segment and across the chann...
CollapsibleChannelDomain::BLSquashFctPt & bl_squash_fct_pt()
Function pointer for function that squashes the mesh near the walls. Default trivial mapping (the ide...
CollapsibleChannelDomain::BLSquashFctPt & axial_spacing_fct_pt()
Function pointer for function that redistributes nodes axially. Default trivial mapping (the identity...
void algebraic_node_update(const unsigned &t, AlgebraicNode *&node_pt)
Update nodal position at time level t (t=0: present; t>0: previous)
Algebraic meshes contain AlgebraicElements and AlgebraicNodes. They implement the node update functio...
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.
Algebraic nodes are nodes with an algebraic positional update function.
Collapsible channel domain.
AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function that implements axial spacing of macro elements.
double(* BLSquashFctPt)(const double &s)
Typedef for function pointer for function that squashes the macro elements near the wall to help reso...
double(* AxialSpacingFctPt)(const double &xi)
Typedef for function pointer for function that implements axial spacing of macro elements.
BLSquashFctPt & bl_squash_fct_pt()
Function pointer for function that squashes the macro elements near wall. Default mapping (identity) ...
Basic collapsible channel mesh. The mesh is derived from the SimpleRectangularQuadMesh so it's node a...
virtual CollapsibleChannelDomain::AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function that redistributes the elements in the axial direction....
~CollapsibleChannelMesh()
destructor
GeomObject * Wall_pt
Pointer to geometric object that represents the moving wall.
CollapsibleChannelDomain * domain_pt()
Access function to domain.
virtual CollapsibleChannelDomain::BLSquashFctPt & bl_squash_fct_pt()
Function pointer for function that squashes the mesh near the walls. Default trivial mapping (the ide...
CollapsibleChannelDomain::BLSquashFctPt bl_squash_fct_pt() const
Function pointer for function that squashes the mesh near the walls. Default trivial mapping (the ide...
GeomObject *& wall_pt()
Access function to GeomObject representing wall.
virtual CollapsibleChannelDomain::AxialSpacingFctPt & axial_spacing_fct_pt() const
Function pointer for function that redistributes the elements in the axial direction....
unsigned Ncollapsible
Number of element columns in collapsible part.
unsigned Nup
Number of element columns in upstream part.
unsigned Ndown
Number of element columns in downstream part.
CollapsibleChannelDomain * Domain_pt
Pointer to domain.
unsigned Ny
Number of element rows across channel.
A geometric object is an object that provides a parametrised description of its shape via the functio...
Collapsible channel mesh with MacroElement-based node update. The collapsible segment is represented ...
virtual ~MacroElementNodeUpdateCollapsibleChannelMesh()
Destructor: empty.
MacroElementNodeUpdateCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass numbers of elements and dimensions of the various parts of the collapsible channel,...
Base class for elements that allow MacroElement-based node update.
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.
Refineable collapsible channel mesh with MacroElement-based node update. The collapsible segment is r...
virtual ~MacroElementNodeUpdateRefineableCollapsibleChannelMesh()
Destructor: empty.
MacroElementNodeUpdateRefineableCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass numbers of elements and dimensions of the various parts of the collapsible channel,...
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....
Refineable version of the CollapsibleChannel mesh with algebraic node update.
void update_node_update(AlgebraicNode *&node_pt)
Update the node update data for specified node following any mesh adapation.
RefineableAlgebraicCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in upstream/collapsible/ downstream segment and across the chann...
RefineableAlgebraicCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, CollapsibleChannelDomain::BLSquashFctPt bl_squash_function_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in upstream/collapsible/ downstream segment and across the chann...
Refineable collapsible channel mesh. The mesh is derived from the SimpleRectangularQuadMesh so it's n...
RefineableCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements, lengths, pointer to geometric object that describes the wall an...
~RefineableCollapsibleChannelMesh()
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.
const unsigned & ny() const
Access function for number of elements in y directions.
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).