Path: blob/main/src/t8_cmesh/t8_cmesh_io/t8_cmesh_triangle.h
921 views
/*1This file is part of t8code.2t8code is a C library to manage a collection (a forest) of multiple3connected adaptive space-trees of general element classes in parallel.45Copyright (C) 2015 the developers67t8code is free software; you can redistribute it and/or modify8it under the terms of the GNU General Public License as published by9the Free Software Foundation; either version 2 of the License, or10(at your option) any later version.1112t8code is distributed in the hope that it will be useful,13but WITHOUT ANY WARRANTY; without even the implied warranty of14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15GNU General Public License for more details.1617You should have received a copy of the GNU General Public License18along with t8code; if not, write to the Free Software Foundation, Inc.,1951 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.20*/2122/** \file t8_cmesh_triangle.h23* We define a function here that serves to open a mesh file generated by24* TRIANGLE and constructing a cmesh from it.25*/2627#ifndef T8_CMESH_TRIANGLE_H28#define T8_CMESH_TRIANGLE_H2930#include <t8.h>31#include <t8_eclass.h>32#include <t8_cmesh/t8_cmesh.h>3334/* put typedefs here */3536T8_EXTERN_C_BEGIN ();3738/* put declarations here */3940/** Open a .node, .ele and .neigh file created by TRIANGLE to read41* and create a cmesh from them. The cmesh will be replicated.42* The files are opened and read by one process and the cmesh is then43* broadcasted to the other processes.44* \param [in] fileprefix A string holding the prefix of the TRIANGLE files.45* The files \a fileprefix.node, \a fileprefix.ele and46* \a fileprefix.neigh are read.47* \param [in] partition In the future this flag can decide whether the returned48* cmesh is partitioned or not. Currently it is always replicated.49* \param [in] comm The mpi communicator to be used.50* \param [in] do_dup Whether \a comm should be duplicated by cmesh.51* \return A committed, replicated cmesh constructed from the info52* in the TRIANGLE files.53*/54t8_cmesh_t55t8_cmesh_from_triangle_file (char *fileprefix, int partition, sc_MPI_Comm comm, int do_dup);5657T8_EXTERN_C_END ();5859#endif /* !T8_CMESH_TRIANGLE_H */606162