59 const std::string& rFileName)
63 std::vector<std::string> raw_data;
64 std::ifstream data_file(rFileName.c_str());
68 if (!data_file.is_open())
70 EXCEPTION(
"Could not open data file " + rFileName);
75 getline(data_file, raw_line);
82 long hash_location = raw_line.find(
'#', 0);
83 if (hash_location >= 0)
85 raw_line = raw_line.substr(0, hash_location);
89 long not_blank_location = raw_line.find_first_not_of(
" \t", 0);
90 if (not_blank_location >= 0)
92 raw_data.push_back(raw_line);
96 getline(data_file, raw_line);
107 std::vector<std::vector<unsigned> >::iterator the_iterator;
109 unsigned max_node_index = 0;
111 for (the_iterator = mElementData.begin(); the_iterator < mElementData.end(); the_iterator++)
113 std::vector<unsigned> indices = *the_iterator;
115 for (
unsigned i = 0; i < ELEMENT_DIM+1; i++)
117 if (indices[i] > max_node_index)
119 max_node_index = indices[i];
124 return max_node_index;
131 std::vector<std::vector<unsigned> >::iterator the_iterator;
133 unsigned min_node_index = UINT_MAX;
135 for (the_iterator = mElementData.begin(); the_iterator < mElementData.end(); the_iterator++)
137 std::vector<unsigned> indices = *the_iterator;
139 for (
unsigned i = 0; i < ELEMENT_DIM+1; i++)
141 if (indices[i] < min_node_index)
143 min_node_index = indices[i];
148 return min_node_index;