28 std::getline(std::cin,line);
29 std::string::size_type
x = 0;
31 std::vector<double> coords;
33 x = line.find(
"point [");
34 while(x == std::string::npos && !std::cin.eof()){
35 std::getline(std::cin,line);
36 x = line.find(
"point [");
39 std::cerr <<
"File error 1." << std::endl;
42 std::getline(std::cin,line);
44 unsigned int count = 1;
45 while(x == std::string::npos && !std::cin.eof()){
46 std::istringstream Istr(line);
48 Istr >> xc >> yc >> zc;
53 std::getline(std::cin,line);
57 std::cerr <<
"File error 2." << std::endl;
60 unsigned int number_of_nodes = coords.size()/3;
62 nc.
init(number_of_nodes,&(coords[0]));
63 getline(std::cin,line);
64 x = line.find(
"coordIndex [");
65 while(x == std::string::npos && !std::cin.eof()){
66 getline(std::cin,line);
67 x = line.find(
"coordIndex [");
70 std::cerr <<
"File error 3." << std::endl;
74 std::vector<Mesh::IndexType> element(3);
75 std::getline(std::cin,line);
77 while(x == std::string::npos && !std::cin.eof()){
78 std::istringstream Istr(line);
81 Istr >> element[0] >> delim >> element[1] >> delim >> element[2] >> delim >> dummy;
86 std::getline(std::cin,line);
90 std::cerr <<
"File error 4." << std::endl;
94 unsigned int nvert = nc.
Size();
95 unsigned int ntri = ec.
Nelem();
96 std::cout <<
"Number of vertices: " << nvert << std::endl
97 <<
"Number of triangles: " << ntri << std::endl;
void AddElement(const std::vector< IndexType > &elem)
General connectivity object.
void CheckCoordinates(double *coords, int number_of_points, double tol)
bool TRAIL_WriteWindow(const std::string &wname, const std::string &path, const std::string &twin, const std::string &tpath, double t, unsigned int id, MPI_Comm comm, std::ostream *=NULL)
int TRAIL_SurfaceMesh2Window(const std::string &wname, int pane_id, Mesh::NodalCoordinates &, Mesh::Connectivity &)
Creates a window from a Mesh object. (copies data)
void COM_init(int *argc, char ***argv)