t8  1.2.0
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
Functions
t8_cmesh_triangle.h File Reference

We define function here that serve to open a mesh file generated by TETGEN and consructing a cmesh from it. More...

#include <t8.h>
#include <t8_eclass.h>
#include <t8_cmesh.h>

Go to the source code of this file.

Functions

t8_cmesh_t t8_cmesh_from_triangle_file (char *fileprefix, int partition, sc_MPI_Comm comm, int do_dup)
 Open a .node, .ele and .neigh file created by TRIANGLE to read and create a cmesh from them. More...
 

Detailed Description

We define function here that serve to open a mesh file generated by TETGEN and consructing a cmesh from it.

We define function here that serve to open a mesh file generated by TRIANGLE and consructing a cmesh from it.

Function Documentation

◆ t8_cmesh_from_triangle_file()

t8_cmesh_t t8_cmesh_from_triangle_file ( char *  fileprefix,
int  partition,
sc_MPI_Comm  comm,
int  do_dup 
)

Open a .node, .ele and .neigh file created by TRIANGLE to read and create a cmesh from them.

The cmesh will be replicated. The files are opened and read by one process and the cmesh is then broadcasted to the other processes.

Parameters
[in]fileprefixA string holding the prefix of the TRIANGLE files. The files fileprefix.node, fileprefix.ele and fileprefix.neigh are read.
[in]partitionIn the future this flag can decide whether the returned cmesh is partitioned or not. Currently it is always replicated.
[in]commThe mpi communicator to be used.
[in]do_dupWhether comm should be duplicated by cmesh.
Returns
A ommited, replicated cmesh constructed from the info in the TRIANGLE files.