Commit 4703b3c9 authored by Michael Turner's avatar Michael Turner

Merge branch 'master' into 'feature/cfi-combined-lines'

# Conflicts:
#   CHANGELOG.md
parents a56ff01e eb06d792
......@@ -63,6 +63,8 @@ v5.0.0
- Fix automatic peralign call in 2D periodic meshing (!888)
- Fix BL splitting call from MCF (!910)
- Support CFI combined lines (!917)
- Order nodes in Gmsh output (!912)
- Fix manifold face curvature nodes (!913)
**FieldConvert**:
- Add input module for Semtex field files (!777)
......
......@@ -859,7 +859,7 @@ void Module::RegisterConfig(string key, string val)
{
it->second.value = it->second.defValue;
}
else
else
{
it->second.value = val;
}
......
......@@ -129,12 +129,21 @@ void HOSurfaceMesh::Process()
FaceSharedPtr f = m_mesh->m_element[2][i]->GetFaceLink();
bool dumFace = false;
if (!f)
{
//This uses a fake face to build the high-order info
//in the case of 2D and manifold geometries without having to
//rewrite the 3D code
//important to note that face nodes need to be inserted into the
//volume nodes of the surface element or they will be forgotton
f = std::shared_ptr<Face>(new Face(
m_mesh->m_element[2][i]->GetVertexList(),
vector<NodeSharedPtr>(), m_mesh->m_element[2][i]->GetEdgeList(),
LibUtilities::ePolyEvenlySpaced));
dumFace = true;
}
f->m_parentCAD = s;
......@@ -506,6 +515,12 @@ void HOSurfaceMesh::Process()
f->m_faceNodes = honodes;
f->m_curveType = LibUtilities::eGaussLobattoLegendre;
}
if(dumFace)
{
m_mesh->m_element[2][i]->SetVolumeNodes(f->m_faceNodes);
m_mesh->m_element[2][i]->SetCurveType(f->m_curveType);
}
}
if (m_mesh->m_verbose)
......
......@@ -1333,7 +1333,7 @@ void MeshGraphXmlCompressed::WriteCurves(TiXmlElement *geomTag, CurveMap &edges,
cinfo.ptid = 0;
cinfo.ptoffset = ptOffset;
edgeInfo.push_back(cinfo);
faceInfo.push_back(cinfo);
for(int j = 0; j < i.second->m_points.size(); j++)
{
......
......@@ -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;
......
......@@ -415,6 +415,32 @@ void OutputNekpp::TransferCurves(MeshGraphSharedPtr graph)
facecnt++;
}
}
if(m_mesh->m_expDim == 2 && m_mesh->m_spaceDim == 3)
{
//manifold case
for(int e = 0; e < m_mesh->m_element[2].size(); e++)
{
ElementSharedPtr el = m_mesh->m_element[2][e];
vector<NodeSharedPtr> ns;
el->GetCurvedNodes(ns);
if(ns.size() > 4)
{
CurveSharedPtr curve = MemoryManager<Curve>::AllocateSharedPtr(
el->GetId(), el->GetCurveType());
for(int i = 0; i < ns.size(); i++)
{
PointGeomSharedPtr vert = MemoryManager<PointGeom>::AllocateSharedPtr(
m_mesh->m_expDim, facecnt, ns[i]->m_x, ns[i]->m_y, ns[i]->m_z);
curve->m_points.push_back(vert);
}
faces[el->GetId()] = curve;
facecnt++;
}
}
}
}
void OutputNekpp::TransferComposites(MeshGraphSharedPtr graph)
......
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