26#ifndef OOMPH_FISH_MESH_TEMPLATE_HEADER
27#define OOMPH_FISH_MESH_TEMPLATE_HEADER
29#ifndef OOMPH_FISH_MESH_HEADER
30#error __FILE__ should only be included from fish_mesh.h.
39 template<
class ELEMENT>
43 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
52 Must_kill_fish_back =
true;
63 template<
class ELEMENT>
68 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
81 template<
class ELEMENT>
85 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
118 set_boundary_coordinate_exists(0);
119 set_boundary_coordinate_exists(4);
123 Element_pt.resize(
nelem);
146 for (
unsigned e = 0;
e <
nelem;
e++)
149 Element_pt[
e] =
new ELEMENT;
172 Domain_pt->macro_element_pt(
e)->macro_map(
s,
r);
215 if ((
i0 == 0) || (
i1 == 0))
272 for (
unsigned i = 0;
i < 2;
i++)
274 double error = std::fabs(
356 for (
unsigned i = 0;
i < 2;
i++)
358 double error = std::fabs(
406 finite_element_pt(
e)->node_pt(
j_local)->set_coordinates_on_boundary(
447 for (
unsigned i = 0;
i < 2;
i++)
449 double error = std::fabs(
471 if ((
i0 != 0) && (
i1 == 0))
482 for (
unsigned i = 0;
i < 2;
i++)
484 double error = std::fabs(
540 std::ostringstream error_message;
541 error_message <<
"Error occured in node killing!\n";
543 <<
"Max. permitted difference in position of the two nodes\n "
565 setup_boundary_element_info();
576 if (boundary_coordinate_exists(
ibound))
586 Back_pt->position(
zeta,
r);
592 for (
unsigned i = 0;
i < 2;
i++)
598 oomph_info <<
"Error in boundary coordinate for direction " <<
i
603 << boundary_node_pt(
ibound,
inod)->x(0) << std::endl;
606 << boundary_node_pt(
ibound,
inod)->x(1) << std::endl
618 std::ostringstream error_message;
619 error_message <<
"Error occured in boundary coordinate setup!\n";
640 template<
class ELEMENT>
644 this->setup_quadtree_forest();
660 template<
class ELEMENT>
670 std::ostringstream error_message;
671 error_message <<
"Element in AlgebraicFishMesh must be\n"
672 <<
"derived from AlgebraicElementBase\n"
673 <<
"but it is of type: "
703 geom_object_pt[0] = this->Back_pt;
722 ->add_node_update_info(this->Lower_body,
747 geom_object_pt[0] = this->Back_pt;
766 ->add_node_update_info(this->Lower_fin,
791 geom_object_pt[0] = this->Back_pt;
810 ->add_node_update_info(this->Upper_body,
835 geom_object_pt[0] = this->Back_pt;
854 ->add_node_update_info(this->Upper_fin,
867 template<
class ELEMENT>
875 double x_mouth = this->Domain_pt->x_mouth();
879 double zeta_mouth = this->Domain_pt->xi_nose();
922 template<
class ELEMENT>
930 double zeta_wall = this->Domain_pt->xi_tail();
933 double x_tail = this->Domain_pt->x_fin();
936 double y_tail = this->Domain_pt->y_fin();
Base class for algebraic elements.
void setup_algebraic_node_update()
Setup algebraic update operation for all nodes (separate function because this task needs to be perfo...
void node_update_in_body(const unsigned &t, AlgebraicNode *&node_pt)
Algebraic update function for nodes in upper/lower body.
void node_update_in_fin(const unsigned &t, AlgebraicNode *&node_pt)
Algebraic update function for nodes in upper/lower fin.
Algebraic nodes are nodes with an algebraic positional update function.
A general Finite Element class.
virtual void set_macro_elem_pt(MacroElement *macro_elem_pt)
Set pointer to macro element – can be overloaded in derived elements to perform additional tasks.
void position(const Vector< double > &zeta, Vector< double > &r) const
Return the parametrised position of the FiniteElement in its incarnation as a GeomObject,...
Node ** Node_pt
Storage for pointers to the nodes in the element.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
virtual unsigned nnode_1d() const
Return the number of nodes along one edge of the element Default is to return zero — must be overload...
Fish shaped domain, represented by four MacroElements. Shape is parametrised by GeomObject that repre...
Fish shaped mesh. The geometry is defined by the Domain object FishDomain.
FishMesh(TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to timestepper (defaults to the (Steady) default timestepper defined in Mes...
void build_mesh(TimeStepper *time_stepper_pt)
Build the mesh, using the geometric object identified by Back_pt.
bool Must_kill_fish_back
Do I need to kill the fish back geom object?
A geometric object is an object that provides a parametrised description of its shape via the functio...
unsigned ndim() const
Access function to # of Eulerian coordinates.
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
unsigned nlagrangian() const
Access function to # of Lagrangian coordinates.
FiniteElement * finite_element_pt(const unsigned &e) const
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions).
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
virtual void set_coordinates_on_boundary(const unsigned &b, const unsigned &k, const Vector< double > &boundary_zeta)
Set the vector of the k-th generalised boundary coordinates on mesh boundary b. Broken virtual interf...
double & x(const unsigned &i)
Return the i-th nodal coordinate.
void resize(const unsigned &n_value)
Resize the number of equations.
An OomphLibError object which should be thrown when an run-time error is encountered....
void setup_adaptivity()
Setup all the information that's required for spatial adaptivity: Set pointers to macro elements and ...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
void output(std::ostream &outfile)
Output function: x,y,u or x,y,z,u.
TAdvectionDiffusionReactionElement()
Constructor: Call constructors for TElement and AdvectionDiffusionReaction equations.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...