Select Git revision
configure.in
Forked from
gmsh / gmsh
Source project has a limited visibility.
tetgen.cxx 1.09 MiB
///////////////////////////////////////////////////////////////////////////////
// //
// TetGen //
// //
// A Quality Tetrahedral Mesh Generator and 3D Delaunay Triangulator //
// //
// Version 1.5 //
// February 21, 2012 //
// //
// PRE-RELEASE TEST CODE. //
// PLEASE DO NOT DISTRIBUTE !! //
// PLEASE HELP ME TO IMPROVE IT !! //
// //
// Copyright (C) 2002--2012 //
// Hang Si //
// Research Group: Numerical Mathematics and Scientific Computing //
// Weierstrass Institute for Applied Analysis and Stochastics (WIAS) //
// Mohrenstr. 39, 10117 Berlin, Germany //
// Hang.Si@wias-berlin.de //
// //
// TetGen is freely available through the website: http://www.tetgen.org. //
// It may be copied, modified, and redistributed for non-commercial use. //
// Please consult the file LICENSE for the detailed copyright notices. //
// //
///////////////////////////////////////////////////////////////////////////////
#include "tetgen.h"
//// io_cxx ///////////////////////////////////////////////////////////////////
//// ////
//// ////
///////////////////////////////////////////////////////////////////////////////
// //
// load_node_call() Read a list of points from a file. //
// //
// 'infile' is the file handle contains the node list. It may point to a //
// .node, or .poly or .smesh file. 'markers' indicates each node contains an //
// additional marker (integer) or not. 'uvflag' indicates each node contains //
// u,v coordinates or not. It is reuqired by a PSC. 'infilename' is the name //
// of the file being read, it is only used in error messages. //
// //
// The 'firstnumber' (0 or 1) is automatically determined by the number of //
// the first index of the first point. //
// //
///////////////////////////////////////////////////////////////////////////////
bool tetgenio::load_node_call(FILE* infile, int markers, int uvflag,
char* infilename)
{
char inputline[INPUTLINESIZE];
char *stringptr;
REAL x, y, z, attrib;
int firstnode, currentmarker;
int index, attribindex;
int i, j;
// Initialize 'pointlist', 'pointattributelist', and 'pointmarkerlist'.
pointlist = new REAL[numberofpoints * 3];
if (pointlist == (REAL *) NULL) {
terminatetetgen(1);
}
if (numberofpointattributes > 0) {
pointattributelist = new REAL[numberofpoints * numberofpointattributes];
if (pointattributelist == (REAL *) NULL) {
terminatetetgen(1);
}
}
if (markers) {
pointmarkerlist = new int[numberofpoints];