26#ifndef OOMPH_FISH_MESH_HEADER
27#define OOMPH_FISH_MESH_HEADER
30#include "generic/refineable_quad_mesh.h"
31#include "generic/macro_element.h"
32#include "generic/domain.h"
33#include "generic/algebraic_elements.h"
34#include "generic/quad_mesh.h"
35#include "generic/macro_element_node_update_element.h"
38#include "generic/algebraic_elements.h"
41#include "generic/macro_element_node_update_element.h"
52 template<
class ELEMENT>
123 template<
class ELEMENT>
125 public RefineableQuadMesh<ELEMENT>
179 class MacroElementNodeUpdateNode;
191 template<
class ELEMENT>
193 :
public virtual MacroElementNodeUpdateMesh,
212 <<
"MacroElementNodeUpdateRefineableFishMesh needs"
213 <<
"to be of type MacroElementNodeUpdateElement!\n";
218 "MacroElementNodeUpdateRefineableFishMesh::\n";
219 function_name +=
"MacroElementNodeUpdateRefineableFishMesh()";
245 <<
"Failed to upcast to MacroElementNodeUpdateElementBase\n";
247 "MacroElementNodeUpdateElementBase\n";
251 "MacroElementNodeUpdateRefineableFishMesh::\n";
252 function_name +=
"MacroElementNodeUpdateRefinableFishMesh()";
271 MacroElementNodeUpdateMesh::set_geom_object_vector_pt(
geom_object_pt);
274 MacroElementNodeUpdateMesh::macro_domain_pt() = this->
domain_pt();
291 "Doesn't make sense to use an MacroElementNodeUpdateMesh with\n";
293 "SolidElements so specifying update_all_solid_nodes=true\n";
297 "MacroElementNodeUpdateRefineableFishMesh::";
304 MacroElementNodeUpdateMesh::node_update();
318 template<
class ELEMENT>
340 AlgebraicMesh::add_geom_object_list_pt(
back_pt);
355 unsigned id =
node_pt->node_update_fct_id();
371 <<
", but it should only be one of " << this->
Lower_body
373 <<
" or " << this->
Upper_fin << std::endl;
375 "AlgebraicFishMesh::algebraic_node_update()";
394 "Doesn't make sense to use an AlgebraicMesh with\n";
396 "SolidElements so specifying update_all_solid_nodes=true\n";
399 std::string
function_name =
"AlgebraicFishMesh::node_update()";
405 AlgebraicMesh::node_update();
432 zeta[0] = 0.5 * (xi_nose + xi_tail);
441 error_message <<
"AlgebraicFishMesh only works with GeomObjects\n"
442 <<
"that do not contain sub-elements (e.g. GeomObjects\n"
443 <<
"that represent a wall finite element mesh!\n"
444 <<
"Back_pt : " << this->
Back_pt << std::endl
446 <<
"s[0] : " <<
s[0] << std::endl
447 <<
"zeta[0] : " <<
zeta[0] << std::endl;
479 template<
class ELEMENT>
Fish shaped mesh with algebraic node update function for nodes.
virtual ~AlgebraicFishMesh()
Destructor: empty.
void setup_algebraic_node_update()
Setup algebraic update operation for all nodes (separate function because this task needs to be perfo...
virtual void node_update(const bool &update_all_solid_nodes=false)
Resolve the node update function (we neither want the broken empty one in the Mesh base class nor the...
AlgebraicFishMesh(TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to timestepper. (defaults to (Steady) default timestepper defined in Mesh)
void node_update_in_body(const unsigned &t, AlgebraicNode *&node_pt)
Algebraic update function for nodes in upper/lower body.
void update_node_update(AlgebraicNode *&node_pt)
Update the geometric references that are used to update node after mesh adaptation....
AlgebraicFishMesh(GeomObject *back_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer GeomObject that defines the fish's back and pointer to timestepper (default...
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_in_fin(const unsigned &t, AlgebraicNode *&node_pt)
Algebraic update function for nodes in upper/lower fin.
Refineable fish shaped mesh with algebraic node update function.
AlgebraicRefineableFishMesh(GeomObject *back_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer GeomObject that defines the fish's back and pointer to timestepper....
virtual ~AlgebraicRefineableFishMesh()
Destructor: empty.
void node_update(const bool &update_all_solid_nodes=false)
Resolve node update function: Use the one defined in the AlgebraicFishMesh (where the bool flag is ex...
AlgebraicRefineableFishMesh(TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to timestepper. (defaults to (Steady) default timestepper defined in Mesh)
Fish shaped domain, represented by four MacroElements. Shape is parametrised by GeomObject that repre...
double & xi_nose()
Start coordinate on wall (near nose)
double & xi_tail()
End coordinate on wall (near tail)
Fish shaped mesh. The geometry is defined by the Domain object FishDomain.
GeomObject * Back_pt
Pointer to fish back.
virtual ~FishMesh()
Destructor: Kill the geom object that represents the fish's back (if necessary)
FishDomain *& domain_pt()
Access function to FishDomain.
void build_mesh(TimeStepper *time_stepper_pt)
Build the mesh, using the geometric object identified by Back_pt.
GeomObject *& fish_back_pt()
Access function to geom object that represents the fish's back.
bool Must_kill_fish_back
Do I need to kill the fish back geom object?
FishDomain * Domain_pt
Pointer to domain.
Refineable fish shaped mesh with MacroElement-based node update. The fish's back is represented by a ...
void node_update(const bool &update_all_solid_nodes=false)
Resolve mesh update: NodeUpdate current nodal positions via sparse MacroElement-based update....
virtual ~MacroElementNodeUpdateRefineableFishMesh()
Destructor: empty.
MacroElementNodeUpdateRefineableFishMesh(GeomObject *back_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer GeomObject that defines the fish's back and pointer to timestepper (default...
Refineable fish shaped mesh. The geometry is defined by the Domain object FishDomain.
void setup_adaptivity()
Setup all the information that's required for spatial adaptivity: Set pointers to macro elements and ...
RefineableFishMesh(TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to timestepper – defaults to (Steady) default timestepper defined in the Me...
RefineableFishMesh(GeomObject *back_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer GeomObject that defines the fish's back and pointer to timestepper (default...
virtual ~RefineableFishMesh()
Destructor: Empty – all cleanup gets handled in the base classes.
Unstructured refineable Triangle Mesh.