Commit 07b38848 authored by Michael Turner's avatar Michael Turner

smooth refinement and change compids

parent 19f04585
......@@ -121,7 +121,7 @@ void Generator2D::Process()
for (int i = 1; i <= m_mesh->m_cad->GetNumSurf(); i++)
{
m_facemeshes[i] = MemoryManager<FaceMesh>::AllocateSharedPtr(
i, m_mesh, m_curvemeshes, m_mesh->m_cad->GetNumSurf() > 100);
i, m_mesh, m_curvemeshes, 100);
m_facemeshes[i]->OrientateCurves();
MakeBL(i, m_facemeshes[i]->GetEdges());
......@@ -145,7 +145,7 @@ void Generator2D::Process()
}
m_facemeshes[i] = MemoryManager<FaceMesh>::AllocateSharedPtr(
i, m_mesh, m_curvemeshes, m_mesh->m_cad->GetNumSurf() > 100);
i, m_mesh, m_curvemeshes, 100);
m_facemeshes[i]->Mesh();
}
......@@ -280,7 +280,7 @@ void Generator2D::MakeBL(int faceid, vector<EdgeLoop> e)
ElmtConfig conf(LibUtilities::eQuadrilateral, 1, false, false);
vector<int> tags;
tags.push_back(102);
tags.push_back(101);
ElementSharedPtr E = GetElementFactory().CreateInstance(
LibUtilities::eQuadrilateral, conf, qns, tags);
......
......@@ -933,7 +933,12 @@ bool FaceMesh::Validate()
numValid++;
}
if (numValid != 3)
NekDouble rmin = min(r[0],r[1]);
rmin = min(rmin,r[2]);
NekDouble rmax = max(r[0],r[1]);
rmax = min(rmax,r[2]);
if (numValid != 3 || rmax / rmin > 1.1)
{
Array<OneD, NekDouble> ainfo, binfo, cinfo;
ainfo = m_connec[i][0]->GetCADSurfInfo(m_id);
......
......@@ -87,12 +87,6 @@ void SurfaceMesh::Process()
if (m_mesh->m_verbose)
cout << endl << "\tFace meshing:" << endl << endl;
int prefix = 100;
if(m_mesh->m_cad->GetNumSurf() > 1000)
{
prefix *= 10;
}
bool validError = false;
for (int i = 1; i <= m_mesh->m_cad->GetNumSurf(); i++)
{
......@@ -103,7 +97,7 @@ void SurfaceMesh::Process()
}
m_facemeshes[i] =
MemoryManager<FaceMesh>::AllocateSharedPtr(i,m_mesh,
m_curvemeshes, prefix + i);
m_curvemeshes, i);
validError = validError ? true : m_facemeshes[i]->ValidateCurves();
}
......
......@@ -775,7 +775,7 @@ void BLMesh::BuildElements()
}
vector<int> tags;
tags.push_back(1); //all prisms are comp 1
tags.push_back(m_mesh->m_cad->GetNumSurf() < 100 ? 101 : 1001);
ElementSharedPtr E = GetElementFactory().
CreateInstance(LibUtilities::ePrism, pconf, pn, tags);
E->SetId(i);
......
......@@ -145,7 +145,7 @@ void TetMesh::Mesh()
n.push_back(IdToNode[m_tetconnect[i][3]]);
ElmtConfig conf(LibUtilities::eTetrahedron, 1, false, false);
vector<int> tags;
tags.push_back(0);
tags.push_back(m_mesh->m_cad->GetNumSurf() < 100 ? 100 : 1000);
ElementSharedPtr E = GetElementFactory().CreateInstance(
LibUtilities::eTetrahedron, conf, n, tags);
......
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