/////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// More...
#include <triangle_mesh.template.h>
Public Types | |
typedef void(* | 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) More... | |
typedef void(* | 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() More... | |
Public Types inherited from oomph::Mesh | |
typedef void(FiniteElement::* | SteadyExactSolutionFctPt) (const Vector< double > &x, Vector< double > &soln) |
Typedef for function pointer to function that computes steady exact solution. More... | |
typedef void(FiniteElement::* | UnsteadyExactSolutionFctPt) (const double &time, const Vector< double > &x, Vector< double > &soln) |
Typedef for function pointer to function that computes unsteady exact solution. More... | |
Public Member Functions | |
RefineableTriangleMesh (TriangleMeshParameters &triangle_mesh_parameters, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper) | |
Build mesh, based on the specifications on TriangleMeshParameters. More... | |
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... | |
virtual | ~RefineableTriangleMesh () |
Empty Destructor. More... | |
void | enable_timings_tranfering_target_areas () |
Enables info. and timings for tranferring of target areas. More... | |
void | disable_timings_tranfering_target_areas () |
Disables info. and timings for tranferring of target areas. More... | |
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... | |
unsigned & | nbin_x_for_area_transfer () |
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! More... | |
unsigned & | nbin_y_for_area_transfer () |
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! More... | |
unsigned | max_sample_points_for_limited_locate_zeta_during_target_area_transfer () |
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. More... | |
double & | max_element_size () |
Max element size allowed during adaptation. More... | |
double & | min_element_size () |
Min element size allowed during adaptation. More... | |
double & | min_permitted_angle () |
Min angle before remesh gets triggered. More... | |
bool | use_iterative_solver_for_projection () |
void | enable_iterative_solver_for_projection () |
Enables the use of an iterative solver for the projection problem. More... | |
void | disable_iterative_solver_for_projection () |
Enables the use of an iterative solver for the projection problem. More... | |
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 () |
Unrefine mesh uniformly: Return 0 for success, 1 for failure (if unrefinement has reached the coarsest permitted level) More... | |
void | adapt (const Vector< double > &elem_error) |
Adapt mesh, based on elemental error provided. More... | |
MeshUpdateFctPt & | mesh_update_fct_pt () |
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) More... | |
InternalHolePointUpdateFctPt & | internal_hole_point_update_fct_pt () |
Access to function pointer to can be used to generate the internal point for the ihole-th hole. More... | |
unsigned | nsorted_shared_boundary_node (unsigned &b) |
void | flush_sorted_shared_boundary_node () |
Node * | sorted_shared_boundary_node_pt (unsigned &b, unsigned &i) |
Vector< Node * > | sorted_shared_boundary_node_pt (unsigned &b) |
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 | fill_boundary_elements_and_nodes_for_internal_boundaries () |
void | fill_boundary_elements_and_nodes_for_internal_boundaries (std::ofstream &outfile) |
void | reestablish_distribution_info_for_restart (OomphCommunicator *comm_pt, std::istream &restart_file) |
Used to re-establish any additional info. related with the distribution after a re-starting for triangle meshes. More... | |
void | update_polyline_representation_from_restart () |
Method used to update the polylines representation after restart. More... | |
void | load_balance (const Vector< unsigned > &input_target_domain_for_local_non_halo_element) |
Performs the load balancing for unstructured meshes, the load balancing strategy is based on mesh migration. More... | |
void | get_shared_boundary_elements_and_face_indexes (const Vector< FiniteElement * > &first_element_pt, const Vector< FiniteElement * > &second_element_pt, Vector< FiniteElement * > &first_shared_boundary_element_pt, Vector< unsigned > &first_shared_boundary_element_face_index, Vector< FiniteElement * > &second_shared_boundary_element_pt, Vector< unsigned > &second_shared_boundary_element_face_index) |
Use the first and second group of elements to find the intersection between them to get the shared boundary elements from the first and second group. More... | |
void | create_new_shared_boundaries (std::set< FiniteElement * > &element_in_processor_pt, Vector< Vector< FiniteElement * >> &new_shared_boundary_element_pt, Vector< Vector< unsigned >> &new_shared_boundary_element_face_index) |
Creates the new shared boundaries, this method is also in charge of computing the shared boundaries ids of each processor and send that info. to all the processors. More... | |
void | compute_shared_node_degree_helper (Vector< Vector< FiniteElement * >> &unsorted_face_ele_pt, std::map< Node *, unsigned > &global_node_degree) |
Computes the degree of the nodes on the shared boundaries, the degree of the node is computed from the global graph created by the shared boundaries of all processors. More... | |
void | create_adjacency_matrix_new_shared_edges_helper (Vector< Vector< FiniteElement * >> &unsorted_face_ele_pt, Vector< Vector< Node * >> &tmp_sorted_shared_node_pt, std::map< Node *, Vector< Vector< unsigned >>> &node_alias, Vector< Vector< Vector< unsigned >>> &adjacency_matrix) |
Sort the nodes on the new shared boundaries (after load balancing), computes the alias of the nodes and creates the adjacency matrix that represent the graph created by the shared edges between each pair of processors. More... | |
void | get_shared_boundary_segment_nodes_helper (const unsigned &shd_bnd_id, Vector< Vector< Node * >> &tmp_segment_nodes) |
Get the nodes on the shared boundary (b), these are stored in the segment they belong. More... | |
void | get_boundary_segment_nodes_helper (const unsigned &b, Vector< Vector< Node * >> &tmp_segment_nodes) |
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) More... | |
void | enable_boundary_unrefinement_constrained_by_target_areas () |
Enable/disable unrefinement/refinement methods for original boundaries. More... | |
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 () |
Enable/disable unrefinement/refinement methods for shared boundaries. More... | |
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 () |
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... | |
TriangleMesh (TriangleMeshParameters &triangle_mesh_parameters, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper) | |
Build mesh, based on the specifications on TriangleMeshParameters. More... | |
TriangleMesh (const std::string &poly_file_name, const double &element_area, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper, const bool &allow_automatic_creation_of_vertices_on_boundaries=true) | |
Build mesh from poly file, with specified target area for all elements. More... | |
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) |
Overload set_mesh_level_time_stepper so that the stored time stepper now corresponds to the new timestepper. More... | |
void | compute_boundary_segments_connectivity_and_initial_zeta_values (const unsigned &b) |
Compute the boundary segments connectivity for those boundaries that were splited during the distribution process. More... | |
void | re_assign_initial_zeta_values_for_internal_boundary (const unsigned &b, Vector< std::list< FiniteElement * >> &old_segment_sorted_ele_pt, std::map< FiniteElement *, bool > &old_is_inverted) |
Re-assign the boundary segments initial zeta (arclength) value for those internal boundaries that were splited during the distribution process. Those boundaries that have one face element at each side of the boundary. More... | |
void | re_scale_re_assigned_initial_zeta_values_for_internal_boundary (const unsigned &b) |
Re-scale the re-assigned zeta values for the boundary nodes, apply only for internal boundaries. More... | |
void | identify_boundary_segments_and_assign_initial_zeta_values (const unsigned &b, Vector< FiniteElement * > &input_face_ele_pt, const bool &is_internal_boundary, std::map< FiniteElement *, FiniteElement * > &face_to_bulk_element_pt) |
Identify the segments from the old mesh (original mesh) in the new mesh (this) and assign initial and final boundary coordinates for the segments that create the boundary. (This is the version called from the original mesh to identify its own segments) More... | |
void | identify_boundary_segments_and_assign_initial_zeta_values (const unsigned &b, TriangleMesh< ELEMENT > *original_mesh_pt) |
Identify the segments from the old mesh (original mesh) in the new mesh (this) and assign initial and final boundary coordinates for the segments that create the boundary. More... | |
void | synchronize_boundary_coordinates (const unsigned &b) |
In charge of sinchronize the boundary coordinates for internal boundaries that were split as part of the distribution process. Called after setup_boundary_coordinates() for the original mesh only. More... | |
void | select_boundary_face_elements (Vector< FiniteElement * > &face_el_pt, const unsigned &b, bool &is_internal_boundary, std::map< FiniteElement *, FiniteElement * > &face_to_bulk_element_pt) |
Select face element from boundary using the criteria to decide which of the two face elements should be used on internal boundaries. More... | |
Vector< Vector< Node * > > & | boundary_segment_node_pt (const unsigned &b) |
Return direct access to nodes associated with a boundary but sorted in segments. More... | |
Vector< Node * > & | boundary_segment_node_pt (const unsigned &b, const unsigned &s) |
Return direct access to nodes associated with a segment of a given boundary. More... | |
Node *& | boundary_segment_node_pt (const unsigned &b, const unsigned &s, const unsigned &n) |
Return pointer to node n on boundary b. More... | |
void | update_triangulateio (Vector< Vector< double >> &internal_point) |
Update the TriangulateIO object to the current nodal position and the centre hole coordinates. More... | |
void | update_triangulateio () |
Update the triangulateio object to the current nodal positions. More... | |
void | dump_distributed_info_for_restart (std::ostream &dump_file) |
Used to dump info. related with distributed triangle meshes. More... | |
const unsigned | read_unsigned_line_helper (std::istream &read_file) |
void | read_distributed_info_for_restart (std::istream &restart_file) |
Used to read info. related with distributed triangle meshes. More... | |
void | remesh_from_internal_triangulateio () |
Completely regenerate the mesh from the trianglateio structure. More... | |
bool | triangulateio_exists () |
Boolean defining if Triangulateio object has been built or not. More... | |
Vector< unsigned > | oomph_vertex_nodes_id () |
Return the vector that contains the oomph-lib node number for all vertex nodes in the TriangulateIO representation of the mesh. More... | |
const unsigned | initial_shared_boundary_id () |
The initial boundary id for shared boundaries. More... | |
const unsigned | final_shared_boundary_id () |
The final boundary id for shared boundaries. 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 routines. Generally used after load balance. More... | |
void | output_boundary_coordinates (const unsigned &b, std::ostream &outfile) |
Output the nodes on the boundary and their respective boundary coordinates(into separate tecplot zones) More... | |
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 () |
Setup lookup schemes which establish whic elements are located next to mesh's boundaries (wrapper to suppress doc). More... | |
void | setup_boundary_element_info (std::ostream &outfile) |
Setup lookup schemes which establish which elements are located next to mesh's boundaries. Doc in outfile (if it's open). More... | |
bool | use_triangulateio_restart () const |
const access for Use_triangulateio_restart. More... | |
void | enable_triangulateio_restart () |
write access for Use_triangulateio_restart. More... | |
void | disable_triangulateio_restart () |
write access for Use_triangulateio_restart. More... | |
TriangulateIO & | triangulateio_representation () |
Access to the triangulateio representation of the mesh. More... | |
void | write_triangulateio (TriangulateIO &triangulate_io, std::string &s) |
Helper function. Write a TriangulateIO object file with all the triangulateio fields. String s is add to assign a different value for the input and/or output structure. More... | |
void | clear_triangulateio () |
Helper function. Clean up the memory associated with the TriangulateIO object. This should really only be used to save memory in extremely tight situations. More... | |
void | dump_triangulateio (std::ostream &dump_file) |
Dump the triangulateio structure to a dump file and record boundary coordinates of boundary nodes. More... | |
virtual void | dump_info_to_reset_halo_haloed_scheme (std::ostream &dump_file) |
Virtual function that is used to dump info. related with distributed triangle meshes. More... | |
void | remesh_from_triangulateio (std::istream &restart_file) |
Regenerate the mesh from a dumped triangulateio file and dumped boundary coordinates of boundary nodes. 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... | |
FiniteElement * | region_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... | |
GeomObject * | boundary_geom_object_pt (const unsigned &b) |
Return the geometric object associated with the b-th boundary or null if the boundary has associated geometric object. More... | |
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 () |
Return access to the vector of boundary coordinates associated with each geometric object. More... | |
Vector< double > & | boundary_coordinate_limits (const unsigned &b) |
Return access to the coordinate limits associated with the geometric object associated with boundary b. More... | |
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... | |
FiniteElement * | boundary_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... | |
TriangleMeshPolyLine * | boundary_polyline_pt (const unsigned &b) |
Return pointer to the current polyline that describes the b-th mesh boundary. More... | |
std::map< unsigned, std::set< Node * > > & | nodes_on_boundary_pt () |
Gets a pointer to a set with all the nodes related with a boundary. More... | |
const bool | get_connected_vertex_number_on_destination_polyline (TriangleMeshPolyLine *dst_polyline_pt, Vector< double > &vertex_coordinates, unsigned &vertex_number) |
Gets the vertex number on the destination polyline (used to create the connections among shared boundaries) More... | |
void | check_contiguousness_on_polylines_helper (Vector< TriangleMeshPolyLine * > &polylines_pt, unsigned &index) |
Sort the polylines coming from joining them. Check whether it is necessary to reverse them or not. Used when joining two curve polylines in order to create a polygon. More... | |
void | check_contiguousness_on_polylines_helper (Vector< TriangleMeshPolyLine * > &polylines_pt, unsigned &index_halo_start, unsigned &index_halo_end) |
Sort the polylines coming from joining them. Check whether it is necessary to reverse them or not. Used when joining polylines and they still do not create a polygon. More... | |
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 (a set of sorted vertices that connected create a polygon) More... | |
void | enable_automatic_creation_of_vertices_on_boundaries () |
Enables the creation of points (by Triangle) on the outer and internal boundaries. More... | |
void | disable_automatic_creation_of_vertices_on_boundaries () |
Disables the creation of points (by Triangle) on the outer and internal boundaries. More... | |
bool | is_automatic_creation_of_vertices_on_boundaries_allowed () |
Returns the status of the variable Allow_automatic_creation_of_vertices_on_boundaries. More... | |
void | flush_boundary_segment_node (const unsigned &b) |
Flush the boundary segment node storage. More... | |
void | set_nboundary_segment_node (const unsigned &b, const unsigned &s) |
Set the number of segments associated with a boundary. More... | |
unsigned | nboundary_segment (const unsigned &b) |
Return the number of segments associated with a boundary. More... | |
unsigned long | nboundary_segment_node (const unsigned &b) |
Return the number of segments associated with a boundary. More... | |
unsigned long | nboundary_segment_node (const unsigned &b, const unsigned &s) |
Return the number of nodes associated with a given segment of a boundary. More... | |
void | add_boundary_segment_node (const unsigned &b, const unsigned &s, Node *const &node_pt) |
Add the node node_pt to the b-th boundary and the s-th segment of the mesh. More... | |
std::map< unsigned, Vector< double > > & | boundary_initial_coordinate () |
Return direct access to the initial coordinates of a boundary. More... | |
std::map< unsigned, Vector< double > > & | boundary_final_coordinate () |
Return direct access to the final coordinates of a boundary. More... | |
std::map< unsigned, Vector< double > > & | boundary_initial_zeta_coordinate () |
Return direct access to the initial zeta coordinate of a boundary. More... | |
std::map< unsigned, Vector< double > > & | boundary_final_zeta_coordinate () |
Return direct access to the final zeta coordinates of a boundary. More... | |
std::map< unsigned, Vector< unsigned > > & | boundary_segment_inverted () |
Return the info. to know if it is necessary to reverse the segment based on a previous mesh. More... | |
std::map< unsigned, Vector< Vector< double > > > & | boundary_segment_initial_coordinate () |
Return direct access to the initial coordinates for the segments that are part of a boundary. More... | |
std::map< unsigned, Vector< Vector< double > > > & | boundary_segment_final_coordinate () |
Return direct access to the final coordinates for the segments that are part of a boundary. More... | |
std::map< unsigned, Vector< double > > & | boundary_segment_initial_arclength () |
Return direct access to the initial arclength for the segments that are part of a boundary. More... | |
std::map< unsigned, Vector< double > > & | boundary_segment_final_arclength () |
Return direct access to the final arclength for the segments that are part of a boundary. More... | |
std::map< unsigned, Vector< double > > & | boundary_segment_initial_zeta () |
Return direct access to the initial zeta for the segments that are part of a boundary. More... | |
std::map< unsigned, Vector< double > > & | boundary_segment_final_zeta () |
Return direct access to the final zeta for the segments that are part of a boundary. More... | |
Vector< double > & | boundary_segment_initial_zeta (const unsigned &b) |
Return the initial zeta for the segments that are part of a boundary. More... | |
Vector< double > & | boundary_segment_final_zeta (const unsigned &b) |
Return the final zeta for the segments that are part of a boundary. More... | |
Vector< double > & | boundary_initial_coordinate (const unsigned &b) |
Return the initial coordinates for the boundary. More... | |
Vector< double > & | boundary_final_coordinate (const unsigned &b) |
Return the final coordinates for the boundary. More... | |
const Vector< unsigned > | boundary_segment_inverted (const unsigned &b) const |
Return the info. to know if it is necessary to reverse the segment based on a previous mesh. More... | |
Vector< unsigned > & | boundary_segment_inverted (const unsigned &b) |
Return the info. to know if it is necessary to reverse the segment based on a previous mesh. More... | |
Vector< double > & | boundary_initial_zeta_coordinate (const unsigned &b) |
Return the initial zeta coordinate for the boundary. More... | |
Vector< double > & | boundary_final_zeta_coordinate (const unsigned &b) |
Return the final zeta coordinate for the boundary. More... | |
Vector< double > & | boundary_segment_initial_arclength (const unsigned &b) |
Return the initial arclength for the segments that are part of a boundary. More... | |
Vector< double > & | boundary_segment_final_arclength (const unsigned &b) |
Return the final arclength for the segments that are part of a boundary. More... | |
Vector< Vector< double > > & | boundary_segment_initial_coordinate (const unsigned &b) |
Return the initial coordinates for the segments that are part of a boundary. More... | |
Vector< Vector< double > > & | boundary_segment_final_coordinate (const unsigned &b) |
Return the final coordinates for the segments that are part of a boundary. More... | |
template<class ELEMENT > | |
void | setup_boundary_coordinates (const unsigned &b) |
Setup boundary coordinate on boundary b. Boundary coordinate increases continously along polygonal boundary. It's zero at the lowest left node on the boundary. More... | |
template<class ELEMENT > | |
void | setup_boundary_coordinates (const unsigned &b, std::ofstream &outfile) |
Setup boundary coordinate on boundary b. Doc Faces in outfile. Boundary coordinate increases continously along polygonal boundary. It's zero at the lowest left node on the boundary. More... | |
Public Member Functions inherited from oomph::Mesh | |
void | resize_halo_nodes () |
Helper function that resizes halo nodes to the same size as their non-halo counterparts if required. (A discrepancy can arise if a FaceElement that introduces additional unknowns are attached to a bulk element that shares a node with a haloed element. In that case the joint node between haloed and non-haloed element is resized on that processor but not on the one that holds the halo counterpart (because no FaceElement is attached to the halo element) More... | |
Mesh () | |
Default constructor. More... | |
Mesh (const Vector< Mesh * > &sub_mesh_pt) | |
Constructor builds combined mesh from the meshes specified. Note: This simply merges the meshes' elements and nodes (ignoring duplicates; no boundary information etc. is created). More... | |
void | merge_meshes (const Vector< Mesh * > &sub_mesh_pt) |
Merge meshes. Note: This simply merges the meshes' elements and nodes (ignoring duplicates; no boundary information etc. is created). More... | |
template<class BULK_ELEMENT > | |
void | doc_boundary_coordinates (const unsigned &b, std::ofstream &the_file) |
Output boundary coordinates on boundary b – template argument specifies the bulk element type (needed to create FaceElement of appropriate type on mesh boundary). More... | |
virtual void | scale_mesh (const double &factor) |
Scale all nodal coordinates by given factor. Virtual so it can be overloaded in SolidMesh class where it also re-assigns the Lagrangian coordinates. More... | |
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 () |
Flush storage for elements and nodes by emptying the vectors that store the pointers to them. This is useful if a particular mesh is only built to generate a small part of a bigger mesh. Once the elements and nodes have been created, they are typically copied into the new mesh and the auxiliary mesh can be deleted. However, if we simply call the destructor of the auxiliary mesh, it will also wipe out the nodes and elements, because it still "thinks" it's in charge of these... More... | |
void | flush_element_storage () |
Flush storage for elements (only) by emptying the vectors that store the pointers to them. This is useful if a particular mesh is only built to generate a small part of a bigger mesh. Once the elements and nodes have been created, they are typically copied into the new mesh and the auxiliary mesh can be deleted. However, if we simply call the destructor of the auxiliary mesh, it will also wipe out the nodes and elements, because it still "thinks" it's in charge of these... More... | |
void | flush_node_storage () |
Flush storage for nodes (only) by emptying the vectors that store the pointers to them. More... | |
Node *& | node_pt (const unsigned long &n) |
Return pointer to global node n. More... | |
Node * | node_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... | |
GeneralisedElement * | element_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... | |
FiniteElement * | finite_element_pt (const unsigned &e) const |
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions). More... | |
Node *& | boundary_node_pt (const unsigned &b, const unsigned &n) |
Return pointer to node n on boundary b. More... | |
Node * | boundary_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) |
Remove all information about nodes stored on the b-th boundary of the mesh. More... | |
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 () |
Replace existing boundary node lookup schemes with new schemes created using the boundary data stored in the nodes. More... | |
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) |
Update nodal positions in response to changes in the domain shape. Uses the FiniteElement::get_x(...) function for FiniteElements and doesn't do anything for other element types. If a MacroElement pointer has been set for a FiniteElement, the MacroElement representation is used to update the nodal positions; if not get_x(...) uses the FE interpolation and thus leaves the nodal positions unchanged. Virtual, so it can be overloaded by specific meshes, such as AlgebraicMeshes or SpineMeshes. Generally, this function updates the position of all nodes in response to changes in the boundary position. However, we ignore all SolidNodes since their position is computed as part of the solution – unless the bool flag is set to true. Such calls are typically made when the initial mesh is created and/or after a mesh has been refined repeatedly before the start of the computation. More... | |
virtual void | reorder_nodes (const bool &use_old_ordering=true) |
Re-order nodes in the order in which they appear in elements – can be overloaded for more efficient re-ordering. More... | |
virtual void | get_node_reordering (Vector< Node * > &reordering, const bool &use_old_ordering=true) const |
Get a reordering of the nodes in the order in which they appear in elements – can be overloaded for more efficient re-ordering. More... | |
template<class BULK_ELEMENT , template< class > class FACE_ELEMENT> | |
void | build_face_mesh (const unsigned &b, Mesh *const &face_mesh_pt) |
Constuct a Mesh of FACE_ELEMENTs along the b-th boundary of the mesh (which contains elements of type BULK_ELEMENT) More... | |
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) |
Determine max and min area for all FiniteElements in the mesh (non-FiniteElements are ignored) More... | |
double | total_size () |
Determine the sum of all "sizes" of the FiniteElements in the mesh (non-FiniteElements are ignored). This gives the length/area/volume occupied by the mesh. More... | |
void | check_inverted_elements (bool &mesh_has_inverted_elements, std::ofstream &inverted_element_file) |
Check for inverted elements and report outcome in boolean variable. This visits all elements at their integration points and checks if the Jacobian of the mapping between local and global coordinates is positive – using the same test that would be carried out (but only in PARANOID mode) during the assembly of the elements' Jacobian matrices. Inverted elements are output in inverted_element_file (if the stream is open). More... | |
void | check_inverted_elements (bool &mesh_has_inverted_elements) |
Check for inverted elements and report outcome in boolean variable. This visits all elements at their integration points and checks if the Jacobian of the mapping between local and global coordinates is positive – using the same test that would be carried out (but only in PARANOID mode) during the assembly of the elements' Jacobian matrices. More... | |
unsigned | check_for_repeated_nodes (const double &epsilon=1.0e-12) |
Check for repeated nodes within a given spatial tolerance. Return (0/1) for (pass/fail). More... | |
Vector< Node * > | prune_dead_nodes () |
Prune nodes. Nodes that have been marked as obsolete are removed from the mesh (and its boundary-node scheme). Returns vector of pointers to deleted nodes. More... | |
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... | |
FiniteElement * | boundary_element_pt (const unsigned &b, const unsigned &e) const |
Return pointer to e-th finite element on boundary b. More... | |
Node * | get_some_non_boundary_node () const |
Find a node not on any boundary in mesh_pt (useful for pinning a single node in a purely Neumann problem so that it is fully determined). More... | |
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 |
For the e-th finite element on boundary b, return int to indicate the face_index of the face adjacent to the boundary. This is consistent with input required during the generation of FaceElements. More... | |
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 |
Output in paraview format into specified file. Breaks up each element into sub-elements for plotting purposes. We assume that all elements are of the same type (fct will break break (in paranoid mode) if paraview output fcts of the elements are inconsistent). More... | |
void | output_fct_paraview (std::ofstream &file_out, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt) const |
Output in paraview format into specified file. Breaks up each element into sub-elements for plotting purposes. We assume that all elements are of the same type (fct will break break (in paranoid mode) if paraview output fcts of the elements are inconsistent). More... | |
void | output_fct_paraview (std::ofstream &file_out, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt) const |
Output in paraview format into specified file. Breaks up each element into sub-elements for plotting purposes. We assume that all elements are of the same type (fct will break break (in paranoid mode) if paraview output fcts of the elements are inconsistent). More... | |
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) |
Output a given time-dep. Vector function at f(n_plot) points in each element. More... | |
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) |
Output the nodes on the boundaries (into separate tecplot zones). Specify filename. More... | |
void | assign_initial_values_impulsive () |
Assign initial values for an impulsive start. More... | |
void | shift_time_values () |
Shift time-dependent data along for next timestep: Deal with nodal Data/positions and the element's internal Data. More... | |
void | calculate_predictions () |
Calculate predictions for all Data and positions associated with the mesh, usually used in adaptive time-stepping. More... | |
void | set_nodal_and_elemental_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data) |
Set the timestepper associated with all nodal and elemental data stored in the mesh. More... | |
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 ¶meter_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) |
Set the timestepper associated with the internal data stored within elements in the meah. More... | |
virtual void | compute_norm (double &norm) |
Compute norm of solution by summing contributions of compute_norm(...) for all constituent elements in the mesh. What that norm means depends on what's defined in the element's function; may need to take the square root afterwards if the elements compute the square of the L2 norm, say. More... | |
virtual void | compute_norm (Vector< double > &norm) |
Compute norm of solution by summing contributions of compute_norm(...) for all constituent elements in the mesh. What that norm means depends on what's defined in the element's function; may need to take the square root afterwards if the elements compute the square of the L2 norm, say. More... | |
virtual void | compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm) |
Plot error when compared against a given exact solution. Also returns the norm of the error and that of the exact solution. More... | |
virtual void | compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm) |
Plot error when compared against a given time-depdendent exact solution. Also returns the norm of the error and that of the exact solution. More... | |
virtual void | compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm) |
Plot error when compared against a given time-dependent exact solution. Also returns the norm of the error and that of the exact solution. More... | |
virtual void | compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm) |
Plot error when compared against a given time-dependent exact solution. Also returns the norm of the error and that of the exact solution. More... | |
virtual void | compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm) |
Plot error when compared against a given time-depdendent exact solution. Also returns the norm of the error and that of the exact solution. Version with vectors of norms and errors so that different variables' norms and errors can be returned individually. More... | |
virtual void | compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm) |
Plot error when compared against a given time-depdendent exact solution. Also returns the norm of the error and that of the exact solution. Version with vectors of norms and errors so that different variables' norms and errors can be returned individually. More... | |
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) |
Returns the norm of the error and that of the exact solution. Version with vectors of norms and errors so that different variables' norms and errors can be returned individually. More... | |
bool | is_mesh_distributed () const |
Boolean to indicate if Mesh has been distributed. More... | |
OomphCommunicator * | communicator_pt () const |
Read-only access fct to communicator (Null if mesh is not distributed, i.e. if we don't have mpi). More... | |
void | set_communicator_pt (OomphCommunicator *comm_pt) |
Function to set communicator (mesh is assumed to be distributed if the communicator pointer is non-null). Only defined if mpi is enabled becaus Comm_pt itself is only defined when mpi is enabled. More... | |
void | set_keep_all_elements_as_halos () |
Call this function to keep all the elements as halo elements. More... | |
void | unset_keep_all_elements_as_halos () |
Calll this function to unset the flag that keeps all elements in the mesh as halo elements. More... | |
virtual void | distribute (OomphCommunicator *comm_pt, const Vector< unsigned > &element_domain, Vector< GeneralisedElement * > &deleted_element_pt, DocInfo &doc_info, const bool &report_stats, const bool &overrule_keep_as_halo_element_status) |
Distribute the problem and doc; make this virtual to allow overloading for particular meshes where further work is required. Add to vector of pointers to deleted elements. More... | |
void | distribute (OomphCommunicator *comm_pt, const Vector< unsigned > &element_domain, Vector< GeneralisedElement * > &deleted_element_pt, const bool &report_stats=false) |
Distribute the problem Add to vector of pointers to deleted elements. More... | |
void | prune_halo_elements_and_nodes (Vector< GeneralisedElement * > &deleted_element_pt, const bool &report_stats=false) |
(Irreversibly) prune halo(ed) elements and nodes, usually after another round of refinement, to get rid of excessively wide halo layers. Note that the current mesh will be now regarded as the base mesh and no unrefinement relative to it will be possible once this function has been called. More... | |
void | prune_halo_elements_and_nodes (Vector< GeneralisedElement * > &deleted_element_pt, DocInfo &doc_info, const bool &report_stats) |
(Irreversibly) prune halo(ed) elements and nodes, usually after another round of refinement, to get rid of excessively wide halo layers. Note that the current mesh will be now regarded as the base mesh and no unrefinement relative to it will be possible once this function has been called. More... | |
void | get_efficiency_of_mesh_distribution (double &av_efficiency, double &max_efficiency, double &min_efficiency) |
Get efficiency of mesh distribution: In an ideal distribution without halo overhead, each processor would only hold its own elements. Efficieny per processor = (number of non-halo elements)/ (total number of elements). More... | |
void | doc_mesh_distribution (DocInfo &doc_info) |
Doc the mesh distribution, to be processed with tecplot macros. More... | |
void | check_halo_schemes (DocInfo &doc_info, double &max_permitted_error_for_halo_check) |
Check halo and shared schemes on the mesh. More... | |
virtual void | classify_halo_and_haloed_nodes (DocInfo &doc_info, const bool &report_stats) |
Classify the halo and haloed nodes in the mesh. Virtual so it can be overloaded to perform additional functionality (such as synchronising hanging nodes) in refineable meshes, say. More... | |
virtual void | classify_halo_and_haloed_nodes (const bool &report_stats=false) |
Classify the halo and haloed nodes in the mesh. Virtual so it can be overloaded to perform additional functionality (such as synchronising hanging nodes) in refineable meshes, say. More... | |
void | synchronise_shared_nodes (const bool &report_stats) |
Synchronise shared node lookup schemes to cater for the the case where: (1) a certain node on the current processor is halo with proc p (i.e. its non-halo counterpart lives on processor p) (2) that node is also exists (also as a halo) on another processor (q, say) where its non-halo counter part is also known to be on processor p. However, without calling this function the current processor does not necessarily know that it shares a node with processor q. This information can be required, e.g. when synchronising hanging node schemes over all processors. More... | |
void | get_all_halo_data (std::map< unsigned, double * > &map_of_halo_data) |
Get all the halo data stored in the mesh and add pointers to the data to the map, indexed by global equation number. More... | |
Vector< GeneralisedElement * > | halo_element_pt (const unsigned &p) |
Return vector of halo elements in this Mesh whose non-halo counterpart is held on processor p. More... | |
Vector< GeneralisedElement * > | haloed_element_pt (const unsigned &p) |
Return vector of haloed elements in this Mesh whose haloing counterpart is held on processor p. More... | |
unsigned | nnon_halo_element () |
Total number of non-halo elements in this mesh (Costly call computes result on the fly) More... | |
unsigned | nroot_halo_element () |
Total number of root halo elements in this Mesh. More... | |
unsigned | nroot_halo_element (const unsigned &p) |
Number of root halo elements in this Mesh whose non-halo counterpart is held on processor p. More... | |
Vector< GeneralisedElement * > | root_halo_element_pt (const unsigned &p) |
Vector of pointers to root halo elements in this Mesh whose non-halo counterpart is held on processor p. More... | |
GeneralisedElement *& | root_halo_element_pt (const unsigned &p, const unsigned &e) |
Access fct to the e-th root halo element in this Mesh whose non-halo counterpart is held on processor p. More... | |
void | add_root_halo_element_pt (const unsigned &p, GeneralisedElement *&el_pt) |
Add root halo element whose non-halo counterpart is held on processor p to this Mesh. More... | |
unsigned | nhalo_node () |
Total number of halo nodes in this Mesh. More... | |
unsigned | nhalo_node (const unsigned &p) |
Number of halo nodes in this Mesh whose non-halo counterpart is held on processor p. More... | |
void | add_halo_node_pt (const unsigned &p, Node *&nod_pt) |
Add halo node whose non-halo counterpart is held on processor p to the storage scheme for halo nodes. More... | |
Node * | halo_node_pt (const unsigned &p, const unsigned &j) |
Access fct to the j-th halo node in this Mesh whose non-halo counterpart is held on processor p. More... | |
unsigned | nroot_haloed_element () |
Total number of root haloed elements in this Mesh. More... | |
unsigned | nroot_haloed_element (const unsigned &p) |
Number of root haloed elements in this Mesh whose non-halo counterpart is held on processor p. More... | |
Vector< GeneralisedElement * > | root_haloed_element_pt (const unsigned &p) |
Vector of pointers to root haloed elements in this Mesh whose non-halo counterpart is held on processor p. More... | |
GeneralisedElement *& | root_haloed_element_pt (const unsigned &p, const unsigned &e) |
Access fct to the e-th root haloed element in this Mesh whose non-halo counterpart is held on processor p. More... | |
void | add_root_haloed_element_pt (const unsigned &p, GeneralisedElement *&el_pt) |
Add root haloed element whose non-halo counterpart is held on processor p to the storage scheme for haloed elements. Note: This does not add the element to the storage scheme for elements as it's understood to naturally live on this processor anyway! More... | |
unsigned | nhaloed_node () |
Total number of haloed nodes in this Mesh. More... | |
unsigned | nhaloed_node (const unsigned &p) |
Number of haloed nodes in this Mesh whose haloed counterpart is held on processor p. More... | |
Node * | haloed_node_pt (const unsigned &p, const unsigned &j) |
Access fct to the j-th haloed node in this Mesh whose halo counterpart is held on processor p. More... | |
void | add_haloed_node_pt (const unsigned &p, Node *&nod_pt) |
Add haloed node whose halo counterpart is held on processor p to the storage scheme for haloed nodes. More... | |
void | disable_resizing_of_halo_nodes () |
Function to suppress resizing of halo nodes – optmisation but call it at your own risk! More... | |
void | enable_resizing_of_halo_nodes () |
Function to (re-)enable resizing of halo nodes – this returns things to the default behaviour. More... | |
void | disable_output_of_halo_elements () |
Function to disable halo element output. More... | |
void | enable_output_of_halo_elements () |
Function to enable halo element output. More... | |
unsigned | nshared_node () |
Total number of shared nodes in this Mesh. More... | |
void | doc_shared_nodes () |
Doc shared nodes. More... | |
unsigned | nshared_node (const unsigned &p) |
Number of shared nodes in this Mesh who have a counterpart on processor p. More... | |
Node * | shared_node_pt (const unsigned &p, const unsigned &j) |
Access fct to the j-th shared node in this Mesh who has a counterpart on processor p. More... | |
void | get_shared_node_pt (const unsigned &p, Vector< Node * > &shared_node_pt) |
Get vector of pointers to shared nodes with processor p. Required for faster search in Missing_masters_functions::add_external_haloed_node_helper() and Missing_masters_functions::add_external_haloed_master_node_helper() More... | |
void | add_shared_node_pt (const unsigned &p, Node *&nod_pt) |
Add shared node whose counterpart is held on processor p to the storage scheme for shared nodes. (NB: ensure that this routine is called twice, once for each process) More... | |
void | get_halo_node_stats (double &av_number, unsigned &max_number, unsigned &min_number) |
Get halo node stats for this distributed mesh: Average/max/min number of halo nodes over all processors. Careful: Involves MPI Broadcasts and must therefore be called on all processors! More... | |
void | get_haloed_node_stats (double &av_number, unsigned &max_number, unsigned &min_number) |
Get haloed node stats for this distributed mesh: Average/max/min number of haloed nodes over all processors. Careful: Involves MPI Broadcasts and must therefore be called on all processors! More... | |
void | output_external_halo_elements (std::ostream &outfile, const unsigned &n_plot=5) |
Output all external halo elements. More... | |
void | output_external_halo_elements (const unsigned &p, std::ostream &outfile, const unsigned &n_plot=5) |
Output all external halo elements with processor p. More... | |
void | output_external_haloed_elements (std::ostream &outfile, const unsigned &n_plot=5) |
Output all external haloed elements. More... | |
void | output_external_haloed_elements (const unsigned &p, std::ostream &outfile, const unsigned &n_plot=5) |
Output all external haloed elements with processor p. More... | |
unsigned | nexternal_halo_element () |
Total number of external halo elements in this Mesh. More... | |
unsigned | nexternal_halo_element (const unsigned &p) |
Number of external halo elements in this Mesh whose non-halo counterpart is held on processor p. More... | |
GeneralisedElement *& | external_halo_element_pt (const unsigned &p, const unsigned &e) |
Access fct to the e-th external halo element in this Mesh whose non-halo counterpart is held on processor p. More... | |
void | add_external_halo_element_pt (const unsigned &p, GeneralisedElement *&el_pt) |
Add external halo element whose non-halo counterpart is held on processor p to this Mesh. More... | |
unsigned | nexternal_haloed_element () |
Total number of external haloed elements in this Mesh. More... | |
unsigned | nexternal_haloed_element (const unsigned &p) |
Number of external haloed elements in this Mesh whose non-halo counterpart is held on processor p. More... | |
GeneralisedElement *& | external_haloed_element_pt (const unsigned &p, const unsigned &e) |
Access fct to the e-th external haloed element in this Mesh whose non-halo counterpart is held on processor p. More... | |
unsigned | add_external_haloed_element_pt (const unsigned &p, GeneralisedElement *&el_pt) |
Add external haloed element whose non-halo counterpart is held on processor p to the storage scheme for haloed elements. More... | |
unsigned | nexternal_halo_node () |
Total number of external halo nodes in this Mesh. More... | |
void | get_external_halo_node_pt (Vector< Node * > &external_halo_node_pt) |
Get vector of pointers to all external halo nodes. More... | |
unsigned | nexternal_halo_node (const unsigned &p) |
Number of external halo nodes in this Mesh whose non-halo (external) counterpart is held on processor p. More... | |
void | add_external_halo_node_pt (const unsigned &p, Node *&nod_pt) |
Add external halo node whose non-halo (external) counterpart is held on processor p to the storage scheme for halo nodes. More... | |
Node *& | external_halo_node_pt (const unsigned &p, const unsigned &j) |
Access fct to the j-th external halo node in this Mesh whose non-halo external counterpart is held on processor p. More... | |
Vector< Node * > | external_halo_node_pt (const unsigned &p) |
Access fct to vector of external halo node in this Mesh whose non-halo external counterpart is held on processor p. (read only) More... | |
void | set_external_halo_node_pt (const unsigned &p, const Vector< Node * > &external_halo_node_pt) |
Set vector of external halo node in this Mesh whose non-halo external counterpart is held on processor p. More... | |
void | null_external_halo_node (const unsigned &p, Node *nod_pt) |
Null out specified external halo node (used when deleting duplicates) More... | |
void | remove_null_pointers_from_external_halo_node_storage () |
Consolidate external halo node storage by removing nulled out pointes in external halo and haloed schemes. More... | |
unsigned | nexternal_haloed_node () |
Total number of external haloed nodes in this Mesh. More... | |
unsigned | nexternal_haloed_node (const unsigned &p) |
Number of external haloed nodes in this Mesh whose halo (external) counterpart is held on processor p. More... | |
Node *& | external_haloed_node_pt (const unsigned &p, const unsigned &j) |
Access fct to the j-th external haloed node in this Mesh whose halo external counterpart is held on processor p. More... | |
unsigned | add_external_haloed_node_pt (const unsigned &p, Node *&nod_pt) |
Add external haloed node whose halo (external) counterpart is held on processor p to the storage scheme for haloed nodes. More... | |
Vector< Node * > | external_haloed_node_pt (const unsigned &p) |
Access fct to vector of external haloed node in this Mesh whose halo external counterpart is held on processor p. (read only) More... | |
void | set_external_haloed_node_pt (const unsigned &p, const Vector< Node * > &external_haloed_node_pt) |
Set vector of external haloed node in this Mesh whose halo external counterpart is held on processor p. More... | |
std::set< int > | external_halo_proc () |
Return the set of processors that hold external halo nodes. This is required to avoid having to pass a communicator into the node_update functions for Algebraic-based and MacroElement-based Meshes. More... | |
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 () | |
Constructor sets default values for refinement targets etc. and initialises pointer to spatial error estimator to NULL. More... | |
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... | |
unsigned & | nrefinement_overruled () |
Number of elements that would have liked to be refined further but can't because they've reached the max. refinement level. More... | |
unsigned & | max_keep_unrefined () |
Max. number of elements that we allow to remain unrefined if no other mesh adaptation is required (to avoid mesh-adaptations that would only unrefine a few elements and then force a new solve – this can't be worth our while!) More... | |
ErrorEstimator *& | spatial_error_estimator_pt () |
Access to spatial error estimator. More... | |
ErrorEstimator * | spatial_error_estimator_pt () const |
Access to spatial error estimator (const version. More... | |
double & | min_permitted_error () |
Access fct for min. error (i.e. (try to) merge elements if their error is smaller) More... | |
double & | max_permitted_error () |
Access fct for max. error (i.e. split elements if their error is larger) More... | |
double & | min_error () |
Access fct for min. actual error in present solution (i.e. before re-solve on adapted mesh) More... | |
double & | max_error () |
Access fct for max. actual error in present solution (i.e. before re-solve on adapted mesh) More... | |
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) |
p-adapt mesh: Refine elements whose error is lager than err_max and (try to) unrefine those whose error is smaller than err_min More... | |
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 | |
RefineableTriangleMesh (const Vector< double > &target_area, TriangulateIO &triangulate_io, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper, const bool &use_attributes=false, const bool &allow_automatic_creation_of_vertices_on_boundaries=true, OomphCommunicator *comm_pt=0) | |
Build mesh from specified triangulation and associated target areas for elements in it NOTE: This is used ONLY during adaptation and should not be used as a method of constructing a TriangleMesh object in demo drivers! More... | |
const bool | boundary_connections (const unsigned &b, const unsigned &c, std::set< Vector< double >> &vertices) |
Verifies if the given boundary receives a connection, and if that is the case then returns the list of vertices that receive the connections. More... | |
const void | synchronize_shared_boundary_connections () |
Synchronise the vertices that are marked for non deletion. More... | |
void | add_vertices_for_non_deletion () |
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. More... | |
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) |
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. More... | |
void | create_temporary_boundary_connections (Vector< TriangleMeshPolygon * > &tmp_outer_polygons_pt, Vector< TriangleMeshOpenCurve * > &tmp_open_curves_pt) |
After unrefinement and refinement has taken place compute the new vertices numbers of the temporary representation of the. More... | |
void | restore_boundary_connections (Vector< TriangleMeshPolyLine * > &resume_initial_connection_polyline_pt, Vector< TriangleMeshPolyLine * > &resume_final_connection_polyline_pt) |
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. More... | |
void | restore_polyline_connections_helper (TriangleMeshPolyLine *polyline_pt, Vector< TriangleMeshPolyLine * > &resume_initial_connection_polyline_pt, Vector< TriangleMeshPolyLine * > &resume_final_connection_polyline_pt) |
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. More... | |
void | resume_boundary_connections (Vector< TriangleMeshPolyLine * > &resume_initial_connection_polyline_pt, Vector< TriangleMeshPolyLine * > &resume_final_connection_polyline_pt) |
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. More... | |
bool | get_connected_vertex_number_on_dst_boundary (Vector< double > &vertex_coordinates, const unsigned &dst_b_id, unsigned &vertex_number) |
Computes the associated vertex number on the destination boundary. More... | |
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) |
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. More... | |
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) |
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. More... | |
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) |
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. More... | |
bool | unrefine_shared_boundary_constrained_by_target_area (const unsigned &b, const unsigned &c, Vector< Vector< double >> &vector_bnd_vertices, Vector< double > &area_constraint) |
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. More... | |
bool | refine_shared_boundary_constrained_by_target_area (Vector< Vector< double >> &vector_bnd_vertices, Vector< double > &area_constraint) |
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. More... | |
void | initialise_boundary_refinement_data () |
Set all the flags to true (the default values) More... | |
void | sort_nodes_on_shared_boundaries () |
Sort the nodes on shared boundaries so that the processors that share a boundary agree with the order of the nodes on the boundary. More... | |
void | reset_shared_boundary_elements_and_nodes (const bool flush_elements=true, const bool update_elements=true, const bool flush_nodes=true, const bool update_nodes=true) |
Re-establish the shared boundary elements after the adaptation process (the updating of shared nodes is optional and performed by default) More... | |
void | reset_halo_haloed_scheme () |
In charge of. re-establish the halo(ed) scheme on all processors. Sends info. to create halo elements and nodes on the processors that need it. It uses and all to all communication strategy therefore must be called on all processors. More... | |
void | compute_global_node_names_and_shared_nodes (Vector< Vector< Vector< std::map< unsigned, Node * >>>> &other_proc_shd_bnd_node_pt, Vector< Vector< Vector< unsigned >>> &global_node_names, std::map< Vector< unsigned >, unsigned > &node_name_to_global_index, Vector< Node * > &global_shared_node_pt) |
Compute the names of the nodes on shared boundaries in this (my_rank) processor with other processors. Also compute the names of nodes on shared boundaries of other processors with other processors (useful when there is an element that requires to be sent to this (my_rank) processor because there is a shared node between this (my_rank) and other processors BUT there is not a shared boundary between this and the other processor. More... | |
void | send_boundary_node_info_of_shared_nodes (Vector< Vector< Vector< unsigned >>> &global_node_names, std::map< Vector< unsigned >, unsigned > &node_name_to_global_index, Vector< Node * > &global_shared_node_pt) |
Get the original boundaries to which is associated each shared node, and send the info. to the related processors. We need to do this so that at the reset of halo(ed) info. stage, the info. be already updated. More... | |
void | reset_halo_haloed_scheme_helper (Vector< Vector< Vector< std::map< unsigned, Node * >>>> &other_proc_shd_bnd_node_pt, Vector< Vector< Node * >> &iproc_currently_created_nodes_pt, Vector< Vector< Vector< unsigned >>> &global_node_names, std::map< Vector< unsigned >, unsigned > &node_name_to_global_index, Vector< Node * > &global_shared_node_pt) |
In charge of creating additional halo(ed) elements on those processors that have no shared boundaries in common but have shared nodes. More... | |
unsigned | try_to_add_element_pt_load_balance (Vector< FiniteElement * > &new_elements_on_domain, FiniteElement *&ele_pt) |
Check if necessary to add the element to the new domain or if it has been previously added. More... | |
void | get_required_elemental_information_load_balance_helper (unsigned &iproc, Vector< Vector< FiniteElement * >> &f_haloed_ele_pt, FiniteElement *ele_pt) |
Helper function to get the required elemental information from the element to be sent. This info. involves the association of the element to a boundary or region, and if its part of the halo(ed) elements within a processor. More... | |
unsigned | try_to_add_node_pt_load_balance (Vector< Node * > &new_nodes_on_domain, Node *&node_pt) |
Check if necessary to add the node to the new domain or if it has been already added. More... | |
void | add_node_load_balance_helper (unsigned &iproc, Vector< Vector< FiniteElement * >> &f_halo_ele_pt, Vector< Node * > &new_nodes_on_domain, Node *nod_pt) |
Helper function to add haloed node. More... | |
void | get_required_nodal_information_load_balance_helper (Vector< Vector< FiniteElement * >> &f_halo_ele_pt, unsigned &iproc, Node *nod_pt) |
Helper function to get the required nodal information from an haloed node so that a fully-functional node (and therefore element) can be created on the receiving process (this is the specific version for the load balance strategy, the difference with the original method is that it checks if the node is on a shared boundary no associated with the current processor –my_rank–, or in a haloed element from other processors. More... | |
void | create_element_load_balance_helper (unsigned &iproc, Vector< Vector< FiniteElement * >> &f_haloed_ele_pt, Vector< Vector< std::map< unsigned, FiniteElement * >>> &received_old_haloed_element_pt, Vector< FiniteElement * > &new_elements_on_domain, Vector< Node * > &new_nodes_on_domain, Vector< Vector< Vector< std::map< unsigned, Node * >>>> &other_proc_shd_bnd_node_pt, Vector< Vector< Vector< unsigned >>> &global_node_names, std::map< Vector< unsigned >, unsigned > &node_name_to_global_index, Vector< Node * > &global_shared_node_pt) |
Helper function to create elements on the loop process based on the info received in send_and_received_elements_nodes_info. More... | |
void | add_element_load_balance_helper (const unsigned &iproc, Vector< Vector< std::map< unsigned, FiniteElement * >>> &received_old_haloed_element_pt, FiniteElement *ele_pt) |
Helper function to create elements on the loop process based on the info received in send_and_received_elements_nodes_info This function is in charge of verify if the element is associated to a boundary and associate to it if that is the case. More... | |
void | add_received_node_load_balance_helper (Node *&new_nod_pt, Vector< Vector< FiniteElement * >> &f_haloed_ele_pt, Vector< Vector< std::map< unsigned, FiniteElement * >>> &received_old_haloed_element_pt, Vector< Node * > &new_nodes_on_domain, Vector< Vector< Vector< std::map< unsigned, Node * >>>> &other_proc_shd_bnd_node_pt, unsigned &iproc, unsigned &node_index, FiniteElement *const &new_el_pt, Vector< Vector< Vector< unsigned >>> &global_node_names, std::map< Vector< unsigned >, unsigned > &node_name_to_global_index, Vector< Node * > &global_shared_node_pt) |
Helper function to add a new node from load balance. More... | |
void | construct_new_node_load_balance_helper (Node *&new_nod_pt, Vector< Vector< FiniteElement * >> &f_haloed_ele_pt, Vector< Vector< std::map< unsigned, FiniteElement * >>> &received_old_haloed_element_pt, Vector< Node * > &new_nodes_on_domain, Vector< Vector< Vector< std::map< unsigned, Node * >>>> &other_proc_shd_bnd_node_pt, unsigned &iproc, unsigned &node_index, FiniteElement *const &new_el_pt, Vector< Vector< Vector< unsigned >>> &global_node_names, std::map< Vector< unsigned >, unsigned > &node_name_to_global_index, Vector< Node * > &global_shared_node_pt) |
Helper function which constructs a new node (on an element) with the information sent from the load balance process. More... | |
unsigned | try_to_add_root_haloed_element_pt (const unsigned &p, GeneralisedElement *&el_pt) |
Check if necessary to add the element as haloed or if it has been previously added to the haloed scheme. More... | |
unsigned | try_to_add_haloed_node_pt (const unsigned &p, Node *&nod_pt) |
Check if necessary to add the node as haloed or if it has been previously added to the haloed scheme. More... | |
void | get_required_elemental_information_helper (unsigned &iproc, FiniteElement *ele_pt) |
Helper function to get the required elemental information from an haloed element. This info. involves the association of the element to a boundary or region. More... | |
void | get_required_nodal_information_helper (unsigned &iproc, Node *nod_pt) |
Helper function to get the required nodal information from a haloed node so that a fully-functional halo node (and therefore element) can be created on the receiving process. More... | |
void | add_haloed_node_helper (unsigned &iproc, Node *nod_pt) |
Helper function to add haloed node. More... | |
void | send_and_receive_elements_nodes_info (int &send_proc, int &recv_proc) |
Helper function to send back halo and haloed information. More... | |
void | create_halo_element (unsigned &iproc, Vector< Node * > &new_nodes_on_domain, Vector< Vector< Vector< std::map< unsigned, Node * >>>> &other_proc_shd_bnd_node_pt, Vector< Vector< Vector< unsigned >>> &global_node_names, std::map< Vector< unsigned >, unsigned > &node_name_to_global_index, Vector< Node * > &global_shared_node_pt) |
Helper function to create (halo) elements on the loop process based on the info received in send_and_received_located_info. More... | |
void | add_halo_element_helper (unsigned &iproc, FiniteElement *ele_pt) |
Helper function to create (halo) elements on the loop process based on the info received in send_and_received_located_info This function is in charge of verify if the element is associated to a boundary. More... | |
void | add_halo_node_helper (Node *&new_nod_pt, Vector< Node * > &new_nodes_on_domain, Vector< Vector< Vector< std::map< unsigned, Node * >>>> &other_proc_shd_bnd_node_pt, unsigned &iproc, unsigned &node_index, FiniteElement *const &new_el_pt, Vector< Vector< Vector< unsigned >>> &global_node_names, std::map< Vector< unsigned >, unsigned > &node_name_to_global_index, Vector< Node * > &global_shared_node_pt) |
Helper function to add halo node. More... | |
void | construct_new_halo_node_helper (Node *&new_nod_pt, Vector< Node * > &new_nodes_on_domain, Vector< Vector< Vector< std::map< unsigned, Node * >>>> &other_proc_shd_bnd_node_pt, unsigned &iproc, unsigned &node_index, FiniteElement *const &new_el_pt, Vector< Vector< Vector< unsigned >>> &global_node_names, std::map< Vector< unsigned >, unsigned > &node_name_to_global_index, Vector< Node * > &global_shared_node_pt) |
Helper function which constructs a new halo node (on an element) with the information sent from the haloed process. More... | |
void | update_other_proc_shd_bnd_node_helper (Node *&new_nod_pt, Vector< Vector< Vector< std::map< unsigned, Node * >>>> &other_proc_shd_bnd_node_pt, Vector< unsigned > &other_processor_1, Vector< unsigned > &other_processor_2, Vector< unsigned > &other_shared_boundaries, Vector< unsigned > &other_indexes, Vector< Vector< Vector< unsigned >>> &global_node_names, std::map< Vector< unsigned >, unsigned > &node_name_to_global_index, Vector< Node * > &global_shared_node_pt) |
Helper function that assigns/updates the references to the node so that it can be found with any other reference. The return value indicates whether or not a node was found on the same reference. More... | |
bool | update_polygon_using_face_mesh (TriangleMeshPolygon *polygon_pt, const bool &check_only=false) |
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. More... | |
bool | update_open_curve_using_face_mesh (TriangleMeshOpenCurve *open_polyline_pt, const bool &check_only=false) |
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. More... | |
virtual bool | surface_remesh_for_inner_hole_boundaries (Vector< Vector< double >> &internal_point_coord, const bool &check_only=false) |
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. More... | |
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) |
Helper function Creates an unsorted face mesh representation from the specified boundary id. It means that the elements are not sorted along the boundary. More... | |
void | create_sorted_face_mesh_representation (const unsigned &boundary_id, Mesh *face_mesh_pt, std::map< FiniteElement *, bool > &is_inverted, bool &inverted_face_mesh) |
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. More... | |
void | get_face_mesh_representation (TriangleMeshPolygon *polygon_pt, Vector< Mesh * > &face_mesh_pt) |
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. More... | |
void | get_face_mesh_representation (TriangleMeshOpenCurve *open_polyline_pt, Vector< Mesh * > &face_mesh_pt) |
Helper function to construct face mesh representation of open curves. More... | |
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) |
Updates the polylines using the elements area as constraint for the number of points along the boundaries. More... | |
bool | update_open_curve_using_elements_area (TriangleMeshOpenCurve *&open_curve_pt, const Vector< double > &target_area) |
Updates the open curve but using the elements area instead of the default refinement and unrefinement methods. More... | |
bool | update_shared_curve_using_elements_area (Vector< TriangleMeshPolyLine * > &vector_polyline_pt, const Vector< double > &target_areas) |
Updates the polylines using the elements area as constraint for the number of points along the boundaries. More... | |
void | update_shared_curve_after_restart (Vector< TriangleMeshPolyLine * > &vector_polyline_pt) |
Updates the shared polylines representation after restart. More... | |
void | initialise_adaptation_data () |
Helper function to initialise data associated with adaptation. More... | |
void | refine_triangulateio (TriangulateIO &triangulate_io, const Vector< double > &target_area, TriangulateIO &triangle_refine) |
Build a new TriangulateIO object from previous TriangulateIO based on target area for each element. More... | |
double | compute_area_target (const Vector< double > &elem_error, Vector< double > &target_area) |
Compute target area based on the element's error and the error target; return minimum angle (in degrees) More... | |
Protected Member Functions inherited from oomph::TriangleMesh< ELEMENT > | |
void | build_from_scaffold (TimeStepper *time_stepper_pt, const bool &use_attributes) |
Build mesh from scaffold. More... | |
void | build_triangulateio (const std::string &poly_file_name, TriangulateIO &triangulate_io, bool &use_attributes) |
Helper function to create TriangulateIO object (return in triangulate_io) from the .poly file. More... | |
void | generic_constructor (Vector< TriangleMeshPolygon * > &outer_boundary_pt, Vector< TriangleMeshPolygon * > &internal_polygon_pt, Vector< TriangleMeshOpenCurve * > &open_polylines_pt, const double &element_area, Vector< Vector< double >> &extra_holes_coordinates, std::map< unsigned, Vector< double >> ®ions_coordinates, std::map< unsigned, double > ®ions_areas, TimeStepper *time_stepper_pt, const bool &use_attributes, const bool &refine_boundary, const bool &refine_internal_boundary) |
A general-purpose construction function that builds the mesh once the different specific constructors have assembled the appropriate information. More... | |
void | shared_boundaries_in_this_processor (Vector< unsigned > &shared_boundaries_in_this_processor) |
Get the shared boundaries ids living in the current processor. More... | |
const unsigned | nshared_boundaries (const unsigned &p, const unsigned &q) const |
Access functions to boundaries shared with processors. More... | |
Vector< Vector< Vector< unsigned > > > | shared_boundaries_ids () const |
Vector< Vector< Vector< unsigned > > > & | shared_boundaries_ids () |
Vector< Vector< unsigned > > | shared_boundaries_ids (const unsigned &p) const |
Vector< Vector< unsigned > > & | shared_boundaries_ids (const unsigned &p) |
Vector< unsigned > | shared_boundaries_ids (const unsigned &p, const unsigned &q) const |
Vector< unsigned > & | shared_boundaries_ids (const unsigned &p, const unsigned &q) |
const unsigned | shared_boundaries_ids (const unsigned &p, const unsigned &q, const unsigned &i) const |
const unsigned | nshared_boundary_curves (const unsigned &p) const |
const unsigned | nshared_boundary_polyline (const unsigned &p, const unsigned &c) const |
Vector< TriangleMeshPolyLine * > & | shared_boundary_polyline_pt (const unsigned &p, const unsigned &c) |
TriangleMeshPolyLine * | shared_boundary_polyline_pt (const unsigned &p, const unsigned &c, const unsigned &i) const |
const unsigned | nshared_boundaries () const |
const unsigned | nshared_boundary_element (const unsigned &b) |
void | flush_shared_boundary_element () |
void | flush_shared_boundary_element (const unsigned &b) |
void | add_shared_boundary_element (const unsigned &b, FiniteElement *ele_pt) |
FiniteElement * | shared_boundary_element_pt (const unsigned &b, const unsigned &e) |
void | flush_face_index_at_shared_boundary () |
void | add_face_index_at_shared_boundary (const unsigned &b, const unsigned &i) |
int | face_index_at_shared_boundary (const unsigned &b, const unsigned &e) |
const unsigned | nshared_boundary_node (const unsigned &b) |
void | flush_shared_boundary_node () |
Flush ALL the shared boundary nodes. More... | |
void | flush_shared_boundary_node (const unsigned &b) |
Flush the boundary nodes associated to the shared boundary b. More... | |
void | add_shared_boundary_node (const unsigned &b, Node *node_pt) |
Add the node the shared boundary. More... | |
Node * | shared_boundary_node_pt (const unsigned &b, const unsigned &n) |
bool | is_node_on_shared_boundary (const unsigned &b, Node *const &node_pt) |
Is the node on the shared boundary. More... | |
std::map< unsigned, Vector< unsigned > > & | shared_boundary_from_processors () |
Return the association of the shared boundaries with the processors. More... | |
Vector< unsigned > & | shared_boundary_from_processors (const unsigned &b) |
const unsigned | nshared_boundary_overlaps_internal_boundary () |
Get the number of shared boundaries overlaping internal boundaries. More... | |
const bool | shared_boundary_overlaps_internal_boundary (const unsigned &shd_bnd_id) |
Checks if the shared boundary overlaps an internal boundary. More... | |
const unsigned | shared_boundary_overlapping_internal_boundary (const unsigned &shd_bnd_id) |
Gets the boundary id of the internal boundary that the shared boundary lies on. More... | |
void | get_shared_boundaries_overlapping_internal_boundary (const unsigned &internal_bnd_id, Vector< unsigned > &shd_bnd_ids) |
Gets the shared boundaries ids that overlap the given internal boundary. More... | |
std::map< unsigned, unsigned > & | shared_boundary_overlaps_internal_boundary () |
Gets the storage that indicates if a shared boundary is part of an internal boundary. More... | |
const bool | boundary_was_splitted (const unsigned &b) |
Helper function to verify if a given boundary was splitted in the distribution process. More... | |
const unsigned | nboundary_subpolylines (const unsigned &b) |
Gets the number of subpolylines that create the boundarya (useful only when the boundary is marked as split) More... | |
Vector< TriangleMeshPolyLine * > & | boundary_subpolylines (const unsigned &b) |
Gets the vector of auxiliar polylines that will represent the given boundary (useful only when the boundaries were split) More... | |
const bool | boundary_marked_as_shared_boundary (const unsigned &b, const unsigned &isub) |
Returns the value that indicates if a subpolyline of a given boundary continues been used as internal boundary or should be changed as shared boundary. More... | |
void | flush_shared_boundary_polyline_pt () |
void | create_distributed_domain_representation (Vector< TriangleMeshPolygon * > &polygons_pt, Vector< TriangleMeshOpenCurve * > &open_curves_pt) |
Creates the distributed domain representation. Joins the original boundaires, shared boundaries and creates connections among them to create the new polygons that represent the distributed domain. More... | |
void | sort_polylines_helper (Vector< TriangleMeshPolyLine * > &unsorted_polylines_pt, Vector< Vector< TriangleMeshPolyLine * >> &sorted_polylines_pt) |
Sorts the polylines so they be continuous and then we can create a closed or open curve from them. More... | |
void | create_tmp_polygons_helper (Vector< Vector< TriangleMeshPolyLine * >> &polylines_pt, Vector< TriangleMeshPolygon * > &polygons_pt) |
Take the polylines from the shared boundaries and create temporary polygon representations of the domain. More... | |
void | create_tmp_open_curves_helper (Vector< Vector< TriangleMeshPolyLine * >> &sorted_open_curves_pt, Vector< TriangleMeshPolyLine * > &unsorted_shared_to_internal_poly_pt, Vector< TriangleMeshOpenCurve * > &open_curves_pt) |
Take the polylines from the original open curves and created new temporaly representations of open curves with the bits of original curves not overlapped by shared boundaries. More... | |
void | compute_holes_left_by_halo_elements_helper (Vector< Vector< double >> &output_holes_coordinates) |
Compute the holes left by the halo elements, those adjacent to the shared boundaries. More... | |
void | update_holes_information_helper (Vector< TriangleMeshPolygon * > &polygons_pt, Vector< Vector< double >> &output_holes_coordinates) |
Keeps those vertices that define a hole, those that are inside closed internal boundaries in the new polygons that define the domain. Delete those outside/inside the outer polygons (this is required since Triangle can not deal with vertices that define holes outside the new outer polygons of the domain) More... | |
const int | check_connections_of_polyline_nodes (std::set< FiniteElement * > &element_in_processor_pt, const int &root_edge_bnd_id, std::map< std::pair< Node *, Node * >, bool > &overlapped_face, std::map< unsigned, std::map< Node *, bool >> &node_on_bnd_not_overlapped_by_shd_bnd, std::list< Node * > ¤t_polyline_nodes, std::map< unsigned, std::list< Node * >> &shared_bnd_id_to_sorted_list_node_pt, const unsigned &node_degree, Node *&new_node_pt, const bool called_from_load_balance=false) |
Check for any possible connections that the array of sorted nodes have with any previous boundaries or with itself. Return -1 if no connection was found, return -2 if the connection is with the same polyline, return the boundary id of the boundary to which the connection is performed. More... | |
void | create_shared_polylines_connections () |
Establish the connections of the polylines previously marked as having connections. This connections were marked in the function TriangleMesh::create_polylines_from_halo_elements_helper(). More... | |
void | create_shared_boundaries (OomphCommunicator *comm_pt, const Vector< unsigned > &element_domain, const Vector< GeneralisedElement * > &backed_up_el_pt, const Vector< FiniteElement * > &backed_up_f_el_pt, std::map< Data *, std::set< unsigned >> &processors_associated_with_data, const bool &overrule_keep_as_halo_element_status) |
Creates the shared boundaries. More... | |
void | get_halo_elements_on_all_procs (const unsigned &nproc, const Vector< unsigned > &element_domain, const Vector< GeneralisedElement * > &backed_up_el_pt, std::map< Data *, std::set< unsigned >> &processors_associated_with_data, const bool &overrule_keep_as_halo_element_status, std::map< GeneralisedElement *, unsigned > &element_to_global_index, Vector< Vector< Vector< GeneralisedElement * >>> &output_halo_elements_pt) |
Creates the halo elements on all processors Gets the halo elements on all processors, these elements are then used on the function that computes the shared boundaries among the processors. More... | |
void | get_element_edges_on_boundary (std::map< std::pair< Node *, Node * >, unsigned > &element_edges_on_boundary) |
Get the element edges (pair of nodes, edges) that lie on a boundary (used to mark shared boundaries that lie on internal boundaries) More... | |
void | create_polylines_from_halo_elements_helper (const Vector< unsigned > &element_domain, std::map< GeneralisedElement *, unsigned > &element_to_global_index, std::set< FiniteElement * > &element_in_processor_pt, Vector< Vector< Vector< GeneralisedElement * >>> &input_halo_elements, std::map< std::pair< Node *, Node * >, unsigned > &elements_edges_on_boundary, Vector< Vector< Vector< TriangleMeshPolyLine * >>> &output_polylines_pt) |
Creates polylines from the intersection of halo elements on all processors. The new polylines define the shared boundaries in the domain This get the polylines on ALL processors, that is why the three dimensions output_polylines_pt[iproc][ncurve][npolyline]. More... | |
void | break_loops_on_shared_polyline_helper (const unsigned &initial_shd_bnd_id, std::list< Node * > &input_nodes, Vector< FiniteElement * > &input_boundary_element_pt, Vector< int > &input_face_index_element, const int &input_connect_to_the_left, const int &input_connect_to_the_right, Vector< std::list< Node * >> &output_sorted_nodes_pt, Vector< Vector< FiniteElement * >> &output_boundary_element_pt, Vector< Vector< int >> &output_face_index_element, Vector< int > &output_connect_to_the_left, Vector< int > &output_connect_to_the_right) |
Break any possible loop created by the sorted list of nodes that is used to create a new shared polyline. More... | |
void | break_loops_on_shared_polyline_load_balance_helper (const unsigned &initial_shd_bnd_id, std::list< Node * > &input_nodes, Vector< FiniteElement * > &input_boundary_element_pt, Vector< FiniteElement * > &input_boundary_face_element_pt, Vector< int > &input_face_index_element, const int &input_connect_to_the_left, const int &input_connect_to_the_right, Vector< std::list< Node * >> &output_sorted_nodes_pt, Vector< Vector< FiniteElement * >> &output_boundary_element_pt, Vector< Vector< FiniteElement * >> &output_boundary_face_element_pt, Vector< Vector< int >> &output_face_index_element, Vector< int > &output_connect_to_the_left, Vector< int > &output_connect_to_the_right) |
Break any possible loop created by the sorted list of nodes that is used to create a new shared polyline (modified version for load balance) More... | |
void | create_shared_polyline (const unsigned &my_rank, const unsigned &shd_bnd_id, const unsigned &iproc, const unsigned &jproc, std::list< Node * > &sorted_nodes, const int &root_edge_bnd_id, Vector< FiniteElement * > &bulk_bnd_ele_pt, Vector< int > &face_index_ele, Vector< Vector< TriangleMeshPolyLine * >> &unsorted_polylines_pt, const int &connect_to_the_left_flag, const int &connect_to_the_right_flag) |
Create the shared polyline and fill the data structured that keep all the information associated with the creationg of the shared boundary. More... | |
Protected Member Functions inherited from oomph::UnstructuredTwoDMeshGeometryBase | |
void | build_triangulateio (Vector< TriangleMeshPolygon * > &outer_polygons_pt, Vector< TriangleMeshPolygon * > &internal_polygons_pt, Vector< TriangleMeshOpenCurve * > &open_curves_pt, Vector< Vector< double >> &extra_holes_coordinates, std::map< unsigned, Vector< double >> ®ions_coordinates, std::map< unsigned, double > ®ions_areas, TriangulateIO &triangulate_io) |
Create TriangulateIO object from outer boundaries, internal boundaries, and open curves. Add the holes and regions information as well. More... | |
void | add_connection_matrix_info_helper (TriangleMeshPolyLine *polyline_pt, std::map< unsigned, std::map< unsigned, Vector< vertex_connection_info >>> &connection_matrix, TriangleMeshPolyLine *next_polyline_pt=0) |
Helps to add information to the connection matrix of the given polyline. More... | |
void | initialise_base_vertex (TriangleMeshPolyLine *polyline_pt, std::map< unsigned, std::map< unsigned, Vector< base_vertex_info >>> &base_vertices) |
Initialise the base vertex structure, set every vertex to no visited and not being a base vertex. More... | |
void | add_base_vertex_info_helper (TriangleMeshPolyLine *polyline_pt, std::map< unsigned, std::map< unsigned, Vector< base_vertex_info >>> &base_vertices, std::map< unsigned, std::map< unsigned, Vector< vertex_connection_info >>> &connection_matrix, std::map< unsigned, std::map< unsigned, unsigned >> &boundary_chunk_nvertices) |
Helps to identify the base vertex of the given polyline. More... | |
void | snap_nodes_onto_geometric_objects () |
Snap the boundary nodes onto any curvilinear boundaries defined by geometric objects. More... | |
void | copy_connection_information (TriangleMeshCurveSection *input_curve_pt, TriangleMeshCurveSection *output_curve_pt) |
Helper function to copy the connection information from the input curve(polyline or curviline) to the output polyline. More... | |
void | copy_connection_information_to_sub_polylines (TriangleMeshCurveSection *input_curve_pt, TriangleMeshCurveSection *output_curve_pt) |
Helper function to copy the connection information from the input curve(polyline or curviline) to the output sub-polyline. More... | |
void | create_vertex_coordinates_for_polyline_no_connections (TriangleMeshCurviLine *boundary_pt, Vector< Vector< double >> &vertex_coord, Vector< std::pair< double, double >> &polygonal_vertex_arclength_info) |
Helper function to create polyline vertex coordinates for curvilinear boundary specified by boundary_pt, using either equal increments in zeta or in (approximate) arclength along the curviline. vertex_coord[i_vertex][i_dim] stores i_dim-th coordinate of i_vertex-th vertex. polygonal_vertex_arclength_info[i_vertex] contains the pair of doubles made of the arclength of the i_vertex-th vertex along the polygonal representation (.first), and the corresponding coordinate on the GeomObject (.second) More... | |
void | create_vertex_coordinates_for_polyline_connections (TriangleMeshCurviLine *boundary_pt, Vector< Vector< double >> &vertex_coord, Vector< std::pair< double, double >> &polygonal_vertex_arclength_info) |
Helper function to create polyline vertex coordinates for curvilinear boundary specified by boundary_pt, using either equal increments in zeta or in (approximate) arclength along the curviline. vertex_coord[i_vertex][i_dim] stores i_dim-th coordinate of i_vertex-th vertex. polygonal_vertex_arclength_info[i_vertex] contains the pair of doubles made of the arclength of the i_vertex-th vertex along the polygonal representation (.first), and the corresponding coordinate on the GeomObject (.second) More... | |
TriangleMeshPolygon * | closed_curve_to_polygon_helper (TriangleMeshClosedCurve *closed_curve_pt, unsigned &max_bnd_id_local) |
Helper function that returns a polygon representation for the given closed curve, it also computes the maximum boundary id of the constituent curves. If the TriangleMeshClosedCurve is already a TriangleMeshPolygon we simply return a pointer to it. Otherwise a new TrilangleMeshPolygon is created – this is deleted automatically when the TriangleMesh destructor is called, so no external book-keeping is required. More... | |
TriangleMeshOpenCurve * | create_open_curve_with_polyline_helper (TriangleMeshOpenCurve *open_curve_pt, unsigned &max_bnd_id_local) |
Helper function that creates and returns an open curve with the polyline representation of its constituent curve sections. The new created open curve is deleted when the TriangleMesh destructor is called. More... | |
void | set_geom_objects_and_coordinate_limits_for_close_curve (TriangleMeshClosedCurve *input_closed_curve_pt) |
Stores the geometric objects associated to the curve sections that compound the closed curve. It also stores the limits defined by these geometric objects. More... | |
void | set_geom_objects_and_coordinate_limits_for_open_curve (TriangleMeshOpenCurve *input_open_curve_pt) |
Stores the geometric objects associated to the curve sections that compound the open curve. It also stores the limits defined by these geometric objects. More... | |
Protected Member Functions inherited from oomph::Mesh | |
void | setup_shared_node_scheme () |
Setup shared node scheme. More... | |
unsigned long | assign_global_eqn_numbers (Vector< double * > &Dof_pt) |
Assign the global equation numbers in the Data stored at the nodes and also internal element Data. Also, build (via push_back) the Vector of pointers to the dofs (variables). More... | |
void | describe_dofs (std::ostream &out, const std::string ¤t_string) const |
Function to describe the dofs of the Mesh. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...) More... | |
void | describe_local_dofs (std::ostream &out, const std::string ¤t_string) const |
Function to describe the local dofs of the elements. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...) More... | |
void | assign_local_eqn_numbers (const bool &store_local_dof_pt) |
Assign the local equation numbers in all elements If the boolean argument is true then also store pointers to dofs. More... | |
void | convert_to_boundary_node (Node *&node_pt, const Vector< FiniteElement * > &finite_element_pt) |
A function that upgrades an ordinary node to a boundary node We shouldn't ever really use this, but it does make life that bit easier for the lazy mesh writer. The pointer to the node is replaced by a pointer to the new boundary node in all element look-up schemes and in the mesh's Node_pt vector. The new node is also addressed by node_pt on return from the function. More... | |
void | convert_to_boundary_node (Node *&node_pt) |
A function that upgrades an ordinary node to a boundary node. All pointers to the node from the mesh's elements are found. and replaced by pointers to the new boundary node. If the node is present in the mesh's list of nodes, that pointer is also replaced. Finally, the pointer argument node_pt addresses the new node on return from the function. We shouldn't ever really use this, but it does make life that bit easier for the lazy mesh writer. More... | |
Protected Attributes | |
std::map< unsigned, std::set< Vector< double > > > | Boundary_connections_pt |
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. More... | |
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... | |
std::map< unsigned, Vector< Node * > > | Sorted_shared_boundary_node_pt |
Stores the nodes in the boundaries in the same order in all the processors Sorted_shared_boundary_node_pt[bnd_id][i-th node] = Node* It is a map since the boundary id may not start at zero. More... | |
Vector< double > | Flat_packed_doubles |
Vector of flat-packed doubles to be communicated with other processors. More... | |
unsigned | Counter_for_flat_packed_doubles |
Counter used when processing vector of flat-packed doubles. More... | |
Vector< unsigned > | Flat_packed_unsigneds |
Vector of flat-packed unsigneds to be communicated with other processors. More... | |
unsigned | Counter_for_flat_packed_unsigneds |
Counter used when processing vector of flat-packed unsigneds. More... | |
Vector< std::string > | Flat_packed_unsigneds_string |
Temporary vector of strings to enable full annotation of RefineableTriangleMesh comms. More... | |
unsigned | Nbin_x_for_area_transfer |
Number of bins in the x-direction when transferring target areas by bin method. Only used if we don't have CGAL! More... | |
unsigned | Nbin_y_for_area_transfer |
Number of bins in the y-direction when transferring target areas by bin method. Only used if we don't have CGAL! More... | |
unsigned | Max_sample_points_for_limited_locate_zeta_during_target_area_transfer |
Default value for max. number of sample points used for locate_zeta when transferring target areas using cgal-based sample point container. More... | |
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 |
Flag to indicate whether to use or not an iterative solver (CG with diagonal preconditioned) for the projection problem. More... | |
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 |
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) More... | |
InternalHolePointUpdateFctPt | Internal_hole_point_update_fct_pt |
Function pointer to function that can be set to update the position of the central point in internal holes. More... | |
Protected Attributes inherited from oomph::TriangleMesh< ELEMENT > | |
std::map< unsigned, double > | Regions_areas |
Target areas for regions; defaults to 0.0 which (luckily) implies "no specific target area" for triangle! More... | |
bool | Triangulateio_exists |
Boolean defining if Triangulateio object has been built or not. More... | |
TriangleScaffoldMesh * | Tmp_mesh_pt |
Temporary scaffold mesh. More... | |
Vector< unsigned > | Oomph_vertex_nodes_id |
Vector storing oomph-lib node number for all vertex nodes in the TriangulateIO representation of the mesh. More... | |
unsigned | Initial_shared_boundary_id |
The initial boundary id for shared boundaries. More... | |
unsigned | Final_shared_boundary_id |
The final boundary id for shared boundaries. More... | |
Vector< Vector< Vector< unsigned > > > | Shared_boundaries_ids |
Stores the boundaries ids created by the interaction of two processors Shared_boundaries_ids[iproc][jproc] = Vector of shared boundaries ids "iproc" processor shares boundaries with "jproc" processor. More... | |
std::map< unsigned, Vector< unsigned > > | Shared_boundary_from_processors |
Stores the processors involved in the generation of a shared boundary, in 2D two processors give rise to the creation of a shared boundary. More... | |
std::map< unsigned, unsigned > | Shared_boundary_overlaps_internal_boundary |
Stores information about those shared boundaries that lie over or over a segment of an internal boundary (only used when using internal boundaries in the domain) More... | |
Vector< Vector< Vector< TriangleMeshPolyLine * > > > | Shared_boundary_polyline_pt |
Stores the polyline representation of the shared boundaries Shared_boundary_polyline_pt[iproc][ncurve][npolyline] = polyline_pt. More... | |
std::map< unsigned, Vector< FiniteElement * > > | Shared_boundary_element_pt |
Stores the boundary elements adjacent to the shared boundaries, these elements are a subset of the halo and haloed elements. More... | |
std::map< unsigned, Vector< int > > | Face_index_at_shared_boundary |
For the e-th finite element on shared boundary b, this is the index of the face that lies along that boundary. More... | |
std::map< unsigned, Vector< Node * > > | Shared_boundary_node_pt |
Stores the boundary nodes adjacent to the shared boundaries, these nodes are a subset of the halo and haloed nodes. More... | |
std::map< unsigned, bool > | Boundary_was_splitted |
Flag to indicate if a polyline has been splitted during the distribution process, the boundary id of the polyline is used to indicate if spplited. More... | |
std::map< unsigned, Vector< TriangleMeshPolyLine * > > | Boundary_subpolylines |
The polylines that will temporary represent the boundary that was splitted in the distribution process. Used to ease the sending of info. to Triangle during the adaptation process. More... | |
std::map< unsigned, std::vector< bool > > | Boundary_marked_as_shared_boundary |
Flag to indicate if an internal boundary will be used as shared boundary because there is overlapping of the internal boundary with the shared boundary. More... | |
bool | First_time_compute_holes_left_by_halo_elements |
Flag to know if it is the first time we are going to compute the holes left by the halo elements. More... | |
Vector< Vector< double > > | Original_extra_holes_coordinates |
Backup the original extra holes coordinates. More... | |
Protected Attributes inherited from oomph::TriangleMeshBase | |
TriangulateIO | Triangulateio |
TriangulateIO representation of the mesh. More... | |
bool | Use_triangulateio_restart |
Should we use triangulateio specific parts for dump/restart? (Doesn't work with some elements and isn't needed if not using adaptivity). More... | |
Protected Attributes inherited from oomph::UnstructuredTwoDMeshGeometryBase | |
std::map< unsigned, Vector< Vector< Node * > > > | Boundary_segment_node_pt |
Used to store the nodes associated to a boundary and to an specific segment (this only applies in distributed meshes where the boundary is splitted in segments) More... | |
std::map< unsigned, Vector< double > > | Boundary_segment_initial_zeta |
Stores the initial zeta coordinate for the segments that appear when a boundary is splited among processors. More... | |
std::map< unsigned, Vector< double > > | Boundary_segment_final_zeta |
Stores the final zeta coordinate for the segments that appear when a boundary is splited among processors. More... | |
std::map< unsigned, Vector< double > > | Boundary_initial_coordinate |
Stores the initial coordinates for the boundary. More... | |
std::map< unsigned, Vector< double > > | Boundary_final_coordinate |
Stores the final coordinates for the boundary. More... | |
std::map< unsigned, Vector< unsigned > > | Boundary_segment_inverted |
Stores the info. to know if it is necessary to reverse the segment based on a previous mesh. More... | |
std::map< unsigned, Vector< double > > | Boundary_initial_zeta_coordinate |
Stores the initial zeta coordinate for the boundary. More... | |
std::map< unsigned, Vector< double > > | Boundary_final_zeta_coordinate |
Stores the final zeta coordinate for the boundary. More... | |
std::map< unsigned, Vector< double > > | Boundary_segment_initial_arclength |
Stores the initial arclength for the segments that appear when a boundary is splited among processors. More... | |
std::map< unsigned, Vector< double > > | Boundary_segment_final_arclength |
Stores the final arclength for the segments that appear when a boundary is splited among processors. More... | |
std::map< unsigned, Vector< Vector< double > > > | Boundary_segment_initial_coordinate |
Stores the initial coordinates for the segments that appear when a boundary is splited among processors. More... | |
std::map< unsigned, Vector< Vector< double > > > | Boundary_segment_final_coordinate |
Stores the final coordinates for the segments that appear when a boundary is splited among processors. More... | |
bool | Allow_automatic_creation_of_vertices_on_boundaries |
Flag to indicate whether the automatic creation of vertices along the boundaries by Triangle is allowed. More... | |
std::map< unsigned, Vector< FiniteElement * > > | Region_element_pt |
Vector of elements in each region differentiated by attribute (the key of the map is the attribute) More... | |
Vector< double > | Region_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 |
Storage for the limits of the boundary coordinates defined by the use of geometric objects. Only used for curvilinear boundaries. More... | |
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 |
Storage for extra coordinates for regions. The key on the map is the region id. More... | |
std::map< unsigned, TriangleMeshCurveSection * > | Boundary_curve_section_pt |
A map that stores the associated curve section of the specified boundary id. More... | |
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 |
Storage for pairs of doubles representing: .first: the arclength along the polygonal representation of the curviline .second: the corresponding intrinsic coordinate on the associated geometric object at which the vertices on the specified boundary are located. Only used for boundaries represented by geom objects. More... | |
std::map< unsigned, std::set< Node * > > | Nodes_on_boundary_pt |
Stores a pointer to a set with all the nodes related with a boundary. More... | |
std::set< TriangleMeshCurveSection * > | Free_curve_section_pt |
A set that contains the curve sections created by this object therefore it is necessary to free their associated memory. More... | |
std::set< TriangleMeshPolygon * > | Free_polygon_pt |
A set that contains the polygons created by this object therefore it is necessary to free their associated memory. More... | |
std::set< TriangleMeshOpenCurve * > | Free_open_curve_pt |
A set that contains the open curves created by this object therefore it is necessary to free their associated memory. More... | |
bool | Immersed_rigid_body_triangle_mesh_polygon_used |
Protected Attributes inherited from oomph::Mesh | |
Vector< Vector< Node * > > | Boundary_node_pt |
Vector of Vector of pointers to nodes on the boundaries: Boundary_node_pt(b,n). Note that this is private to force the use of the add_boundary_node() function, which ensures that the reverse look-up schemes for the nodes are set up. More... | |
bool | Lookup_for_elements_next_boundary_is_setup |
Flag to indicate that the lookup schemes for elements that are adjacent to the boundaries has been set up. More... | |
Vector< Vector< FiniteElement * > > | Boundary_element_pt |
Vector of Vector of pointers to elements on the boundaries: Boundary_element_pt(b,e) More... | |
Vector< Vector< int > > | Face_index_at_boundary |
For the e-th finite element on boundary b, this is the index of the face that lies along that boundary. More... | |
std::map< unsigned, Vector< GeneralisedElement * > > | Root_halo_element_pt |
Map of vectors holding the pointers to the root halo elements. More... | |
std::map< unsigned, Vector< GeneralisedElement * > > | Root_haloed_element_pt |
Map of vectors holding the pointers to the root haloed elements. More... | |
std::map< unsigned, Vector< Node * > > | Halo_node_pt |
Map of vectors holding the pointers to the halo nodes. More... | |
std::map< unsigned, Vector< Node * > > | Haloed_node_pt |
Map of vectors holding the pointers to the haloed nodes. More... | |
std::map< unsigned, Vector< Node * > > | Shared_node_pt |
Map of vectors holding the pointers to the shared nodes. These are all the nodes that are on two "neighbouring" processes (the halo(ed) lookup scheme depends upon which processor is in charge. More... | |
OomphCommunicator * | Comm_pt |
Pointer to communicator – set to NULL if mesh is not distributed. More... | |
std::map< unsigned, Vector< GeneralisedElement * > > | External_halo_element_pt |
External halo(ed) elements are created as and when they are needed to act as source elements for the particular process's mesh. The storage is wiped and rebuilt every time the mesh is refined. More... | |
std::map< unsigned, Vector< GeneralisedElement * > > | External_haloed_element_pt |
Map of vectors holding the pointers to the external haloed elements. More... | |
std::map< unsigned, Vector< Node * > > | External_halo_node_pt |
Map of vectors holding the pointers to the external halo nodes. More... | |
std::map< unsigned, Vector< Node * > > | External_haloed_node_pt |
Map of vectors holding the pointers to the external haloed nodes. More... | |
bool | Keep_all_elements_as_halos |
bool to indicate whether to keep all elements in a mesh as halos or not More... | |
bool | Resize_halo_nodes_not_required |
Set this to true to suppress resizing of halo nodes (at your own risk!) More... | |
Vector< Node * > | Node_pt |
Vector of pointers to nodes. More... | |
Vector< GeneralisedElement * > | Element_pt |
Vector of pointers to generalised elements. More... | |
std::vector< bool > | Boundary_coordinate_exists |
Vector of boolean data that indicates whether the boundary coordinates have been set for the boundary. More... | |
Protected Attributes inherited from oomph::RefineableMeshBase | |
ErrorEstimator * | Spatial_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... | |
DocInfo * | Doc_info_pt |
Pointer to DocInfo. More... | |
unsigned | Max_keep_unrefined |
Max. number of elements that can remain unrefined if no other mesh adaptation is required (to avoid mesh-adaptations that would only unrefine a few elements and then force a new solve – this can't be worth our while!) More... | |
unsigned | Nrefinement_overruled |
Number of elements that would like to be refined further but can't because they've reached the max. refinement level. More... | |
Additional Inherited Members | |
Public Attributes inherited from oomph::TriangleMesh< ELEMENT > | |
TimeStepper * | Time_stepper_pt |
Timestepper used to build elements. More... | |
bool | Use_attributes |
Boolean flag to indicate whether to use attributes or not (required for multidomain meshes) More... | |
Public Attributes inherited from oomph::UnstructuredTwoDMeshGeometryBase | |
std::map< unsigned, bool > | Assigned_segments_initial_zeta_values |
Flag used at the setup_boundary_coordinate function to know if initial zeta values for segments have been assigned. More... | |
Public Attributes inherited from oomph::Mesh | |
bool | Output_halo_elements |
Bool for output of halo elements. More... | |
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 |
Default Steady Timestepper, to be used in default arguments to Mesh constructors. More... | |
static bool | Suppress_warning_about_empty_mesh_level_time_stepper_function |
Boolean used to control warning about empty mesh level timestepper function. More... | |
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
Unstructured refineable Triangle Mesh
Definition at line 2247 of file triangle_mesh.template.h.
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()
Definition at line 2263 of file triangle_mesh.template.h.
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)
Definition at line 2255 of file triangle_mesh.template.h.
|
inline |
Build mesh, based on the specifications on TriangleMeshParameters.
Definition at line 2270 of file triangle_mesh.template.h.
|
inline |
Build mesh, based on the polyfiles.
Definition at line 2285 of file triangle_mesh.template.h.
|
inlineprotected |
Build mesh from specified triangulation and associated target areas for elements in it NOTE: This is used ONLY during adaptation and should not be used as a method of constructing a TriangleMesh object in demo drivers!
Definition at line 2316 of file triangle_mesh.template.h.
References oomph::TriangleHelper::clear_triangulateio(), oomph::TriangleHelper::initialise_triangulateio(), and oomph::triangulate().
|
inlinevirtual |
Empty Destructor.
Definition at line 2411 of file triangle_mesh.template.h.
|
virtual |
Adapt mesh, based on elemental error provided.
Adapt problem based on specified elemental error estimates This function implement serial and parallel mesh adaptation, the sections for parallel mesh adaptation are clearly identified by checking whether the mesh is distributed or not.
Implements oomph::RefineableMeshBase.
Definition at line 29595 of file triangle_mesh.template.cc.
References oomph::Problem::add_time_stepper_pt(), oomph::UnstructuredTwoDMeshGeometryBase::boundary_coordinate_limits(), oomph::UnstructuredTwoDMeshGeometryBase::boundary_element_in_region_pt(), oomph::Mesh::boundary_element_pt(), oomph::UnstructuredTwoDMeshGeometryBase::boundary_geom_object_pt(), oomph::Mesh::boundary_node_pt(), oomph::TriangleHelper::clear_triangulateio(), oomph::TriangleHelper::deep_copy_of_triangulateio_representation(), oomph::BinArrayParameters::dimensions_of_bin_array(), oomph::TriangleMeshParameters::disable_automatic_creation_of_vertices_on_boundaries(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::disable_use_iterative_solver_for_projection(), oomph::Multi_domain_functions::Doc_full_stats, oomph::Multi_domain_functions::Doc_stats, oomph::Multi_domain_functions::Doc_timings, e, oomph::TriangleMeshParameters::element_area(), oomph::Mesh::element_pt(), oomph::Problem::enable_problem_distributed(), oomph::TriangleMeshParameters::enable_use_attributes(), oomph::SamplePointContainerParameters::enable_use_eulerian_coordinates_during_setup(), oomph::TriangleMeshParameters::extra_holes_coordinates(), oomph::Mesh::face_index_at_boundary(), oomph::UnstructuredTwoDMeshGeometryBase::face_index_at_boundary_in_region(), NonRefineableBinArray::fill_bin_by_diffusion(), oomph::RefineableTriangleMesh< ELEMENT >::fill_boundary_elements_and_nodes_for_internal_boundaries(), oomph::Mesh::finite_element_pt(), oomph::Mesh::flush_element_and_node_storage(), NonRefineableBinArray::get_all_bins_content(), NonRefineableBinArray::get_bin(), NonRefineableBinArray::get_fill_stats(), i, oomph::TriangleMesh< ELEMENT >::identify_boundary_segments_and_assign_initial_zeta_values(), oomph::TriangleMeshParameters::internal_closed_curve_pt(), oomph::TriangleMeshParameters::internal_open_curves_pt(), oomph::GeneralisedElement::is_halo(), oomph::RefineableTriangleMesh< ELEMENT >::max_element_size(), oomph::Problem::mesh_pt(), oomph::RefineableTriangleMesh< ELEMENT >::min_element_size(), oomph::RefineableTriangleMesh< ELEMENT >::min_permitted_angle(), oomph::Mesh::nboundary(), oomph::Mesh::nboundary_element(), oomph::UnstructuredTwoDMeshGeometryBase::nboundary_element_in_region(), oomph::Mesh::nboundary_node(), oomph::UnstructuredTwoDMeshGeometryBase::nboundary_segment(), oomph::Mesh::nelement(), oomph::Mesh::nnode(), oomph::FiniteElement::node_pt(), oomph::Mesh::node_pt(), oomph::UnstructuredTwoDMeshGeometryBase::nregion(), oomph::UnstructuredTwoDMeshGeometryBase::nregion_element(), oomph::oomph_info, oomph::TriangleMesh< ELEMENT >::oomph_vertex_nodes_id(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), oomph::UnstructuredTwoDMeshGeometryBase::region_attribute(), oomph::UnstructuredTwoDMeshGeometryBase::region_element_pt(), oomph::TriangleMeshParameters::regions_coordinates(), oomph::Node::remove_from_boundary(), s, oomph::MeshAsGeomObject::sample_point_container_pt(), oomph::TriangleMeshParameters::set_communicator_pt(), oomph::TriangleMesh< ELEMENT >::set_mesh_level_time_stepper(), oomph::Mesh::set_nodal_and_elemental_time_stepper(), oomph::TriangleMesh< ELEMENT >::shared_boundaries_ids(), oomph::TriangleMesh< ELEMENT >::shared_boundary_overlaps_internal_boundary(), oomph::FiniteElement::size(), oomph::TimingHelpers::timer(), oomph::TriangleMeshBase::triangulateio_representation(), and oomph::Node::x().
|
protected |
Helper function to create elements on the loop process based on the info received in send_and_received_elements_nodes_info This function is in charge of verify if the element is associated to a boundary and associate to it if that is the case.
Definition at line 27584 of file triangle_mesh.template.cc.
References oomph::Multi_domain_functions::Counter_for_flat_packed_unsigneds, oomph::Multi_domain_functions::Flat_packed_unsigneds, and oomph::oomph_info.
|
protected |
Helper function to create (halo) elements on the loop process based on the info received in send_and_received_located_info This function is in charge of verify if the element is associated to a boundary.
Definition at line 19199 of file triangle_mesh.template.cc.
References oomph::Multi_domain_functions::Counter_for_flat_packed_unsigneds, oomph::Multi_domain_functions::Flat_packed_unsigneds, and oomph::oomph_info.
|
protected |
Helper function to add halo node.
Definition at line 19360 of file triangle_mesh.template.cc.
References oomph::Multi_domain_functions::Counter_for_flat_packed_unsigneds, oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::FiniteElement::node_pt(), and oomph::oomph_info.
|
protected |
Helper function to add haloed node.
Helper to add external haloed node that is not a master.
Definition at line 18903 of file triangle_mesh.template.cc.
References oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::Missing_masters_functions::Flat_packed_unsigneds_string, and oomph::Missing_masters_functions::get_required_nodal_information_helper().
|
protected |
Helper function to add haloed node.
Helper function to add nodes on a new domain as a result of load balance.
Definition at line 26752 of file triangle_mesh.template.cc.
References oomph::Multi_domain_functions::Flat_packed_unsigneds, and oomph::Missing_masters_functions::Flat_packed_unsigneds_string.
|
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.
Definition at line 32587 of file triangle_mesh.template.cc.
References oomph::Node::x().
|
protected |
Helper function to add a new node from load balance.
Definition at line 27841 of file triangle_mesh.template.cc.
References oomph::Multi_domain_functions::Counter_for_flat_packed_unsigneds, oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::FiniteElement::node_pt(), and oomph::oomph_info.
|
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.
Mark the vertices that are not allowed for deletion by the unrefienment/refinement polyline methods. In charge of filling the Boundary_connections_pt structure.
Definition at line 31877 of file triangle_mesh.template.cc.
References oomph::TriangleMeshPolyLine::boundary_id(), oomph::TriangleMeshCurveSection::final_vertex_connected_bnd_id(), oomph::TriangleMeshCurveSection::final_vertex_connected_n_chunk(), i, oomph::TriangleMeshCurveSection::initial_vertex_connected_bnd_id(), oomph::TriangleMeshCurveSection::initial_vertex_connected_n_chunk(), oomph::TriangleMeshCurveSection::is_final_vertex_connected(), oomph::TriangleMeshCurveSection::is_initial_vertex_connected(), oomph::TriangleMeshCurve::ncurve_section(), oomph::TriangleMeshPolygon::npolyline(), oomph::TriangleMeshPolygon::polyline_pt(), and oomph::TriangleMeshOpenCurve::polyline_pt().
|
protected |
Get the size of the vector that now includes all added nodes
Definition at line 35553 of file triangle_mesh.template.cc.
References i, oomph::MeshAsGeomObject::position(), and s.
|
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.
Definition at line 2932 of file triangle_mesh.template.h.
|
inlineprotected |
Compute target area based on the element's error and the error target; return minimum angle (in degrees)
Definition at line 3699 of file triangle_mesh.template.h.
References e, oomph::FiniteElement::node_pt(), oomph::oomph_info, oomph::MathematicalConstants::Pi, oomph::FiniteElement::size(), and oomph::Node::x().
|
protected |
Compute the names of the nodes on shared boundaries in this (my_rank) processor with other processors. Also compute the names of nodes on shared boundaries of other processors with other processors (useful when there is an element that requires to be sent to this (my_rank) processor because there is a shared node between this (my_rank) and other processors BUT there is not a shared boundary between this and the other processor.
Definition at line 16060 of file triangle_mesh.template.cc.
References e, i, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), and oomph::Node::x().
void oomph::RefineableTriangleMesh< ELEMENT >::compute_shared_node_degree_helper | ( | Vector< Vector< FiniteElement * >> & | unsorted_face_ele_pt, |
std::map< Node *, unsigned > & | global_node_degree | ||
) |
Computes the degree of the nodes on the shared boundaries, the degree of the node is computed from the global graph created by the shared boundaries of all processors.
Definition at line 24845 of file triangle_mesh.template.cc.
References i, and oomph::Node::x().
|
protected |
Helper function which constructs a new halo node (on an element) with the information sent from the haloed process.
The first entry of All_alg_nodal_info contains the default node update id e.g. for the quarter circle there are "Upper_left_box", "Lower right box" etc...
again we need the size of this vector as it varies between meshes; we also need some indication as to which geometric object should be used...
For the received update_id, ref_value, geom_object call add_node_update_info
Now call update_node_update
Definition at line 19416 of file triangle_mesh.template.cc.
References oomph::AlgebraicNode::add_node_update_info(), oomph::FiniteElement::construct_boundary_node(), oomph::FiniteElement::construct_node(), oomph::Multi_domain_functions::Counter_for_flat_packed_doubles, oomph::Multi_domain_functions::Counter_for_flat_packed_unsigneds, oomph::Multi_domain_functions::Flat_packed_doubles, oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::AlgebraicMesh::geom_object_list_pt(), oomph::MacroElementNodeUpdateMesh::geom_object_vector_pt(), i, oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt(), oomph::FiniteElement::local_coordinate_of_node(), oomph::Node::ndim(), oomph::FiniteElement::node_pt(), oomph::TimeStepper::ntstorage(), oomph::Data::nvalue(), oomph::oomph_info, oomph::SolidNode::read_values_from_vector(), oomph::Node::resize(), oomph::Node::set_coordinates_on_boundary(), oomph::MacroElementNodeUpdateNode::set_node_update_info(), oomph::Data::set_value(), t, oomph::AlgebraicMesh::update_node_update(), oomph::SolidNode::variable_position_pt(), and oomph::Node::x().
|
protected |
Helper function which constructs a new node (on an element) with the information sent from the load balance process.
The first entry of All_alg_nodal_info contains the default node update id e.g. for the quarter circle there are "Upper_left_box", "Lower right box" etc...
again we need the size of this vector as it varies between meshes; we also need some indication as to which geometric object should be used...
For the received update_id, ref_value, geom_object call add_node_update_info
Now call update_node_update
Definition at line 27905 of file triangle_mesh.template.cc.
References oomph::AlgebraicNode::add_node_update_info(), oomph::FiniteElement::construct_boundary_node(), oomph::FiniteElement::construct_node(), oomph::Multi_domain_functions::Counter_for_flat_packed_doubles, oomph::Multi_domain_functions::Counter_for_flat_packed_unsigneds, oomph::Multi_domain_functions::Flat_packed_doubles, oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::AlgebraicMesh::geom_object_list_pt(), oomph::MacroElementNodeUpdateMesh::geom_object_vector_pt(), i, oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt(), oomph::FiniteElement::local_coordinate_of_node(), oomph::Node::ndim(), oomph::FiniteElement::node_pt(), oomph::TimeStepper::ntstorage(), oomph::Data::nvalue(), oomph::oomph_info, oomph::SolidNode::read_values_from_vector(), oomph::Node::resize(), oomph::Node::set_coordinates_on_boundary(), oomph::MacroElementNodeUpdateNode::set_node_update_info(), oomph::Data::set_value(), t, oomph::AlgebraicMesh::update_node_update(), oomph::SolidNode::variable_position_pt(), and oomph::Node::x().
void oomph::RefineableTriangleMesh< ELEMENT >::create_adjacency_matrix_new_shared_edges_helper | ( | Vector< Vector< FiniteElement * >> & | unsorted_face_ele_pt, |
Vector< Vector< Node * >> & | tmp_sorted_shared_node_pt, | ||
std::map< Node *, Vector< Vector< unsigned >>> & | node_alias, | ||
Vector< Vector< Vector< unsigned >>> & | adjacency_matrix | ||
) |
Sort the nodes on the new shared boundaries (after load balancing), computes the alias of the nodes and creates the adjacency matrix that represent the graph created by the shared edges between each pair of processors.
Definition at line 25844 of file triangle_mesh.template.cc.
References e, i, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), and oomph::Node::x().
|
protected |
Helper function to create elements on the loop process based on the info received in send_and_received_elements_nodes_info.
Definition at line 27501 of file triangle_mesh.template.cc.
References oomph::Multi_domain_functions::Counter_for_flat_packed_unsigneds, oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::FiniteElement::nnode(), and oomph::oomph_info.
|
protected |
Helper function to create (halo) elements on the loop process based on the info received in send_and_received_located_info.
Creates (halo) element on the loop process based on the information received from each processor.
Definition at line 19111 of file triangle_mesh.template.cc.
References oomph::Multi_domain_functions::Counter_for_flat_packed_unsigneds, oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::FiniteElement::nnode(), and oomph::oomph_info.
void oomph::RefineableTriangleMesh< ELEMENT >::create_new_shared_boundaries | ( | std::set< FiniteElement * > & | element_in_processor_pt, |
Vector< Vector< FiniteElement * >> & | new_shared_boundary_element_pt, | ||
Vector< Vector< unsigned >> & | new_shared_boundary_element_face_index | ||
) |
Creates the new shared boundaries, this method is also in charge of computing the shared boundaries ids of each processor and send that info. to all the processors.
Definition at line 22702 of file triangle_mesh.template.cc.
References e, oomph::TriangleMeshCurveSection::final_vertex_connected_bnd_id(), oomph::TriangleMeshCurveSection::final_vertex_connected_n_chunk(), i, oomph::TriangleMeshCurveSection::initial_vertex_connected_bnd_id(), oomph::TriangleMeshCurveSection::initial_vertex_connected_n_chunk(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::oomph_info, oomph::TriangleMeshCurveSection::set_final_vertex_connected(), oomph::TriangleMeshCurveSection::set_initial_vertex_connected(), oomph::TimingHelpers::timer(), and oomph::Node::x().
void oomph::RefineableTriangleMesh< ELEMENT >::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.
Create the polylines and fill associate data structures, used when creating from a mesh from polyfiles.
Definition at line 36641 of file triangle_mesh.template.cc.
References i, oomph::TriangleMeshPolyLine::nvertex(), oomph::Global_string_for_annotation::string(), and oomph::TriangleMeshPolyLine::vertex_coordinate().
|
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.
Helper function Creates a sorted face mesh representation of the specified PolyLine It means that the elements are sorted along the boundary.
Definition at line 35704 of file triangle_mesh.template.cc.
References oomph::Mesh::add_element_pt(), e, oomph::Mesh::finite_element_pt(), oomph::Mesh::nelement(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::ToleranceForVertexMismatchInPolygons::Tolerable_error, oomph::TriangleMeshPolyLine::vertex_coordinate(), and oomph::Node::x().
|
protected |
After unrefinement and refinement has taken place compute the new vertices numbers of the temporary representation of the.
Definition at line 33050 of file triangle_mesh.template.cc.
References oomph::TriangleMeshPolyLine::boundary_id(), i, oomph::TriangleMeshCurve::ncurve_section(), oomph::TriangleMeshPolygon::npolyline(), oomph::TriangleMeshPolygon::polyline_pt(), and oomph::TriangleMeshOpenCurve::polyline_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.
Definition at line 35671 of file triangle_mesh.template.cc.
References e, oomph::Mesh::element_pt(), oomph::Mesh::nelement(), and oomph::FaceElement::set_boundary_number_in_bulk_mesh().
|
inline |
Definition at line 2894 of file triangle_mesh.template.h.
|
inline |
Definition at line 2884 of file triangle_mesh.template.h.
|
inline |
Enables the use of an iterative solver for the projection problem.
Definition at line 2510 of file triangle_mesh.template.h.
|
inline |
Disables printing of timings for adaptation.
Definition at line 2522 of file triangle_mesh.template.h.
|
inline |
Disables printing of timings for load balance.
Definition at line 2549 of file triangle_mesh.template.h.
|
inline |
Disables the solution projection step during adaptation.
Definition at line 2434 of file triangle_mesh.template.h.
|
inline |
Definition at line 2916 of file triangle_mesh.template.h.
|
inline |
Definition at line 2906 of file triangle_mesh.template.h.
|
inline |
Disables info. and timings for projection.
Definition at line 2446 of file triangle_mesh.template.h.
|
inline |
Disables info. and timings for tranferring of target areas.
Definition at line 2422 of file triangle_mesh.template.h.
|
inlinevirtual |
Doc the targets for mesh adaptation.
Reimplemented from oomph::RefineableMeshBase.
Definition at line 2570 of file triangle_mesh.template.h.
|
inline |
Definition at line 2889 of file triangle_mesh.template.h.
|
inline |
Enable/disable unrefinement/refinement methods for original boundaries.
Definition at line 2879 of file triangle_mesh.template.h.
|
inline |
Enables the use of an iterative solver for the projection problem.
Definition at line 2503 of file triangle_mesh.template.h.
|
inline |
Enables printing of timings for adaptation.
Definition at line 2516 of file triangle_mesh.template.h.
|
inline |
Enables printing of timings for load balance.
Definition at line 2543 of file triangle_mesh.template.h.
|
inline |
Enables the solution projection step during adaptation.
Definition at line 2428 of file triangle_mesh.template.h.
|
inline |
Definition at line 2911 of file triangle_mesh.template.h.
|
inline |
Enable/disable unrefinement/refinement methods for shared boundaries.
Definition at line 2901 of file triangle_mesh.template.h.
|
inline |
Enables info. and timings for projection.
Definition at line 2440 of file triangle_mesh.template.h.
|
inline |
Enables info. and timings for tranferring of target areas.
Definition at line 2415 of file triangle_mesh.template.h.
void oomph::RefineableTriangleMesh< ELEMENT >::fill_boundary_elements_and_nodes_for_internal_boundaries |
Definition at line 43429 of file triangle_mesh.template.cc.
Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt().
void oomph::RefineableTriangleMesh< ELEMENT >::fill_boundary_elements_and_nodes_for_internal_boundaries | ( | std::ofstream & | outfile | ) |
Definition at line 43441 of file triangle_mesh.template.cc.
References i.
|
inline |
Definition at line 2658 of file triangle_mesh.template.h.
void oomph::RefineableTriangleMesh< ELEMENT >::get_boundary_segment_nodes_helper | ( | const unsigned & | b, |
Vector< Vector< Node * >> & | tmp_segment_nodes | ||
) |
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)
Definition at line 29072 of file triangle_mesh.template.cc.
References e, oomph::GeneralisedElement::is_halo(), oomph::FiniteElement::nnode(), and oomph::FiniteElement::node_pt().
|
protected |
Computes the associated vertex number on the destination boundary.
Gets the associated vertex number according to the vertex coordinates on the destination boundary.
Definition at line 34091 of file triangle_mesh.template.cc.
References i, oomph::TriangleMeshPolyLine::nvertex(), oomph::ToleranceForVertexMismatchInPolygons::Tolerable_error, and oomph::TriangleMeshPolyLine::vertex_coordinate().
|
protected |
Helper function to construct face mesh representation of open curves.
Helper function to construct face mesh representation of all polylines.
Definition at line 36425 of file triangle_mesh.template.cc.
References oomph::TriangleMeshCurveSection::boundary_id(), oomph::TriangleMeshCurve::curve_section_pt(), and oomph::TriangleMeshCurve::ncurve_section().
|
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.
Helper function to construct face mesh representation of all polylines, possibly with segments re-distributed between polylines to maintain an approximately even sub-division of the polygon.
Definition at line 35895 of file triangle_mesh.template.cc.
References oomph::TriangleMeshPolyLine::boundary_id(), e, i, oomph::TriangleMeshPolygon::is_redistribution_of_segments_between_polylines_enabled(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::TriangleMeshPolygon::npolyline(), oomph::TriangleMeshPolygon::polyline_pt(), s, oomph::FaceElement::set_boundary_number_in_bulk_mesh(), and oomph::Node::x().
|
protected |
Helper function to get the required elemental information from an haloed element. This info. involves the association of the element to a boundary or region.
Definition at line 17993 of file triangle_mesh.template.cc.
References e, oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::Missing_masters_functions::Flat_packed_unsigneds_string, and i.
|
protected |
Helper function to get the required elemental information from the element to be sent. This info. involves the association of the element to a boundary or region, and if its part of the halo(ed) elements within a processor.
Helper function to get the required elemental information from the element that will be sent to iproc processor. This info. involves the association of the element to a boundary or region.
Definition at line 26360 of file triangle_mesh.template.cc.
References e, oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::Missing_masters_functions::Flat_packed_unsigneds_string, and i.
|
protected |
Helper function to get the required nodal information from a haloed node so that a fully-functional halo node (and therefore element) can be created on the receiving process.
Helper function to get the required nodal information from an haloed node so that a fully-functional halo node (and therefore element) can be created on the receiving process.
Definition at line 18330 of file triangle_mesh.template.cc.
References oomph::SolidNode::add_values_to_vector(), oomph::Multi_domain_functions::Flat_packed_doubles, oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::Missing_masters_functions::Flat_packed_unsigneds_string, oomph::AlgebraicMesh::geom_object_list_pt(), oomph::AlgebraicNode::geom_object_pt(), oomph::Node::get_coordinates_on_boundary(), i, oomph::Node::is_on_boundary(), oomph::Node::ndim(), oomph::AlgebraicNode::ngeom_object(), oomph::AlgebraicMesh::ngeom_object_list_pt(), oomph::AlgebraicNode::node_update_fct_id(), oomph::AlgebraicNode::nref_value(), oomph::Data::nvalue(), oomph::AlgebraicNode::ref_value(), t, oomph::Data::value(), oomph::Node::value(), oomph::SolidNode::variable_position_pt(), and oomph::Node::x().
|
protected |
Helper function to get the required nodal information from an haloed node so that a fully-functional node (and therefore element) can be created on the receiving process (this is the specific version for the load balance strategy, the difference with the original method is that it checks if the node is on a shared boundary no associated with the current processor –my_rank–, or in a haloed element from other processors.
Helper function to get the required nodal information from an haloed node so that a fully-functional halo node (and therefore element) can be created on the receiving process.
Definition at line 26809 of file triangle_mesh.template.cc.
References oomph::SolidNode::add_values_to_vector(), oomph::Multi_domain_functions::Flat_packed_doubles, oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::Missing_masters_functions::Flat_packed_unsigneds_string, oomph::AlgebraicMesh::geom_object_list_pt(), oomph::AlgebraicNode::geom_object_pt(), oomph::Node::get_coordinates_on_boundary(), i, oomph::Node::is_on_boundary(), oomph::Node::ndim(), oomph::AlgebraicNode::ngeom_object(), oomph::AlgebraicMesh::ngeom_object_list_pt(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::AlgebraicNode::node_update_fct_id(), oomph::AlgebraicNode::nref_value(), oomph::Data::nvalue(), oomph::AlgebraicNode::ref_value(), t, oomph::Data::value(), oomph::Node::value(), oomph::SolidNode::variable_position_pt(), and oomph::Node::x().
void oomph::RefineableTriangleMesh< ELEMENT >::get_shared_boundary_elements_and_face_indexes | ( | const Vector< FiniteElement * > & | first_element_pt, |
const Vector< FiniteElement * > & | second_element_pt, | ||
Vector< FiniteElement * > & | first_shared_boundary_element_pt, | ||
Vector< unsigned > & | first_shared_boundary_element_face_index, | ||
Vector< FiniteElement * > & | second_shared_boundary_element_pt, | ||
Vector< unsigned > & | second_shared_boundary_element_face_index | ||
) |
Use the first and second group of elements to find the intersection between them to get the shared boundary elements from the first and second group.
Definition at line 22549 of file triangle_mesh.template.cc.
References oomph::GeneralisedElement::is_halo(), and oomph::FiniteElement::node_pt().
void oomph::RefineableTriangleMesh< ELEMENT >::get_shared_boundary_segment_nodes_helper | ( | const unsigned & | shd_bnd_id, |
Vector< Vector< Node * >> & | tmp_segment_nodes | ||
) |
Get the nodes on the shared boundary (b), these are stored in the segment they belong.
Definition at line 26030 of file triangle_mesh.template.cc.
References e, oomph::GeneralisedElement::is_halo(), oomph::FiniteElement::nnode(), and oomph::FiniteElement::node_pt().
|
inlineprotected |
Helper function to initialise data associated with adaptation.
Definition at line 3636 of file triangle_mesh.template.h.
|
inlineprotected |
Set all the flags to true (the default values)
Definition at line 3103 of file triangle_mesh.template.h.
|
inline |
Access to function pointer to can be used to generate the internal point for the ihole-th hole.
Definition at line 2636 of file triangle_mesh.template.h.
|
virtual |
Performs the load balancing for unstructured meshes, the load balancing strategy is based on mesh migration.
Reimplemented from oomph::TriangleMesh< ELEMENT >.
Definition at line 20451 of file triangle_mesh.template.cc.
References oomph::Multi_domain_functions::Counter_for_flat_packed_doubles, oomph::Multi_domain_functions::Counter_for_flat_packed_unsigneds, e, oomph::Multi_domain_functions::Flat_packed_doubles, oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::Missing_masters_functions::Flat_packed_unsigneds_string, i, oomph::GeneralisedElement::is_halo(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::oomph_info, oomph::Node::set_non_obsolete(), and oomph::TimingHelpers::timer().
|
inline |
Max element size allowed during adaptation.
Definition at line 2477 of file triangle_mesh.template.h.
Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt().
|
inline |
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.
Definition at line 2471 of file triangle_mesh.template.h.
|
inline |
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)
Definition at line 2628 of file triangle_mesh.template.h.
|
inline |
Min element size allowed during adaptation.
Definition at line 2483 of file triangle_mesh.template.h.
Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt().
|
inline |
Min angle before remesh gets triggered.
Definition at line 2489 of file triangle_mesh.template.h.
Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt().
|
inline |
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!
Definition at line 2454 of file triangle_mesh.template.h.
|
inline |
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!
Definition at line 2462 of file triangle_mesh.template.h.
|
inline |
Definition at line 2643 of file triangle_mesh.template.h.
|
inlinevirtual |
Used to re-establish any additional info. related with the distribution after a re-starting for triangle meshes.
Reimplemented from oomph::TriangleMesh< ELEMENT >.
Definition at line 2715 of file triangle_mesh.template.h.
|
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.
Get the size of the vector that now includes all added nodes
Definition at line 35407 of file triangle_mesh.template.cc.
References i, and oomph::MeshAsGeomObject::position().
|
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.
Helper function that performs the refinement process on the specified boundary by using the provided vertices representation and the associated elements target area.
Definition at line 40814 of file triangle_mesh.template.cc.
References i, oomph::MeshAsGeomObject::position(), and s.
|
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.
Definition at line 41165 of file triangle_mesh.template.cc.
|
protected |
Build a new TriangulateIO object from previous TriangulateIO based on target area for each element.
Build a new TriangulateIO object based on target areas specified.
Definition at line 15054 of file triangle_mesh.template.cc.
References oomph::TriangulateIO::holelist, oomph::TriangleHelper::initialise_triangulateio(), oomph::TriangulateIO::numberofcorners, oomph::TriangulateIO::numberofholes, oomph::TriangulateIO::numberofpoints, oomph::TriangulateIO::numberofsegments, oomph::TriangulateIO::numberoftriangleattributes, oomph::TriangulateIO::numberoftriangles, oomph::TriangulateIO::pointlist, oomph::TriangulateIO::pointmarkerlist, oomph::TriangulateIO::segmentlist, oomph::TriangulateIO::segmentmarkerlist, oomph::TriangulateIO::trianglearealist, oomph::TriangulateIO::triangleattributelist, and oomph::TriangulateIO::trianglelist.
|
inlinevirtual |
Refine mesh uniformly and doc process.
Implements oomph::RefineableMeshBase.
Definition at line 2586 of file triangle_mesh.template.h.
|
protected |
In charge of. re-establish the halo(ed) scheme on all processors. Sends info. to create halo elements and nodes on the processors that need it. It uses and all to all communication strategy therefore must be called on all processors.
Definition at line 15486 of file triangle_mesh.template.cc.
References oomph::Multi_domain_functions::Counter_for_flat_packed_doubles, oomph::Multi_domain_functions::Counter_for_flat_packed_unsigneds, oomph::DocInfo::disable_doc(), oomph::Global_timings::Doc_comprehensive_timings, e, oomph::Multi_domain_functions::Flat_packed_doubles, oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::Missing_masters_functions::Flat_packed_unsigneds_string, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::oomph_info, and oomph::TimingHelpers::timer().
|
protected |
In charge of creating additional halo(ed) elements on those processors that have no shared boundaries in common but have shared nodes.
Definition at line 17655 of file triangle_mesh.template.cc.
References oomph::Multi_domain_functions::Counter_for_flat_packed_doubles, oomph::Multi_domain_functions::Counter_for_flat_packed_unsigneds, e, oomph::Multi_domain_functions::Flat_packed_doubles, oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::Missing_masters_functions::Flat_packed_unsigneds_string, i, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), and oomph::oomph_info.
|
protected |
Re-establish the shared boundary elements after the adaptation process (the updating of shared nodes is optional and performed by default)
Definition at line 15402 of file triangle_mesh.template.cc.
References e.
|
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.
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. It is not permanently deleted because if load balance takes place it may be possible that the boundary to connect be part of the new domain representation, so the connection would exist)
Definition at line 33175 of file triangle_mesh.template.cc.
References i, oomph::TriangleMeshCurve::ncurve_section(), oomph::TriangleMeshPolygon::npolyline(), oomph::TriangleMeshPolygon::polyline_pt(), and oomph::TriangleMeshOpenCurve::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.
Definition at line 33295 of file triangle_mesh.template.cc.
References oomph::TriangleMeshPolyLine::boundary_id(), oomph::TriangleMeshCurveSection::final_vertex_connected_bnd_id(), oomph::TriangleMeshCurveSection::final_vertex_connected_n_chunk(), oomph::TriangleMeshCurveSection::final_vertex_connected_n_vertex(), i, oomph::TriangleMeshCurveSection::initial_vertex_connected_bnd_id(), oomph::TriangleMeshCurveSection::initial_vertex_connected_n_chunk(), oomph::TriangleMeshCurveSection::initial_vertex_connected_n_vertex(), oomph::TriangleMeshCurveSection::is_final_vertex_connected(), oomph::TriangleMeshCurveSection::is_initial_vertex_connected(), oomph::TriangleMeshPolyLine::nvertex(), oomph::TriangleMeshCurveSection::suspend_final_vertex_connected(), oomph::TriangleMeshCurveSection::suspend_initial_vertex_connected(), and oomph::TriangleMeshPolyLine::vertex_coordinate().
|
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.
Definition at line 34048 of file triangle_mesh.template.cc.
References oomph::TriangleMeshCurveSection::resume_final_vertex_connected(), and oomph::TriangleMeshCurveSection::resume_initial_vertex_connected().
|
protected |
Helper function to send back halo and haloed information.
Send the information of the elements that will be created on the other processor.
Definition at line 18955 of file triangle_mesh.template.cc.
References oomph::Multi_domain_functions::Flat_packed_doubles, oomph::Multi_domain_functions::Flat_packed_unsigneds, oomph::Missing_masters_functions::Flat_packed_unsigneds_string, i, and oomph::oomph_info.
|
protected |
Get the original boundaries to which is associated each shared node, and send the info. to the related processors. We need to do this so that at the reset of halo(ed) info. stage, the info. be already updated.
Definition at line 17056 of file triangle_mesh.template.cc.
References oomph::Node::get_coordinates_on_boundary(), i, oomph::Node::is_on_boundary(), oomph::Node::set_coordinates_on_boundary(), and oomph::Node::x().
|
inline |
Sets the printing level of timings for adaptation.
Definition at line 2528 of file triangle_mesh.template.h.
|
inline |
Sets the printing level of timings for load balance.
Definition at line 2555 of file triangle_mesh.template.h.
|
protected |
Snap the boundary nodes onto any curvilinear boundaries.
Move the boundary nodes onto the boundary defined by the old mesh.
Correct!? Because assigned again below
Definition at line 43657 of file triangle_mesh.template.cc.
References oomph::Mesh::boundary_element_pt(), oomph::Mesh::boundary_node_pt(), oomph::TriangleMesh< ELEMENT >::boundary_segment_node_pt(), e, oomph::Mesh::flush_node_storage(), oomph::Node::get_coordinates_on_boundary(), i, oomph::GeneralisedElement::is_halo(), oomph::Node::is_on_boundary(), oomph::FiniteElement::local_coordinate_of_node(), oomph::Mesh::nboundary_element(), oomph::Mesh::nboundary_node(), oomph::UnstructuredTwoDMeshGeometryBase::nboundary_segment(), oomph::UnstructuredTwoDMeshGeometryBase::nboundary_segment_node(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::MeshAsGeomObject::position(), s, oomph::Node::set_coordinates_on_boundary(), oomph::FiniteElement::size(), and oomph::Node::x().
|
protected |
Sort the nodes on shared boundaries so that the processors that share a boundary agree with the order of the nodes on the boundary.
Definition at line 15292 of file triangle_mesh.template.cc.
References oomph::Bottom_left_sorter, i, oomph::classcomp::Tol, and oomph::Node::x().
|
inline |
Definition at line 2679 of file triangle_mesh.template.h.
|
inline |
Definition at line 2663 of file triangle_mesh.template.h.
References i.
|
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.
Update the PSLG that define the inner boundaries of the mesh. 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.
Definition at line 36452 of file triangle_mesh.template.cc.
References oomph::TriangleMeshPolygon::can_update_reference_configuration(), i, oomph::TriangleMeshClosedCurve::internal_point(), oomph::TriangleMeshClosedCurve::is_internal_point_fixed(), oomph::TriangleMeshPolygon::npolyline(), oomph::TriangleMeshPolyLine::nvertex(), oomph::TriangleMeshPolygon::polyline_pt(), oomph::TriangleMeshPolygon::reset_reference_configuration(), and oomph::TriangleMeshPolyLine::vertex_coordinate().
|
protected |
Synchronise the vertices that are marked for non deletion.
Definition at line 32675 of file triangle_mesh.template.cc.
References oomph::TriangleMeshPolyLine::boundary_chunk(), and i.
|
inlineprotected |
Check if necessary to add the element to the new domain or if it has been previously added.
Definition at line 3186 of file triangle_mesh.template.h.
References e.
|
inlineprotectedvirtual |
Check if necessary to add the node as haloed or if it has been previously added to the haloed scheme.
Reimplemented from oomph::Mesh.
Definition at line 3429 of file triangle_mesh.template.h.
|
inlineprotected |
Check if necessary to add the node to the new domain or if it has been already added.
Definition at line 3234 of file triangle_mesh.template.h.
|
inlineprotectedvirtual |
Check if necessary to add the element as haloed or if it has been previously added to the haloed scheme.
Reimplemented from oomph::Mesh.
Definition at line 3391 of file triangle_mesh.template.h.
|
protected |
Helper function that performs the unrefinement process.
Helper function that performs the unrefinement 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.
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.
Get the size of the vector that now includes all remaining nodes
Copy back
Definition at line 35112 of file triangle_mesh.template.cc.
References e, i, and oomph::ToleranceForVertexMismatchInPolygons::Tolerable_error.
|
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.
Helper function that performs the unrefinement process on the specified boundary by using the provided vertices representation and the associated target area.
Definition at line 40558 of file triangle_mesh.template.cc.
References e, i, and oomph::ToleranceForVertexMismatchInPolygons::Tolerable_error.
|
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.
Definition at line 40956 of file triangle_mesh.template.cc.
References i, and oomph::ToleranceForVertexMismatchInPolygons::Tolerable_error.
|
inlinevirtual |
Unrefine mesh uniformly: Return 0 for success, 1 for failure (if unrefinement has reached the coarsest permitted level)
Implements oomph::RefineableMeshBase.
Definition at line 2612 of file triangle_mesh.template.h.
|
protected |
Updates the open curve representation after restart.
Use a vector of vector for vertices and target areas to deal with the cases when the boundaries are split bn the distribution process. Internal boundaries may be completely or partially overlapped by shared boundaries
Definition at line 42037 of file triangle_mesh.template.cc.
References oomph::TriangleMeshCurveSection::boundary_id(), oomph::TriangleMeshCurve::curve_section_pt(), oomph::Node::get_coordinates_on_boundary(), i, oomph::GeneralisedElement::is_halo(), oomph::TriangleMeshCurveSection::maximum_length(), oomph::TriangleMeshCurve::ncurve_section(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::TriangleMeshCurveSection::nvertex(), oomph::TriangleMeshOpenCurve::polyline_pt(), oomph::TriangleMeshCurveSection::refinement_tolerance(), oomph::TriangleMeshPolyLine::reverse(), oomph::TriangleMeshCurveSection::set_maximum_length(), oomph::TriangleMeshCurveSection::set_refinement_tolerance(), oomph::TriangleMeshCurveSection::set_unrefinement_tolerance(), oomph::ToleranceForVertexMismatchInPolygons::Tolerable_error, oomph::TriangleMeshCurveSection::unrefinement_tolerance(), oomph::TriangleMeshPolyLine::vertex_coordinate(), and oomph::Node::x().
|
protected |
Updates the open curve but using the elements area instead of the default refinement and unrefinement methods.
Use a vector of vector for vertices and target areas to deal with the cases when the boundaries are split by the distribution process. Internal boundaries may be completely or partially overlapped by shared boundaries
Definition at line 38619 of file triangle_mesh.template.cc.
References oomph::TriangleMeshCurveSection::boundary_chunk(), oomph::TriangleMeshCurveSection::boundary_id(), oomph::TriangleMeshCurve::curve_section_pt(), oomph::Node::get_coordinates_on_boundary(), i, oomph::GeneralisedElement::is_halo(), oomph::TriangleMeshCurveSection::maximum_length(), oomph::TriangleMeshCurve::ncurve_section(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::TriangleMeshCurveSection::nvertex(), oomph::TriangleMeshOpenCurve::polyline_pt(), oomph::TriangleMeshCurveSection::refinement_tolerance(), oomph::TriangleMeshPolyLine::reverse(), oomph::TriangleMeshCurveSection::set_maximum_length(), oomph::TriangleMeshCurveSection::set_refinement_tolerance(), oomph::TriangleMeshCurveSection::set_unrefinement_tolerance(), oomph::ToleranceForVertexMismatchInPolygons::Tolerable_error, oomph::TriangleMeshCurveSection::unrefinement_tolerance(), oomph::TriangleMeshPolyLine::vertex_coordinate(), and oomph::Node::x().
|
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.
Refinement
Definition at line 34628 of file triangle_mesh.template.cc.
References oomph::TriangleMeshCurveSection::boundary_chunk(), oomph::TriangleMeshCurveSection::boundary_id(), oomph::TriangleMeshCurve::curve_section_pt(), e, oomph::TriangleMeshPolyLine::final_vertex_coordinate(), oomph::Node::get_coordinates_on_boundary(), i, oomph::TriangleMeshPolyLine::initial_vertex_coordinate(), oomph::TriangleMeshCurveSection::maximum_length(), oomph::TriangleMeshCurve::ncurve_section(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::TriangleMeshOpenCurve::polyline_pt(), oomph::TriangleMeshCurveSection::refinement_tolerance(), oomph::TriangleMeshPolyLine::reverse(), oomph::TriangleMeshCurveSection::set_maximum_length(), oomph::TriangleMeshCurveSection::set_refinement_tolerance(), oomph::TriangleMeshCurveSection::set_unrefinement_tolerance(), oomph::ToleranceForVertexMismatchInPolygons::Tolerable_error, oomph::TriangleMeshCurveSection::unrefinement_tolerance(), and oomph::Node::x().
|
protected |
Helper function that assigns/updates the references to the node so that it can be found with any other reference. The return value indicates whether or not a node was found on the same reference.
Definition at line 20302 of file triangle_mesh.template.cc.
|
protected |
Updates the polylines representation after restart.
Use a vector of vector for vertices and target areas to deal with the cases when the boundaries are split by the distribution process
Definition at line 41268 of file triangle_mesh.template.cc.
References oomph::TriangleMeshCurveSection::boundary_id(), oomph::TriangleMeshCurve::curve_section_pt(), oomph::Node::get_coordinates_on_boundary(), i, oomph::GeneralisedElement::is_halo(), oomph::TriangleMeshCurveSection::maximum_length(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::TriangleMeshPolygon::npolyline(), oomph::TriangleMeshCurveSection::nvertex(), oomph::TriangleMeshPolygon::polyline_pt(), oomph::TriangleMeshCurveSection::refinement_tolerance(), oomph::TriangleMeshPolyLine::reverse(), oomph::TriangleMeshCurveSection::set_maximum_length(), oomph::TriangleMeshCurveSection::set_refinement_tolerance(), oomph::TriangleMeshCurveSection::set_unrefinement_tolerance(), oomph::ToleranceForVertexMismatchInPolygons::Tolerable_error, oomph::TriangleMeshCurveSection::unrefinement_tolerance(), oomph::TriangleMeshPolyLine::vertex_coordinate(), and oomph::Node::x().
|
protected |
Updates the polylines using the elements area as constraint for the number of points along the boundaries.
Updates the polygon but using the elements area instead of the default refinement and unrefinement methods.
Use a vector of vector for vertices and target areas to deal with the cases when the boundaries are split by the distribution process
Definition at line 37661 of file triangle_mesh.template.cc.
References oomph::TriangleMeshCurveSection::boundary_chunk(), oomph::TriangleMeshCurveSection::boundary_id(), oomph::TriangleMeshCurve::curve_section_pt(), oomph::Node::get_coordinates_on_boundary(), i, oomph::GeneralisedElement::is_halo(), oomph::TriangleMeshCurveSection::maximum_length(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::TriangleMeshPolygon::npolyline(), oomph::TriangleMeshCurveSection::nvertex(), oomph::TriangleMeshPolygon::polyline_pt(), oomph::TriangleMeshCurveSection::refinement_tolerance(), oomph::TriangleMeshPolyLine::reverse(), oomph::TriangleMeshCurveSection::set_maximum_length(), oomph::TriangleMeshCurveSection::set_refinement_tolerance(), oomph::TriangleMeshCurveSection::set_unrefinement_tolerance(), oomph::ToleranceForVertexMismatchInPolygons::Tolerable_error, oomph::TriangleMeshCurveSection::unrefinement_tolerance(), oomph::TriangleMeshPolyLine::vertex_coordinate(), and oomph::Node::x().
|
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.
Definition at line 34138 of file triangle_mesh.template.cc.
References oomph::TriangleMeshCurveSection::boundary_chunk(), oomph::TriangleMeshCurveSection::boundary_id(), oomph::TriangleMeshCurve::curve_section_pt(), e, oomph::Node::get_coordinates_on_boundary(), i, oomph::GeneralisedElement::is_halo(), oomph::TriangleMeshCurveSection::maximum_length(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::TriangleMeshPolygon::npolyline(), oomph::TriangleMeshCurveSection::nvertex(), oomph::TriangleMeshPolygon::polyline_pt(), oomph::TriangleMeshCurveSection::refinement_tolerance(), oomph::TriangleMeshPolyLine::reverse(), oomph::TriangleMeshCurveSection::set_maximum_length(), oomph::TriangleMeshCurveSection::set_refinement_tolerance(), oomph::TriangleMeshCurveSection::set_unrefinement_tolerance(), oomph::ToleranceForVertexMismatchInPolygons::Tolerable_error, oomph::TriangleMeshCurveSection::unrefinement_tolerance(), oomph::TriangleMeshPolyLine::vertex_coordinate(), and oomph::Node::x().
|
inlinevirtual |
Method used to update the polylines representation after restart.
Reimplemented from oomph::TriangleMeshBase.
Definition at line 2767 of file triangle_mesh.template.h.
References i.
|
protected |
Updates the shared polylines representation after restart.
Definition at line 43013 of file triangle_mesh.template.cc.
References e, i, oomph::GeneralisedElement::is_halo(), and oomph::FiniteElement::node_pt().
|
protected |
Updates the polylines using the elements area as constraint for the number of points along the boundaries.
Definition at line 39894 of file triangle_mesh.template.cc.
References e, oomph::GeneralisedElement::is_halo(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), and s.
|
inline |
Definition at line 2496 of file triangle_mesh.template.h.
|
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.
Definition at line 2927 of file triangle_mesh.template.h.
|
protected |
Counter used when processing vector of flat-packed doubles.
Definition at line 3365 of file triangle_mesh.template.h.
|
protected |
Counter used when processing vector of flat-packed unsigneds.
Definition at line 3373 of file triangle_mesh.template.h.
|
protected |
Enable/disable solution projection during adaptation.
Definition at line 3854 of file triangle_mesh.template.h.
|
protected |
Flag that enables or disables boundary refinement (true by default)
Definition at line 3094 of file triangle_mesh.template.h.
|
protected |
Flag that enables or disables boundary unrefinement (true by default)
Definition at line 3091 of file triangle_mesh.template.h.
|
protected |
Flag that enables or disables boundary unrefinement (true by default)
Definition at line 3100 of file triangle_mesh.template.h.
|
protected |
Flag that enables or disables boundary unrefinement (true by default)
Definition at line 3097 of file triangle_mesh.template.h.
|
protected |
Vector of flat-packed doubles to be communicated with other processors.
Definition at line 3361 of file triangle_mesh.template.h.
|
protected |
Vector of flat-packed unsigneds to be communicated with other processors.
Definition at line 3369 of file triangle_mesh.template.h.
|
protected |
Temporary vector of strings to enable full annotation of RefineableTriangleMesh comms.
Definition at line 3378 of file triangle_mesh.template.h.
|
protected |
Function pointer to function that can be set to update the position of the central point in internal holes.
Definition at line 3881 of file triangle_mesh.template.h.
|
protected |
Max permitted element size.
Definition at line 3845 of file triangle_mesh.template.h.
|
protected |
Default value for max. number of sample points used for locate_zeta when transferring target areas using cgal-based sample point container.
Definition at line 3842 of file triangle_mesh.template.h.
|
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)
Definition at line 3876 of file triangle_mesh.template.h.
|
protected |
Min permitted element size.
Definition at line 3848 of file triangle_mesh.template.h.
|
protected |
Min angle before remesh gets triggered.
Definition at line 3851 of file triangle_mesh.template.h.
|
protected |
Number of bins in the x-direction when transferring target areas by bin method. Only used if we don't have CGAL!
Definition at line 3831 of file triangle_mesh.template.h.
|
protected |
Number of bins in the y-direction when transferring target areas by bin method. Only used if we don't have CGAL!
Definition at line 3836 of file triangle_mesh.template.h.
|
protected |
The printing level for adaptation.
Definition at line 3867 of file triangle_mesh.template.h.
|
protected |
The printing level for load balance.
Definition at line 3870 of file triangle_mesh.template.h.
|
protected |
Enable/disable printing timings for projection.
Definition at line 3864 of file triangle_mesh.template.h.
|
protected |
Enable/disable printing timings for transfering target areas.
Definition at line 3861 of file triangle_mesh.template.h.
|
protected |
Stores the nodes in the boundaries in the same order in all the processors Sorted_shared_boundary_node_pt[bnd_id][i-th node] = Node* It is a map since the boundary id may not start at zero.
Definition at line 3118 of file triangle_mesh.template.h.
|
protected |
Flag to indicate whether to use or not an iterative solver (CG with diagonal preconditioned) for the projection problem.
Definition at line 3858 of file triangle_mesh.template.h.