26#ifndef OOMPH_FISH_MESH_TEMPLATE_CC
27#define OOMPH_FISH_MESH_TEMPLATE_CC
38 template<
class ELEMENT>
42 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
51 Must_kill_fish_back =
true;
63 template<
class ELEMENT>
68 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
82 template<
class ELEMENT>
86 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
120 Boundary_coordinate_exists[0] =
true;
121 Boundary_coordinate_exists[4] =
true;
125 Element_pt.resize(
nelem);
150 for (
unsigned e = 0;
e <
nelem;
e++)
153 Element_pt[
e] =
new ELEMENT;
176 Domain_pt->macro_element_pt(
e)->macro_map(
s,
r);
221 if ((
i0 == 0) || (
i1 == 0))
280 for (
unsigned i = 0;
i < 2;
i++)
282 double error = std::fabs(
366 for (
unsigned i = 0;
i < 2;
i++)
368 double error = std::fabs(
416 finite_element_pt(
e)->node_pt(
j_local)->set_coordinates_on_boundary(
459 for (
unsigned i = 0;
i < 2;
i++)
461 double error = std::fabs(
484 if ((
i0 != 0) && (
i1 == 0))
496 for (
unsigned i = 0;
i < 2;
i++)
498 double error = std::fabs(
556 std::ostringstream error_message;
557 error_message <<
"Error occured in node killing!\n";
559 <<
"Max. permitted difference in position of the two nodes\n "
583 setup_boundary_element_info();
595 if (boundary_coordinate_exists(
ibound))
605 Back_pt->position(
zeta,
r);
611 for (
unsigned i = 0;
i < 2;
i++)
617 oomph_info <<
"Error in boundary coordinate for direction " <<
i
622 << boundary_node_pt(
ibound,
inod)->x(0) << std::endl;
625 << boundary_node_pt(
ibound,
inod)->x(1) << std::endl
637 std::ostringstream error_message;
638 error_message <<
"Error occured in boundary coordinate setup!\n";
660 template<
class ELEMENT>
664 this->setup_quadtree_forest();
681 template<
class ELEMENT>
691 std::ostringstream error_message;
692 error_message <<
"Element in AlgebraicFishMesh must be\n"
693 <<
"derived from AlgebraicElementBase\n"
694 <<
"but it is of type: "
724 geom_object_pt[0] = this->Back_pt;
743 ->add_node_update_info(this->Lower_body,
769 geom_object_pt[0] = this->Back_pt;
788 ->add_node_update_info(this->Lower_fin,
814 geom_object_pt[0] = this->Back_pt;
833 ->add_node_update_info(this->Upper_body,
859 geom_object_pt[0] = this->Back_pt;
878 ->add_node_update_info(this->Upper_fin,
892 template<
class ELEMENT>
900 double x_mouth = this->Domain_pt->x_mouth();
904 double zeta_mouth = this->Domain_pt->xi_nose();
948 template<
class ELEMENT>
956 double zeta_wall = this->Domain_pt->xi_tail();
959 double x_tail = this->Domain_pt->x_fin();
962 double y_tail = this->Domain_pt->y_fin();
////////////////////////////////////////////////////////////////////
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.
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
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?
/////////////////////////////////////////////////////////////////////
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 ...
//////////////////////////////////////////////////////////////////////
void output(std::ostream &outfile)
Output function: x,y,u or x,y,z,u.
TAdvectionDiffusionReactionElement()
Constructor: Call constructors for TElement and AdvectionDiffusionReaction equations.
////////////////////////////////////////////////////////////////////// //////////////////////////////...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...