oomph::AlgebraicCylinderWithFlagMesh< ELEMENT > Class Template Reference

Algebraic version of CylinderWithFlagMesh. More...

#include <cylinder_with_flag_mesh.template.h>

+ Inheritance diagram for oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >:

Public Member Functions

 AlgebraicCylinderWithFlagMesh (Circle *cylinder_pt, GeomObject *top_flag_pt, GeomObject *bottom_flag_pt, GeomObject *tip_flag_pt, const double &length, const double &height, const double &flag_length, const double &flag_height, const double &centre_x, const double &centre_y, const double &a, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
 
virtual ~AlgebraicCylinderWithFlagMesh ()
 Destructor: empty. More...
 
void set_bottom_flag_pt (GeomObject *bottom_flag_pt)
 
void set_top_flag_pt (GeomObject *top_flag_pt)
 
void set_tip_flag_pt (GeomObject *tip_flag_pt)
 
GeomObjectbottom_flag_pt () const
 
GeomObjecttop_flag_pt () const
 
GeomObjecttip_flag_pt () const
 
void update_node_update (AlgebraicNode *&node_pt)
 
void algebraic_node_update (const unsigned &t, AlgebraicNode *&node_pt)
 The algebraic node update function. More...
 
- Public Member Functions inherited from oomph::AlgebraicMesh
 AlgebraicMesh ()
 
 AlgebraicMesh (const AlgebraicMesh &)=delete
 Broken copy constructor. More...
 
 ~AlgebraicMesh ()
 Broken assignment operator. More...
 
AlgebraicNodenode_pt (const unsigned long &n)
 Return a pointer to the n-th global AlgebraicNode. More...
 
void node_update (const bool &update_all_solid_nodes=false)
 
unsigned self_test ()
 Self test: check consistentency of multiple node updates. More...
 
void add_geom_object_list_pt (GeomObject *geom_object_pt)
 
unsigned ngeom_object_list_pt ()
 Return number of geometric objects associated with AlgebraicMesh. More...
 
GeomObjectgeom_object_list_pt (const unsigned &i)
 Access function to the ith GeomObject. More...
 
- Public Member Functions inherited from oomph::Mesh
 Mesh ()
 Default constructor. More...
 
 Mesh (const Vector< Mesh * > &sub_mesh_pt)
 
void merge_meshes (const Vector< Mesh * > &sub_mesh_pt)
 
virtual void reset_boundary_element_info (Vector< unsigned > &ntmp_boundary_elements, Vector< Vector< unsigned >> &ntmp_boundary_elements_in_region, Vector< FiniteElement * > &deleted_elements)
 Virtual function to perform the reset boundary elements info rutines. More...
 
template<class BULK_ELEMENT >
void doc_boundary_coordinates (const unsigned &b, std::ofstream &the_file)
 
virtual void scale_mesh (const double &factor)
 
 Mesh (const Mesh &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const Mesh &)=delete
 Broken assignment operator. More...
 
virtual ~Mesh ()
 Virtual Destructor to clean up all memory. More...
 
void flush_element_and_node_storage ()
 
void flush_element_storage ()
 
void flush_node_storage ()
 
Node *& node_pt (const unsigned long &n)
 Return pointer to global node n. More...
 
Nodenode_pt (const unsigned long &n) const
 Return pointer to global node n (const version) More...
 
GeneralisedElement *& element_pt (const unsigned long &e)
 Return pointer to element e. More...
 
GeneralisedElementelement_pt (const unsigned long &e) const
 Return pointer to element e (const version) More...
 
const Vector< GeneralisedElement * > & element_pt () const
 Return reference to the Vector of elements. More...
 
Vector< GeneralisedElement * > & element_pt ()
 Return reference to the Vector of elements. More...
 
FiniteElementfinite_element_pt (const unsigned &e) const
 
Node *& boundary_node_pt (const unsigned &b, const unsigned &n)
 Return pointer to node n on boundary b. More...
 
Nodeboundary_node_pt (const unsigned &b, const unsigned &n) const
 Return pointer to node n on boundary b. More...
 
void set_nboundary (const unsigned &nbound)
 Set the number of boundaries in the mesh. More...
 
void remove_boundary_nodes ()
 Clear all pointers to boundary nodes. More...
 
void remove_boundary_nodes (const unsigned &b)
 
void remove_boundary_node (const unsigned &b, Node *const &node_pt)
 Remove a node from the boundary b. More...
 
void add_boundary_node (const unsigned &b, Node *const &node_pt)
 Add a (pointer to) a node to the b-th boundary. More...
 
void copy_boundary_node_data_from_nodes ()
 
bool boundary_coordinate_exists (const unsigned &i) const
 Indicate whether the i-th boundary has an intrinsic coordinate. More...
 
unsigned long nelement () const
 Return number of elements in the mesh. More...
 
unsigned long nnode () const
 Return number of nodes in the mesh. More...
 
unsigned ndof_types () const
 Return number of dof types in mesh. More...
 
unsigned elemental_dimension () const
 Return number of elemental dimension in mesh. More...
 
unsigned nodal_dimension () const
 Return number of nodal dimension in mesh. More...
 
void add_node_pt (Node *const &node_pt)
 Add a (pointer to a) node to the mesh. More...
 
void add_element_pt (GeneralisedElement *const &element_pt)
 Add a (pointer to) an element to the mesh. More...
 
virtual void reorder_nodes (const bool &use_old_ordering=true)
 
virtual void get_node_reordering (Vector< Node * > &reordering, const bool &use_old_ordering=true) const
 
template<class BULK_ELEMENT , template< class > class FACE_ELEMENT>
void build_face_mesh (const unsigned &b, Mesh *const &face_mesh_pt)
 
unsigned self_test ()
 Self-test: Check elements and nodes. Return 0 for OK. More...
 
void max_and_min_element_size (double &max_size, double &min_size)
 
double total_size ()
 
void check_inverted_elements (bool &mesh_has_inverted_elements, std::ofstream &inverted_element_file)
 
void check_inverted_elements (bool &mesh_has_inverted_elements)
 
unsigned check_for_repeated_nodes (const double &epsilon=1.0e-12)
 
Vector< Node * > prune_dead_nodes ()
 
unsigned nboundary () const
 Return number of boundaries. More...
 
unsigned long nboundary_node (const unsigned &ibound) const
 Return number of nodes on a particular boundary. More...
 
FiniteElementboundary_element_pt (const unsigned &b, const unsigned &e) const
 Return pointer to e-th finite element on boundary b. More...
 
Nodeget_some_non_boundary_node () const
 
unsigned nboundary_element (const unsigned &b) const
 Return number of finite elements that are adjacent to boundary b. More...
 
int face_index_at_boundary (const unsigned &b, const unsigned &e) const
 
virtual void dump (std::ofstream &dump_file, const bool &use_old_ordering=true) const
 Dump the data in the mesh into a file for restart. More...
 
void dump (const std::string &dump_file_name, const bool &use_old_ordering=true) const
 Dump the data in the mesh into a file for restart. More...
 
virtual void read (std::ifstream &restart_file)
 Read solution from restart file. More...
 
void output_paraview (std::ofstream &file_out, const unsigned &nplot) const
 
void output_fct_paraview (std::ofstream &file_out, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt) const
 
void output_fct_paraview (std::ofstream &file_out, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt) const
 
void output (std::ostream &outfile)
 Output for all elements. More...
 
void output (std::ostream &outfile, const unsigned &n_plot)
 Output at f(n_plot) points in each element. More...
 
void output (FILE *file_pt)
 Output for all elements (C-style output) More...
 
void output (FILE *file_pt, const unsigned &nplot)
 Output at f(n_plot) points in each element (C-style output) More...
 
void output (const std::string &output_filename)
 Output for all elements. More...
 
void output (const std::string &output_filename, const unsigned &n_plot)
 Output at f(n_plot) points in each element. More...
 
void output_fct (std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt)
 Output a given Vector function at f(n_plot) points in each element. More...
 
void output_fct (std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt)
 
void output_boundaries (std::ostream &outfile)
 Output the nodes on the boundaries (into separate tecplot zones) More...
 
void output_boundaries (const std::string &output_filename)
 
void assign_initial_values_impulsive ()
 Assign initial values for an impulsive start. More...
 
void shift_time_values ()
 
void calculate_predictions ()
 
void set_nodal_and_elemental_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
virtual void set_mesh_level_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
void set_consistent_pinned_values_for_continuation (ContinuationStorageScheme *const &continuation_stepper_pt)
 Set consistent values for pinned data in continuation. More...
 
bool does_pointer_correspond_to_mesh_data (double *const &parameter_pt)
 Does the double pointer correspond to any mesh data. More...
 
void set_nodal_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 Set the timestepper associated with the nodal data in the mesh. More...
 
void set_elemental_internal_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
virtual void compute_norm (double &norm)
 
virtual void compute_norm (Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 
virtual void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 
virtual void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 Returns the norm of the error and that of the exact solution. More...
 
virtual void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
bool is_mesh_distributed () const
 Boolean to indicate if Mesh has been distributed. More...
 
OomphCommunicatorcommunicator_pt () const
 
void delete_all_external_storage ()
 Wipe the storage for all externally-based elements. More...
 
- Public Member Functions inherited from oomph::CylinderWithFlagMesh< ELEMENT >
 CylinderWithFlagMesh (Circle *cylinder_pt, GeomObject *top_flag_pt, GeomObject *bottom_flag_pt, GeomObject *tip_flag_pt, const double &length, const double &height, const double &flag_length, const double &flag_height, const double &centre_x, const double &centre_y, const double &a, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
 
virtual ~CylinderWithFlagMesh ()
 Destructor: Kill the domain. More...
 
CylinderWithFlagDomaindomain_pt ()
 Access function to the domain. More...
 
- Public Member Functions inherited from oomph::QuadMeshBase
 QuadMeshBase ()
 Constructor (empty) More...
 
 QuadMeshBase (const QuadMeshBase &node)=delete
 Broken copy constructor. More...
 
void operator= (const QuadMeshBase &)=delete
 Broken assignment operator. More...
 
virtual ~QuadMeshBase ()
 Destructor (empty) More...
 
void setup_boundary_element_info ()
 
void setup_boundary_element_info (std::ostream &outfile)
 

Protected Member Functions

void setup_algebraic_node_update ()
 Function to setup the algebraic node update. More...
 
void node_update_I (const unsigned &t, AlgebraicNode *&node_pt)
 Helper function. More...
 
void node_update_II (const unsigned &t, AlgebraicNode *&node_pt)
 Helper function. More...
 
void node_update_III (const unsigned &t, AlgebraicNode *&node_pt)
 Helper function. More...
 
void node_update_IV (const unsigned &t, AlgebraicNode *&node_pt)
 Helper function. More...
 
void node_update_V (const unsigned &t, AlgebraicNode *&node_pt)
 Helper function. More...
 
void node_update_VI (const unsigned &t, AlgebraicNode *&node_pt)
 Helper function. More...
 
void node_update_VII (const unsigned &t, AlgebraicNode *&node_pt)
 Helper function. More...
 
void node_update_VIII (const unsigned &t, AlgebraicNode *&node_pt)
 Helper function. More...
 
void node_update_IX (const unsigned &t, AlgebraicNode *&node_pt)
 Helper function. More...
 
- Protected Member Functions inherited from oomph::Mesh
unsigned long assign_global_eqn_numbers (Vector< double * > &Dof_pt)
 Assign (global) equation numbers to the nodes. More...
 
void describe_dofs (std::ostream &out, const std::string &current_string) const
 
void describe_local_dofs (std::ostream &out, const std::string &current_string) const
 
void assign_local_eqn_numbers (const bool &store_local_dof_pt)
 Assign local equation numbers in all elements. More...
 
void convert_to_boundary_node (Node *&node_pt, const Vector< FiniteElement * > &finite_element_pt)
 
void convert_to_boundary_node (Node *&node_pt)
 

Protected Attributes

GeomObjectCylinder_pt
 Cylinder. More...
 
GeomObjectTop_flag_pt
 Top flag. More...
 
GeomObjectBottom_flag_pt
 Bottom flag. More...
 
GeomObjectTip_flag_pt
 Tip flag. More...
 
double Length
 Length of the domain. More...
 
double Height
 Height of the domain. More...
 
double Flag_length
 Flag length. More...
 
double Flag_height
 Flag thickness. More...
 
double Centre_x
 x position of the centre of the cylinder More...
 
double Centre_y
 x position of the centre of the cylinder More...
 
double A
 radius of the cylinder More...
 
- Protected Attributes inherited from oomph::Mesh
Vector< Vector< Node * > > Boundary_node_pt
 
bool Lookup_for_elements_next_boundary_is_setup
 
Vector< Vector< FiniteElement * > > Boundary_element_pt
 
Vector< Vector< int > > Face_index_at_boundary
 
Vector< Node * > Node_pt
 Vector of pointers to nodes. More...
 
Vector< GeneralisedElement * > Element_pt
 Vector of pointers to generalised elements. More...
 
std::vector< boolBoundary_coordinate_exists
 
- Protected Attributes inherited from oomph::CylinderWithFlagMesh< ELEMENT >
CylinderWithFlagDomainDomain_pt
 Pointer to the domain. More...
 

Additional Inherited Members

- Public Types inherited from oomph::Mesh
typedef void(FiniteElement::* SteadyExactSolutionFctPt) (const Vector< double > &x, Vector< double > &soln)
 
typedef void(FiniteElement::* UnsteadyExactSolutionFctPt) (const double &time, const Vector< double > &x, Vector< double > &soln)
 
- Static Public Attributes inherited from oomph::Mesh
static Steady< 0 > Default_TimeStepper
 The Steady Timestepper. More...
 
static bool Suppress_warning_about_empty_mesh_level_time_stepper_function
 Static boolean flag to control warning about mesh level timesteppers. More...
 

Detailed Description

template<class ELEMENT>
class oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >

Algebraic version of CylinderWithFlagMesh.

/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////

Constructor & Destructor Documentation

◆ AlgebraicCylinderWithFlagMesh()

template<class ELEMENT >
oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::AlgebraicCylinderWithFlagMesh ( Circle cylinder_pt,
GeomObject top_flag_pt,
GeomObject bottom_flag_pt,
GeomObject tip_flag_pt,
const double length,
const double height,
const double flag_length,
const double flag_height,
const double centre_x,
const double centre_y,
const double a,
TimeStepper time_stepper_pt = &Mesh::Default_TimeStepper 
)
inline

Constructor. Pass the pointers to the GeomObjects that parametrise the cylinder, the three edges of the flag, the length and height of the domain, the length and height of the flag, the coordinates of the centre of the cylinder and its radius. Timestepper defaults to Steady default timestepper.

178  : CylinderWithFlagMesh<ELEMENT>(cylinder_pt,
179  top_flag_pt,
181  tip_flag_pt,
182  length,
183  height,
184  flag_length,
185  flag_height,
186  centre_x,
187  centre_y,
188  a,
189  time_stepper_pt),
190  Cylinder_pt(cylinder_pt),
194  Length(length),
195  Height(height),
196  Flag_length(flag_length),
197  Flag_height(flag_height),
198  Centre_x(centre_x),
199  Centre_y(centre_y),
200  A(a)
201  {
202  // Add the geometric objects to the list associated with this
203  // AlgebraicMesh
208 
209  // Setup algebraic node update operations
211  }
GeomObject * top_flag_pt() const
Definition: cylinder_with_flag_mesh.template.h:254
double Height
Height of the domain.
Definition: cylinder_with_flag_mesh.template.h:324
GeomObject * Top_flag_pt
Top flag.
Definition: cylinder_with_flag_mesh.template.h:312
double Centre_x
x position of the centre of the cylinder
Definition: cylinder_with_flag_mesh.template.h:333
GeomObject * Cylinder_pt
Cylinder.
Definition: cylinder_with_flag_mesh.template.h:309
double Centre_y
x position of the centre of the cylinder
Definition: cylinder_with_flag_mesh.template.h:336
double Length
Length of the domain.
Definition: cylinder_with_flag_mesh.template.h:321
double Flag_height
Flag thickness.
Definition: cylinder_with_flag_mesh.template.h:330
double Flag_length
Flag length.
Definition: cylinder_with_flag_mesh.template.h:327
GeomObject * bottom_flag_pt() const
Definition: cylinder_with_flag_mesh.template.h:246
double A
radius of the cylinder
Definition: cylinder_with_flag_mesh.template.h:339
GeomObject * Bottom_flag_pt
Bottom flag.
Definition: cylinder_with_flag_mesh.template.h:315
GeomObject * Tip_flag_pt
Tip flag.
Definition: cylinder_with_flag_mesh.template.h:318
void setup_algebraic_node_update()
Function to setup the algebraic node update.
Definition: cylinder_with_flag_mesh.template.cc:915
GeomObject * tip_flag_pt() const
Definition: cylinder_with_flag_mesh.template.h:261
void add_geom_object_list_pt(GeomObject *geom_object_pt)
Definition: algebraic_elements.h:823
const Scalar * a
Definition: level2_cplx_impl.h:32
double height(const double &x)
Height of domain.
Definition: simple_spine_channel.cc:429

References oomph::AlgebraicMesh::add_geom_object_list_pt(), oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::bottom_flag_pt(), oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::setup_algebraic_node_update(), oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::tip_flag_pt(), and oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::top_flag_pt().

◆ ~AlgebraicCylinderWithFlagMesh()

template<class ELEMENT >
virtual oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::~AlgebraicCylinderWithFlagMesh ( )
inlinevirtual

Destructor: empty.

214 {}

Member Function Documentation

◆ algebraic_node_update()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::algebraic_node_update ( const unsigned t,
AlgebraicNode *&  node_pt 
)
virtual

The algebraic node update function.

Update nodal position at time level t (t=0: present; t>0: previous)

Implements oomph::AlgebraicMesh.

1346  {
1347  unsigned id = node_pt->node_update_fct_id();
1348 
1349  switch (id)
1350  {
1351  case 1:
1353  break;
1354 
1355  case 2:
1357  break;
1358 
1359  case 3:
1361  break;
1362 
1363  case 4:
1365  break;
1366 
1367  case 5:
1369  break;
1370 
1371  case 6:
1373  break;
1374 
1375  case 7:
1377  break;
1378 
1379  case 8:
1381  break;
1382 
1383  case 9:
1385  break;
1386 
1387  default:
1388  std::ostringstream error_message;
1389  error_message << "Wrong id " << id << std::endl;
1390  throw OomphLibError(error_message.str(),
1393  }
1394 
1395 
1396  } // end of algebraic_node_update()
void node_update_V(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
Definition: cylinder_with_flag_mesh.template.cc:1571
void node_update_II(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
Definition: cylinder_with_flag_mesh.template.cc:1441
void node_update_III(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
Definition: cylinder_with_flag_mesh.template.cc:1477
void node_update_IV(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
Definition: cylinder_with_flag_mesh.template.cc:1523
void node_update_I(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
Definition: cylinder_with_flag_mesh.template.cc:1402
void node_update_VIII(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
Definition: cylinder_with_flag_mesh.template.cc:1707
void node_update_VI(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
Definition: cylinder_with_flag_mesh.template.cc:1620
void node_update_VII(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
Definition: cylinder_with_flag_mesh.template.cc:1662
void node_update_IX(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
Definition: cylinder_with_flag_mesh.template.cc:1793
AlgebraicNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global AlgebraicNode.
Definition: algebraic_elements.h:620
int node_update_fct_id()
Default (usually first if there are multiple ones) node update fct id.
Definition: algebraic_elements.h:146
t
Definition: plotPSD.py:36
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References oomph::AlgebraicNode::node_update_fct_id(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and plotPSD::t.

◆ bottom_flag_pt()

template<class ELEMENT >
GeomObject* oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::bottom_flag_pt ( ) const
inline

◆ node_update_I()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::node_update_I ( const unsigned t,
AlgebraicNode *&  node_pt 
)
protected

Helper function.

Node update for region I.

1404  {
1405  // Extract reference values for update by copy construction
1406  Vector<double> ref_value(node_pt->vector_ref_value());
1407 
1408  // Extract geometric objects for update by copy construction
1409  Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1410 
1411  // Pointer to geom object
1412  GeomObject* flag_pt = geom_object_pt[0];
1413 
1414  // Point on the line y=p11[1] corresponding to the initial x.
1415  Vector<double> ref_point(2);
1416  ref_point[0] = ref_value[4];
1417  ref_point[1] = 0.778024390 * Height;
1418 
1419  // Point on the flag
1420  Vector<double> flag_point(2);
1421  Vector<double> zeta(1);
1422  zeta[0] = ref_value[3];
1423  flag_pt->position(t, zeta, flag_point);
1424 
1425  // Third reference value : fraction of the vertical line
1426  // between the straight line y = p11[1] and the flag
1427  double r = ref_value[1];
1428 
1429  // Assign new nodal coordinates
1430  node_pt->x(t, 0) =
1431  ref_point[0] + (1.0 - r) * (flag_point[0] - ref_point[0]);
1432  node_pt->x(t, 1) =
1433  ref_point[1] + (1.0 - r) * (flag_point[1] - ref_point[1]);
1434  }
Vector< GeomObject * > & vector_geom_object_pt(const int &id)
Definition: algebraic_elements.h:200
Vector< double > & vector_ref_value()
Definition: algebraic_elements.h:251
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152
r
Definition: UniformPSDSelfTest.py:20

References GlobalParameters::Height, oomph::GeomObject::position(), UniformPSDSelfTest::r, plotPSD::t, oomph::AlgebraicNode::vector_geom_object_pt(), oomph::AlgebraicNode::vector_ref_value(), oomph::Node::x(), and Eigen::zeta().

◆ node_update_II()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::node_update_II ( const unsigned t,
AlgebraicNode *&  node_pt 
)
protected

Helper function.

Node update for region II.

1443  {
1444  // Extract reference values for update by copy construction
1445  Vector<double> ref_value(node_pt->vector_ref_value());
1446 
1447  // Extract geometric objects for update by copy construction
1448  Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1449 
1450  // Pointer to geom object
1451  GeomObject* flag_pt = geom_object_pt[0];
1452 
1453  // Point on the line y=p37[1] corresponding to the initial x.
1454  Vector<double> ref_point(2);
1455  ref_point[0] = ref_value[4];
1456  ref_point[1] = 0.197585366 * Height;
1457 
1458  // Point on the flag
1459  Vector<double> flag_point(2);
1460  Vector<double> zeta(1);
1461  zeta[0] = ref_value[3];
1462  flag_pt->position(t, zeta, flag_point);
1463 
1464  // Third reference value : fraction of the vertical line
1465  // between the straight line y = p11[1] and the flag
1466  double r = ref_value[1];
1467 
1468  // Assign new nodal coordinates
1469  node_pt->x(t, 0) = ref_point[0] + r * (flag_point[0] - ref_point[0]);
1470  node_pt->x(t, 1) = ref_point[1] + r * (flag_point[1] - ref_point[1]);
1471  }

References GlobalParameters::Height, oomph::GeomObject::position(), UniformPSDSelfTest::r, plotPSD::t, oomph::AlgebraicNode::vector_geom_object_pt(), oomph::AlgebraicNode::vector_ref_value(), oomph::Node::x(), and Eigen::zeta().

◆ node_update_III()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::node_update_III ( const unsigned t,
AlgebraicNode *&  node_pt 
)
protected

Helper function.

Node update for region III.

1479  {
1480  // useful points
1481  Vector<double> p15(2);
1482  Vector<double> p35(2);
1483 
1484  p15[0] = 0.285123967 * Length;
1485  p15[1] = 0.625 * Height;
1486 
1487  p35[0] = 0.285123967 * Length;
1488  p35[1] = 0.350609756 * Height;
1489 
1490  // Extract reference values for update by copy construction
1491  Vector<double> ref_value(node_pt->vector_ref_value());
1492 
1493  // Extract geometric objects for update by copy construction
1494  Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1495 
1496  // Pointer to geom object
1497  GeomObject* flag_pt = geom_object_pt[0];
1498 
1499  // Point on the line x=p15[0]
1500  Vector<double> ref_point(2);
1501  ref_point[0] = p15[0];
1502  ref_point[1] = p35[1] + ref_value[1] * (p15[1] - p35[1]);
1503 
1504  // Point on the flag
1505  Vector<double> flag_point(2);
1506  Vector<double> zeta(1);
1507  zeta[0] = ref_value[3];
1508  flag_pt->position(t, zeta, flag_point);
1509 
1510  // Third reference value : fraction of the horizontal line
1511  // between the flag and the horizontal straight line in x=p15[0]
1512  double r = ref_value[0];
1513 
1514  // Assign new nodal coordinates
1515  node_pt->x(t, 0) = flag_point[0] + r * (ref_point[0] - flag_point[0]);
1516  node_pt->x(t, 1) = flag_point[1] + r * (ref_point[1] - flag_point[1]);
1517  }

References GlobalParameters::Height, Global_Physical_Variables::Length, oomph::GeomObject::position(), UniformPSDSelfTest::r, plotPSD::t, oomph::AlgebraicNode::vector_geom_object_pt(), oomph::AlgebraicNode::vector_ref_value(), oomph::Node::x(), and Eigen::zeta().

◆ node_update_IV()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::node_update_IV ( const unsigned t,
AlgebraicNode *&  node_pt 
)
protected

Helper function.

Node update for region IV.

1525  {
1526  // Useful points
1527  Vector<double> p15(2);
1528  Vector<double> p25(2);
1529  Vector<double> top_flag(2);
1530 
1531  p15[0] = 0.285123967 * Length;
1532  p15[1] = 0.625 * Height;
1533 
1534  p25[0] = Centre_x +
1535  A * sqrt(1.0 - Flag_height * Flag_height / (4.0 * A * A)) +
1536  Flag_length;
1537  p25[1] = Centre_y + Flag_height / 2.0;
1538 
1539  // Extract reference values for update by copy construction
1540  Vector<double> ref_value(node_pt->vector_ref_value());
1541 
1542  // Extract geometric objects for update by copy construction
1543  Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1544 
1545  // Pointer to geom object
1546  GeomObject* flag_pt = geom_object_pt[0];
1547 
1548  Vector<double> zeta(1);
1549  zeta[0] = ref_value[2];
1550  flag_pt->position(t, zeta, top_flag);
1551 
1552  // point on the line linking p15 et top_flag
1553  Vector<double> p1(2);
1554  p1[0] = top_flag[0] + ref_value[0] * (p15[0] - top_flag[0]);
1555  p1[1] = top_flag[1] + ref_value[0] * (p15[1] - top_flag[1]);
1556 
1557  // Point on the line y = Height;
1558  Vector<double> p2(2);
1559  p2[0] = p25[0] + ref_value[0] * (p15[0] - p25[0]);
1560  p2[1] = Height;
1561 
1562  // Connect those points with the vertical fraction ref_value[1]
1563  node_pt->x(t, 0) = p1[0] + ref_value[1] * (p2[0] - p1[0]);
1564  node_pt->x(t, 1) = p1[1] + ref_value[1] * (p2[1] - p1[1]);
1565  }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
Vector3f p1
Definition: MatrixBase_all.cpp:2
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47

References Global_Parameters::Centre_x, Global_Parameters::Centre_y, GlobalParameters::Height, Global_Physical_Variables::Length, p1, oomph::GeomObject::position(), sqrt(), plotPSD::t, oomph::AlgebraicNode::vector_geom_object_pt(), oomph::AlgebraicNode::vector_ref_value(), oomph::Node::x(), and Eigen::zeta().

◆ node_update_IX()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::node_update_IX ( const unsigned t,
AlgebraicNode *&  node_pt 
)
protected

Helper function.

Node update for region IX.

Extreme angles on circle

1795  {
1796  // Useful point
1797  Vector<double> p37(2);
1798  p37[0] = 0.127596 * Length;
1799  p37[1] = 0.197585366 * Height;
1800 
1802  double zeta_circle_top = -asin(Flag_height / 2. / A);
1803  double zeta_circle_bot = -atan(1.0);
1804 
1805  // Extract reference values for update by copy construction
1806  Vector<double> ref_value(node_pt->vector_ref_value());
1807 
1808  // Extract geometric objects for update by copy construction
1809  Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1810 
1811  // Pointer to geom object containing the reference point
1812  GeomObject* flag_ref_pt = geom_object_pt[0];
1813 
1814  // Pointer to geom object containing the end of macro element
1815  GeomObject* flag_end_pt = geom_object_pt[1];
1816 
1817  double omega_horizontal = ref_value[0];
1818  double omega_vertical = ref_value[1];
1819 
1820  // end of the macro element on the flag
1821  Vector<double> flag_end(2);
1822  Vector<double> zeta(1);
1823  zeta[0] = ref_value[5];
1824  flag_end_pt->position(t, zeta, flag_end);
1825 
1826  Vector<double> outer_point(p37);
1827 
1828  // Get reference point on circle
1829  Vector<double> ref_point_on_circle(2);
1830  zeta[0] =
1831  zeta_circle_bot + (zeta_circle_top - zeta_circle_bot) * omega_vertical;
1832  Cylinder_pt->position(zeta, ref_point_on_circle);
1833 
1834  // Get reference point on right line
1835  Vector<double> ref_point_on_right_line(2);
1836  ref_point_on_right_line[0] = // flag_end[0];
1837  outer_point[0] + (flag_end[0] - outer_point[0]) * omega_vertical;
1838  ref_point_on_right_line[1] =
1839  outer_point[1] + (flag_end[1] - outer_point[1]) * omega_vertical;
1840 
1841  // Get reference point on flag
1842  Vector<double> ref_point_on_flag(2);
1843  zeta[0] = ref_value[3];
1844  flag_ref_pt->position(t, zeta, ref_point_on_flag);
1845 
1846  // Get top-most point on circle
1847  Vector<double> circle_top(2);
1848  zeta[0] = zeta_circle_top;
1849  Cylinder_pt->position(zeta, circle_top);
1850 
1851  // Get reference point on horizontal fraction of straight line
1852  // connecting the two top most reference points
1853  Vector<double> r_top(2);
1854  r_top[0] = circle_top[0] + (flag_end[0] - circle_top[0]) * omega_horizontal;
1855  r_top[1] = circle_top[1] + (flag_end[1] - circle_top[1]) * omega_horizontal;
1856 
1857  // Place point on horizontal fraction of straight line
1858  // connecting reference points -- this won't match the
1859  // curved top boundary adjacent to the flag
1860  node_pt->x(t, 0) =
1861  ref_point_on_circle[0] +
1862  (ref_point_on_right_line[0] - ref_point_on_circle[0]) * omega_horizontal;
1863  node_pt->x(t, 1) =
1864  ref_point_on_circle[1] +
1865  (ref_point_on_right_line[1] - ref_point_on_circle[1]) * omega_horizontal;
1866 
1867  // Correct by scaled difference between top straight line
1868  // and bent flag
1869  node_pt->x(t, 0) += (ref_point_on_flag[0] - r_top[0]) * omega_vertical;
1870  node_pt->x(t, 1) += (ref_point_on_flag[1] - r_top[1]) * omega_vertical;
1871  }
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 asin(const bfloat16 &a)
Definition: BFloat16.h:634
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 atan(const bfloat16 &a)
Definition: BFloat16.h:636

References Eigen::bfloat16_impl::asin(), Eigen::bfloat16_impl::atan(), GlobalParameters::Cylinder_pt, GlobalParameters::Height, Global_Physical_Variables::Length, OscillatingCylinder::position(), oomph::GeomObject::position(), plotPSD::t, oomph::AlgebraicNode::vector_geom_object_pt(), oomph::AlgebraicNode::vector_ref_value(), oomph::Node::x(), and Eigen::zeta().

◆ node_update_V()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::node_update_V ( const unsigned t,
AlgebraicNode *&  node_pt 
)
protected

Helper function.

Node update for region V.

1573  {
1574  // Useful points
1575  Vector<double> p31(2);
1576  Vector<double> p35(2);
1577  Vector<double> top_flag(2);
1578 
1579  p31[0] = Centre_x +
1580  A * sqrt(1.0 - Flag_height * Flag_height / (4.0 * A * A)) +
1581  Flag_length;
1582  p31[1] = Centre_y - Flag_height / 2.;
1583 
1584  p35[0] = 0.285123967 * Length;
1585  p35[1] = 0.350609756 * Height;
1586 
1587  // Extract reference values for update by copy construction
1588  Vector<double> ref_value(node_pt->vector_ref_value());
1589 
1590  // Extract geometric objects for update by copy construction
1591  Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1592 
1593  // Pointer to geom object
1594  GeomObject* flag_pt = geom_object_pt[0];
1595 
1596  Vector<double> zeta(1);
1597  zeta[0] = ref_value[2];
1598 
1599  flag_pt->position(t, zeta, top_flag);
1600 
1601  // point on the line linking p35 et top_flag
1602  Vector<double> p1(2);
1603  p1[0] = top_flag[0] + ref_value[0] * (p35[0] - top_flag[0]);
1604  p1[1] = top_flag[1] + ref_value[0] * (p35[1] - top_flag[1]);
1605 
1606  // Point on the line y = 0.0;
1607  Vector<double> p2(2);
1608  p2[0] = p31[0] + ref_value[0] * (p35[0] - p31[0]);
1609  p2[1] = 0.;
1610 
1611  // Connect those points with the vertical fraction ref_value[1]
1612  node_pt->x(t, 0) = p2[0] + ref_value[1] * (p1[0] - p2[0]);
1613  node_pt->x(t, 1) = p2[1] + ref_value[1] * (p1[1] - p2[1]);
1614  }

References Global_Parameters::Centre_x, Global_Parameters::Centre_y, GlobalParameters::Height, Global_Physical_Variables::Length, p1, oomph::GeomObject::position(), sqrt(), plotPSD::t, oomph::AlgebraicNode::vector_geom_object_pt(), oomph::AlgebraicNode::vector_ref_value(), oomph::Node::x(), and Eigen::zeta().

◆ node_update_VI()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::node_update_VI ( const unsigned t,
AlgebraicNode *&  node_pt 
)
protected

Helper function.

Node update for region VI.

1622  {
1623  // Extract reference values for update by copy construction
1624  Vector<double> ref_value(node_pt->vector_ref_value());
1625 
1626  // Useful points
1627  Vector<double> p14(2);
1628  Vector<double> p5(2);
1629  Vector<double> point_flag(2);
1630 
1631  p14[0] = 0.211596 * Length;
1632  p14[1] = 0.778024390 * Height;
1633 
1634  p5[0] = 0.239596 * Length;
1635  p5[1] = Height;
1636 
1637  // Extract geometric objects for update by copy construction
1638  Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1639 
1640  // Pointer to geom object
1641  GeomObject* flag_pt = geom_object_pt[0];
1642 
1643  Vector<double> zeta(1);
1644  zeta[0] = ref_value[3];
1645  flag_pt->position(t, zeta, point_flag);
1646 
1647  // point on the line linking p14 et p5
1648  Vector<double> p1(2);
1649  p1[0] = p14[0] + ref_value[0] * (p5[0] - p14[0]);
1650  p1[1] = p14[1] + ref_value[0] * (p5[1] - p14[1]);
1651 
1652 
1653  // Connect those points with the vertical fraction ref_value[1]
1654  node_pt->x(t, 0) = point_flag[0] + ref_value[1] * (p1[0] - point_flag[0]);
1655  node_pt->x(t, 1) = point_flag[1] + ref_value[1] * (p1[1] - point_flag[1]);
1656  }

References GlobalParameters::Height, Global_Physical_Variables::Length, p1, oomph::GeomObject::position(), plotPSD::t, oomph::AlgebraicNode::vector_geom_object_pt(), oomph::AlgebraicNode::vector_ref_value(), oomph::Node::x(), and Eigen::zeta().

◆ node_update_VII()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::node_update_VII ( const unsigned t,
AlgebraicNode *&  node_pt 
)
protected

Helper function.

Node update for region VII.

1664  {
1665  // Extract reference values for update by copy construction
1666  Vector<double> ref_value(node_pt->vector_ref_value());
1667 
1668  // Useful points
1669  Vector<double> p40(2);
1670  Vector<double> p45(2);
1671  Vector<double> point_flag(2);
1672 
1673  p40[0] = 0.211596 * Length;
1674  p40[1] = 0.197585366 * Height;
1675 
1676  p45[0] = 0.239596 * Length;
1677  p45[1] = 0.0;
1678 
1679  // Extract geometric objects for update by copy construction
1680  Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1681 
1682  // Pointer to geom object
1683  GeomObject* flag_pt = geom_object_pt[0];
1684 
1685  Vector<double> zeta(1);
1686  zeta[0] = ref_value[3];
1687  flag_pt->position(t, zeta, point_flag);
1688 
1689  // point on the line linking p40 et p45
1690  Vector<double> p1(2);
1691  p1[0] = p40[0] + ref_value[0] * (p45[0] - p40[0]);
1692  p1[1] = p40[1] + ref_value[0] * (p45[1] - p40[1]);
1693 
1694 
1695  // Connect those points with the vertical fraction ref_value[1]
1696  node_pt->x(t, 0) =
1697  point_flag[0] + (1 - ref_value[1]) * (p1[0] - point_flag[0]);
1698  node_pt->x(t, 1) =
1699  point_flag[1] + (1 - ref_value[1]) * (p1[1] - point_flag[1]);
1700  }

References GlobalParameters::Height, Global_Physical_Variables::Length, p1, oomph::GeomObject::position(), plotPSD::t, oomph::AlgebraicNode::vector_geom_object_pt(), oomph::AlgebraicNode::vector_ref_value(), oomph::Node::x(), and Eigen::zeta().

◆ node_update_VIII()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::node_update_VIII ( const unsigned t,
AlgebraicNode *&  node_pt 
)
protected

Helper function.

Node update for region VIII.

Extreme angles on circle

1709  {
1710  // Useful point
1711  Vector<double> p11(2);
1712  p11[0] = 0.127596 * Length;
1713  p11[1] = 0.778024390 * Height;
1714 
1716  double zeta_circle_top = atan(1.0);
1717  double zeta_circle_bot = asin(Flag_height / 2. / A);
1718 
1719  // Extract reference values for update by copy construction
1720  Vector<double> ref_value(node_pt->vector_ref_value());
1721 
1722  // Extract geometric objects for update by copy construction
1723  Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1724 
1725  // Pointer to geom object containing the reference point
1726  GeomObject* flag_ref_pt = geom_object_pt[0];
1727 
1728  // Pointer to geom object containing the end of the macro element
1729  GeomObject* flag_end_pt = geom_object_pt[1];
1730 
1731  double omega_horizontal = ref_value[0];
1732  double omega_vertical = ref_value[1];
1733 
1734  // end of the macro element on the flag
1735  Vector<double> flag_end(2);
1736  Vector<double> zeta(1);
1737  zeta[0] = ref_value[5];
1738  flag_end_pt->position(t, zeta, flag_end);
1739 
1740  Vector<double> outer_point(p11);
1741 
1742  // Get reference point on circle
1743  Vector<double> ref_point_on_circle(2);
1744  zeta[0] =
1745  zeta_circle_bot + (zeta_circle_top - zeta_circle_bot) * omega_vertical;
1746  Cylinder_pt->position(zeta, ref_point_on_circle);
1747 
1748  // Get reference point on right line
1749  Vector<double> ref_point_on_right_line(2);
1750  ref_point_on_right_line[0] = // flag_end[0];
1751  outer_point[0] + (flag_end[0] - outer_point[0]) * (1.0 - omega_vertical);
1752  ref_point_on_right_line[1] =
1753  outer_point[1] + (flag_end[1] - outer_point[1]) * (1.0 - omega_vertical);
1754 
1755  // Get reference point on flag
1756  Vector<double> ref_point_on_flag(2);
1757  zeta[0] = ref_value[3];
1758  flag_ref_pt->position(t, zeta, ref_point_on_flag);
1759 
1760  // Get bottom-most point on circle
1761  Vector<double> circle_bot(2);
1762  zeta[0] = zeta_circle_bot;
1763  Cylinder_pt->position(zeta, circle_bot);
1764 
1765  // Get reference point on horizontal fraction of straight line
1766  // connecting the two bottom most reference points
1767  Vector<double> r_bot(2);
1768  r_bot[0] = circle_bot[0] + (flag_end[0] - circle_bot[0]) * omega_horizontal;
1769  r_bot[1] = circle_bot[1] + (flag_end[1] - circle_bot[1]) * omega_horizontal;
1770 
1771  // Place point on horizontal fraction of straight line
1772  // connecting reference points -- this won't match the
1773  // curved top boundary adjacent to the flag
1774  node_pt->x(t, 0) =
1775  ref_point_on_circle[0] +
1776  (ref_point_on_right_line[0] - ref_point_on_circle[0]) * omega_horizontal;
1777  node_pt->x(t, 1) =
1778  ref_point_on_circle[1] +
1779  (ref_point_on_right_line[1] - ref_point_on_circle[1]) * omega_horizontal;
1780 
1781  // Correct by scaled difference between bottom straight line
1782  // and bent flag
1783  node_pt->x(t, 0) +=
1784  (ref_point_on_flag[0] - r_bot[0]) * (1.0 - omega_vertical);
1785  node_pt->x(t, 1) +=
1786  (ref_point_on_flag[1] - r_bot[1]) * (1.0 - omega_vertical);
1787  }

References Eigen::bfloat16_impl::asin(), Eigen::bfloat16_impl::atan(), GlobalParameters::Cylinder_pt, GlobalParameters::Height, Global_Physical_Variables::Length, OscillatingCylinder::position(), oomph::GeomObject::position(), plotPSD::t, oomph::AlgebraicNode::vector_geom_object_pt(), oomph::AlgebraicNode::vector_ref_value(), oomph::Node::x(), and Eigen::zeta().

◆ set_bottom_flag_pt()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::set_bottom_flag_pt ( GeomObject bottom_flag_pt)
inline

Set geometric object that defines the bottom face of the flag

220  {
221  // Need to alter the domain's bottom_flag_pt too
224  }
GeomObject *& bottom_flag_pt()
Access fct to GeomObjects for top, bottom and tip.
Definition: cylinder_with_flag_domain.h:84
CylinderWithFlagDomain * domain_pt()
Access function to the domain.
Definition: cylinder_with_flag_mesh.template.h:77

References oomph::CylinderWithFlagDomain::bottom_flag_pt(), oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::bottom_flag_pt(), oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::Bottom_flag_pt, and oomph::CylinderWithFlagMesh< ELEMENT >::domain_pt().

◆ set_tip_flag_pt()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::set_tip_flag_pt ( GeomObject tip_flag_pt)
inline

◆ set_top_flag_pt()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::set_top_flag_pt ( GeomObject top_flag_pt)
inline

◆ setup_algebraic_node_update()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::setup_algebraic_node_update
protected

Function to setup the algebraic node update.

Setup algebraic node update.

/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////

set the size ??

916  {
917  // The update function requires six parameters in some cases:
918  Vector<double> ref_value(6);
919  for (unsigned i = 0; i < 5; i++)
920  {
921  ref_value[i] = 0.0;
922  }
923 
924  // Part I : macro elements 8,12,16
925  for (unsigned k = 0; k < 3; k++)
926  {
927  FiniteElement* el_pt = this->finite_element_pt(8 + k * 4);
928  unsigned nnode = el_pt->nnode();
929  for (unsigned i = 0; i < nnode; i++)
930  {
931  // Get local coordinates
932  Vector<double> coord_loc(2);
933  el_pt->local_coordinate_of_node(i, coord_loc);
934 
935  // First reference value : horizontal fraction
936  ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
937 
938  // Second reference value : vertical fraction
939  ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
940 
941  // Third reference value : zeta coordinate on flag
942  ref_value[2] = double(k + 1) / 5. * Flag_length +
943  ref_value[0] * 1. / 5. * Flag_length;
944 
945  // Sub-geomobject corresponding to the zeta coordinate on the flag
946  GeomObject* geom_obj_pt;
947  Vector<double> s(1);
948  Vector<double> zeta(1);
949  zeta[0] = ref_value[2];
950  Top_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
951 
952  // Create vector of geomobject for add_node_update_info()
953  Vector<GeomObject*> geom_object_pt(1);
954  geom_object_pt[0] = geom_obj_pt;
955 
956  // Fourth reference value : local coordinate in the sub geomobject
957  ref_value[3] = s[0];
958 
959  // Fifth reference value : x coordinate
960  ref_value[4] = el_pt->node_pt(i)->x(0);
961 
962  // Setup algebraic update for node: Pass update information
963  // to AlgebraicNode:
964  dynamic_cast<AlgebraicNode*>(el_pt->node_pt(i))
965  ->add_node_update_info(1, // ID
966  this, // mesh
967  geom_object_pt, // vector of geom objects
968  ref_value); // vector of ref. values
969  }
970  }
971 
972  // Part II : macro elements 9,13,17
973  for (unsigned k = 0; k < 3; k++)
974  {
975  FiniteElement* el_pt = this->finite_element_pt(9 + k * 4);
976  unsigned nnode = el_pt->nnode();
977  for (unsigned i = 0; i < nnode; i++)
978  {
979  // Get local coordinates
980  Vector<double> coord_loc(2);
981  el_pt->local_coordinate_of_node(i, coord_loc);
982 
983  // First reference value : horizontal fraction
984  ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
985 
986  // Second reference value : vertical fraction
987  ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
988 
989  // Third reference value : zeta coordinate on flag
990  ref_value[2] = double(k + 1) / 5. * Flag_length +
991  ref_value[0] * 1. / 5. * Flag_length;
992 
993  // Sub-geomobject corresponding to the zeta coordinate on the flag
994  GeomObject* geom_obj_pt;
995  Vector<double> s(1);
996  Vector<double> zeta(1);
997  zeta[0] = ref_value[2];
998  Bottom_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
999 
1000  // Create vector of geomobject for add_node_update_info()
1001  Vector<GeomObject*> geom_object_pt(1);
1002  geom_object_pt[0] = geom_obj_pt;
1003 
1004  // Fourth reference value : local coordinate in the sub geomobject
1005  ref_value[3] = s[0];
1006 
1007  // Fifth reference value : x coordinate
1008  ref_value[4] = el_pt->node_pt(i)->x(0);
1009 
1010  // Setup algebraic update for node: Pass update information
1011  // to AlgebraicNode:
1012  dynamic_cast<AlgebraicNode*>(el_pt->node_pt(i))
1013  ->add_node_update_info(2, // ID
1014  this, // mesh
1015  geom_object_pt, // vector of geom objects
1016  ref_value); // vector of ref. values
1017  }
1018  }
1019 
1020  // Part III : macro element 22
1021  FiniteElement* el_pt = this->finite_element_pt(22);
1022  unsigned nnode = el_pt->nnode();
1023  for (unsigned i = 0; i < nnode; i++)
1024  {
1025  // Get local coordinates
1026  Vector<double> coord_loc(2);
1027  el_pt->local_coordinate_of_node(i, coord_loc);
1028 
1029  // First reference value : horizontal fraction
1030  ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
1031 
1032  // Second reference value : vertical fraction
1033  ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
1034 
1035  // Third reference value : zeta coordinate on flag
1036  ref_value[2] = coord_loc[1] * Flag_height / 2.;
1037 
1038  // Sub-geomobject corresponding to the zeta coordinate on the flag
1039  GeomObject* geom_obj_pt;
1040  Vector<double> s(1);
1041  Vector<double> zeta(1);
1042  zeta[0] = ref_value[2];
1043  Tip_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1044 
1045  // Create vector of geomobject for add_node_update_info()
1046  Vector<GeomObject*> geom_object_pt(1);
1047  geom_object_pt[0] = geom_obj_pt;
1048 
1049  // Fourth reference value : local coordinate in the sub geomobject
1050  ref_value[3] = s[0];
1051 
1052  // Setup algebraic update for node: Pass update information
1053  // to AlgebraicNode:
1054  dynamic_cast<AlgebraicNode*>(el_pt->node_pt(i))
1055  ->add_node_update_info(3, // ID
1056  this, // mesh
1057  geom_object_pt, // vector of geom objects
1058  ref_value); // vector of ref. values
1059  }
1060 
1061  // Part IV : macro element 21
1062  el_pt = this->finite_element_pt(21);
1063  nnode = el_pt->nnode();
1064  for (unsigned i = 0; i < nnode; i++)
1065  {
1066  // Get local coordinates
1067  Vector<double> coord_loc(2);
1068  el_pt->local_coordinate_of_node(i, coord_loc);
1069 
1070  // First reference value : horizontal fraction
1071  ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
1072 
1073  // Second reference value : vertical fraction
1074  ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
1075 
1076  // Sub-geomobject corresponding to the tip of the Tip_flag
1077  GeomObject* geom_obj_pt;
1078  Vector<double> s(1);
1079  Vector<double> zeta(1);
1080  zeta[0] = Flag_height / 2.;
1081  Tip_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1082 
1083  // Create vector of geomobject for add_node_update_info()
1084  Vector<GeomObject*> geom_object_pt(1);
1085  geom_object_pt[0] = geom_obj_pt;
1086 
1087  // Third reference value : local coordinate in the sub geomobject
1088  ref_value[2] = s[0];
1089 
1090  // Setup algebraic update for node: Pass update information
1091  // to AlgebraicNode:
1092  dynamic_cast<AlgebraicNode*>(el_pt->node_pt(i))
1093  ->add_node_update_info(4, // ID
1094  this, // mesh
1095  geom_object_pt, // vector of geom objects
1096  ref_value); // vector of ref. values
1097  }
1098 
1099  // Part V : macro element 23
1100  el_pt = this->finite_element_pt(23);
1101  nnode = el_pt->nnode();
1102  for (unsigned i = 0; i < nnode; i++)
1103  {
1104  // Get local coordinates
1105  Vector<double> coord_loc(2);
1106  el_pt->local_coordinate_of_node(i, coord_loc);
1107 
1108  // First reference value : horizontal fraction
1109  ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
1110 
1111  // Second reference value : vertical fraction
1112  ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
1113 
1114  // Sub-geomobject corresponding to the tip of the Tip_flag
1115  GeomObject* geom_obj_pt;
1116  Vector<double> s(1);
1117  Vector<double> zeta(1);
1118  zeta[0] = -Flag_height / 2.;
1119  Tip_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1120 
1121  // Create vector of geomobject for add_node_update_info()
1122  Vector<GeomObject*> geom_object_pt(1);
1123  geom_object_pt[0] = geom_obj_pt;
1124 
1125  // Third reference value : local coordinate in the sub geomobject
1126  ref_value[2] = s[0];
1127 
1128  // Setup algebraic update for node: Pass update information
1129  // to AlgebraicNode:
1130  dynamic_cast<AlgebraicNode*>(el_pt->node_pt(i))
1131  ->add_node_update_info(5, // ID
1132  this, // mesh
1133  geom_object_pt, // vector of geom objects
1134  ref_value); // vector of ref. values
1135  }
1136 
1137  // Part VI = macro element 19
1138  el_pt = this->finite_element_pt(19);
1139  nnode = el_pt->nnode();
1140  for (unsigned i = 0; i < nnode; i++)
1141  {
1142  // Get local coordinates
1143  Vector<double> coord_loc(2);
1144  el_pt->local_coordinate_of_node(i, coord_loc);
1145 
1146  // First reference value : horizontal fraction
1147  ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
1148 
1149  // Second reference value : vertical fraction
1150  ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
1151 
1152  // Third reference value : zeta coordinate on the flag
1153  ref_value[2] =
1154  4. / 5. * Flag_length + ref_value[0] * 1. / 5. * Flag_length;
1155 
1156  // Sub-geomobject
1157  GeomObject* geom_obj_pt;
1158  Vector<double> s(1);
1159  Vector<double> zeta(1);
1160  zeta[0] = ref_value[2];
1161  Top_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1162 
1163  // Create vector of geomobject for add_node_update_info()
1164  Vector<GeomObject*> geom_object_pt(1);
1165  geom_object_pt[0] = geom_obj_pt;
1166 
1167  // Third reference value : local coordinate in the sub geomobject
1168  ref_value[3] = s[0];
1169 
1170  // Setup algebraic update for node: Pass update information
1171  // to AlgebraicNode:
1172  dynamic_cast<AlgebraicNode*>(el_pt->node_pt(i))
1173  ->add_node_update_info(6, // ID
1174  this, // mesh
1175  geom_object_pt, // vector of geom objects
1176  ref_value); // vector of ref. values
1177  }
1178 
1179 
1180  // Part VII = macro element 20
1181  el_pt = this->finite_element_pt(20);
1182  nnode = el_pt->nnode();
1183  for (unsigned i = 0; i < nnode; i++)
1184  {
1185  // Get local coordinates
1186  Vector<double> coord_loc(2);
1187  el_pt->local_coordinate_of_node(i, coord_loc);
1188 
1189  // First reference value : horizontal fraction
1190  ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
1191 
1192  // Second reference value : vertical fraction
1193  ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
1194 
1195  // Third reference value : zeta coordinate on the flag
1196  ref_value[2] =
1197  4. / 5. * Flag_length + ref_value[0] * 1. / 5. * Flag_length;
1198 
1199  // Sub-geomobject
1200  GeomObject* geom_obj_pt;
1201  Vector<double> s(1);
1202  Vector<double> zeta(1);
1203  zeta[0] = ref_value[2];
1204  Bottom_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1205 
1206  // Create vector of geomobject for add_node_update_info()
1207  Vector<GeomObject*> geom_object_pt(1);
1208  geom_object_pt[0] = geom_obj_pt;
1209 
1210  // Third reference value : local coordinate in the sub geomobject
1211  ref_value[3] = s[0];
1212 
1213  // Setup algebraic update for node: Pass update information
1214  // to AlgebraicNode:
1215  dynamic_cast<AlgebraicNode*>(el_pt->node_pt(i))
1216  ->add_node_update_info(7, // ID
1217  this, // mesh
1218  geom_object_pt, // vector of geom objects
1219  ref_value); // vector of ref. values
1220  }
1221 
1222  // Part VIII : macro element 3
1223  el_pt = this->finite_element_pt(3);
1224  nnode = el_pt->nnode();
1225  for (unsigned i = 0; i < nnode; i++)
1226  {
1227  // Get local coordinates
1228  Vector<double> coord_loc(2);
1229  el_pt->local_coordinate_of_node(i, coord_loc);
1230 
1231  // First reference value : horizontal fraction
1232  ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
1233 
1234  // Second reference value : vertical fraction
1235  ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
1236 
1237  // Third reference value : zeta coordinate on flag at reference point
1238  ref_value[2] = ref_value[0] * 1. / 5. * Flag_length;
1239 
1240  // Sub-geomobject corresponding to the zeta coordinate on the flag
1241  // at the reference point
1242  GeomObject* geom_obj_pt;
1243  Vector<double> s(1);
1244  Vector<double> zeta(1);
1245  zeta[0] = ref_value[2];
1246  Top_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1247 
1248  // Fourth reference value : local coordinate in the sub geomobject
1249  ref_value[3] = s[0];
1250 
1251  // Create vector of geomobject for add_node_update_info()
1252  Vector<GeomObject*> geom_object_pt(2);
1253  geom_object_pt[0] = geom_obj_pt;
1254 
1255  // Fifth reference value : zeta coordinate on flag at end of macro element
1256  ref_value[4] = 1. / 5. * Flag_length;
1257 
1258  // Sub-geomobject corresponding to the zeta coordinate on the flag
1259  // at the end of the macro element
1260  zeta[0] = ref_value[4];
1261  Top_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1262 
1263  // Add geom object
1264  geom_object_pt[1] = geom_obj_pt;
1265 
1266  // Sixth reference value : local coordinate in the sub geomobject
1267  ref_value[5] = s[0];
1268 
1269 
1270  // Setup algebraic update for node: Pass update information
1271  // to AlgebraicNode:
1272  dynamic_cast<AlgebraicNode*>(el_pt->node_pt(i))
1273  ->add_node_update_info(8, // ID
1274  this, // mesh
1275  geom_object_pt, // vector of geom objects
1276  ref_value); // vector of ref. values
1277  }
1278 
1279 
1280  // Part IX : macro element 4
1281  el_pt = this->finite_element_pt(4);
1282  nnode = el_pt->nnode();
1283  for (unsigned i = 0; i < nnode; i++)
1284  {
1285  // Get local coordinates
1286  Vector<double> coord_loc(2);
1287  el_pt->local_coordinate_of_node(i, coord_loc);
1288 
1289  // First reference value : horizontal fraction
1290  ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
1291 
1292  // Second reference value : vertical fraction
1293  ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
1294 
1295  // Third reference value : zeta coordinate on flag
1296  ref_value[2] = ref_value[0] * 1. / 5. * Flag_length;
1297 
1298  // Sub-geomobject corresponding to the zeta coordinate on the flag
1299  // at the reference point
1300  GeomObject* geom_obj_pt;
1301  Vector<double> s(1);
1302  Vector<double> zeta(1);
1303  zeta[0] = ref_value[2];
1304  Bottom_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1305 
1306  // Fourth reference value : local coordinate in the sub geomobject
1307  ref_value[3] = s[0];
1308 
1309  // Create vector of geomobject for add_node_update_info()
1310  Vector<GeomObject*> geom_object_pt(2);
1311  geom_object_pt[0] = geom_obj_pt;
1312 
1313  // Fifth reference value : zeta coordinate on flag at end of macro element
1314  ref_value[4] = 1. / 5. * Flag_length;
1315 
1316  // Sub-geomobject corresponding to the zeta coordinate on the flag
1317  // at the end of the macro element
1318  zeta[0] = ref_value[4];
1319  Bottom_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1320 
1321  // Add geom object
1322  geom_object_pt[1] = geom_obj_pt;
1323 
1324  // Sixth reference value : local coordinate in the sub geomobject
1325  ref_value[5] = s[0];
1326 
1327  // Setup algebraic update for node: Pass update information
1328  // to AlgebraicNode:
1329  dynamic_cast<AlgebraicNode*>(el_pt->node_pt(i))
1330  ->add_node_update_info(9, // ID
1331  this, // mesh
1332  geom_object_pt, // vector of geom objects
1333  ref_value); // vector of ref. values
1334  }
1335 
1336 
1337  } // end of setup_algebraic_node_update
int i
Definition: BiCGSTAB_step_by_step.cpp:9
virtual void locate_zeta(const Vector< double > &zeta, GeomObject *&sub_geom_object_pt, Vector< double > &s, const bool &use_coordinate_as_initial_guess=false)
Definition: geom_objects.h:381
FiniteElement * finite_element_pt(const unsigned &e) const
Definition: mesh.h:473
unsigned long nnode() const
Return number of nodes in the mesh.
Definition: mesh.h:596
RealScalar s
Definition: level1_cplx_impl.h:130
char char char int int * k
Definition: level2_impl.h:374

References Flag_definition::Bottom_flag_pt, i, k, oomph::FiniteElement::local_coordinate_of_node(), oomph::GeomObject::locate_zeta(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), s, Flag_definition::Tip_flag_pt, Flag_definition::Top_flag_pt, oomph::Node::x(), and Eigen::zeta().

Referenced by oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::AlgebraicCylinderWithFlagMesh().

◆ tip_flag_pt()

template<class ELEMENT >
GeomObject* oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::tip_flag_pt ( ) const
inline

◆ top_flag_pt()

template<class ELEMENT >
GeomObject* oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::top_flag_pt ( ) const
inline

◆ update_node_update()

template<class ELEMENT >
void oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::update_node_update ( AlgebraicNode *&  node_pt)
inlinevirtual

Update the geometric references that are used to update node after mesh adaptation. Empty – no update of node update required without adaptativity

Implements oomph::AlgebraicMesh.

Reimplemented in oomph::RefineableAlgebraicCylinderWithFlagMesh< ELEMENT >, and oomph::RefineableAlgebraicCylinderWithFlagMesh< FLUID_ELEMENT >.

270 {}

Member Data Documentation

◆ A

template<class ELEMENT >
double oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::A
protected

radius of the cylinder

◆ Bottom_flag_pt

◆ Centre_x

template<class ELEMENT >
double oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::Centre_x
protected

x position of the centre of the cylinder

◆ Centre_y

template<class ELEMENT >
double oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::Centre_y
protected

x position of the centre of the cylinder

◆ Cylinder_pt

template<class ELEMENT >
GeomObject* oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::Cylinder_pt
protected

Cylinder.

◆ Flag_height

template<class ELEMENT >
double oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::Flag_height
protected

Flag thickness.

◆ Flag_length

template<class ELEMENT >
double oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::Flag_length
protected

Flag length.

◆ Height

template<class ELEMENT >
double oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::Height
protected

Height of the domain.

◆ Length

template<class ELEMENT >
double oomph::AlgebraicCylinderWithFlagMesh< ELEMENT >::Length
protected

Length of the domain.

◆ Tip_flag_pt

◆ Top_flag_pt


The documentation for this class was generated from the following files: