oomph::RefineableTriangleMesh< ELEMENT > Class Template Reference

Unstructured refineable Triangle Mesh. More...

#include <triangle_mesh.template.h>

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

Public Types

typedef void(* MeshUpdateFctPt) (Mesh *mesh_pt)
 
typedef void(* InternalHolePointUpdateFctPt) (const unsigned &ihole, TriangleMeshPolygon *poly_pt)
 
- 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)
 

Public Member Functions

 RefineableTriangleMesh (const std::string &node_file_name, const std::string &element_file_name, const std::string &poly_file_name, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper, const bool &allow_automatic_creation_of_vertices_on_boundaries=true)
 Build mesh, based on the polyfiles. More...
 
- Public Member Functions inherited from oomph::TriangleMesh< ELEMENT >
 TriangleMesh ()
 Empty constructor. More...
 
 TriangleMesh (const std::string &node_file_name, const std::string &element_file_name, const std::string &poly_file_name, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper, const bool &allow_automatic_creation_of_vertices_on_boundaries=true)
 Constructor with the input files. More...
 
void output_boundary_coordinates (const unsigned &b, std::ostream &outfile)
 
- Public Member Functions inherited from oomph::TriangleMeshBase
 TriangleMeshBase ()
 Constructor. More...
 
 TriangleMeshBase (const TriangleMeshBase &node)=delete
 Broken copy constructor. More...
 
virtual ~TriangleMeshBase ()
 Broken assignment operator. More...
 
void setup_boundary_element_info ()
 
void setup_boundary_element_info (std::ostream &outfile)
 
virtual void load_balance (const Vector< unsigned > &target_domain_for_local_non_halo_element)
 Virtual function to perform the load balance rutines. More...
 
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...
 
- Public Member Functions inherited from oomph::UnstructuredTwoDMeshGeometryBase
 UnstructuredTwoDMeshGeometryBase ()
 Empty constructor. More...
 
 UnstructuredTwoDMeshGeometryBase (const UnstructuredTwoDMeshGeometryBase &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const UnstructuredTwoDMeshGeometryBase &)=delete
 Broken assignment operator. More...
 
 ~UnstructuredTwoDMeshGeometryBase ()
 Empty destructor. More...
 
unsigned nregion ()
 Return the number of regions specified by attributes. More...
 
unsigned nregion_element (const unsigned &i)
 Return the number of elements in the i-th region. More...
 
FiniteElementregion_element_pt (const unsigned &i, const unsigned &e)
 Return the e-th element in the i-th region. More...
 
unsigned nregion_attribute ()
 Return the number of attributes used in the mesh. More...
 
double region_attribute (const unsigned &i)
 Return the attribute associated with region i. More...
 
GeomObjectboundary_geom_object_pt (const unsigned &b)
 
std::map< unsigned, GeomObject * > & boundary_geom_object_pt ()
 Return direct access to the geometric object storage. More...
 
std::map< unsigned, Vector< double > > & boundary_coordinate_limits ()
 
Vector< double > & boundary_coordinate_limits (const unsigned &b)
 
unsigned nboundary_element_in_region (const unsigned &b, const unsigned &r) const
 Return the number of elements adjacent to boundary b in region r. More...
 
FiniteElementboundary_element_in_region_pt (const unsigned &b, const unsigned &r, const unsigned &e) const
 Return pointer to the e-th element adjacent to boundary b in region r. More...
 
int face_index_at_boundary_in_region (const unsigned &b, const unsigned &r, const unsigned &e) const
 Return face index of the e-th element adjacent to boundary b in region r. More...
 
TriangleMeshPolyLineboundary_polyline_pt (const unsigned &b)
 
std::map< unsigned, std::set< Node * > > & nodes_on_boundary_pt ()
 
const bool get_connected_vertex_number_on_destination_polyline (TriangleMeshPolyLine *dst_polyline_pt, Vector< double > &vertex_coordinates, unsigned &vertex_number)
 
void check_contiguousness_on_polylines_helper (Vector< TriangleMeshPolyLine * > &polylines_pt, unsigned &index)
 
void check_contiguousness_on_polylines_helper (Vector< TriangleMeshPolyLine * > &polylines_pt, unsigned &index_halo_start, unsigned &index_halo_end)
 
bool is_point_inside_polygon_helper (Vector< Vector< double >> polygon_vertices, Vector< double > point)
 Helper function that checks if a given point is inside a polygon. More...
 
void enable_automatic_creation_of_vertices_on_boundaries ()
 
void disable_automatic_creation_of_vertices_on_boundaries ()
 
bool is_automatic_creation_of_vertices_on_boundaries_allowed ()
 
template<class ELEMENT >
void setup_boundary_coordinates (const unsigned &b)
 
template<class ELEMENT >
void setup_boundary_coordinates (const unsigned &b, std::ofstream &outfile)
 
- 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)
 
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 node_update (const bool &update_all_solid_nodes=false)
 
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)
 
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::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...
 
virtual void p_adapt (const Vector< double > &elemental_error)
 
virtual void refine_uniformly ()
 Refine mesh uniformly. More...
 
virtual void p_refine_uniformly (DocInfo &doc_info)
 p-refine mesh uniformly and doc process More...
 
virtual void p_refine_uniformly ()
 p-refine mesh uniformly More...
 
void p_unrefine_uniformly (DocInfo &doc_info)
 p-unrefine mesh uniformly More...
 

Protected Member Functions

virtual ~RefineableTriangleMesh ()
 Empty Destructor. More...
 
void enable_timings_tranfering_target_areas ()
 
void disable_timings_tranfering_target_areas ()
 
void enable_projection ()
 Enables the solution projection step during adaptation. More...
 
void disable_projection ()
 Disables the solution projection step during adaptation. More...
 
void enable_timings_projection ()
 Enables info. and timings for projection. More...
 
void disable_timings_projection ()
 Disables info. and timings for projection. More...
 
unsignednbin_x_for_area_transfer ()
 
unsignednbin_y_for_area_transfer ()
 
unsigned max_sample_points_for_limited_locate_zeta_during_target_area_transfer ()
 
doublemax_element_size ()
 Max element size allowed during adaptation. More...
 
doublemin_element_size ()
 Min element size allowed during adaptation. More...
 
doublemin_permitted_angle ()
 Min angle before remesh gets triggered. More...
 
bool use_iterative_solver_for_projection ()
 
void enable_iterative_solver_for_projection ()
 
void disable_iterative_solver_for_projection ()
 
void enable_print_timings_adaptation (const unsigned &print_level=1)
 Enables printing of timings for adaptation. More...
 
void disable_print_timings_adaptation ()
 Disables printing of timings for adaptation. More...
 
void set_print_level_timings_adaptation (const unsigned &print_level)
 Sets the printing level of timings for adaptation. More...
 
void enable_print_timings_load_balance (const unsigned &print_level=1)
 Enables printing of timings for load balance. More...
 
void disable_print_timings_load_balance ()
 Disables printing of timings for load balance. More...
 
void set_print_level_timings_load_balance (const unsigned &print_level)
 Sets the printing level of timings for load balance. More...
 
void doc_adaptivity_targets (std::ostream &outfile)
 Doc the targets for mesh adaptation. More...
 
void refine_uniformly (DocInfo &doc_info)
 Refine mesh uniformly and doc process. More...
 
unsigned unrefine_uniformly ()
 
void adapt (const Vector< double > &elem_error)
 Adapt mesh, based on elemental error provided. More...
 
MeshUpdateFctPtmesh_update_fct_pt ()
 
InternalHolePointUpdateFctPtinternal_hole_point_update_fct_pt ()
 
void create_polylines_from_polyfiles (const std::string &node_file_name, const std::string &poly_file_name)
 Helper function to create polylines and fill associate data. More...
 
void update_polyline_representation_from_restart ()
 Method used to update the polylines representation after restart. More...
 
void get_boundary_segment_nodes_helper (const unsigned &b, Vector< Vector< Node * >> &tmp_segment_nodes)
 
void enable_boundary_unrefinement_constrained_by_target_areas ()
 
void disable_boundary_unrefinement_constrained_by_target_areas ()
 
void enable_boundary_refinement_constrained_by_target_areas ()
 
void disable_boundary_refinement_constrained_by_target_areas ()
 
void enable_shared_boundary_unrefinement_constrained_by_target_areas ()
 
void disable_shared_boundary_unrefinement_constrained_by_target_areas ()
 
void enable_shared_boundary_refinement_constrained_by_target_areas ()
 
void disable_shared_boundary_refinement_constrained_by_target_areas ()
 
const bool boundary_connections (const unsigned &b, const unsigned &c, std::set< Vector< double >> &vertices)
 
const void synchronize_shared_boundary_connections ()
 Synchronise the vertices that are marked for non deletion. More...
 
void add_vertices_for_non_deletion ()
 
void add_non_delete_vertices_from_boundary_helper (Vector< Vector< Node * >> src_bound_segment_node_pt, Vector< Vector< Node * >> dst_bound_segment_node_pt, const unsigned &dst_bnd_id, const unsigned &dst_bnd_chunk)
 
void create_temporary_boundary_connections (Vector< TriangleMeshPolygon * > &tmp_outer_polygons_pt, Vector< TriangleMeshOpenCurve * > &tmp_open_curves_pt)
 
void restore_boundary_connections (Vector< TriangleMeshPolyLine * > &resume_initial_connection_polyline_pt, Vector< TriangleMeshPolyLine * > &resume_final_connection_polyline_pt)
 
void restore_polyline_connections_helper (TriangleMeshPolyLine *polyline_pt, Vector< TriangleMeshPolyLine * > &resume_initial_connection_polyline_pt, Vector< TriangleMeshPolyLine * > &resume_final_connection_polyline_pt)
 
void resume_boundary_connections (Vector< TriangleMeshPolyLine * > &resume_initial_connection_polyline_pt, Vector< TriangleMeshPolyLine * > &resume_final_connection_polyline_pt)
 
bool get_connected_vertex_number_on_dst_boundary (Vector< double > &vertex_coordinates, const unsigned &dst_b_id, unsigned &vertex_number)
 
bool unrefine_boundary (const unsigned &b, const unsigned &c, Vector< Vector< double >> &vector_bnd_vertices, double &unrefinement_tolerance, const bool &check_only=false)
 Helper function that performs the unrefinement process. More...
 
bool refine_boundary (Mesh *face_mesh_pt, Vector< Vector< double >> &vector_bnd_vertices, double &refinement_tolerance, const bool &check_only=false)
 
bool apply_max_length_constraint (Mesh *face_mesh_pt, Vector< Vector< double >> &vector_bnd_vertices, double &max_length_constraint)
 
bool unrefine_boundary_constrained_by_target_area (const unsigned &b, const unsigned &c, Vector< Vector< double >> &vector_bnd_vertices, double &unrefinement_tolerance, Vector< double > &area_constraint)
 
bool refine_boundary_constrained_by_target_area (MeshAsGeomObject *mesh_geom_obj_pt, Vector< Vector< double >> &vector_bnd_vertices, double &refinement_tolerance, Vector< double > &area_constraint)
 
bool unrefine_shared_boundary_constrained_by_target_area (const unsigned &b, const unsigned &c, Vector< Vector< double >> &vector_bnd_vertices, Vector< double > &area_constraint)
 
bool refine_shared_boundary_constrained_by_target_area (Vector< Vector< double >> &vector_bnd_vertices, Vector< double > &area_constraint)
 
void initialise_boundary_refinement_data ()
 Set all the flags to true (the default values) More...
 
bool update_polygon_using_face_mesh (TriangleMeshPolygon *polygon_pt, const bool &check_only=false)
 
bool update_open_curve_using_face_mesh (TriangleMeshOpenCurve *open_polyline_pt, const bool &check_only=false)
 
virtual bool surface_remesh_for_inner_hole_boundaries (Vector< Vector< double >> &internal_point_coord, const bool &check_only=false)
 
void snap_nodes_onto_boundary (RefineableTriangleMesh< ELEMENT > *&new_mesh_pt, const unsigned &b)
 Snap the boundary nodes onto any curvilinear boundaries. More...
 
void create_unsorted_face_mesh_representation (const unsigned &boundary_id, Mesh *face_mesh_pt)
 
void create_sorted_face_mesh_representation (const unsigned &boundary_id, Mesh *face_mesh_pt, std::map< FiniteElement *, bool > &is_inverted, bool &inverted_face_mesh)
 
void get_face_mesh_representation (TriangleMeshPolygon *polygon_pt, Vector< Mesh * > &face_mesh_pt)
 
void get_face_mesh_representation (TriangleMeshOpenCurve *open_polyline_pt, Vector< Mesh * > &face_mesh_pt)
 
void update_polygon_after_restart (TriangleMeshPolygon *&polygon_pt)
 Updates the polylines representation after restart. More...
 
void update_open_curve_after_restart (TriangleMeshOpenCurve *&open_curve_pt)
 Updates the open curve representation after restart. More...
 
bool update_polygon_using_elements_area (TriangleMeshPolygon *&polygon_pt, const Vector< double > &target_area)
 
bool update_open_curve_using_elements_area (TriangleMeshOpenCurve *&open_curve_pt, const Vector< double > &target_area)
 
void initialise_adaptation_data ()
 Helper function to initialise data associated with adaptation. More...
 
double compute_area_target (const Vector< double > &elem_error, Vector< double > &target_area)
 
- Protected Member Functions inherited from oomph::TriangleMesh< ELEMENT >
 TriangleMesh (const TriangleMesh &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const TriangleMesh &)=delete
 Broken assignment operator. More...
 
virtual ~TriangleMesh ()
 Destructor. More...
 
void set_mesh_level_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
Vector< unsignedoomph_vertex_nodes_id ()
 
void build_from_scaffold (TimeStepper *time_stepper_pt, const bool &use_attributes)
 Build mesh from scaffold. More...
 
- Protected Member Functions inherited from oomph::UnstructuredTwoDMeshGeometryBase
void snap_nodes_onto_geometric_objects ()
 
void copy_connection_information (TriangleMeshCurveSection *input_curve_pt, TriangleMeshCurveSection *output_curve_pt)
 
void copy_connection_information_to_sub_polylines (TriangleMeshCurveSection *input_curve_pt, TriangleMeshCurveSection *output_curve_pt)
 
- 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

std::map< unsigned, std::set< Vector< double > > > Boundary_connections_pt
 
bool Do_boundary_unrefinement_constrained_by_target_areas
 Flag that enables or disables boundary unrefinement (true by default) More...
 
bool Do_boundary_refinement_constrained_by_target_areas
 Flag that enables or disables boundary refinement (true by default) More...
 
bool Do_shared_boundary_unrefinement_constrained_by_target_areas
 Flag that enables or disables boundary unrefinement (true by default) More...
 
bool Do_shared_boundary_refinement_constrained_by_target_areas
 Flag that enables or disables boundary unrefinement (true by default) More...
 
unsigned Nbin_x_for_area_transfer
 
unsigned Nbin_y_for_area_transfer
 
unsigned Max_sample_points_for_limited_locate_zeta_during_target_area_transfer
 
double Max_element_size
 Max permitted element size. More...
 
double Min_element_size
 Min permitted element size. More...
 
double Min_permitted_angle
 Min angle before remesh gets triggered. More...
 
bool Disable_projection
 Enable/disable solution projection during adaptation. More...
 
bool Use_iterative_solver_for_projection
 
bool Print_timings_transfering_target_areas
 Enable/disable printing timings for transfering target areas. More...
 
bool Print_timings_projection
 Enable/disable printing timings for projection. More...
 
unsigned Print_timings_level_adaptation
 The printing level for adaptation. More...
 
unsigned Print_timings_level_load_balance
 The printing level for load balance. More...
 
MeshUpdateFctPt Mesh_update_fct_pt
 
InternalHolePointUpdateFctPt Internal_hole_point_update_fct_pt
 
- Protected Attributes inherited from oomph::TriangleMesh< ELEMENT >
TimeStepperTime_stepper_pt
 Timestepper used to build elements. More...
 
bool Use_attributes
 
std::map< unsigned, doubleRegions_areas
 
TriangleScaffoldMeshTmp_mesh_pt
 Temporary scaffold mesh. More...
 
Vector< unsignedOomph_vertex_nodes_id
 
- Protected Attributes inherited from oomph::UnstructuredTwoDMeshGeometryBase
bool Allow_automatic_creation_of_vertices_on_boundaries
 
std::map< unsigned, Vector< FiniteElement * > > Region_element_pt
 
Vector< doubleRegion_attribute
 Vector of attributes associated with the elements in each region. More...
 
std::map< unsigned, GeomObject * > Boundary_geom_object_pt
 Storage for the geometric objects associated with any boundaries. More...
 
std::map< unsigned, Vector< double > > Boundary_coordinate_limits
 
Vector< TriangleMeshPolygon * > Outer_boundary_pt
 Polygon that defines outer boundaries. More...
 
Vector< TriangleMeshPolygon * > Internal_polygon_pt
 Vector of polygons that define internal polygons. More...
 
Vector< TriangleMeshOpenCurve * > Internal_open_curve_pt
 Vector of open polylines that define internal curves. More...
 
Vector< Vector< double > > Extra_holes_coordinates
 Storage for extra coordinates for holes. More...
 
std::map< unsigned, Vector< double > > Regions_coordinates
 
std::map< unsigned, TriangleMeshCurveSection * > Boundary_curve_section_pt
 
Vector< std::map< unsigned, Vector< FiniteElement * > > > Boundary_region_element_pt
 Storage for elements adjacent to a boundary in a particular region. More...
 
Vector< std::map< unsigned, Vector< int > > > Face_index_region_at_boundary
 Storage for the face index adjacent to a boundary in a particular region. More...
 
std::map< unsigned, Vector< std::pair< double, double > > > Polygonal_vertex_arclength_info
 
std::map< unsigned, std::set< Node * > > Nodes_on_boundary_pt
 
std::set< TriangleMeshCurveSection * > Free_curve_section_pt
 
std::set< TriangleMeshPolygon * > Free_polygon_pt
 
std::set< TriangleMeshOpenCurve * > Free_open_curve_pt
 
- 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::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
 

Additional Inherited Members

- Static Public Attributes inherited from oomph::UnstructuredTwoDMeshGeometryBase
static bool Suppress_warning_about_regions_and_boundaries
 Public static flag to suppress warning; defaults to false. More...
 
- 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::RefineableTriangleMesh< ELEMENT >

Unstructured refineable Triangle Mesh.

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

Member Typedef Documentation

◆ InternalHolePointUpdateFctPt

template<class ELEMENT >
typedef void(* oomph::RefineableTriangleMesh< ELEMENT >::InternalHolePointUpdateFctPt) (const unsigned &ihole, TriangleMeshPolygon *poly_pt)

Function pointer to a function that can generate a point within the ihole-th hole, so that this can be overloaded by the user if they have a better way of doing it than our clunky default. The function should update the components of the Vector poly_pt->internal_point()

◆ MeshUpdateFctPt

template<class ELEMENT >
typedef void(* oomph::RefineableTriangleMesh< ELEMENT >::MeshUpdateFctPt) (Mesh *mesh_pt)

Function pointer to function that updates the mesh following the snapping of boundary nodes to the boundaries (e.g. to move boundary nodes very slightly to satisfy volume constraints)

Constructor & Destructor Documentation

◆ RefineableTriangleMesh()

template<class ELEMENT >
oomph::RefineableTriangleMesh< ELEMENT >::RefineableTriangleMesh ( const std::string &  node_file_name,
const std::string &  element_file_name,
const std::string &  poly_file_name,
TimeStepper time_stepper_pt = &Mesh::Default_TimeStepper,
const bool allow_automatic_creation_of_vertices_on_boundaries = true 
)
inline

Build mesh, based on the polyfiles.

2291  : TriangleMesh<ELEMENT>(
2292  node_file_name,
2293  element_file_name,
2294  poly_file_name,
2295  time_stepper_pt,
2296  allow_automatic_creation_of_vertices_on_boundaries)
2297  {
2298  // Create and fill the data structures to give rise to polylines so that
2299  // the mesh can use the adapt methods
2300  create_polylines_from_polyfiles(node_file_name, poly_file_name);
2301 
2302  // Initialise the data associated with adaptation
2304 
2305  // Initialise the data associated with boundary refinements
2307  }
void initialise_adaptation_data()
Helper function to initialise data associated with adaptation.
Definition: triangle_mesh.template.h:3636
void initialise_boundary_refinement_data()
Set all the flags to true (the default values)
Definition: triangle_mesh.template.h:3103
void create_polylines_from_polyfiles(const std::string &node_file_name, const std::string &poly_file_name)
Helper function to create polylines and fill associate data.

◆ ~RefineableTriangleMesh()

template<class ELEMENT >
virtual oomph::RefineableTriangleMesh< ELEMENT >::~RefineableTriangleMesh ( )
inlineprotectedvirtual

Empty Destructor.

2411 {}

Member Function Documentation

◆ adapt()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::adapt ( const Vector< double > &  elem_error)
protectedvirtual

Adapt mesh, based on elemental error provided.

Implements oomph::RefineableMeshBase.

◆ add_non_delete_vertices_from_boundary_helper()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::add_non_delete_vertices_from_boundary_helper ( Vector< Vector< Node * >>  src_bound_segment_node_pt,
Vector< Vector< Node * >>  dst_bound_segment_node_pt,
const unsigned dst_bnd_id,
const unsigned dst_bnd_chunk 
)
protected

Adds the vertices from the sources boundary that are repeated in the destination boundary to the list of non delete-able vertices in the destination boundary

◆ add_vertices_for_non_deletion()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::add_vertices_for_non_deletion ( )
protected

Mark the vertices that are not allowed for deletion by the unrefienment/refinement polyline methods. In charge of filling the Boundary_chunk_connections_pt structure

◆ apply_max_length_constraint()

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::apply_max_length_constraint ( Mesh face_mesh_pt,
Vector< Vector< double >> &  vector_bnd_vertices,
double max_length_constraint 
)
protected

◆ boundary_connections()

template<class ELEMENT >
const bool oomph::RefineableTriangleMesh< ELEMENT >::boundary_connections ( const unsigned b,
const unsigned c,
std::set< Vector< double >> &  vertices 
)
inlineprotected

Verifies if the given boundary receives a connection, and if that is the case then returns the list of vertices that receive the connections

2935  {
2936  // Search for the given boundary
2937  std::map<unsigned, std::set<Vector<double>>>::iterator it =
2938  Boundary_connections_pt.find(b);
2939  // Was the boundary found?
2940  if (it != Boundary_connections_pt.end())
2941  {
2942  // Return the set of vertices that receive the connection
2943  vertices = (*it).second;
2944  return true;
2945  }
2946  else
2947  {
2948  return false;
2949  }
2950  }
Scalar * b
Definition: benchVecAdd.cpp:17
std::map< unsigned, std::set< Vector< double > > > Boundary_connections_pt
Definition: triangle_mesh.template.h:2927

References b.

◆ compute_area_target()

template<class ELEMENT >
double oomph::RefineableTriangleMesh< ELEMENT >::compute_area_target ( const Vector< double > &  elem_error,
Vector< double > &  target_area 
)
inlineprotected

Compute target area based on the element's error and the error target; return minimum angle (in degrees)

3701  {
3702  double min_angle = DBL_MAX;
3703  unsigned count_unrefined = 0;
3704  unsigned count_refined = 0;
3705  this->Nrefinement_overruled = 0;
3706 
3707  // Record max. area constraint set by region
3708  std::map<FiniteElement*, double> max_area_from_region;
3709  for (std::map<unsigned, double>::iterator it =
3710  this->Regions_areas.begin();
3711  it != this->Regions_areas.end();
3712  it++)
3713  {
3714  unsigned r = (*it).first;
3715  unsigned nel = this->nregion_element(r);
3716  for (unsigned e = 0; e < nel; e++)
3717  {
3718  max_area_from_region[this->region_element_pt(r, e)] = (*it).second;
3719  }
3720  }
3721 
3722  unsigned nel = this->nelement();
3723  for (unsigned e = 0; e < nel; e++)
3724  {
3725  // Get element
3726  FiniteElement* el_pt = this->finite_element_pt(e);
3727 
3728  // Area
3729  double area = el_pt->size();
3730 
3731  // Min angle based on vertex coordinates
3732  // (vertices are enumerated first)
3733  double ax = el_pt->node_pt(0)->x(0);
3734  double ay = el_pt->node_pt(0)->x(1);
3735 
3736  double bx = el_pt->node_pt(1)->x(0);
3737  double by = el_pt->node_pt(1)->x(1);
3738 
3739  double cx = el_pt->node_pt(2)->x(0);
3740  double cy = el_pt->node_pt(2)->x(1);
3741 
3742  // Min angle
3743  double angle0 =
3744  acos(((ax - cx) * (bx - cx) + (ay - cy) * (by - cy)) /
3745  (sqrt((ax - cx) * (ax - cx) + (ay - cy) * (ay - cy)) *
3746  sqrt((bx - cx) * (bx - cx) + (by - cy) * (by - cy)))) *
3747  180.0 / MathematicalConstants::Pi;
3748  min_angle = std::min(min_angle, angle0);
3749 
3750  double angle1 =
3751  acos(((ax - bx) * (cx - bx) + (ay - by) * (cy - by)) /
3752  (sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by)) *
3753  sqrt((cx - bx) * (cx - bx) + (cy - by) * (cy - by)))) *
3754  180.0 / MathematicalConstants::Pi;
3755  min_angle = std::min(min_angle, angle1);
3756 
3757  double angle2 = 180.0 - angle0 - angle1;
3758  min_angle = std::min(min_angle, angle2);
3759 
3760  // Mimick refinement in tree-based procedure: Target areas
3761  // for elements that exceed permitted error is 1/3 of their
3762  // current area, corresponding to a uniform sub-division.
3763  double size_ratio = 3.0;
3764  if (elem_error[e] > max_permitted_error())
3765  {
3766  // Reduce area
3767  target_area[e] = std::max(area / size_ratio, Min_element_size);
3768 
3769  //...but also make sure we're below the max element size
3770  target_area[e] = std::min(target_area[e], Max_element_size);
3771 
3772  if (target_area[e] != Min_element_size)
3773  {
3774  count_refined++;
3775  }
3776  else
3777  {
3778  this->Nrefinement_overruled++;
3779  }
3780  }
3781  else if (elem_error[e] < min_permitted_error())
3782  {
3783  // Increase the area
3784  target_area[e] = std::min(size_ratio * area, Max_element_size);
3785 
3786  //...but also make sure we're above the min element size
3787  target_area[e] = std::max(target_area[e], Min_element_size);
3788 
3789  if (target_area[e] != Max_element_size)
3790  {
3791  count_unrefined++;
3792  }
3793  }
3794  else
3795  {
3796  // Leave it alone but enforce size limits
3797  double area_leave_alone = std::max(area, Min_element_size);
3798  target_area[e] = std::min(area_leave_alone, Max_element_size);
3799  }
3800 
3801  // Enforce max areas from regions
3802  std::map<FiniteElement*, double>::iterator it =
3803  max_area_from_region.find(el_pt);
3804  if (it != max_area_from_region.end())
3805  {
3806  target_area[e] = std::min(target_area[e], (*it).second);
3807  }
3808  }
3809 
3810 
3811  // Tell everybody
3812  this->Nrefined = count_refined;
3813  this->Nunrefined = count_unrefined;
3814 
3815  if (this->Nrefinement_overruled != 0)
3816  {
3817  oomph_info
3818  << "\nNOTE: Refinement of " << this->Nrefinement_overruled
3819  << " elements was "
3820  << "overruled \nbecause the target area would have "
3821  << "been below \nthe minimum permitted area of " << Min_element_size
3822  << ".\nYou can change the minimum permitted area with the\n"
3823  << "function RefineableTriangleMesh::min_element_size().\n\n";
3824  }
3825  return min_angle;
3826  }
AnnoyingScalar acos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:138
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
Array< double, 1, 3 > e(1./3., 0.5, 2.)
FiniteElement * finite_element_pt(const unsigned &e) const
Definition: mesh.h:473
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
unsigned Nrefined
Stats: Number of elements that were refined.
Definition: refineable_mesh.h:338
unsigned Nunrefined
Stats: Number of elements that were unrefined.
Definition: refineable_mesh.h:341
double & min_permitted_error()
Definition: refineable_mesh.h:156
unsigned Nrefinement_overruled
Definition: refineable_mesh.h:363
double & max_permitted_error()
Definition: refineable_mesh.h:163
double Max_element_size
Max permitted element size.
Definition: triangle_mesh.template.h:3845
double Min_element_size
Min permitted element size.
Definition: triangle_mesh.template.h:3848
std::map< unsigned, double > Regions_areas
Definition: triangle_mesh.template.h:1188
FiniteElement * region_element_pt(const unsigned &i, const unsigned &e)
Return the e-th element in the i-th region.
Definition: unstructured_two_d_mesh_geometry_base.h:1783
unsigned nregion_element(const unsigned &i)
Return the number of elements in the i-th region.
Definition: unstructured_two_d_mesh_geometry_base.h:1763
#define min(a, b)
Definition: datatypes.h:22
#define max(a, b)
Definition: datatypes.h:23
r
Definition: UniformPSDSelfTest.py:20
const double Pi
50 digits from maple
Definition: oomph_utilities.h:157
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
ax
Definition: plotDoE.py:39

References acos(), plotDoE::ax, e(), max, TestArguments::Max_element_size, min, TestArguments::Min_element_size, oomph::FiniteElement::node_pt(), oomph::oomph_info, oomph::MathematicalConstants::Pi, UniformPSDSelfTest::r, oomph::FiniteElement::size(), sqrt(), and oomph::Node::x().

◆ create_polylines_from_polyfiles()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::create_polylines_from_polyfiles ( const std::string &  node_file_name,
const std::string &  poly_file_name 
)
protected

Helper function to create polylines and fill associate data.

◆ create_sorted_face_mesh_representation()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::create_sorted_face_mesh_representation ( const unsigned boundary_id,
Mesh face_mesh_pt,
std::map< FiniteElement *, bool > &  is_inverted,
bool inverted_face_mesh 
)
protected

Helper function Creates a sorted face mesh representation of the specified PolyLine It means that the elements are sorted along the boundary It also returns a map that indicated the inverted elements

◆ create_temporary_boundary_connections()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::create_temporary_boundary_connections ( Vector< TriangleMeshPolygon * > &  tmp_outer_polygons_pt,
Vector< TriangleMeshOpenCurve * > &  tmp_open_curves_pt 
)
protected

After unrefinement and refinement has taken place compute the new vertices numbers of the temporary representation of the

◆ create_unsorted_face_mesh_representation()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::create_unsorted_face_mesh_representation ( const unsigned boundary_id,
Mesh face_mesh_pt 
)
protected

Helper function Creates an unsorted face mesh representation from the specified boundary id. It means that the elements are not sorted along the boundary

◆ disable_boundary_refinement_constrained_by_target_areas()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::disable_boundary_refinement_constrained_by_target_areas ( )
inlineprotected
2895  {
2897  }
bool Do_boundary_refinement_constrained_by_target_areas
Flag that enables or disables boundary refinement (true by default)
Definition: triangle_mesh.template.h:3094

◆ disable_boundary_unrefinement_constrained_by_target_areas()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::disable_boundary_unrefinement_constrained_by_target_areas ( )
inlineprotected
2885  {
2887  }
bool Do_boundary_unrefinement_constrained_by_target_areas
Flag that enables or disables boundary unrefinement (true by default)
Definition: triangle_mesh.template.h:3091

◆ disable_iterative_solver_for_projection()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::disable_iterative_solver_for_projection ( )
inlineprotected

Enables the use of an iterative solver for the projection problem

2511  {
2513  }
bool Use_iterative_solver_for_projection
Definition: triangle_mesh.template.h:3858

◆ disable_print_timings_adaptation()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::disable_print_timings_adaptation ( )
inlineprotected

Disables printing of timings for adaptation.

2523  {
2525  }
unsigned Print_timings_level_adaptation
The printing level for adaptation.
Definition: triangle_mesh.template.h:3867

◆ disable_print_timings_load_balance()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::disable_print_timings_load_balance ( )
inlineprotected

Disables printing of timings for load balance.

2550  {
2552  }
unsigned Print_timings_level_load_balance
The printing level for load balance.
Definition: triangle_mesh.template.h:3870

◆ disable_projection()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::disable_projection ( )
inlineprotected

Disables the solution projection step during adaptation.

2435  {
2436  Disable_projection = true;
2437  }
bool Disable_projection
Enable/disable solution projection during adaptation.
Definition: triangle_mesh.template.h:3854

◆ disable_shared_boundary_refinement_constrained_by_target_areas()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::disable_shared_boundary_refinement_constrained_by_target_areas ( )
inlineprotected
2917  {
2919  }
bool Do_shared_boundary_refinement_constrained_by_target_areas
Flag that enables or disables boundary unrefinement (true by default)
Definition: triangle_mesh.template.h:3100

◆ disable_shared_boundary_unrefinement_constrained_by_target_areas()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::disable_shared_boundary_unrefinement_constrained_by_target_areas ( )
inlineprotected
2907  {
2909  }
bool Do_shared_boundary_unrefinement_constrained_by_target_areas
Flag that enables or disables boundary unrefinement (true by default)
Definition: triangle_mesh.template.h:3097

◆ disable_timings_projection()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::disable_timings_projection ( )
inlineprotected

Disables info. and timings for projection.

2447  {
2448  Print_timings_projection = false;
2449  }
bool Print_timings_projection
Enable/disable printing timings for projection.
Definition: triangle_mesh.template.h:3864

◆ disable_timings_tranfering_target_areas()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::disable_timings_tranfering_target_areas ( )
inlineprotected

Disables info. and timings for tranferring of target areas

2423  {
2425  }
bool Print_timings_transfering_target_areas
Enable/disable printing timings for transfering target areas.
Definition: triangle_mesh.template.h:3861

◆ doc_adaptivity_targets()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::doc_adaptivity_targets ( std::ostream &  outfile)
inlineprotectedvirtual

Doc the targets for mesh adaptation.

Reimplemented from oomph::RefineableMeshBase.

2571  {
2572  outfile << std::endl;
2573  outfile << "Targets for mesh adaptation: " << std::endl;
2574  outfile << "---------------------------- " << std::endl;
2575  outfile << "Target for max. error: " << Max_permitted_error << std::endl;
2576  outfile << "Target for min. error: " << Min_permitted_error << std::endl;
2577  outfile << "Target min angle: " << Min_permitted_angle << std::endl;
2578  outfile << "Min. allowed element size: " << Min_element_size << std::endl;
2579  outfile << "Max. allowed element size: " << Max_element_size << std::endl;
2580  outfile << "Don't unrefine if less than " << Max_keep_unrefined
2581  << " elements need unrefinement." << std::endl;
2582  outfile << std::endl;
2583  }
unsigned Max_keep_unrefined
Definition: refineable_mesh.h:359
double Min_permitted_error
Min. error (i.e. (try to) merge elements if their error is smaller)
Definition: refineable_mesh.h:329
double Max_permitted_error
Max. error (i.e. split elements if their error is larger)
Definition: refineable_mesh.h:326
double Min_permitted_angle
Min angle before remesh gets triggered.
Definition: triangle_mesh.template.h:3851

References TestArguments::Max_element_size, TestArguments::Max_permitted_error, TestArguments::Min_element_size, and TestArguments::Min_permitted_error.

◆ enable_boundary_refinement_constrained_by_target_areas()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::enable_boundary_refinement_constrained_by_target_areas ( )
inlineprotected
2890  {
2892  }

◆ enable_boundary_unrefinement_constrained_by_target_areas()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::enable_boundary_unrefinement_constrained_by_target_areas ( )
inlineprotected

Enable/disable unrefinement/refinement methods for original boundaries

2880  {
2882  }

◆ enable_iterative_solver_for_projection()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::enable_iterative_solver_for_projection ( )
inlineprotected

Enables the use of an iterative solver for the projection problem

2504  {
2506  }

◆ enable_print_timings_adaptation()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::enable_print_timings_adaptation ( const unsigned print_level = 1)
inlineprotected

Enables printing of timings for adaptation.

2517  {
2519  }
void set_print_level_timings_adaptation(const unsigned &print_level)
Sets the printing level of timings for adaptation.
Definition: triangle_mesh.template.h:2528

◆ enable_print_timings_load_balance()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::enable_print_timings_load_balance ( const unsigned print_level = 1)
inlineprotected

Enables printing of timings for load balance.

2544  {
2546  }
void set_print_level_timings_load_balance(const unsigned &print_level)
Sets the printing level of timings for load balance.
Definition: triangle_mesh.template.h:2555

◆ enable_projection()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::enable_projection ( )
inlineprotected

Enables the solution projection step during adaptation.

2429  {
2430  Disable_projection = false;
2431  }

◆ enable_shared_boundary_refinement_constrained_by_target_areas()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::enable_shared_boundary_refinement_constrained_by_target_areas ( )
inlineprotected

◆ enable_shared_boundary_unrefinement_constrained_by_target_areas()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::enable_shared_boundary_unrefinement_constrained_by_target_areas ( )
inlineprotected

Enable/disable unrefinement/refinement methods for shared boundaries

◆ enable_timings_projection()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::enable_timings_projection ( )
inlineprotected

Enables info. and timings for projection.

2441  {
2442  Print_timings_projection = true;
2443  }

◆ enable_timings_tranfering_target_areas()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::enable_timings_tranfering_target_areas ( )
inlineprotected

Enables info. and timings for tranferring of target areas

2416  {
2418  }

◆ get_boundary_segment_nodes_helper()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::get_boundary_segment_nodes_helper ( const unsigned b,
Vector< Vector< Node * >> &  tmp_segment_nodes 
)
protected

Get the nodes on the boundary (b), these are stored in the segment they belong (also used by the load balance method to re-set the number of segments per boundary after load balance has taken place)

◆ get_connected_vertex_number_on_dst_boundary()

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::get_connected_vertex_number_on_dst_boundary ( Vector< double > &  vertex_coordinates,
const unsigned dst_b_id,
unsigned vertex_number 
)
protected

Computes the associated vertex number on the destination boundary

◆ get_face_mesh_representation() [1/2]

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::get_face_mesh_representation ( TriangleMeshOpenCurve open_polyline_pt,
Vector< Mesh * > &  face_mesh_pt 
)
protected

Helper function to construct face mesh representation of open curves

◆ get_face_mesh_representation() [2/2]

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::get_face_mesh_representation ( TriangleMeshPolygon polygon_pt,
Vector< Mesh * > &  face_mesh_pt 
)
protected

Helper function to construct face mesh representation of all polylines, possibly with segments re-distributed between polylines to maintain an appxroximately even sub-division of the polygon

◆ initialise_adaptation_data()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::initialise_adaptation_data ( )
inlineprotected

Helper function to initialise data associated with adaptation.

3637  {
3638  // Number of bins in the x-direction
3639  // when transferring target areas by bin method. Only used if we
3640  // don't have CGAL!
3641  this->Nbin_x_for_area_transfer = 100;
3642 
3643  // Number of bins in the y-direction
3644  // when transferring target areas by bin method. Only used if we
3645  // don't have CGAL!
3646  this->Nbin_y_for_area_transfer = 100;
3647 
3648  // Initialise "what it says" -- used when transferring target areas
3649  // using cgal-based sample point container
3651 
3652  // Set max and min targets for adaptation
3653  this->Max_element_size = 1.0;
3654  this->Min_element_size = 0.001;
3655  this->Min_permitted_angle = 15.0;
3656 
3657  // By default we want to do projection
3658  this->Disable_projection = false;
3659 
3660  // Use by default an iterative solver for the projection problem
3662 
3663  // Set the defaul value for printing level adaptation (default 0)
3665 
3666  // Set the defaul value for printing level load balance (default 0)
3668 
3669  // By default we want no info. about timings for transferring of
3670  // target areas
3672 
3673  // By default we want no info. about timings for projection
3674  this->Print_timings_projection = false;
3675 
3676  // Initialise function pointer to function that updates the
3677  // mesh following the snapping of boundary nodes to the
3678  // boundaries (e.g. to move boundary nodes very slightly
3679  // to satisfy volume constraints)
3680  Mesh_update_fct_pt = 0;
3681 
3682  // Initialise function point for update of internal hole
3683  // point to null
3685  }
unsigned Nbin_x_for_area_transfer
Definition: triangle_mesh.template.h:3831
MeshUpdateFctPt Mesh_update_fct_pt
Definition: triangle_mesh.template.h:3876
InternalHolePointUpdateFctPt Internal_hole_point_update_fct_pt
Definition: triangle_mesh.template.h:3881
unsigned Max_sample_points_for_limited_locate_zeta_during_target_area_transfer
Definition: triangle_mesh.template.h:3842
unsigned Nbin_y_for_area_transfer
Definition: triangle_mesh.template.h:3836

References TestArguments::Max_element_size, and TestArguments::Min_element_size.

◆ initialise_boundary_refinement_data()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::initialise_boundary_refinement_data ( )
inlineprotected

Set all the flags to true (the default values)

3104  {
3105  // All boundaries refinement and unrefinement are allowed by
3106  // default
3111  }

◆ internal_hole_point_update_fct_pt()

template<class ELEMENT >
InternalHolePointUpdateFctPt& oomph::RefineableTriangleMesh< ELEMENT >::internal_hole_point_update_fct_pt ( )
inlineprotected

Access to function pointer to can be used to generate the internal point for the ihole-th hole.

2637  {
2639  }

◆ max_element_size()

template<class ELEMENT >
double& oomph::RefineableTriangleMesh< ELEMENT >::max_element_size ( )
inlineprotected

Max element size allowed during adaptation.

2478  {
2479  return Max_element_size;
2480  }

References TestArguments::Max_element_size.

◆ max_sample_points_for_limited_locate_zeta_during_target_area_transfer()

template<class ELEMENT >
unsigned oomph::RefineableTriangleMesh< ELEMENT >::max_sample_points_for_limited_locate_zeta_during_target_area_transfer ( )
inlineprotected

Read/write access to number of sample points from which we try to locate zeta by Newton method when transferring target areas using cgal-based sample point container. If Newton method doesn't converge from any of these we use the nearest sample point.

◆ mesh_update_fct_pt()

template<class ELEMENT >
MeshUpdateFctPt& oomph::RefineableTriangleMesh< ELEMENT >::mesh_update_fct_pt ( )
inlineprotected

Access to function pointer to function that updates the mesh following the snapping of boundary nodes to the boundaries (e.g. to move boundary nodes very slightly to satisfy volume constraints)

2629  {
2630  return Mesh_update_fct_pt;
2631  }

◆ min_element_size()

template<class ELEMENT >
double& oomph::RefineableTriangleMesh< ELEMENT >::min_element_size ( )
inlineprotected

Min element size allowed during adaptation.

2484  {
2485  return Min_element_size;
2486  }

References TestArguments::Min_element_size.

◆ min_permitted_angle()

template<class ELEMENT >
double& oomph::RefineableTriangleMesh< ELEMENT >::min_permitted_angle ( )
inlineprotected

Min angle before remesh gets triggered.

2490  {
2491  return Min_permitted_angle;
2492  }

◆ nbin_x_for_area_transfer()

template<class ELEMENT >
unsigned& oomph::RefineableTriangleMesh< ELEMENT >::nbin_x_for_area_transfer ( )
inlineprotected

Read/write access to number of bins in the x-direction when transferring target areas by bin method. Only used if we don't have CGAL!

2455  {
2456  return Nbin_x_for_area_transfer;
2457  }

◆ nbin_y_for_area_transfer()

template<class ELEMENT >
unsigned& oomph::RefineableTriangleMesh< ELEMENT >::nbin_y_for_area_transfer ( )
inlineprotected

Read/write access to number of bins in the y-direction when transferring target areas by bin method. Only used if we don't have CGAL!

2463  {
2464  return Nbin_y_for_area_transfer;
2465  }

◆ refine_boundary()

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::refine_boundary ( Mesh face_mesh_pt,
Vector< Vector< double >> &  vector_bnd_vertices,
double refinement_tolerance,
const bool check_only = false 
)
protected

Helper function that performs the refinement process on the specified boundary by using the provided vertices representation. Optional boolean is used to run it as test only (if true is specified as input) in which case vertex coordinates aren't actually modified. Returned boolean indicates if polyline was (or would have been – if called with check_only=false) changed.

◆ refine_boundary_constrained_by_target_area()

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::refine_boundary_constrained_by_target_area ( MeshAsGeomObject mesh_geom_obj_pt,
Vector< Vector< double >> &  vector_bnd_vertices,
double refinement_tolerance,
Vector< double > &  area_constraint 
)
protected

Helper function that performs the refinement process on the specified boundary by using the provided vertices representation and the associated elements target area. Used only when the 'allow_automatic_creation_of_vertices_on_boundaries' flag is set to true.

◆ refine_shared_boundary_constrained_by_target_area()

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::refine_shared_boundary_constrained_by_target_area ( Vector< Vector< double >> &  vector_bnd_vertices,
Vector< double > &  area_constraint 
)
protected

Helper function that performs the refinement process on the specified boundary by using the provided vertices representation and the associated elements target area. NOTE: This is the version that applies refinement to shared boundaries

◆ refine_uniformly()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::refine_uniformly ( DocInfo doc_info)
inlineprotectedvirtual

Refine mesh uniformly and doc process.

Implements oomph::RefineableMeshBase.

2587  {
2588  // Set the element error to something big
2589  unsigned nelem = nelement();
2590  Vector<double> elem_error(nelem, DBL_MAX);
2591 
2592  // Limit the min element size to 1/3 of the current minimum
2593  double backup = Min_element_size;
2594 
2595  // Get current max and min element size
2596  double orig_max_area, orig_min_area;
2597  this->max_and_min_element_size(orig_max_area, orig_min_area);
2598 
2599  // Limit
2600  Min_element_size = orig_min_area / 3.0;
2601 
2602  // Do it...
2603  adapt(elem_error);
2604 
2605  // Reset
2606  Min_element_size = backup;
2607  }
void max_and_min_element_size(double &max_size, double &min_size)
Definition: mesh.h:692
void adapt(const Vector< double > &elem_error)
Adapt mesh, based on elemental error provided.

References TestArguments::Min_element_size.

◆ restore_boundary_connections()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::restore_boundary_connections ( Vector< TriangleMeshPolyLine * > &  resume_initial_connection_polyline_pt,
Vector< TriangleMeshPolyLine * > &  resume_final_connection_polyline_pt 
)
protected

After unrefinement and refinement has taken place compute the new vertices numbers of the boundaries to connect (in a distributed scheme it may be possible that the destination boundary does no longer exist, therefore the connection is suspended and resumed after the adaptation processor

◆ restore_polyline_connections_helper()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::restore_polyline_connections_helper ( TriangleMeshPolyLine polyline_pt,
Vector< TriangleMeshPolyLine * > &  resume_initial_connection_polyline_pt,
Vector< TriangleMeshPolyLine * > &  resume_final_connection_polyline_pt 
)
protected

Restore the connections of the specific polyline The vertices numbering on the destination boundaries may have change because of (un)refinement in the destination boundaries. Also deals with connection that do not longer exist because the destination boundary does no longer exist because of the distribution process

◆ resume_boundary_connections()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::resume_boundary_connections ( Vector< TriangleMeshPolyLine * > &  resume_initial_connection_polyline_pt,
Vector< TriangleMeshPolyLine * > &  resume_final_connection_polyline_pt 
)
protected

Resume the boundary connections that may have been suspended because the destination boundary is no part of the domain. The connections are no permanently suspended because if load balance takes place the destination boundary may be part of the new domain representation therefore the connection would exist

◆ set_print_level_timings_adaptation()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::set_print_level_timings_adaptation ( const unsigned print_level)
inlineprotected

Sets the printing level of timings for adaptation.

2529  {
2530  const unsigned max_print_level = 3;
2531  // If printing level is greater than max. printing level
2532  if (print_level > max_print_level)
2533  {
2534  Print_timings_level_adaptation = max_print_level;
2535  }
2536  else
2537  {
2538  Print_timings_level_adaptation = print_level;
2539  }
2540  }

◆ set_print_level_timings_load_balance()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::set_print_level_timings_load_balance ( const unsigned print_level)
inlineprotected

Sets the printing level of timings for load balance.

2556  {
2557  const unsigned max_print_level = 3;
2558  // If printing level is greater than max. printing level
2559  if (print_level > max_print_level)
2560  {
2561  Print_timings_level_load_balance = max_print_level;
2562  }
2563  else
2564  {
2565  Print_timings_level_load_balance = print_level;
2566  }
2567  }

◆ snap_nodes_onto_boundary()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::snap_nodes_onto_boundary ( RefineableTriangleMesh< ELEMENT > *&  new_mesh_pt,
const unsigned b 
)
protected

Snap the boundary nodes onto any curvilinear boundaries.

◆ surface_remesh_for_inner_hole_boundaries()

template<class ELEMENT >
virtual bool oomph::RefineableTriangleMesh< ELEMENT >::surface_remesh_for_inner_hole_boundaries ( Vector< Vector< double >> &  internal_point_coord,
const bool check_only = false 
)
protectedvirtual

Generate a new PSLG representation of the inner hole boundaries. Optional boolean is used to run it as test only (if true is specified as input) in which case PSLG isn't actually modified. Returned boolean indicates if PSLG was (or would have been – if called with check_only=false) changed.

◆ synchronize_shared_boundary_connections()

template<class ELEMENT >
const void oomph::RefineableTriangleMesh< ELEMENT >::synchronize_shared_boundary_connections ( )
protected

Synchronise the vertices that are marked for non deletion.

◆ unrefine_boundary()

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::unrefine_boundary ( const unsigned b,
const unsigned c,
Vector< Vector< double >> &  vector_bnd_vertices,
double unrefinement_tolerance,
const bool check_only = false 
)
protected

Helper function that performs the unrefinement process.

representation. Optional boolean is used to run it as test only (if true is specified as input) in which case vertex coordinates aren't actually modified. Returned boolean indicates if polyline was (or would have been – if called with check_only=false) changed.

◆ unrefine_boundary_constrained_by_target_area()

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::unrefine_boundary_constrained_by_target_area ( const unsigned b,
const unsigned c,
Vector< Vector< double >> &  vector_bnd_vertices,
double unrefinement_tolerance,
Vector< double > &  area_constraint 
)
protected

Helper function that performs the unrefinement process on the specified boundary by using the provided vertices representation and the associated target area. Used only when the 'allow_automatic_creation_of_vertices_on_boundaries' flag is set to true.

◆ unrefine_shared_boundary_constrained_by_target_area()

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::unrefine_shared_boundary_constrained_by_target_area ( const unsigned b,
const unsigned c,
Vector< Vector< double >> &  vector_bnd_vertices,
Vector< double > &  area_constraint 
)
protected

Helper function that performs the unrefinement process on the specified boundary by using the provided vertices representation and the associated target area. NOTE: This is the version that applies unrefinement to shared boundaries

◆ unrefine_uniformly()

template<class ELEMENT >
unsigned oomph::RefineableTriangleMesh< ELEMENT >::unrefine_uniformly ( )
inlineprotectedvirtual

Unrefine mesh uniformly: Return 0 for success, 1 for failure (if unrefinement has reached the coarsest permitted level)

Implements oomph::RefineableMeshBase.

2613  {
2614  throw OomphLibError("unrefine_uniformly() not implemented yet",
2617  // dummy return
2618  return 0;
2619  }
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ update_open_curve_after_restart()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::update_open_curve_after_restart ( TriangleMeshOpenCurve *&  open_curve_pt)
protected

Updates the open curve representation after restart.

◆ update_open_curve_using_elements_area()

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::update_open_curve_using_elements_area ( TriangleMeshOpenCurve *&  open_curve_pt,
const Vector< double > &  target_area 
)
protected

Updates the open curve but using the elements area instead of the default refinement and unrefinement methods

◆ update_open_curve_using_face_mesh()

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::update_open_curve_using_face_mesh ( TriangleMeshOpenCurve open_polyline_pt,
const bool check_only = false 
)
protected

Helper function that updates the input open curve by using end-points of elements from FaceMesh(es) that are constructed for the boundaries associated with the polylines. Optional boolean is used to run it as test only (if true is specified as input) in which case the polylines are not actually modified. Returned boolean indicates if polylines were (or would have been – if called with check_only=false) changed.

◆ update_polygon_after_restart()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_after_restart ( TriangleMeshPolygon *&  polygon_pt)
protected

Updates the polylines representation after restart.

◆ update_polygon_using_elements_area()

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_using_elements_area ( TriangleMeshPolygon *&  polygon_pt,
const Vector< double > &  target_area 
)
protected

Updates the polylines using the elements area as constraint for the number of points along the boundaries

◆ update_polygon_using_face_mesh()

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_using_face_mesh ( TriangleMeshPolygon polygon_pt,
const bool check_only = false 
)
protected

Helper function that updates the input polygon's PSLG by using the end-points of elements from FaceMesh(es) that are constructed for the boundaries associated with the segments of the polygon. Optional boolean is used to run it as test only (if true is specified as input) in which case polygon isn't actually modified. Returned boolean indicates if polygon was (or would have been – if called with check_only=false) changed.

◆ update_polyline_representation_from_restart()

template<class ELEMENT >
void oomph::RefineableTriangleMesh< ELEMENT >::update_polyline_representation_from_restart ( )
inlineprotected

Method used to update the polylines representation after restart.

2768  {
2769 #ifdef OOMPH_HAS_MPI
2770  // If the mesh is distributed then also update the shared
2771  // boundaries
2772  unsigned my_rank = 0;
2773  if (this->is_mesh_distributed())
2774  {
2775  my_rank = this->communicator_pt()->my_rank();
2776  }
2777 #endif
2778 
2779  // Update the polyline representation after restart
2780 
2781  // First update all internal boundaries
2782  const unsigned ninternal = this->Internal_polygon_pt.size();
2783  for (unsigned i_internal = 0; i_internal < ninternal; i_internal++)
2784  {
2786  this->Internal_polygon_pt[i_internal]);
2787  }
2788 
2789  // then update the external boundaries
2790  const unsigned nouter = this->Outer_boundary_pt.size();
2791  for (unsigned i_outer = 0; i_outer < nouter; i_outer++)
2792  {
2793  this->update_polygon_after_restart(this->Outer_boundary_pt[i_outer]);
2794  }
2795 
2796 #ifdef OOMPH_HAS_MPI
2797  // If the mesh is distributed then also update the shared
2798  // boundaries
2799  if (this->is_mesh_distributed())
2800  {
2801  const unsigned ncurves = this->nshared_boundary_curves(my_rank);
2802  for (unsigned nc = 0; nc < ncurves; nc++)
2803  {
2804  // Update the shared polyline
2805  this->update_shared_curve_after_restart(
2806  this->Shared_boundary_polyline_pt[my_rank][nc] // shared_curve
2807  );
2808  }
2809 
2810  } // if (this->is_mesh_distributed())
2811 #endif // #ifdef OOMPH_HAS_MPI
2812 
2813  const unsigned n_open_polyline = this->Internal_open_curve_pt.size();
2814  for (unsigned i = 0; i < n_open_polyline; i++)
2815  {
2817  }
2818  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
bool is_mesh_distributed() const
Boolean to indicate if Mesh has been distributed.
Definition: mesh.h:1588
OomphCommunicator * communicator_pt() const
Definition: mesh.h:1600
int my_rank() const
my rank
Definition: communicator.h:176
void update_open_curve_after_restart(TriangleMeshOpenCurve *&open_curve_pt)
Updates the open curve representation after restart.
void update_polygon_after_restart(TriangleMeshPolygon *&polygon_pt)
Updates the polylines representation after restart.
Vector< TriangleMeshOpenCurve * > Internal_open_curve_pt
Vector of open polylines that define internal curves.
Definition: unstructured_two_d_mesh_geometry_base.h:2602
Vector< TriangleMeshPolygon * > Outer_boundary_pt
Polygon that defines outer boundaries.
Definition: unstructured_two_d_mesh_geometry_base.h:2596
Vector< TriangleMeshPolygon * > Internal_polygon_pt
Vector of polygons that define internal polygons.
Definition: unstructured_two_d_mesh_geometry_base.h:2599

References i.

◆ use_iterative_solver_for_projection()

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::use_iterative_solver_for_projection ( )
inlineprotected
2497  {
2499  }

Member Data Documentation

◆ Boundary_connections_pt

template<class ELEMENT >
std::map<unsigned, std::set<Vector<double> > > oomph::RefineableTriangleMesh< ELEMENT >::Boundary_connections_pt
protected

A map that stores the vertices that receive connections, they are identified by the boundary number that receive the connection This is necessary for not erasing them on the adaptation process, specifically for the un-refinement process

◆ Disable_projection

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::Disable_projection
protected

Enable/disable solution projection during adaptation.

◆ Do_boundary_refinement_constrained_by_target_areas

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::Do_boundary_refinement_constrained_by_target_areas
protected

Flag that enables or disables boundary refinement (true by default)

◆ Do_boundary_unrefinement_constrained_by_target_areas

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::Do_boundary_unrefinement_constrained_by_target_areas
protected

Flag that enables or disables boundary unrefinement (true by default)

◆ Do_shared_boundary_refinement_constrained_by_target_areas

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::Do_shared_boundary_refinement_constrained_by_target_areas
protected

Flag that enables or disables boundary unrefinement (true by default)

◆ Do_shared_boundary_unrefinement_constrained_by_target_areas

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::Do_shared_boundary_unrefinement_constrained_by_target_areas
protected

Flag that enables or disables boundary unrefinement (true by default)

◆ Internal_hole_point_update_fct_pt

template<class ELEMENT >
InternalHolePointUpdateFctPt oomph::RefineableTriangleMesh< ELEMENT >::Internal_hole_point_update_fct_pt
protected

Function pointer to function that can be set to update the position of the central point in internal holes

◆ Max_element_size

template<class ELEMENT >
double oomph::RefineableTriangleMesh< ELEMENT >::Max_element_size
protected

Max permitted element size.

◆ Max_sample_points_for_limited_locate_zeta_during_target_area_transfer

template<class ELEMENT >
unsigned oomph::RefineableTriangleMesh< ELEMENT >::Max_sample_points_for_limited_locate_zeta_during_target_area_transfer
protected

Default value for max. number of sample points used for locate_zeta when transferring target areas using cgal-based sample point container

◆ Mesh_update_fct_pt

template<class ELEMENT >
MeshUpdateFctPt oomph::RefineableTriangleMesh< ELEMENT >::Mesh_update_fct_pt
protected

Function pointer to function that updates the mesh following the snapping of boundary nodes to the boundaries (e.g. to move boundary nodes very slightly to satisfy volume constraints)

◆ Min_element_size

template<class ELEMENT >
double oomph::RefineableTriangleMesh< ELEMENT >::Min_element_size
protected

Min permitted element size.

◆ Min_permitted_angle

template<class ELEMENT >
double oomph::RefineableTriangleMesh< ELEMENT >::Min_permitted_angle
protected

Min angle before remesh gets triggered.

◆ Nbin_x_for_area_transfer

template<class ELEMENT >
unsigned oomph::RefineableTriangleMesh< ELEMENT >::Nbin_x_for_area_transfer
protected

Number of bins in the x-direction when transferring target areas by bin method. Only used if we don't have CGAL!

◆ Nbin_y_for_area_transfer

template<class ELEMENT >
unsigned oomph::RefineableTriangleMesh< ELEMENT >::Nbin_y_for_area_transfer
protected

Number of bins in the y-direction when transferring target areas by bin method. Only used if we don't have CGAL!

◆ Print_timings_level_adaptation

template<class ELEMENT >
unsigned oomph::RefineableTriangleMesh< ELEMENT >::Print_timings_level_adaptation
protected

The printing level for adaptation.

◆ Print_timings_level_load_balance

template<class ELEMENT >
unsigned oomph::RefineableTriangleMesh< ELEMENT >::Print_timings_level_load_balance
protected

The printing level for load balance.

◆ Print_timings_projection

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::Print_timings_projection
protected

Enable/disable printing timings for projection.

◆ Print_timings_transfering_target_areas

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::Print_timings_transfering_target_areas
protected

Enable/disable printing timings for transfering target areas.

◆ Use_iterative_solver_for_projection

template<class ELEMENT >
bool oomph::RefineableTriangleMesh< ELEMENT >::Use_iterative_solver_for_projection
protected

Flag to indicate whether to use or not an iterative solver (CG with diagonal preconditioned) for the projection problem


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