19 std::vector<MVertex *> &vec)
21 for(
int i = 0; i < num; i++) {
35 FILE *fp =
Fopen(name.c_str(),
"r");
37 Msg::Error(
"Unable to open file '%s'", name.c_str());
42 std::map<int, std::vector<MElement *> > elements[2];
43 char buffer[256], dummy[256];
46 if(!fgets(buffer, 256, fp))
break;
47 if(!strncmp(buffer,
".NOE", 4)) {
49 if(!fgets(buffer, 256, fp))
break;
50 if(buffer[0] ==
'!')
continue;
51 if(buffer[0] ==
';')
break;
54 if(sscanf(buffer,
"%s %d %s %lf %s %lf %s %lf", dummy, &num, dummy, &x,
55 dummy, &y, dummy, &
z) != 8)
61 else if(!strncmp(buffer,
".MAI", 4)) {
63 if(!fgets(buffer, 256, fp))
break;
64 if(buffer[0] ==
'!')
continue;
65 if(buffer[0] ==
';')
break;
66 std::stringstream s(buffer);
69 while(s >> word) nn++;
73 if(sscanf(buffer,
"%s %d %s %d %s %d %d %d", dummy, &num, dummy, ®,
74 dummy, &n[0], &n[1], &n[2]) != 8)
80 if(sscanf(buffer,
"%s %d %s %d %s %d %d %d %d", dummy, &num, dummy,
81 ®, dummy, &n[0], &n[1], &n[2], &n[3]) != 9)
90 for(
int i = 0; i < (int)(
sizeof(elements) /
sizeof(elements[0])); i++)