Commit eb06d792 authored by Michael Turner's avatar Michael Turner

Merge branch 'feature/gmsh-ordered-nodes' into 'master'

Order nodes in Gmsh output

See merge request !912
parents 9a061755 a5c3d1c7
......@@ -62,6 +62,7 @@ v5.0.0
- Add ability to space out 2D BL nodes to better fit local target Delta (!890)
- Fix automatic peralign call in 2D periodic meshing (!888)
- Fix BL splitting call from MCF (!910)
- Order nodes in Gmsh output (!912)
- Fix manifold face curvature nodes (!913)
**FieldConvert**:
......
......@@ -155,17 +155,20 @@ void OutputGmsh::Process()
}
// Create ordered set of nodes - not required but looks nicer.
std::set<NodeSharedPtr> tmp(m_mesh->m_vertexSet.begin(),
m_mesh->m_vertexSet.end());
map<int, NodeSharedPtr> tmp;
for (const auto &it : m_mesh->m_vertexSet)
{
tmp[it->GetID() + 1] = it;
}
// Write out nodes section.
m_mshFile << "$Nodes" << endl << m_mesh->m_vertexSet.size() << endl;
for (auto &it : tmp)
{
m_mshFile << it->m_id+1 << " " << scientific << setprecision(10)
<< it->m_x << " " << it->m_y << " " << it->m_z
<< endl;
m_mshFile << it.first << " " << scientific << setprecision(10)
<< it.second->m_x << " " << it.second->m_y << " "
<< it.second->m_z << endl;
}
m_mshFile << "$EndNodes" << endl;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment