Path: blob/main/src/t8_cmesh/t8_cmesh_io/t8_cmesh_tetgen.h
927 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_tetgen.h23* We define function here that serve to open a mesh file generated by24* TETGEN and constructing a cmesh from it.25*/2627#ifndef T8_CMESH_TETGEN_H28#define T8_CMESH_TETGEN_H2930#include <t8.h>31#include <t8_eclass.h>32#include <t8_cmesh/t8_cmesh.h>33#include <sc_flops.h>34#include <sc_statistics.h>35#include <sc_options.h>3637/* put typedefs here */3839T8_EXTERN_C_BEGIN ();4041/* put declarations here */4243/** Open a .node, .ele and .neigh file created by TETGEN to read44* and create a cmesh from them. The cmesh will be replicated.45* The files are opened and read by one process and the cmesh is then46* broadcasted to the other processes.47* \param [in] fileprefix A string holding the prefix of the TETGEN files.48* The files \a fileprefix.node, \a fileprefix.ele and49* \a fileprefix.neigh are read.50* \param [in] partition In the future this flag can decide whether the returned51* cmesh is partitioned or not. Currently it is always replicated.52* \param [in] comm The mpi communicator to be used.53* \param [in] do_dup Whether \a comm should be duplicated by cmesh.54* \return A committed, replicated cmesh constructed from the info55* in the TETGEN files.56*/57t8_cmesh_t58t8_cmesh_from_tetgen_file (char *fileprefix, int partition, sc_MPI_Comm comm, int do_dup);5960/** Same as \ref t8_cmesh_from_tetgen_file but with flop and stat info.61* \param [in] fileprefix A string holding the prefix of the TETGEN files.62* The files \a fileprefix.node, \a fileprefix.ele and63* \a fileprefix.neigh are read.64* \param [in] partition In the future this flag can decide whether the returned65* cmesh is partitioned or not. Currently it is always replicated.66* \param [in] comm The mpi communicator to be used.67* \param [in] do_dup Whether \a comm should be duplicated by cmesh.68* \param [in,out] fi The flopinfo struct to use for flop counting.69* \param [out] snapshot On output is a copy of fi.70* \param [in,out] stats The statinfo array to use for statistics.71* \param [in] statentry The index in \a stats to use for statistics.72* \return A committed, replicated cmesh constructed from the info73* in the TETGEN files.74*/75t8_cmesh_t76t8_cmesh_from_tetgen_file_time (char *fileprefix, int partition, sc_MPI_Comm comm, int do_dup, sc_flopinfo_t *fi,77sc_flopinfo_t *snapshot, sc_statinfo_t *stats, int statentry);7879T8_EXTERN_C_END ();8081#endif /* !T8_CMESH_TETGEN_H */828384