Commit 908a51c9 authored by Michael Turner's avatar Michael Turner
Browse files

io changes

parent 19abb47d
......@@ -59,6 +59,15 @@ void CADSystem::Report()
cout << endl << "CAD report:" << endl;
cout << "\tCAD has: " << m_curves.size() << " curves." << endl;
cout << "\tCAD has: " << m_surfs.size() << " surfaces." << endl;
if(m_surfs.size() == 1 && m_surfs[1]->IsPlane())
{
cout << "\tCAD is 2D" << endl;
m_2d = true;
}
else
{
m_2d = false;
}
}
void CADSystem::SmallFeatureAnalysis(NekDouble min)
......
......@@ -182,6 +182,8 @@ private:
std::map<int, CADVertSharedPtr> m_verts;
/// occ master object
TopoDS_Shape shape;
bool m_2d;
};
typedef boost::shared_ptr<CADSystem> CADSystemSharedPtr;
......
......@@ -93,45 +93,30 @@ void InputCAD::Process()
m_makeBL = true;
pSession->LoadParameter("BLThick", m_blthick);
}
else
{
else if(pSession->GetSolverInfo("MeshType") == "EULER")
m_makeBL = false;
}
else
ASSERTL0(false,"unknown MeshType");
vector<unsigned int> symsurfs;
vector<unsigned int> blsurfs;
if(m_makeBL)
{
string sym = pSession->GetSolverInfo("SymPlane");
string bl = pSession->GetSolverInfo("BLSurfs");
string sym, bl;
sym = pSession->GetSolverInfo("SymPlane");
bl = pSession->GetSolverInfo("BLSurfs");
ParseUtils::GenerateSeqVector(sym.c_str(), symsurfs);
ParseUtils::GenerateSeqVector(bl.c_str(), blsurfs);
sort(symsurfs.begin(), symsurfs.end());
sort(blsurfs.begin(), blsurfs.end());
if(m_mesh->m_verbose)
{
cout << "making boundary layer of surfs: ";
for(int i = 0; i < blsurfs.size(); i++)
{
cout << blsurfs[i] << " ";
}
cout << endl << "with the symmetry planes: ";
for(int i = 0; i < symsurfs.size(); i++)
{
cout << symsurfs[i] << " ";
}
cout << endl << "of thickness " << m_blthick << endl;
}
ASSERTL0(blsurfs.size() > 0, "No surfaces selected to make boundary layer on");
}
if(boost::iequals(m_orelax,"TRUE"))
m_octreeRelax = true;
else
{
m_octreeRelax = false;
}
CADSystemSharedPtr m_cad = MemoryManager<CADSystem>::
AllocateSharedPtr(m_CADName);
......@@ -143,6 +128,24 @@ void InputCAD::Process()
cout << "With a relaxed octree" << endl;
}
if(m_makeBL)
{
if(m_mesh->m_verbose)
{
cout << "making boundary layer of surfs: ";
for(int i = 0; i < blsurfs.size(); i++)
{
cout << blsurfs[i] << " ";
}
cout << endl << "with the symmetry planes: ";
for(int i = 0; i < symsurfs.size(); i++)
{
cout << symsurfs[i] << " ";
}
cout << endl << "of thickness " << m_blthick << endl;
}
}
ASSERTL0(m_cad->LoadCAD(),
"Failed to load CAD");
......@@ -173,7 +176,7 @@ void InputCAD::Process()
//create surface mesh
m_mesh->m_expDim--; //just to make it easier to surface mesh for now
SurfaceMeshSharedPtr m_surfacemesh = MemoryManager<SurfaceMesh>::
AllocateSharedPtr(m_mesh, m_cad, m_octree, symsurfs, bl);
AllocateSharedPtr(m_mesh, m_cad, m_octree, symsurfs, m_blthick);
m_surfacemesh->Mesh();
......@@ -193,10 +196,13 @@ void InputCAD::Process()
map<int, FaceSharedPtr> surftopriface; //map of surface element id to opposite prism face for psudo surface in tetmesh
//BLMeshSharedPtr m_blmesh = boost::shared_ptr<BLMesh>(new BLMesh(m_mesh,
// blsurfs, symsurfs, bl, surftopriface));
if(m_makeBL)
{
BLMeshSharedPtr m_blmesh = boost::shared_ptr<BLMesh>(new BLMesh(m_mesh,
blsurfs, symsurfs, m_blthick, surftopriface));
//m_blmesh->Mesh();
m_blmesh->Mesh();
}
//create tet mesh
TetMeshSharedPtr m_tet =
......
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