oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT > Class Template Reference

#include <quarter_circle_sector_mesh.template.h>

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

Public Member Functions

 AlgebraicRefineableQuarterCircleSectorMesh (GeomObject *wall_pt, const double &xi_lo, const double &fract_mid, const double &xi_hi, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
 
unsigned self_test ()
 Run self-test for algebraic mesh – return 0/1 for OK/failure. More...
 
void node_update (const bool &update_all_solid_nodes=false)
 
void algebraic_node_update (const unsigned &t, AlgebraicNode *&node_pt)
 
void update_node_update (AlgebraicNode *&node_pt)
 
- 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...
 
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::RefineableQuarterCircleSectorMesh< ELEMENT >
 RefineableQuarterCircleSectorMesh (GeomObject *wall_pt, const double &xi_lo, const double &fract_mid, const double &xi_hi, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
 
virtual ~RefineableQuarterCircleSectorMesh ()
 Destructor: Empty. More...
 
- Public Member Functions inherited from oomph::QuarterCircleSectorMesh< ELEMENT >
 QuarterCircleSectorMesh (GeomObject *wall_pt, const double &xi_lo, const double &fract_mid, const double &xi_hi, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
 
virtual ~QuarterCircleSectorMesh ()
 Destructor: More...
 
GeomObject *& wall_pt ()
 Access function to GeomObject representing wall. More...
 
QuarterCircleSectorDomaindomain_pt ()
 Access function to domain. More...
 
QuarterCircleSectorDomain::BLSquashFctPtbl_squash_fct_pt ()
 
- 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)
 
- Public Member Functions inherited from oomph::RefineableQuadMesh< ELEMENT >
 RefineableQuadMesh ()
 Constructor: Setup static quadtree data. More...
 
 RefineableQuadMesh (const RefineableQuadMesh &dummy)=delete
 Broken copy constructor. More...
 
virtual ~RefineableQuadMesh ()
 Broken assignment operator. More...
 
virtual void setup_tree_forest ()
 
void setup_quadtree_forest ()
 
- Public Member Functions inherited from oomph::TreeBasedRefineableMesh< ELEMENT >
 TreeBasedRefineableMesh ()
 Constructor, call the constructor of the base class. More...
 
 TreeBasedRefineableMesh (const TreeBasedRefineableMesh &dummy)=delete
 Broken copy constructor. More...
 
virtual ~TreeBasedRefineableMesh ()
 Empty virtual destructor. More...
 
- Public Member Functions inherited from oomph::TreeBasedRefineableMeshBase
 TreeBasedRefineableMeshBase ()
 Constructor. More...
 
 TreeBasedRefineableMeshBase (const TreeBasedRefineableMeshBase &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const TreeBasedRefineableMeshBase &)=delete
 Broken assignment operator. More...
 
virtual ~TreeBasedRefineableMeshBase ()
 Empty Destructor: More...
 
void adapt (const Vector< double > &elemental_error)
 
void p_adapt (const Vector< double > &elemental_error)
 
void refine_uniformly (DocInfo &doc_info)
 Refine mesh uniformly and doc process. More...
 
void refine_uniformly ()
 Refine mesh uniformly. More...
 
void p_refine_uniformly (DocInfo &doc_info)
 p-refine mesh uniformly and doc process More...
 
void p_refine_uniformly ()
 p-refine mesh uniformly More...
 
unsigned unrefine_uniformly ()
 
void p_unrefine_uniformly (DocInfo &doc_info)
 p-unrefine mesh uniformly More...
 
TreeForestforest_pt ()
 Return pointer to the Forest represenation of the mesh. More...
 
void doc_adaptivity_targets (std::ostream &outfile)
 Doc the targets for mesh adaptation. More...
 
unsignedmax_refinement_level ()
 Access fct for max. permissible refinement level (relative to base mesh) More...
 
unsignedmin_refinement_level ()
 Access fct for min. permissible refinement level (relative to base mesh) More...
 
unsignedmax_p_refinement_level ()
 
unsignedmin_p_refinement_level ()
 
virtual void adapt_mesh (DocInfo &doc_info)
 
virtual void adapt_mesh ()
 
void p_adapt_mesh (DocInfo &doc_info)
 
void p_adapt_mesh ()
 
virtual void refine_selected_elements (const Vector< unsigned > &elements_to_be_refined)
 
virtual void refine_selected_elements (const Vector< RefineableElement * > &elements_to_be_refined)
 
void p_refine_selected_elements (const Vector< unsigned > &elements_to_be_refined)
 p-refine mesh by refining the elements identified by their numbers. More...
 
void p_refine_selected_elements (const Vector< PRefineableElement * > &elements_to_be_refined_pt)
 p-refine mesh by refining the elements identified by their pointers. More...
 
virtual void refine_base_mesh_as_in_reference_mesh (TreeBasedRefineableMeshBase *const &ref_mesh_pt)
 Refine to same degree as the reference mesh. More...
 
virtual bool refine_base_mesh_as_in_reference_mesh_minus_one (TreeBasedRefineableMeshBase *const &ref_mesh_pt)
 
virtual void refine_as_in_reference_mesh (TreeBasedRefineableMeshBase *const &ref_mesh_pt)
 
virtual void get_refinement_levels (unsigned &min_refinement_level, unsigned &max_refinement_level)
 Get max/min refinement levels in mesh. More...
 
virtual void get_elements_at_refinement_level (unsigned &refinement_level, Vector< RefineableElement * > &level_elements)
 
virtual void get_refinement_pattern (Vector< Vector< unsigned >> &to_be_refined)
 
void refine_base_mesh (Vector< Vector< unsigned >> &to_be_refined)
 Refine base mesh according to specified refinement pattern. More...
 
virtual void refine (std::ifstream &restart_file)
 Refine mesh according to refinement pattern in restart file. More...
 
virtual void dump_refinement (std::ostream &outfile)
 Dump refinement pattern to allow for rebuild. More...
 
virtual void read_refinement (std::ifstream &restart_file, Vector< Vector< unsigned >> &to_be_refined)
 Read refinement pattern to allow for rebuild. More...
 
unsigned uniform_refinement_level_when_pruned () const
 
unsigneduniform_refinement_level_when_pruned ()
 Level to which the mesh was uniformly refined when it was pruned. More...
 
- Public Member Functions inherited from oomph::RefineableMeshBase
bool adapt_flag ()
 
 RefineableMeshBase ()
 
 RefineableMeshBase (const RefineableMeshBase &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const RefineableMeshBase &)=delete
 Broken assignment operator. More...
 
virtual ~RefineableMeshBase ()
 Empty Destructor: More...
 
unsigned nrefined ()
 Access fct for number of elements that were refined. More...
 
unsigned nunrefined ()
 Access fct for number of elements that were unrefined. More...
 
unsignednrefinement_overruled ()
 
unsignedmax_keep_unrefined ()
 
ErrorEstimator *& spatial_error_estimator_pt ()
 Access to spatial error estimator. More...
 
ErrorEstimatorspatial_error_estimator_pt () const
 Access to spatial error estimator (const version. More...
 
doublemin_permitted_error ()
 
doublemax_permitted_error ()
 
doublemin_error ()
 
doublemax_error ()
 
DocInfo *& doc_info_pt ()
 Access fct for pointer to DocInfo. More...
 
void enable_adaptation ()
 Enable adaptation. More...
 
void disable_adaptation ()
 Disable adaptation. More...
 
void enable_p_adaptation ()
 Enable adaptation. More...
 
void disable_p_adaptation ()
 Disable adaptation. More...
 
void enable_additional_synchronisation_of_hanging_nodes ()
 Enable additional synchronisation of hanging nodes. More...
 
void disable_additional_synchronisation_of_hanging_nodes ()
 Disable additional synchronisation of hanging nodes. More...
 
bool is_adaptation_enabled () const
 Return whether the mesh is to be adapted. More...
 
bool is_p_adaptation_enabled () const
 Return whether the mesh is to be adapted. More...
 
bool is_additional_synchronisation_of_hanging_nodes_disabled () const
 Return whether additional synchronisation is enabled. More...
 
DocInfo doc_info ()
 Access fct for DocInfo. More...
 
void p_unrefine_uniformly (DocInfo &doc_info)
 p-unrefine mesh uniformly More...
 

Private Types

enum  { Central_box , Lower_right_box , Upper_left_box }
 Remesh function ids. More...
 

Private Member Functions

void node_update_in_central_box (const unsigned &t, AlgebraicNode *&node_pt)
 
void node_update_in_lower_right_box (const unsigned &t, AlgebraicNode *&node_pt)
 
void node_update_in_upper_left_box (const unsigned &t, AlgebraicNode *&node_pt)
 
void setup_algebraic_node_update ()
 Setup algebraic update operation for all nodes. More...
 
void update_node_update_in_lower_right_box (AlgebraicNode *&node_pt)
 Update algebraic update function for nodes in lower right box. More...
 
void update_node_update_in_upper_left_box (AlgebraicNode *&node_pt)
 Update algebraic update function for nodes in upper left box. More...
 

Private Attributes

double Lambda_x
 Fractional width of central box. More...
 
double Lambda_y
 Fractional height of central box. 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...
 
- 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 Member Functions inherited from oomph::TreeBasedRefineableMeshBase
void complete_hanging_nodes (const int &ncont_interpolated_values)
 Complete the hanging node scheme recursively. More...
 
void complete_hanging_nodes_recursively (Node *&nod_pt, Vector< Node * > &master_nodes, Vector< double > &hang_weights, const int &ival)
 Auxiliary routine for recursive hanging node completion. 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::QuarterCircleSectorMesh< ELEMENT >
QuarterCircleSectorDomainDomain_pt
 Pointer to Domain. More...
 
GeomObjectWall_pt
 
double Xi_lo
 Lower limit for the (1D) coordinates along the wall. More...
 
double Fract_mid
 Fraction along wall where outer ring is to be divided. More...
 
double Xi_hi
 Upper limit for the (1D) coordinates along the wall. More...
 
- Protected Attributes inherited from oomph::TreeBasedRefineableMeshBase
unsigned Uniform_refinement_level_when_pruned
 Level to which the mesh was uniformly refined when it was pruned. More...
 
unsigned Max_refinement_level
 Max. permissible refinement level (relative to base mesh) More...
 
unsigned Min_refinement_level
 Min. permissible refinement level (relative to base mesh) More...
 
unsigned Max_p_refinement_level
 Max. permissible p-refinement level (relative to base mesh) More...
 
unsigned Min_p_refinement_level
 Min. permissible p-refinement level (relative to base mesh) More...
 
TreeForestForest_pt
 Forest representation of the mesh. More...
 
- Protected Attributes inherited from oomph::RefineableMeshBase
ErrorEstimatorSpatial_error_estimator_pt
 Pointer to spatial error estimator. More...
 
double Max_permitted_error
 Max. error (i.e. split elements if their error is larger) More...
 
double Min_permitted_error
 Min. error (i.e. (try to) merge elements if their error is smaller) More...
 
double Min_error
 Min.actual error. More...
 
double Max_error
 Max. actual error. More...
 
unsigned Nrefined
 Stats: Number of elements that were refined. More...
 
unsigned Nunrefined
 Stats: Number of elements that were unrefined. More...
 
bool Adapt_flag
 Flag that requests adaptation. More...
 
bool P_adapt_flag
 Flag that requests p-adaptation. More...
 
bool Additional_synchronisation_of_hanging_nodes_not_required
 Flag that disables additional synchronisation of hanging nodes. More...
 
DocInfoDoc_info_pt
 Pointer to DocInfo. More...
 
unsigned Max_keep_unrefined
 
unsigned Nrefinement_overruled
 

Detailed Description

template<class ELEMENT>
class oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >

Algebraic version of RefineableQuarterCircleSectorMesh

---___
| ---____
| - BOUNDARY 1
| /
| [2] / |
| / |
| N / |
| |_ E / |
BOUNDARY 2 |----------- |
| | [1] |
| [0] | | ^
| | | / \ direction of
| N | N | | Lagrangian
| |_ E | |_ E | | coordinate
|__________|___________| | along wall GeomObject
BOUNDARY 0
Within the elements (MacroElements), the local coordinates
are such that the (E)astern direction coincides with the positive
s_0 direction, while the (N)orther direction coincides with the positive
s_1 direction.
#define _(A, B)
Definition: cfortran.h:132
@ N
Definition: constructor.cpp:22
double E
Elastic modulus.
Definition: TwenteMeshGluing.cpp:68

Domain is parametrised by three macro elements as sketched. Elements need to be derived from AlgebraicElementBase. In addition to all the refinement procedures available for RefineableQuarterCircleSectorMesh which forms the basis for this mesh, we implement algebraic node update functions for the nodes.

Member Enumeration Documentation

◆ anonymous enum

template<class ELEMENT >
anonymous enum
private

Remesh function ids.

Enumerator
Central_box 
Lower_right_box 
Upper_left_box 
626  {
627  Central_box,
630  };
@ Lower_right_box
Definition: quarter_circle_sector_mesh.template.h:628
@ Central_box
Definition: quarter_circle_sector_mesh.template.h:627
@ Upper_left_box
Definition: quarter_circle_sector_mesh.template.h:629

Constructor & Destructor Documentation

◆ AlgebraicRefineableQuarterCircleSectorMesh()

template<class ELEMENT >
oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::AlgebraicRefineableQuarterCircleSectorMesh ( GeomObject wall_pt,
const double xi_lo,
const double fract_mid,
const double xi_hi,
TimeStepper time_stepper_pt = &Mesh::Default_TimeStepper 
)
inline

Constructor: Pass pointer to geometric object, start and end coordinates on the geometric object and the fraction along which the dividing line is to be placed when updating the nodal positions, and timestepper (defaults to (Steady) default timestepper defined in Mesh). Setup the refineable mesh (by calling the constructor for the underlying RefineableQuarterCircleSectorMesh) and the algebraic update functions for nodes.

457  : RefineableQuarterCircleSectorMesh<ELEMENT>(
458  wall_pt, xi_lo, fract_mid, xi_hi, time_stepper_pt)
459  {
460 #ifdef PARANOID
461  ELEMENT* el_pt = new ELEMENT;
462  if (dynamic_cast<AlgebraicElementBase*>(el_pt) == 0)
463  {
464  std::ostringstream error_message;
465 
466  error_message << "Base class for ELEMENT in "
467  << "AlgebraicRefineableQuarterCircleSectorMesh needs"
468  << "to be of type AlgebraicElement!\n";
469  error_message << "Whereas it is: typeid(el_pt).name()"
470  << typeid(el_pt).name() << std::endl;
471 
472  std::string function_name =
473  " AlgebraicRefineableQuarterCircleSectorMesh::\n";
474  function_name += "AlgebraicRefineableQuarterCircleSectorMesh()";
475 
476  throw OomphLibError(error_message.str(),
479  }
480  delete el_pt;
481 #endif
482 
483  // Add the geometric object to the list associated with this AlgebraicMesh
485 
486  // Setup algebraic node update operations
488  }
void add_geom_object_list_pt(GeomObject *geom_object_pt)
Definition: algebraic_elements.h:823
void setup_algebraic_node_update()
Setup algebraic update operation for all nodes.
Definition: quarter_circle_sector_mesh.template.cc:557
GeomObject *& wall_pt()
Access function to GeomObject representing wall.
Definition: quarter_circle_sector_mesh.template.h:105
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
string name
Definition: plotDoE.py:33
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References oomph::AlgebraicMesh::add_geom_object_list_pt(), plotDoE::name, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::setup_algebraic_node_update(), oomph::Global_string_for_annotation::string(), and oomph::QuarterCircleSectorMesh< ELEMENT >::wall_pt().

Member Function Documentation

◆ algebraic_node_update()

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

Implement the algebraic node update function for a node at time level t (t=0: present; t>0: previous): Update with the node's first (default) update function.

Implements oomph::AlgebraicMesh.

528  {
529  // Update with the update function for the node's first (default)
530  // node update fct
531  unsigned id = node_pt->node_update_fct_id();
532 
533  switch (id)
534  {
535  case Central_box:
536 
537  // Central box
539  break;
540 
541 
542  case Lower_right_box:
543 
544  // Lower right box
546  break;
547 
548  case Upper_left_box:
549 
550  // Upper left box
552  break;
553 
554  default:
555 
556  std::ostringstream error_message;
557  error_message << "The node update fct id is " << id
558  << ", but it should only be one of " << Central_box
559  << ", " << Lower_right_box << " or " << Upper_left_box
560  << std::endl;
561  std::string function_name =
562  " AlgebraicRefineableQuarterCircleSectorMesh::";
563  function_name += "algebraic_node_update()";
564 
565  throw OomphLibError(error_message.str(),
568  }
569  }
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
void node_update_in_central_box(const unsigned &t, AlgebraicNode *&node_pt)
Definition: quarter_circle_sector_mesh.template.cc:851
void node_update_in_lower_right_box(const unsigned &t, AlgebraicNode *&node_pt)
Definition: quarter_circle_sector_mesh.template.cc:940
void node_update_in_upper_left_box(const unsigned &t, AlgebraicNode *&node_pt)
Definition: quarter_circle_sector_mesh.template.cc:1048
t
Definition: plotPSD.py:36

References oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::Central_box, oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::Lower_right_box, oomph::AlgebraicMesh::node_pt(), oomph::AlgebraicNode::node_update_fct_id(), oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::node_update_in_central_box(), oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::node_update_in_lower_right_box(), oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::node_update_in_upper_left_box(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::Global_string_for_annotation::string(), plotPSD::t, and oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::Upper_left_box.

◆ node_update()

template<class ELEMENT >
void oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::node_update ( const bool update_all_solid_nodes = false)
inlinevirtual

Resolve mesh update: Update current nodal positions via algebraic node update. [Doesn't make sense to use this mesh with SolidElements anyway, so we buffer the case if update_all_solid_nodes is set to true.]

Reimplemented from oomph::AlgebraicMesh.

502  {
503 #ifdef PARANOID
504  if (update_all_solid_nodes)
505  {
506  std::string error_message =
507  "Doesn't make sense to use an AlgebraicMesh with\n";
508  error_message +=
509  "SolidElements so specifying update_all_solid_nodes=true\n";
510  error_message += "doesn't make sense either\n";
511 
512  std::string function_name =
513  " AlgebraicRefineableQuarterCircleSectorMesh::";
514  function_name += "node_update()";
515 
516  throw OomphLibError(
518  }
519 #endif
521  }
void node_update(const bool &update_all_solid_nodes=false)
Definition: algebraic_elements.h:653

References oomph::AlgebraicMesh::node_update(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().

◆ node_update_in_central_box()

template<class ELEMENT >
void oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::node_update_in_central_box ( const unsigned t,
AlgebraicNode *&  node_pt 
)
private

Algebraic update function for a node that is located in the central box

Algebraic update function: Update in central box according to wall shape at time level t (t=0: present; t>0: previous)

853  {
854 #ifdef PARANOID
855  // We're updating the nodal positions (!) at time level t
856  // and determine them by evaluating the wall GeomObject's
857  // position at that gime level. I believe this only makes sense
858  // if the t-th history value in the positional timestepper
859  // actually represents previous values (rather than some
860  // generalised quantity). Hence if this function is called with
861  // t>nprev_values(), we issue a warning and terminate the execution.
862  // It *might* be possible that the code still works correctly
863  // even if this condition is violated (e.g. if the GeomObject's
864  // position() function returns the appropriate "generalised"
865  // position value that is required by the timestepping scheme but it's
866  // probably worth flagging this up and forcing the user to manually switch
867  // off this warning if he/she is 100% sure that this is kosher.
869  {
870  std::string error_message =
871  "Trying to update the nodal position at a time level\n";
872  error_message += "beyond the number of previous values in the nodes'\n";
873  error_message += "position timestepper. This seems highly suspect!\n";
874  error_message += "If you're sure the code behaves correctly\n";
875  error_message += "in your application, remove this warning \n";
876  error_message += "or recompile with PARNOID switched off.\n";
877 
878  std::string function_name =
879  "AlgebraicRefineableQuarterCircleSectorMesh::";
880  function_name += "node_update_in_central_box()",
881  throw OomphLibError(
883  }
884 #endif
885 
886  // Extract references for update in central box by copy construction
887  Vector<double> ref_value(node_pt->vector_ref_value(Central_box));
888 
889  // Extract geometric objects for update in central box by copy construction
890  Vector<GeomObject*> geom_object_pt(
892 
893  // First reference value: fractional x-position of node inside box
894  double rho_x = ref_value[0];
895 
896  // Second reference value: fractional y-position of node inside box
897  double rho_y = ref_value[1];
898 
899 
900  // Wall position in bottom right corner:
901 
902  // Pointer to wall element:
903  GeomObject* obj_br_pt = geom_object_pt[0];
904 
905  // Eulerian dimension
906  unsigned n_dim = obj_br_pt->ndim();
907 
908  // Local coordinate:
909  Vector<double> s_br(1);
910  s_br[0] = ref_value[2];
911 
912  // Get wall position
913  Vector<double> r_br(n_dim);
914  obj_br_pt->position(t, s_br, r_br);
915 
916  // Wall position in top left corner:
917 
918  // Pointer to wall element:
919  GeomObject* obj_tl_pt = geom_object_pt[1];
920 
921  // Local coordinate:
922  Vector<double> s_tl(1);
923  s_tl[0] = ref_value[3];
924 
925  Vector<double> r_tl(n_dim);
926  obj_tl_pt->position(t, s_tl, r_tl);
927 
928  // Assign new nodal coordinate
929  node_pt->x(t, 0) = r_br[0] * Lambda_x * rho_x;
930  node_pt->x(t, 1) = r_tl[1] * Lambda_y * rho_y;
931  }
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 Lambda_y
Fractional height of central box.
Definition: quarter_circle_sector_mesh.template.h:637
double Lambda_x
Fractional width of central box.
Definition: quarter_circle_sector_mesh.template.h:634
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
Definition: nodes.h:1022
virtual unsigned nprev_values() const =0
Number of previous values available: 0 for static, 1 for BDF<1>,...

References oomph::GeomObject::ndim(), oomph::TimeStepper::nprev_values(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::GeomObject::position(), oomph::Node::position_time_stepper_pt(), oomph::Global_string_for_annotation::string(), plotPSD::t, oomph::AlgebraicNode::vector_geom_object_pt(), oomph::AlgebraicNode::vector_ref_value(), and oomph::Node::x().

Referenced by oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::algebraic_node_update().

◆ node_update_in_lower_right_box()

template<class ELEMENT >
void oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::node_update_in_lower_right_box ( const unsigned t,
AlgebraicNode *&  node_pt 
)
private

Algebraic update function for a node that is located in the lower right box

Algebraic update function: Update in lower right box according to wall shape at time level t (t=0: present; t>0: previous)

942  {
943 #ifdef PARANOID
944  // We're updating the nodal positions (!) at time level t
945  // and determine them by evaluating the wall GeomObject's
946  // position at that gime level. I believe this only makes sense
947  // if the t-th history value in the positional timestepper
948  // actually represents previous values (rather than some
949  // generalised quantity). Hence if this function is called with
950  // t>nprev_values(), we issue a warning and terminate the execution.
951  // It *might* be possible that the code still works correctly
952  // even if this condition is violated (e.g. if the GeomObject's
953  // position() function returns the appropriate "generalised"
954  // position value that is required by the timestepping scheme but it's
955  // probably worth flagging this up and forcing the user to manually switch
956  // off this warning if he/she is 100% sure that this is kosher.
958  {
959  std::string error_message =
960  "Trying to update the nodal position at a time level";
961  error_message += "beyond the number of previous values in the nodes'";
962  error_message += "position timestepper. This seems highly suspect!";
963  error_message += "If you're sure the code behaves correctly";
964  error_message += "in your application, remove this warning ";
965  error_message += "or recompile with PARNOID switched off.";
966 
967  std::string function_name =
968  "AlgebraicRefineableQuarterCircleSectorMesh::";
969  function_name += "node_update_in_lower_right_box()",
970  throw OomphLibError(
972  }
973 #endif
974 
975  // Extract references for update in central box by copy construction
976  Vector<double> ref_value(node_pt->vector_ref_value(Lower_right_box));
977 
978  // Extract geometric objects for update in central box by copy construction
979  Vector<GeomObject*> geom_object_pt(
981 
982  // First reference value: fractional s0-position of node inside box
983  double rho_0 = ref_value[0];
984 
985  // Second reference value: fractional s1-position of node inside box
986  double rho_1 = ref_value[1];
987 
988  // Wall position in bottom right corner:
989 
990  // Pointer to wall element:
991  GeomObject* obj_br_pt = geom_object_pt[0];
992 
993  // Eulerian dimension
994  unsigned n_dim = obj_br_pt->ndim();
995 
996  // Local coordinate:
997  Vector<double> s_br(1);
998  s_br[0] = ref_value[2];
999 
1000  // Get wall position
1001  Vector<double> r_br(n_dim);
1002  obj_br_pt->position(t, s_br, r_br);
1003 
1004  // Wall position in top left corner:
1005 
1006  // Pointer to wall element:
1007  GeomObject* obj_tl_pt = geom_object_pt[1];
1008 
1009  // Local coordinate:
1010  Vector<double> s_tl(1);
1011  s_tl[0] = ref_value[3];
1012 
1013  Vector<double> r_tl(n_dim);
1014  obj_tl_pt->position(t, s_tl, r_tl);
1015 
1016  // Position of the corner of the central box
1017  Vector<double> r_box(n_dim);
1018  r_box[0] = Lambda_x * r_br[0];
1019  r_box[1] = Lambda_y * r_tl[1];
1020 
1021  // Position Vector to left end of box
1022  Vector<double> r_left(n_dim);
1023  r_left[0] = Lambda_x * r_br[0] + rho_1 * (r_box[0] - Lambda_x * r_br[0]);
1024  r_left[1] = Lambda_x * r_br[1] + rho_1 * (r_box[1] - Lambda_x * r_br[1]);
1025 
1026  // Wall position
1027 
1028  // Pointer to wall element:
1029  GeomObject* obj_wall_pt = geom_object_pt[2];
1030 
1031  // Local coordinate:
1032  Vector<double> s_wall(1);
1033  s_wall[0] = ref_value[4];
1034 
1035  Vector<double> r_wall(n_dim);
1036  obj_wall_pt->position(t, s_wall, r_wall);
1037 
1038  // Assign new nodal coordinate
1039  node_pt->x(t, 0) = r_left[0] + rho_0 * (r_wall[0] - r_left[0]);
1040  node_pt->x(t, 1) = r_left[1] + rho_0 * (r_wall[1] - r_left[1]);
1041  }

References oomph::GeomObject::ndim(), oomph::TimeStepper::nprev_values(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::GeomObject::position(), oomph::Node::position_time_stepper_pt(), oomph::Global_string_for_annotation::string(), plotPSD::t, oomph::AlgebraicNode::vector_geom_object_pt(), oomph::AlgebraicNode::vector_ref_value(), and oomph::Node::x().

Referenced by oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::algebraic_node_update().

◆ node_update_in_upper_left_box()

template<class ELEMENT >
void oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::node_update_in_upper_left_box ( const unsigned t,
AlgebraicNode *&  node_pt 
)
private

Algebraic update function for a node that is located in the upper left box

Algebraic update function: Update in upper left box according to wall shape at time level t (t=0: present; t>0: previous)

1050  {
1051 #ifdef PARANOID
1052  // We're updating the nodal positions (!) at time level t
1053  // and determine them by evaluating the wall GeomObject's
1054  // position at that gime level. I believe this only makes sense
1055  // if the t-th history value in the positional timestepper
1056  // actually represents previous values (rather than some
1057  // generalised quantity). Hence if this function is called with
1058  // t>nprev_values(), we issue a warning and terminate the execution.
1059  // It *might* be possible that the code still works correctly
1060  // even if this condition is violated (e.g. if the GeomObject's
1061  // position() function returns the appropriate "generalised"
1062  // position value that is required by the timestepping scheme but it's
1063  // probably worth flagging this up and forcing the user to manually switch
1064  // off this warning if he/she is 100% sure that this is kosher.
1066  {
1067  std::string error_message =
1068  "Trying to update the nodal position at a time level";
1069  error_message += "beyond the number of previous values in the nodes'";
1070  error_message += "position timestepper. This seems highly suspect!";
1071  error_message += "If you're sure the code behaves correctly";
1072  error_message += "in your application, remove this warning ";
1073  error_message += "or recompile with PARNOID switched off.";
1074 
1075  std::string function_name =
1076  "AlgebraicRefineableQuarterCircleSectorMesh::";
1077  function_name += "node_update_in_upper_left_box()";
1078 
1079  throw OomphLibError(
1081  }
1082 #endif
1083 
1084  // Extract references for update in central box by copy construction
1085  Vector<double> ref_value(node_pt->vector_ref_value(Upper_left_box));
1086 
1087  // Extract geometric objects for update in central box by copy construction
1088  Vector<GeomObject*> geom_object_pt(
1090 
1091  // First reference value: fractional s0-position of node inside box
1092  double rho_0 = ref_value[0];
1093 
1094  // Second reference value: fractional s1-position of node inside box
1095  double rho_1 = ref_value[1];
1096 
1097  // Wall position in bottom right corner:
1098 
1099  // Pointer to wall element:
1100  GeomObject* obj_br_pt = geom_object_pt[0];
1101 
1102  // Eulerian dimension
1103  unsigned n_dim = obj_br_pt->ndim();
1104 
1105  // Local coordinate:
1106  Vector<double> s_br(1);
1107  s_br[0] = ref_value[2];
1108 
1109  // Get wall position
1110  Vector<double> r_br(n_dim);
1111  obj_br_pt->position(t, s_br, r_br);
1112 
1113  // Wall position in top left corner:
1114 
1115  // Pointer to wall element:
1116  GeomObject* obj_tl_pt = node_pt->geom_object_pt(1);
1117 
1118  // Local coordinate:
1119  Vector<double> s_tl(1);
1120  s_tl[0] = node_pt->ref_value(3);
1121 
1122  Vector<double> r_tl(n_dim);
1123  obj_tl_pt->position(t, s_tl, r_tl);
1124 
1125  // Position of the corner of the central box
1126  Vector<double> r_box(n_dim);
1127  r_box[0] = Lambda_x * r_br[0];
1128  r_box[1] = Lambda_y * r_tl[1];
1129 
1130  // Position Vector to top face of central box
1131  Vector<double> r_top(n_dim);
1132  r_top[0] = Lambda_y * r_tl[0] + rho_0 * (r_box[0] - Lambda_y * r_tl[0]);
1133  r_top[1] = Lambda_y * r_tl[1] + rho_0 * (r_box[1] - Lambda_y * r_tl[1]);
1134 
1135  // Wall position
1136 
1137  // Pointer to wall element:
1138  GeomObject* obj_wall_pt = node_pt->geom_object_pt(2);
1139 
1140  // Local coordinate:
1141  Vector<double> s_wall(1);
1142  s_wall[0] = node_pt->ref_value(4);
1143 
1144  Vector<double> r_wall(n_dim);
1145  obj_wall_pt->position(t, s_wall, r_wall);
1146 
1147 
1148  // Assign new nodal coordinate
1149  node_pt->x(t, 0) = r_top[0] + rho_1 * (r_wall[0] - r_top[0]);
1150  node_pt->x(t, 1) = r_top[1] + rho_1 * (r_wall[1] - r_top[1]);
1151  }
GeomObject * geom_object_pt(const unsigned &i)
Definition: algebraic_elements.h:229
double ref_value(const unsigned &i)
Definition: algebraic_elements.h:267

References oomph::AlgebraicNode::geom_object_pt(), oomph::GeomObject::ndim(), oomph::TimeStepper::nprev_values(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::GeomObject::position(), oomph::Node::position_time_stepper_pt(), oomph::AlgebraicNode::ref_value(), oomph::Global_string_for_annotation::string(), plotPSD::t, oomph::AlgebraicNode::vector_geom_object_pt(), oomph::AlgebraicNode::vector_ref_value(), and oomph::Node::x().

Referenced by oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::algebraic_node_update().

◆ self_test()

template<class ELEMENT >
unsigned oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::self_test ( )
inline

Run self-test for algebraic mesh – return 0/1 for OK/failure.

492  {
493  return AlgebraicMesh::self_test();
494  }
unsigned self_test()
Self test: check consistentency of multiple node updates.
Definition: algebraic_elements.h:786

References oomph::AlgebraicMesh::self_test().

◆ setup_algebraic_node_update()

template<class ELEMENT >
void oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::setup_algebraic_node_update
private

Setup algebraic update operation for all nodes.

//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// Setup algebraic update operation, based on individual blocks. Mesh is suspended from the ‘wall’ GeomObject pointed to by wall_pt. The lower right corner of the mesh is located at the wall's coordinate xi_lo, the upper left corner at xi_hi; The dividing line between the two blocks at the outer ring is located at the fraction fract_mid between these two coordinates. Node updating strategy:

  • the shape of the central box remains rectangular; the position of its top right corner is located at a fixed fraction of the width and height of the domain. Nodes in this region are located at fixed horizontal and vertical fractions of the box.
  • Nodes in the two outer "ring" elements (bottom right and top left) are located on straight lines running from the edges of the central box to the outer wall.
558  {
559 #ifdef PARANOID
561  AlgebraicElementBase* central_box_pt =
562  dynamic_cast<AlgebraicElementBase*>(Mesh::element_pt(0));
563 
564  if (central_box_pt == 0)
565  {
566  std::ostringstream error_message;
567  error_message
568  << "Element in AlgebraicRefineableQuarterCircleSectorMesh must be\n ";
569  error_message << "derived from AlgebraicElementBase\n";
570  error_message << "but it is of type: "
571  << typeid(Mesh::element_pt(0)).name() << std::endl;
572  std::string function_name =
573  "AlgebraicRefineableQuarterCircleSectorMesh::";
574  function_name += "setup_algebraic_node_update()";
575  throw OomphLibError(
576  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
577  }
578 #endif
579 
580  // Number of nodes in elements
581  unsigned nnodes = Mesh::finite_element_pt(0)->nnode();
582 
583  // Coordinates of central box
584  double x_box = Mesh::finite_element_pt(0)->node_pt(nnodes - 1)->x(0);
585  double y_box = Mesh::finite_element_pt(0)->node_pt(nnodes - 1)->x(1);
586 
587  // Get wall position in bottom right corner
588  Vector<double> r_br(2);
589  Vector<double> xi(1);
592 
593  // Establish fractional width of central box
594  Lambda_x = x_box / r_br[0];
595 
596  // Find corresponding wall element/local coordinate
597  GeomObject* obj_br_pt;
598  Vector<double> s_br(1);
599  this->Wall_pt->locate_zeta(xi, obj_br_pt, s_br);
600 
601  obj_br_pt->position(s_br, r_br);
602 
603  // Get wall position in top left corner
604  Vector<double> r_tl(2);
607 
608  // Establish fractional height of central box
609  Lambda_y = y_box / r_tl[1];
610 
611  // Find corresponding wall element/local coordinate
612  GeomObject* obj_tl_pt;
613  Vector<double> s_tl(1);
614  this->Wall_pt->locate_zeta(xi, obj_tl_pt, s_tl);
615 
616 
617  // Element 0: central box
618  //-----------------------
619  {
620  unsigned ielem = 0;
621  FiniteElement* el_pt = Mesh::finite_element_pt(ielem);
622 
623  // Loop over all nodes in the element and give them the update
624  // info appropriate for the current element
625  for (unsigned jnod = 0; jnod < nnodes; jnod++)
626  {
627  // Nodal coordinates in undeformed mesh
628  double x = Mesh::finite_element_pt(ielem)->node_pt(jnod)->x(0);
629  double y = Mesh::finite_element_pt(ielem)->node_pt(jnod)->x(1);
630 
631  // The update function requires two geometric objects
632  Vector<GeomObject*> geom_object_pt(2);
633 
634  // The update function requires four parameters:
635  Vector<double> ref_value(4);
636 
637  // First reference value: fractional x-position inside box
638  ref_value[0] = x / x_box;
639 
640  // Second reference value: fractional y-position inside box
641  ref_value[1] = y / y_box;
642 
643  // Wall element at bottom right end of wall mesh:
644  geom_object_pt[0] = obj_br_pt;
645 
646  // Local coordinate in this wall element (Note:
647  // we'll have to recompute this reference
648  // when the mesh is refined as we might fall off the element otherwise)
649  ref_value[2] = s_br[0];
650 
651 
652  // Wall element at top left end of wall mesh:
653  geom_object_pt[1] = obj_tl_pt;
654 
655  // Local coordinate in this wall element. Note:
656  // we'll have to recompute this reference
657  // when the mesh is refined as we might fall off the element otherwise)
658  ref_value[3] = s_tl[0];
659 
660  // Setup algebraic update for node: Pass update information
661  dynamic_cast<AlgebraicNode*>(el_pt->node_pt(jnod))
662  ->add_node_update_info(Central_box, // enumerated ID
663  this, // mesh
664  geom_object_pt, // vector of geom objects
665  ref_value); // vector of ref. values
666  }
667  }
668 
669  // Element 1: Bottom right box
670  //----------------------------
671  {
672  unsigned ielem = 1;
673  FiniteElement* el_pt = Mesh::finite_element_pt(ielem);
674 
675  // Loop over all nodes in the element and give them the update
676  // info appropriate for the current element
677 
678  // Double loop over nodes
679  unsigned nnod_lin =
680  dynamic_cast<ELEMENT*>(Mesh::finite_element_pt(ielem))->nnode_1d();
681  for (unsigned i0 = 0; i0 < nnod_lin; i0++)
682  {
683  // Fraction in the s_0-direction
684  double rho_0 = double(i0) / double(nnod_lin - 1);
685 
686  for (unsigned i1 = 0; i1 < nnod_lin; i1++)
687  {
688  // Fraction in the s_1-direction
689  double rho_1 = double(i1) / double(nnod_lin - 1);
690 
691  // Node number
692  unsigned jnod = i0 + i1 * nnod_lin;
693 
694  // The update function requires three geometric objects
695  Vector<GeomObject*> geom_object_pt(3);
696 
697  // The update function requires five parameters:
698  Vector<double> ref_value(5);
699 
700  // First reference value: fractional s0-position inside box
701  ref_value[0] = rho_0;
702 
703  // Second reference value: fractional s1-position inside box
704  ref_value[1] = rho_1;
705 
706  // Wall element at bottom right end of wall mesh:
707  geom_object_pt[0] = obj_br_pt;
708 
709  // Local coordinate in this wall element. Note:
710  // We'll have to recompute this reference
711  // when the mesh is refined as we might fall off the element
712  // otherwise
713  ref_value[2] = s_br[0];
714 
715  // Wall element at top left end of wall mesh:
716  geom_object_pt[1] = obj_tl_pt;
717 
718  // Local coordinate in this wall element. Note:
719  // We'll have to recompute this reference
720  // when the mesh is refined as we might fall off the element
721  // otherwise
722  ref_value[3] = s_tl[0];
723 
724  // Reference point on wall
725  Vector<double> xi_wall(1);
730 
731  // Identify wall element number and local coordinate of
732  // reference point on wall
733  GeomObject* obj_wall_pt;
734  Vector<double> s_wall(1);
735  this->Wall_pt->locate_zeta(xi_wall, obj_wall_pt, s_wall);
736 
737  // Wall element at that contians reference point:
738  geom_object_pt[2] = obj_wall_pt;
739 
740  // Local coordinate in this wall element. Note:
741  // We'll have to recompute this reference
742  // when the mesh is refined as we might fall off the element
743  // otherwise
744  ref_value[4] = s_wall[0];
745 
746  // Setup algebraic update for node: Pass update information
747  dynamic_cast<AlgebraicNode*>(el_pt->node_pt(jnod))
748  ->add_node_update_info(Lower_right_box, // enumerated ID
749  this, // mesh
750  geom_object_pt, // vector of geom objects
751  ref_value); // vector of ref. vals
752  }
753  }
754  }
755 
756 
757  // Element 2: Top left box
758  //---------------------------
759  {
760  unsigned ielem = 2;
761  FiniteElement* el_pt = Mesh::finite_element_pt(ielem);
762 
763  // Double loop over nodes
764  unsigned nnod_lin =
765  dynamic_cast<ELEMENT*>(Mesh::finite_element_pt(ielem))->nnode_1d();
766 
767  for (unsigned i0 = 0; i0 < nnod_lin; i0++)
768  {
769  // Fraction in the s_0-direction
770  double rho_0 = double(i0) / double(nnod_lin - 1);
771 
772  for (unsigned i1 = 0; i1 < nnod_lin; i1++)
773  {
774  // Fraction in the s_1-direction
775  double rho_1 = double(i1) / double(nnod_lin - 1);
776 
777  // Node number
778  unsigned jnod = i0 + i1 * nnod_lin;
779 
780  // The update function requires three geometric objects
781  Vector<GeomObject*> geom_object_pt(3);
782 
783  // The update function requires five parameters:
784  Vector<double> ref_value(5);
785 
786  // First reference value: fractional s0-position inside box
787  ref_value[0] = rho_0;
788 
789  // Second reference value: fractional s1-position inside box
790  ref_value[1] = rho_1;
791 
792  // Wall element at bottom right end of wall mesh:
793  geom_object_pt[0] = obj_br_pt;
794 
795  // Local coordinate in this wall element. Note:
796  // We'll have to recompute this reference
797  // when the mesh is refined as we might fall off the element
798  // otherwise
799  ref_value[2] = s_br[0];
800 
801  // Wall element at top left end of wall mesh:
802  geom_object_pt[1] = obj_tl_pt;
803 
804  // Local coordinate in this wall element. Note:
805  // We'll have to recompute this reference
806  // when the mesh is refined as we might fall off the element
807  // otherwise
808  ref_value[3] = s_tl[0];
809 
810  // Reference point on wall
811  Vector<double> xi_wall(1);
813  rho_0 *
817 
818  // Identify wall element number and local coordinate of
819  // reference point on wall
820  GeomObject* obj_wall_pt;
821  Vector<double> s_wall(1);
822  this->Wall_pt->locate_zeta(xi_wall, obj_wall_pt, s_wall);
823 
824  // Wall element at that contians reference point:
825  geom_object_pt[2] = obj_wall_pt;
826 
827  // Local coordinate in this wall element. Note:
828  // We'll have to recompute this reference
829  // when the mesh is refined as we might fall off the element
830  // otherwise
831  ref_value[4] = s_wall[0];
832 
833  // Setup algebraic update for node: Pass update information
834  dynamic_cast<AlgebraicNode*>(el_pt->node_pt(jnod))
835  ->add_node_update_info(Upper_left_box, // Enumerated ID
836  this, // mesh
837  geom_object_pt, // vector of geom objects
838  ref_value); // vector of ref. vals
839  }
840  }
841  }
842  }
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
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
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
Definition: mesh.h:460
double Fract_mid
Fraction along wall where outer ring is to be divided.
Definition: quarter_circle_sector_mesh.template.h:138
double Xi_hi
Upper limit for the (1D) coordinates along the wall.
Definition: quarter_circle_sector_mesh.template.h:141
GeomObject * Wall_pt
Definition: quarter_circle_sector_mesh.template.h:132
double Xi_lo
Lower limit for the (1D) coordinates along the wall.
Definition: quarter_circle_sector_mesh.template.h:135
Scalar * y
Definition: level1_cplx_impl.h:128
list x
Definition: plotDoE.py:28

References oomph::Mesh::element_pt(), oomph::Mesh::finite_element_pt(), plotDoE::name, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::GeomObject::position(), oomph::Global_string_for_annotation::string(), plotDoE::x, oomph::Node::x(), and y.

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

◆ update_node_update()

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

Update the node update info for specified algebraic node following any spatial mesh adaptation.

Implements oomph::AlgebraicMesh.

574  {
575  // Get all node update fct for this node (resizes internally)
576  Vector<int> id;
578 
579  // Loop over all update fcts
580  unsigned n_update = id.size();
581  for (unsigned i = 0; i < n_update; i++)
582  {
583  switch (id[i])
584  {
585  case Central_box:
586 
587  // Central box: no update
588  break;
589 
590 
591  case Lower_right_box:
592 
593  // Lower right box
595  break;
596 
597  case Upper_left_box:
598 
599  // Upper left box
601  break;
602 
603  default:
604 
605  // Never get here....
606  std::ostringstream error_message;
607  error_message << "Node update fct id is " << id[i]
608  << ", but it should only be one of" << Central_box
609  << ", " << Lower_right_box << " or " << Upper_left_box
610  << std::endl;
611 
612  std::string function_name =
613  " AlgebraicRefineableQuarterCircleSectorMesh::";
614  function_name += "update_node_update()";
615 
616  throw OomphLibError(error_message.str(),
619  }
620  }
621  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
void update_node_update_in_lower_right_box(AlgebraicNode *&node_pt)
Update algebraic update function for nodes in lower right box.
Definition: quarter_circle_sector_mesh.template.cc:1159
void update_node_update_in_upper_left_box(AlgebraicNode *&node_pt)
Update algebraic update function for nodes in upper left box.
Definition: quarter_circle_sector_mesh.template.cc:1259

References oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::Central_box, i, oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::Lower_right_box, oomph::AlgebraicMesh::node_pt(), oomph::AlgebraicNode::node_update_fct_id(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::Global_string_for_annotation::string(), oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::update_node_update_in_lower_right_box(), oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::update_node_update_in_upper_left_box(), and oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::Upper_left_box.

◆ update_node_update_in_lower_right_box()

template<class ELEMENT >
void oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::update_node_update_in_lower_right_box ( AlgebraicNode *&  node_pt)
private

Update algebraic update function for nodes in lower right box.

Update algebraic node update function for nodes in lower right box

1160  {
1161  // Extract references for update in central box by copy construction
1162  Vector<double> ref_value(node_pt->vector_ref_value(Lower_right_box));
1163 
1164  // Extract geometric objects for updatein central box by copy construction
1165  Vector<GeomObject*> geom_object_pt(
1167 
1168 
1169  // Now remove the update info to allow overwriting below
1171 
1172  // Fixed reference value: Start coordinate on wall
1174 
1175  // Fixed reference value: Fractional position of dividing line
1177 
1178  // Fixed reference value: End coordinate on wall
1180 
1181  // Second reference value: fractional s1-position of node inside box
1182  double rho_1 = ref_value[1];
1183 
1184 
1185  // Update reference to wall point in bottom right corner
1186  //------------------------------------------------------
1187 
1188  // Wall position in bottom right corner:
1189  Vector<double> xi(1);
1190  xi[0] = xi_lo;
1191 
1192  // Find corresponding wall element/local coordinate
1193  GeomObject* obj_br_pt;
1194  Vector<double> s_br(1);
1195  this->Wall_pt->locate_zeta(xi, obj_br_pt, s_br);
1196 
1197  // Wall element at bottom right end of wall mesh:
1198  geom_object_pt[0] = obj_br_pt;
1199 
1200  // Local coordinate in this wall element. Note:
1201  // We'll have to recompute this reference
1202  // when the mesh is refined as we might fall off the element otherwise
1203  ref_value[2] = s_br[0];
1204 
1205 
1206  // Update reference to wall point in upper left corner
1207  //----------------------------------------------------
1208 
1209  // Wall position in top left corner
1210  xi[0] = xi_hi;
1211 
1212  // Find corresponding wall element/local coordinate
1213  GeomObject* obj_tl_pt;
1214  Vector<double> s_tl(1);
1215  this->Wall_pt->locate_zeta(xi, obj_tl_pt, s_tl);
1216 
1217  // Wall element at top left end of wall mesh:
1218  geom_object_pt[1] = obj_tl_pt;
1219 
1220  // Local coordinate in this wall element. Note:
1221  // We'll have to recompute this reference
1222  // when the mesh is refined as we might fall off the element otherwise
1223  ref_value[3] = s_tl[0];
1224 
1225 
1226  // Update reference to reference point on wall
1227  //--------------------------------------------
1228 
1229  // Reference point on wall
1230  Vector<double> xi_wall(1);
1231  xi_wall[0] = xi_lo + rho_1 * fract_mid * (xi_hi - xi_lo);
1232 
1233  // Identify wall element number and local coordinate of
1234  // reference point on wall
1235  GeomObject* obj_wall_pt;
1236  Vector<double> s_wall(1);
1237  this->Wall_pt->locate_zeta(xi_wall, obj_wall_pt, s_wall);
1238 
1239  // Wall element at that contians reference point:
1240  geom_object_pt[2] = obj_wall_pt;
1241 
1242  // Local coordinate in this wall element. Note:
1243  // We'll have to recompute this reference
1244  // when the mesh is refined as we might fall off the element otherwise
1245  ref_value[4] = s_wall[0];
1246 
1247  // Setup algebraic update for node: Pass update information
1248  node_pt->add_node_update_info(Lower_right_box, // Enumerated ID
1249  this, // mesh
1250  geom_object_pt, // vector of geom objects
1251  ref_value); // vector of ref. vals
1252  }
void kill_node_update_info(const int &id=0)
Definition: algebraic_elements.h:365
void add_node_update_info(const int &id, AlgebraicMesh *mesh_pt, const Vector< GeomObject * > &geom_object_pt, const Vector< double > &ref_value, const bool &called_from_constructor=false)
Definition: algebraic_elements.h:280

References oomph::AlgebraicNode::add_node_update_info(), oomph::AlgebraicNode::kill_node_update_info(), oomph::AlgebraicNode::vector_geom_object_pt(), and oomph::AlgebraicNode::vector_ref_value().

Referenced by oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::update_node_update().

◆ update_node_update_in_upper_left_box()

template<class ELEMENT >
void oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::update_node_update_in_upper_left_box ( AlgebraicNode *&  node_pt)
private

Update algebraic update function for nodes in upper left box.

Update algebraic node update function for nodes in upper left box

1260  {
1261  // Extract references for update in central box by copy construction
1262  Vector<double> ref_value(node_pt->vector_ref_value(Upper_left_box));
1263 
1264  // Extract geometric objects for update in central box by copy construction
1265  Vector<GeomObject*> geom_object_pt(
1267 
1268  // Now remove the update info to allow overwriting below
1270 
1271  // Fixed reference value: Start coordinate on wall
1273 
1274  // Fixed reference value: Fractional position of dividing line
1276 
1277  // Fixed reference value: End coordinate on wall
1279 
1280  // First reference value: fractional s0-position of node inside box
1281  double rho_0 = ref_value[0];
1282 
1283  // Update reference to wall point in bottom right corner
1284  //------------------------------------------------------
1285 
1286  // Wall position in bottom right corner:
1287  Vector<double> xi(1);
1288  xi[0] = xi_lo;
1289 
1290  // Find corresponding wall element/local coordinate
1291  GeomObject* obj_br_pt;
1292  Vector<double> s_br(1);
1293  this->Wall_pt->locate_zeta(xi, obj_br_pt, s_br);
1294 
1295  // Wall element at bottom right end of wall mesh:
1296  geom_object_pt[0] = obj_br_pt;
1297 
1298  // Local coordinate in this wall element. Note:
1299  // We'll have to recompute this reference
1300  // when the mesh is refined as we might fall off the element otherwise
1301  ref_value[2] = s_br[0];
1302 
1303  // Update reference to wall point in upper left corner
1304  //----------------------------------------------------
1305 
1306  // Wall position in top left corner
1307  xi[0] = xi_hi;
1308 
1309  // Find corresponding wall element/local coordinate
1310  GeomObject* obj_tl_pt;
1311  Vector<double> s_tl(1);
1312  this->Wall_pt->locate_zeta(xi, obj_tl_pt, s_tl);
1313 
1314  // Wall element at top left end of wall mesh:
1315  geom_object_pt[1] = obj_tl_pt;
1316 
1317  // Local coordinate in this wall element. Note:
1318  // We'll have to recompute this reference
1319  // when the mesh is refined as we might fall off the element otherwise
1320  ref_value[3] = s_tl[0];
1321 
1322 
1323  // Update reference to reference point on wall
1324  //--------------------------------------------
1325 
1326  // Reference point on wall
1327  Vector<double> xi_wall(1);
1328  xi_wall[0] = xi_hi + rho_0 * (1.0 - fract_mid) * (xi_lo - xi_hi);
1329 
1330  // Identify reference point on wall
1331  GeomObject* obj_wall_pt;
1332  Vector<double> s_wall(1);
1333  this->Wall_pt->locate_zeta(xi_wall, obj_wall_pt, s_wall);
1334 
1335  // Wall element at that contians reference point:
1336  geom_object_pt[2] = obj_wall_pt;
1337 
1338  // Local coordinate in this wall element. Note:
1339  // We'll have to recompute this reference
1340  // when the mesh is refined as we might fall off the element otherwise
1341  ref_value[4] = s_wall[0];
1342 
1343  // Setup algebraic update for node: Pass update information
1344  node_pt->add_node_update_info(Upper_left_box, // Enumerated ID
1345  this, // mesh
1346  geom_object_pt, // vector of geom objects
1347  ref_value); // vector of ref. vals
1348  }

References oomph::AlgebraicNode::add_node_update_info(), oomph::AlgebraicNode::kill_node_update_info(), oomph::AlgebraicNode::vector_geom_object_pt(), and oomph::AlgebraicNode::vector_ref_value().

Referenced by oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::update_node_update().

Member Data Documentation

◆ Lambda_x

template<class ELEMENT >
double oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::Lambda_x
private

Fractional width of central box.

◆ Lambda_y

template<class ELEMENT >
double oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::Lambda_y
private

Fractional height of central box.


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