#include <Neutral_Reader.h>
Definition at line 39 of file Neutral_Reader.h.
 
  
  
      
        
          | void get_nextline  | 
          ( | 
          std::istream &  | 
          is,  | 
         
        
           | 
           | 
          char *  | 
          str  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlineprivate   | 
  
 
 
  
  
      
        
          | int read_mesh  | 
          ( | 
          const char *  | 
          fname,  | 
         
        
           | 
           | 
          const std::string &  | 
          wname  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Definition at line 46 of file Neutral_Reader.h.
References buf, COM_get_window_handle(), COM_new_window(), get_nextline(), read_pane_coors(), and read_pane_elems().
Referenced by main().
   47     std::ifstream is( fname); 
 
   49       std::cerr << 
"Error: Could not open file " << fname << std::endl;
 
   57     std::cout << 
"Reading file " << fname << std::endl;
 
   62     } 
while ( !is.eof() && std::string(
buf).find( 
"NUMNP")==std::string::npos);
 
   64     std::cerr << 
"Buf is now \"" << 
buf << 
"\" before getting nn" << std::endl;
 
   66     int t1, t2, t3, t4, nn, ne;
 
   67     std::sscanf( 
buf, 
"%d %d %d %d %d %d", &nn, &ne, &t1, &t2, &t3, &t4);
 
   72     } 
while ( !is.eof() && std::string(
buf).find( 
"NODAL")==std::string::npos);
 
   74     std::cout << 
"Reading " << nn << 
" nodes and "  
   75               << ne << 
" triangles " << std::endl;
 
   81     } 
while ( !is.eof() && std::string(
buf).find( 
"ELEMENTS")==std::string::npos);
 
void read_pane_elems(std::istream &is, const std::string &wname, int ne)
 
void get_nextline(std::istream &is, char *str)
 
void COM_new_window(const char *wname, MPI_Comm c=MPI_COMM_NULL)
 
int COM_get_window_handle(const char *wname)
 
void read_pane_coors(std::istream &is, const std::string &wname, int nn)
 
 
 
 
  
  
      
        
          | void read_pane_coors  | 
          ( | 
          std::istream &  | 
          is,  | 
         
        
           | 
           | 
          const std::string &  | 
          wname,  | 
         
        
           | 
           | 
          int  | 
          nn  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlineprivate   | 
  
 
Definition at line 95 of file Neutral_Reader.h.
References buf, COM_allocate_array(), COM_assertion, COM_set_size(), get_nextline(), and i.
Referenced by read_mesh().
   97     SURF::Point_3<double> *ps;
 
  100     for ( 
int i=0; 
i<nn; ++
i) {
 
  104       std::sscanf( 
buf, 
"%d %lf %lf %lf", &t1, &ps[
i][0], &ps[i][1], &ps[i][2]);
 
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language. 
 
void COM_set_size(const char *wa_str, int pane_id, int size, int ng=0)
Set sizes of for a specific attribute. 
 
void get_nextline(std::istream &is, char *str)
 
void COM_allocate_array(const char *wa_str, int pane_id=0, void **addr=NULL, int strd=0, int cap=0)
Allocate space for an attribute on a specific pane and return the address by setting addr...
 
 
 
 
  
  
      
        
          | void read_pane_elems  | 
          ( | 
          std::istream &  | 
          is,  | 
         
        
           | 
           | 
          const std::string &  | 
          wname,  | 
         
        
           | 
           | 
          int  | 
          ne  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlineprivate   | 
  
 
Definition at line 110 of file Neutral_Reader.h.
References buf, COM_allocate_array(), COM_assertion, COM_set_size(), get_nextline(), and i.
Referenced by read_mesh().
  113     SURF::Vector_3<int> *es;
 
  116     for (
int i=0; 
i<ne; ++
i) {
 
  120       std::sscanf( 
buf, 
"%d %d %d %d %d %d", &t1, &t2, &t3, 
 
  121                    &es[
i][0], &es[i][1], &es[i][2]);
 
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language. 
 
void COM_set_size(const char *wa_str, int pane_id, int size, int ng=0)
Set sizes of for a specific attribute. 
 
void get_nextline(std::istream &is, char *str)
 
void COM_allocate_array(const char *wa_str, int pane_id=0, void **addr=NULL, int strd=0, int cap=0)
Allocate space for an attribute on a specific pane and return the address by setting addr...
 
 
 
 
The documentation for this class was generated from the following file: