27 #ifndef OOMPH_GENERIC_TRIANGLE_MESH_HEADER
28 #define OOMPH_GENERIC_TRIANGLE_MESH_HEADER
32 #include <oomph-lib-config.h>
57 #ifdef OOMPH_HAS_TRIANGLE_LIB
80 #ifdef OOMPH_HAS_TRIANGLE_LIB
90 std::ofstream outfile;
98 #ifdef OOMPH_HAS_TRIANGLE_LIB
145 std::ostringstream error_stream;
146 error_stream <<
"Empty default dump disributed info. method called.\n";
147 error_stream <<
"This should be overloaded in a specific TriangleMesh\n";
150 "TriangleMeshBase::dump_distributed_info_for_restart()",
151 OOMPH_EXCEPTION_LOCATION);
158 std::ostringstream error_stream;
159 error_stream <<
"Empty default dump info. to reset halo haloed scheme.\n";
160 error_stream <<
"This should be overloaded in a specific TriangleMesh\n";
163 "TriangleMeshBase::dump_info_to_reset_halo_haloed_scheme()",
164 OOMPH_EXCEPTION_LOCATION);
171 std::ostringstream error_stream;
172 error_stream <<
"Empty default read disributed info. method called.\n";
173 error_stream <<
"This should be overloaded in a specific TriangleMesh\n";
176 "TriangleMeshBase::read_distributed_info_for_restart()",
177 OOMPH_EXCEPTION_LOCATION);
185 std::ostringstream error_stream;
186 error_stream <<
"Empty default reestablish disributed info method "
188 error_stream <<
"This should be overloaded in a specific "
189 <<
"RefineableTriangleMesh\n";
192 "TriangleMeshBase::reestablish_distribution_info_for_restart()",
193 OOMPH_EXCEPTION_LOCATION);
201 std::ostringstream error_stream;
202 error_stream <<
"Empty default update polylines representation from "
203 <<
"restart method called.\n";
204 error_stream <<
"This should be overloaded in a specific "
205 <<
"RefineableTriangleMesh\n";
208 "TriangleMeshBase::update_polyline_representation_from_restart()",
209 OOMPH_EXCEPTION_LOCATION);
220 std::ostringstream error_stream;
221 error_stream <<
"Empty default remesh function called.\n";
222 error_stream <<
"This should be overloaded in a specific TriangleMesh\n";
224 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
233 std::ostringstream error_stream;
234 error_stream <<
"Empty default load balancing function called.\n";
235 error_stream <<
"This should be overloaded in a specific TriangleMesh\n";
237 "TriangleMeshBase::load_balance()",
238 OOMPH_EXCEPTION_LOCATION);
247 std::ostringstream error_stream;
248 error_stream <<
"Empty default reset boundary element info function"
250 error_stream <<
"This should be overloaded in a specific "
253 "TriangleMeshBase::reset_boundary_element_info()",
254 OOMPH_EXCEPTION_LOCATION);
258 #ifdef OOMPH_HAS_TRIANGLE_LIB
An oomph-lib wrapper to the MPI_Comm communicator object. Just contains an MPI_Comm object (which is ...
An OomphLibError object which should be thrown when an run-time error is encountered....
Base class for triangle meshes (meshes made of 2D triangle elements). Note: we choose to template Tri...
TriangulateIO & triangulateio_representation()
Access to the triangulateio representation of the mesh.
virtual void remesh_from_internal_triangulateio()
Virtual function that is used for specific remeshing from the triangulateio.
void dump_triangulateio(std::ostream &dump_file)
Dump the triangulateio structure to a dump file and record boundary coordinates of boundary nodes.
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.
TriangulateIO Triangulateio
TriangulateIO representation of the mesh.
bool Use_triangulateio_restart
Should we use triangulateio specific parts for dump/restart? (Doesn't work with some elements and isn...
void clear_triangulateio()
Helper function. Clean up the memory associated with the TriangulateIO object. This should really onl...
virtual void read_distributed_info_for_restart(std::istream &restart_file)
Virtual function that is used to read info. related with distributed triangle meshes.
TriangleMeshBase(const TriangleMeshBase &node)=delete
Broken copy constructor.
bool use_triangulateio_restart() const
const access for Use_triangulateio_restart.
void remesh_from_triangulateio(std::istream &restart_file)
Regenerate the mesh from a dumped triangulateio file and dumped boundary coordinates of boundary node...
void disable_triangulateio_restart()
write access for Use_triangulateio_restart.
void setup_boundary_element_info()
Setup lookup schemes which establish whic elements are located next to mesh's boundaries (wrapper to ...
void write_triangulateio(TriangulateIO &triangulate_io, std::string &s)
Helper function. Write a TriangulateIO object file with all the triangulateio fields....
virtual void reset_boundary_element_info(Vector< unsigned > &ntmp_boundary_elements, Vector< Vector< unsigned >> &ntmp_boundary_elements_in_region, Vector< FiniteElement * > &deleted_elements)
Virtual function to perform the reset boundary elements info rutines.
void enable_triangulateio_restart()
write access for Use_triangulateio_restart.
virtual void load_balance(const Vector< unsigned > &target_domain_for_local_non_halo_element)
Virtual function to perform the load balance rutines.
virtual void dump_distributed_info_for_restart(std::ostream &dump_file)
Virtual function that is used to dump info. related with distributed triangle meshes.
virtual void reestablish_distribution_info_for_restart(OomphCommunicator *comm_pt, std::istream &restart_file)
Virtual function used to re-establish any additional info. related with the distribution after a re-s...
virtual void update_polyline_representation_from_restart()
Virtual function used to update the polylines representation after restart.
virtual ~TriangleMeshBase()
Broken assignment operator.
TriangleMeshBase()
Constructor.
Contains functions which define the geometry of the mesh, i.e. regions, boundaries,...
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
void initialise_triangulateio(TriangulateIO &triangle_io)
Initialise TriangulateIO structure.
void clear_triangulateio(TriangulateIO &triangulate_io, const bool &clear_hole_data)
Clear TriangulateIO structure.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
The Triangle data structure, modified from the triangle.h header supplied with triangle 1....