Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
DLR-AMR
GitHub Repository: DLR-AMR/t8code
Path: blob/main/src/t8_cmesh/t8_cmesh_io/t8_cmesh_triangle.h
921 views
1
/*
2
This file is part of t8code.
3
t8code is a C library to manage a collection (a forest) of multiple
4
connected adaptive space-trees of general element classes in parallel.
5
6
Copyright (C) 2015 the developers
7
8
t8code is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 2 of the License, or
11
(at your option) any later version.
12
13
t8code is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with t8code; if not, write to the Free Software Foundation, Inc.,
20
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
*/
22
23
/** \file t8_cmesh_triangle.h
24
* We define a function here that serves to open a mesh file generated by
25
* TRIANGLE and constructing a cmesh from it.
26
*/
27
28
#ifndef T8_CMESH_TRIANGLE_H
29
#define T8_CMESH_TRIANGLE_H
30
31
#include <t8.h>
32
#include <t8_eclass.h>
33
#include <t8_cmesh/t8_cmesh.h>
34
35
/* put typedefs here */
36
37
T8_EXTERN_C_BEGIN ();
38
39
/* put declarations here */
40
41
/** Open a .node, .ele and .neigh file created by TRIANGLE to read
42
* and create a cmesh from them. The cmesh will be replicated.
43
* The files are opened and read by one process and the cmesh is then
44
* broadcasted to the other processes.
45
* \param [in] fileprefix A string holding the prefix of the TRIANGLE files.
46
* The files \a fileprefix.node, \a fileprefix.ele and
47
* \a fileprefix.neigh are read.
48
* \param [in] partition In the future this flag can decide whether the returned
49
* cmesh is partitioned or not. Currently it is always replicated.
50
* \param [in] comm The mpi communicator to be used.
51
* \param [in] do_dup Whether \a comm should be duplicated by cmesh.
52
* \return A committed, replicated cmesh constructed from the info
53
* in the TRIANGLE files.
54
*/
55
t8_cmesh_t
56
t8_cmesh_from_triangle_file (char *fileprefix, int partition, sc_MPI_Comm comm, int do_dup);
57
58
T8_EXTERN_C_END ();
59
60
#endif /* !T8_CMESH_TRIANGLE_H */
61
62