47 const std::string& rNodeFileName,
48 const std::string& rElementFileName,
49 const std::string& rEdgeFileName)
53 std::string node_file_name = rPathBaseName + rNodeFileName;
54 this->mNodeRawData = this->GetRawDataFromFile(node_file_name);
57 this->mNodeData = TokenizeStringsToDoubles(this->mNodeRawData);
60 this->mpNodeIterator = this->mNodeData.begin();
64 std::string element_file_name = rPathBaseName + rElementFileName;
65 this->mElementRawData = this->GetRawDataFromFile(element_file_name);
68 this->mElementData = TokenizeStringsToInts(this->mElementRawData, SPACE_DIM + 1);
69 this->mpElementIterator = this->mElementData.begin();
77 std::string edge_file_name = rPathBaseName + rEdgeFileName;
78 this->mFaceRawData = this->GetRawDataFromFile(edge_file_name);
81 this->mFaceData = TokenizeStringsToInts(this->mFaceRawData, SPACE_DIM);
82 this->mpFaceIterator = this->mFaceData.begin();
93 std::vector < std::vector < double > >tokenized_data;
96 unsigned dimension_count = 0;
97 std::vector < std::string >::const_iterator the_iterator;
98 for (the_iterator = rRawData.begin(); the_iterator != rRawData.end();
101 const std::string& r_line_of_data = *the_iterator;
102 std::stringstream line_stream (r_line_of_data);
104 if (dimension_count == 0)
107 while (!line_stream.eof())
111 std::vector < double >x_coord;
112 line_stream >> item_coord;
113 x_coord.push_back (item_coord);
114 tokenized_data.push_back (x_coord);
119 unsigned current_node = 0;
122 while (!line_stream.eof())
125 line_stream >> item_coord;
126 tokenized_data[current_node].push_back (item_coord);
134 if (SPACE_DIM != dimension_count)
136 EXCEPTION(
"SPACE_DIM != dimension read from file");
138 return (tokenized_data);
145 std::vector < std::vector < unsigned > >tokenized_data;
148 for (
unsigned i = 0; i < dimensionOfObject; i++)
150 const std::string& r_line_of_data = rRawData[i];
151 std::stringstream line_stream (r_line_of_data);
156 while (!line_stream.eof())
160 std::vector < unsigned >first_index;
161 line_stream >> item_index;
162 first_index.push_back ((
unsigned) (item_index - 0.5));
163 tokenized_data.push_back (first_index);
168 unsigned current_node = 0;
171 while (!line_stream.eof())
174 line_stream >> item_index;
175 tokenized_data[current_node].
176 push_back ((
unsigned) (item_index - 0.5));
181 return (tokenized_data);