Commit 47b4f0fa authored by Michael Turner's avatar Michael Turner
Browse files

remove unused curvature from varopti to keep file size down

parent 9f29ce65
......@@ -53,6 +53,11 @@ void Face::GetCurvedNodes(
m_curveType == LibUtilities::eNodalTriElec)
{
int n = m_edgeList[0]->GetNodeCount();
int n2 = m_edgeList[1]->GetNodeCount();
int n3 = m_edgeList[2]->GetNodeCount();
bool same = (n == n2 ? (n2==n3) : false);
ASSERTL0(same, "Edges are not consistent");
nodeList.insert(
nodeList.end(), m_vertexList.begin(), m_vertexList.end());
......
......@@ -518,5 +518,67 @@ vector<ElUtilSharedPtr> ProcessVarOpti::GetLockedElements(NekDouble thres)
return ret;
}
void ProcessVarOpti::RemoveLinearCurvature()
{
for(int i = 0; i < m_dataSet.size(); i++)
{
if(m_dataSet[i]->GetScaledJac() > 0.999)
{
ElementSharedPtr el = m_dataSet[i]->GetEl();
vector<NodeSharedPtr> ns;
el->SetVolumeNodes(ns);
}
}
map<int, vector<FaceSharedPtr> > edgeToFace;
FaceSet::iterator fit;
for(fit = m_mesh->m_faceSet.begin(); fit != m_mesh->m_faceSet.end(); fit++)
{
bool rm = true;
for(int i = 0; i < (*fit)->m_elLink.size(); i++)
{
int id = (*fit)->m_elLink[i].first->GetId();
if(m_dataSet[id]->GetScaledJac() <= 0.999)
{
rm = false;
break;
}
}
if(rm)
{
(*fit)->m_faceNodes.clear();
}
vector<EdgeSharedPtr> es = (*fit)->m_edgeList;
for(int i = 0; i < es.size(); i++)
{
edgeToFace[es[i]->m_id].push_back(*fit);
}
}
EdgeSet::iterator eit;
for(eit = m_mesh->m_edgeSet.begin(); eit != m_mesh->m_edgeSet.end(); eit++)
{
map<int, vector<FaceSharedPtr> >::iterator it;
it = edgeToFace.find((*eit)->m_id);
ASSERTL0(it != edgeToFace.end(),"not found");
bool rm = true;
for(int i = 0; i < it->second.size(); i++)
{
if(it->second[i]->m_faceNodes.size() > 0)
{
rm = false;
break;
}
}
if(rm)
{
(*eit)->m_edgeNodes.clear();
}
}
}
}
}
......@@ -383,6 +383,8 @@ void ProcessVarOpti::Process()
t.Stop();
RemoveLinearCurvature();
if(m_mesh->m_verbose)
{
cout << "Time to compute: " << t.TimePerTest(1) << endl;
......
......@@ -106,7 +106,8 @@ private:
std::vector<ElUtilSharedPtr> GetLockedElements(NekDouble thres);
std::vector<std::vector<NodeSharedPtr> > GetColouredNodes(
std::vector<ElUtilSharedPtr> elLock);
void RemoveLinearCurvature();
NodeElMap m_nodeElMap;
std::vector<ElUtilSharedPtr> m_dataSet;
......
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