21 #ifdef LIBMESH_HAVE_TRIANGLE 36 t.pointlist =
static_cast<REAL*
>(
nullptr);
37 t.pointattributelist =
static_cast<REAL*
>(
nullptr);
38 t.pointmarkerlist =
static_cast<int *
>(
nullptr);
39 t.numberofpoints = 0 ;
40 t.numberofpointattributes = 0 ;
42 t.trianglelist =
static_cast<int *
>(
nullptr);
43 t.triangleattributelist =
static_cast<REAL*
>(
nullptr);
44 t.trianglearealist =
static_cast<REAL*
>(
nullptr);
45 t.neighborlist =
static_cast<int *
>(
nullptr);
46 t.numberoftriangles = 0;
47 t.numberofcorners = 0;
48 t.numberoftriangleattributes = 0;
50 t.segmentlist =
static_cast<int *
>(
nullptr);
51 t.segmentmarkerlist =
static_cast<int *
>(
nullptr);
52 t.numberofsegments = 0;
54 t.holelist =
static_cast<REAL*
>(
nullptr);
57 t.regionlist =
static_cast<REAL*
>(
nullptr);
58 t.numberofregions = 0;
60 t.edgelist =
static_cast<int *
>(
nullptr);
61 t.edgemarkerlist =
static_cast<int *
>(
nullptr);
62 t.normlist =
static_cast<REAL*
>(
nullptr);
73 std::free (t.pointlist );
74 std::free (t.pointattributelist );
75 std::free (t.pointmarkerlist );
76 std::free (t.trianglelist );
77 std::free (t.triangleattributelist);
78 std::free (t.trianglearealist );
79 std::free (t.neighborlist );
80 std::free (t.segmentlist );
81 std::free (t.segmentmarkerlist );
86 std::free (t.holelist );
87 std::free (t.regionlist);
90 std::free (t.edgelist );
91 std::free (t.edgemarkerlist);
92 std::free (t.normlist );
114 for (
int i=0, c=0; c<triangle_data_input.numberofpoints; i+=2, ++c)
119 triangle_data_input.pointlist[i+1]),
124 for (
int i=0; i<triangle_data_input.numberoftriangles; ++i)
132 for (
unsigned int n=0; n<3; ++n)
133 elem->
set_node(n) = mesh_output.
node_ptr(triangle_data_input.trianglelist[i*3 + n]);
143 elem->
set_node(0) = mesh_output.
node_ptr(triangle_data_input.trianglelist[i*6 + 0]);
144 elem->
set_node(1) = mesh_output.
node_ptr(triangle_data_input.trianglelist[i*6 + 1]);
145 elem->
set_node(2) = mesh_output.
node_ptr(triangle_data_input.trianglelist[i*6 + 2]);
146 elem->
set_node(3) = mesh_output.
node_ptr(triangle_data_input.trianglelist[i*6 + 5]);
147 elem->
set_node(4) = mesh_output.
node_ptr(triangle_data_input.trianglelist[i*6 + 3]);
148 elem->
set_node(5) = mesh_output.
node_ptr(triangle_data_input.trianglelist[i*6 + 4]);
154 libmesh_error_msg(
"ERROR: Unrecognized triangular element type.");
172 #endif // LIBMESH_HAVE_TRIANGLE A 2D triangular element with 3 nodes.
virtual Node *& set_node(const unsigned int i)
The base class for all geometric element types.
virtual void find_neighbors(const bool reset_remote_elements=false, const bool reset_current_list=true) override
virtual Node * add_point(const Point &p, const dof_id_type id=DofObject::invalid_id, const processor_id_type proc_id=DofObject::invalid_processor_id)=0
A 2D triangular element with 6 nodes.
Base class for Replicated and Distributed meshes.
virtual Elem * add_elem(Elem *e)=0
void copy_tri_to_mesh(const triangulateio &triangle_data_input, UnstructuredMesh &mesh_output, const ElemType type)
void init(triangulateio &t)
void set_mesh_dimension(unsigned char d)
void destroy(triangulateio &t, IO_Type)
virtual const Node * node_ptr(const dof_id_type i) const =0
A geometric point in (x,y,z) space.