Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gg2mesh.C
Go to the documentation of this file.
1 #include <iostream>
2 #include <fstream>
3 #include <sstream>
4 #include <string>
5 
6 #include "Mesh.H"
7 #include "Profiler.H"
8 #include "Global.H"
9 #include "primitive_utilities.H"
10 
11 int
12 main(int argc,char *argv[])
13 {
14  std::string line;
15  bool done = false;
16  while(!done){
17  std::getline(std::cin,line);
18  std::string::size_type x = line.find("Nodes");
19  if(x != std::string::npos)
20  done = true;
21  }
23  std::cin >> nc;
24  std::cout << nc << std::endl;
25  done = false;
26  while(!done){
27  std::getline(std::cin,line);
28  std::string::size_type x = line.find("Boundary");
29  if(x != std::string::npos)
30  done = true;
31  }
32  Mesh::IndexType nfaces;
33  std::getline(std::cin,line);
34  std::istringstream Dum(line);
35  Dum >> nfaces;
36  for(Mesh::IndexType i = 0;i<nfaces;i++)
37  getline(std::cin,line);
38  done = false;
39  while(!done){
40  std::getline(std::cin,line);
41  std::string::size_type x = line.find("Elements");
42  if(x != std::string::npos)
43  done = true;
44  }
45  done = false;
47  while(!done){
48  std::getline(std::cin,line);
49  std::string::size_type x = line.find("Variables");
50  if(x == std::string::npos){
51  std::istringstream Istr(line);
52  Mesh::IndexType dummy;
53  Istr >> dummy >> dummy;
54  std::vector<Mesh::IndexType> nodes;
55  while(Istr >> dummy)
56  nodes.push_back(dummy);
57  ec.AddElement(nodes);
58  }
59  else
60  done = true;
61  }
62  std::cout << ec << std::endl;
63  return(0);
64 }
void AddElement(const std::vector< IndexType > &elem)
Definition: Mesh.C:235
General connectivity object.
Definition: Mesh.H:334
Mesh Stuff.
blockLoc i
Definition: read.cpp:79
void int int REAL * x
Definition: read.cpp:74
int main(int argc, char *argv[])
Definition: blastest.C:94
IRAD::Primitive::IndexType IndexType
Definition: Mesh.H:57