Skip to content
Snippets Groups Projects
Commit 25cd3ff0 authored by Matti Pellika's avatar Matti Pellika
Browse files

prettier

parent 629fd5fb
Branches
Tags
No related merge requests found
...@@ -29,12 +29,6 @@ bool Less_Cell::operator()(const Cell* c1, const Cell* c2) const ...@@ -29,12 +29,6 @@ bool Less_Cell::operator()(const Cell* c1, const Cell* c2) const
return false; return false;
} }
bool Less_VertexNumIndex::operator()(const std::pair<MVertex*, int> v1,
const std::pair<MVertex*, int> v2) const
{
return (v1.first->getNum() < v2.first->getNum());
}
int Cell::_globalNum = 0; int Cell::_globalNum = 0;
Cell::Cell(MElement* element, int domain) Cell::Cell(MElement* element, int domain)
...@@ -65,15 +59,14 @@ Cell::Cell(Cell* parent, int i) ...@@ -65,15 +59,14 @@ Cell::Cell(Cell* parent, int i)
void Cell::_sortVertexIndices() void Cell::_sortVertexIndices()
{ {
std::vector< std::pair<MVertex*, int> > si; std::map<MVertex*, int, MVertexLessThanNum> si;
for(unsigned int i = 0; i < _v.size(); i++) for(unsigned int i = 0; i < _v.size(); i++)
si.push_back( std::make_pair(_v[i], i) ); si[_v[i]] = i;
std::sort(si.begin(), si.end(), Less_VertexNumIndex());
for(unsigned int i = 0; i < si.size(); i++) std::map<MVertex*, int, MVertexLessThanNum>::iterator it;
_si.push_back(si[i].second); for(it = si.begin(); it != si.end(); it++)
_si.push_back(it->second);
} }
inline int Cell::getSortedVertex(int vertex) const inline int Cell::getSortedVertex(int vertex) const
......
...@@ -19,12 +19,6 @@ public: ...@@ -19,12 +19,6 @@ public:
bool operator()(const Cell* c1, const Cell* c2) const; bool operator()(const Cell* c1, const Cell* c2) const;
}; };
class Less_VertexNumIndex {
public:
bool operator()(const std::pair<MVertex*, int> v1,
const std::pair<MVertex*, int> v2) const;
};
// Class to save cell boundary orientation information // Class to save cell boundary orientation information
class BdInfo { class BdInfo {
private: private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment