Commit 5a1c15ad authored by mike turner's avatar mike turner

start reworking curve constructor

parent a4775340
......@@ -102,36 +102,6 @@ void Generator2D::Process()
////////////////////////////////////////
EdgeSet::iterator it;
for (it = m_mesh->m_edgeSet.begin(); it != m_mesh->m_edgeSet.end(); it++)
{
vector<NodeSharedPtr> ns;
ns.push_back((*it)->m_n1);
ns.push_back((*it)->m_n2);
// for each iterator create a LibUtilities::eSegement
// push segment into m_mesh->m_element[1]
// tag for the elements shoudl be the CAD number of the curves
ElmtConfig conf(LibUtilities::eSegment, 1, false, false);
vector<int> tags;
tags.push_back((*it)->m_parentCAD->GetId());
ElementSharedPtr E2 = GetElementFactory().CreateInstance(
LibUtilities::eSegment, conf, ns, tags);
m_mesh->m_element[1].push_back(E2);
}
for (int i = 1; i <= m_mesh->m_cad->GetNumSurf(); i++)
{
m_facemeshes[i] = MemoryManager<FaceMesh>::AllocateSharedPtr(
i, m_mesh, m_curvemeshes, 100);
m_facemeshes[i]->OrientateCurves();
}
if (m_config["blcurves"].beenSet)
{
// we need to do the boundary layer generation in a face by face basis
......@@ -148,8 +118,6 @@ void Generator2D::Process()
}
}
// m_mesh->m_element[1].clear();
if (m_mesh->m_verbose)
{
cout << endl << "\tFace meshing:" << endl << endl;
......@@ -178,6 +146,30 @@ void Generator2D::Process()
i++;
}
////////////////////////////////////
EdgeSet::iterator it;
for (it = m_mesh->m_edgeSet.begin(); it != m_mesh->m_edgeSet.end(); it++)
{
vector<NodeSharedPtr> ns;
ns.push_back((*it)->m_n1);
ns.push_back((*it)->m_n2);
// for each iterator create a LibUtilities::eSegement
// push segment into m_mesh->m_element[1]
// tag for the elements shoudl be the CAD number of the curves
ElmtConfig conf(LibUtilities::eSegment, 1, false, false);
vector<int> tags;
tags.push_back((*it)->m_parentCAD->GetId());
ElementSharedPtr E2 = GetElementFactory().CreateInstance(
LibUtilities::eSegment, conf, ns, tags);
m_mesh->m_element[1].push_back(E2);
}
ProcessVertices();
ProcessEdges();
ProcessFaces();
......
......@@ -62,26 +62,7 @@ public:
/**
* @brief default constructor
*/
CurveMesh(int id, MeshSharedPtr m) : m_id(id), m_mesh(m)
{
m_blID = m_bl.DefineFunction("x y z", "0.0");
m_cadcurve = m_mesh->m_cad->GetCurve(m_id);
}
/**
* @brief alternative constructor with mesh points already created
*/
CurveMesh(int id, MeshSharedPtr m, std::vector<NodeSharedPtr> n)
: m_id(id), m_mesh(m), m_meshpoints(n)
{
m_blID = m_bl.DefineFunction("x y z", "0.0");
m_cadcurve = m_mesh->m_cad->GetCurve(m_id);
}
/**
* @brief alternative constructor which use the octree in a different way
*/
CurveMesh(int id, MeshSharedPtr m, std::string expr)
CurveMesh(int id, MeshSharedPtr m, std::string expr = "0.0")
: m_id(id), m_mesh(m)
{
m_blID = m_bl.DefineFunction("x y z", expr);
......
......@@ -127,6 +127,7 @@ bool FaceMesh::ValidateCurves()
void FaceMesh::Mesh()
{
Stretching();
OrientateCurves();
int numPoints = 0;
for (int i = 0; i < orderedLoops.size(); i++)
......
......@@ -78,10 +78,7 @@ public:
*/
bool ValidateCurves();
void ResetCurvemeshes(const std::map<int, CurveMeshSharedPtr> &cmeshes)
{
m_curvemeshes = cmeshes;
}
private:
/**
* @brief Get the boundries of the surface and extracts the nodes from
......@@ -89,12 +86,6 @@ public:
*/
void OrientateCurves();
std::vector<EdgeLoopSharedPtr> GetEdges()
{
return m_edgeloops;
}
private:
/**
* @brief Calculate the paramter plane streching factor
*/
......
......@@ -98,8 +98,7 @@ void SurfaceMesh::Process()
m_facemeshes[i] =
MemoryManager<FaceMesh>::AllocateSharedPtr(i,m_mesh,
m_curvemeshes, i);
m_facemeshes[i]->OrientateCurves();
validError = validError ? true : m_facemeshes[i]->ValidateCurves();
}
......
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