Commit e5fd6647 authored by Julian Marcon's avatar Julian Marcon
Browse files

Fix automatic peralign call in 2D periodic meshing

parent 573d8a3a
...@@ -174,9 +174,9 @@ void InputMCF::ParseFile(string nm) ...@@ -174,9 +174,9 @@ void InputMCF::ParseFile(string nm)
it = information.find("MeshType"); it = information.find("MeshType");
ASSERTL0(it != information.end(), "no meshtype defined"); ASSERTL0(it != information.end(), "no meshtype defined");
m_cfiMesh = it->second == "CFI"; m_cfiMesh = it->second == "CFI";
m_makeBL = it->second == "3DBndLayer"; m_makeBL = it->second == "3DBndLayer";
m_2D = it->second == "2D"; m_2D = it->second == "2D";
m_manifold = it->second == "Manifold"; m_manifold = it->second == "Manifold";
if (it->second == "2DBndLayer") if (it->second == "2DBndLayer")
...@@ -228,7 +228,7 @@ void InputMCF::ParseFile(string nm) ...@@ -228,7 +228,7 @@ void InputMCF::ParseFile(string nm)
it = parameters.find("BndLayerAdjustment"); it = parameters.find("BndLayerAdjustment");
if (it != parameters.end()) if (it != parameters.end())
{ {
m_adjust = true; m_adjust = true;
m_adjustment = it->second; m_adjustment = it->second;
} }
else else
...@@ -311,7 +311,7 @@ void InputMCF::Process() ...@@ -311,7 +311,7 @@ void InputMCF::Process()
module = GetModuleFactory().CreateInstance( module = GetModuleFactory().CreateInstance(
ModuleKey(eProcessModule, "loadcad"), m_mesh); ModuleKey(eProcessModule, "loadcad"), m_mesh);
module->RegisterConfig("filename", m_cadfile); module->RegisterConfig("filename", m_cadfile);
if(m_mesh->m_verbose) if (m_mesh->m_verbose)
{ {
module->RegisterConfig("verbose", ""); module->RegisterConfig("verbose", "");
} }
...@@ -324,7 +324,7 @@ void InputMCF::Process() ...@@ -324,7 +324,7 @@ void InputMCF::Process()
module->RegisterConfig("NACA", m_nacadomain); module->RegisterConfig("NACA", m_nacadomain);
} }
if(m_cfiMesh) if (m_cfiMesh)
{ {
module->RegisterConfig("CFIMesh", ""); module->RegisterConfig("CFIMesh", "");
} }
...@@ -357,7 +357,7 @@ void InputMCF::Process() ...@@ -357,7 +357,7 @@ void InputMCF::Process()
if (m_2D) if (m_2D)
{ {
////**** 2DGenerator ****//// ////**** 2DGenerator ****////
m_mesh->m_expDim = 2; m_mesh->m_expDim = 2;
m_mesh->m_spaceDim = 2; m_mesh->m_spaceDim = 2;
module = GetModuleFactory().CreateInstance( module = GetModuleFactory().CreateInstance(
ModuleKey(eProcessModule, "2dgenerator"), m_mesh); ModuleKey(eProcessModule, "2dgenerator"), m_mesh);
...@@ -433,9 +433,9 @@ void InputMCF::Process() ...@@ -433,9 +433,9 @@ void InputMCF::Process()
return; return;
} }
if(m_manifold) if (m_manifold)
{ {
//dont want to volume mesh // dont want to volume mesh
m_mesh->m_expDim = 2; m_mesh->m_expDim = 2;
} }
else else
...@@ -460,7 +460,8 @@ void InputMCF::Process() ...@@ -460,7 +460,8 @@ void InputMCF::Process()
{ {
cout << "Volume meshing has failed with message:" << endl; cout << "Volume meshing has failed with message:" << endl;
cout << e.what() << endl; cout << e.what() << endl;
cout << "The linear surface mesh be dumped as a manifold mesh" cout << "The linear surface mesh be dumped as a manifold "
"mesh"
<< endl; << endl;
m_mesh->m_expDim = 2; m_mesh->m_expDim = 2;
m_mesh->m_element[3].clear(); m_mesh->m_element[3].clear();
...@@ -511,8 +512,7 @@ void InputMCF::Process() ...@@ -511,8 +512,7 @@ void InputMCF::Process()
ModuleKey(eProcessModule, "varopti"), m_mesh); ModuleKey(eProcessModule, "varopti"), m_mesh);
module->RegisterConfig("hyperelastic", ""); module->RegisterConfig("hyperelastic", "");
module->RegisterConfig("maxiter", "10"); module->RegisterConfig("maxiter", "10");
module->RegisterConfig("numthreads", module->RegisterConfig("numthreads", boost::lexical_cast<string>(np));
boost::lexical_cast<string>(np));
try try
{ {
...@@ -535,8 +535,8 @@ void InputMCF::Process() ...@@ -535,8 +535,8 @@ void InputMCF::Process()
ModuleKey(eProcessModule, "bl"), m_mesh); ModuleKey(eProcessModule, "bl"), m_mesh);
module->RegisterConfig("layers", m_bllayers); module->RegisterConfig("layers", m_bllayers);
module->RegisterConfig("surf", m_blsurfs); module->RegisterConfig("surf", m_blsurfs);
module->RegisterConfig( module->RegisterConfig("nq",
"nq", boost::lexical_cast<string>(m_mesh->m_nummode)); boost::lexical_cast<string>(m_mesh->m_nummode));
module->RegisterConfig("r", m_blprog); module->RegisterConfig("r", m_blprog);
try try
...@@ -568,22 +568,23 @@ void InputMCF::Process() ...@@ -568,22 +568,23 @@ void InputMCF::Process()
boost::split(tmp, il, boost::is_any_of(",")); boost::split(tmp, il, boost::is_any_of(","));
module->RegisterConfig("surf1", tmp[0]); module->RegisterConfig("surf1", tmp[0]);
module->RegisterConfig("surf2", tmp[1]); module->RegisterConfig("surf2", tmp[1]);
}
module->SetDefaults(); module->SetDefaults();
module->Process(); module->Process();
}
} }
// apply surface labels // apply surface labels
for(auto &it : m_mesh->m_composite) for (auto &it : m_mesh->m_composite)
{ {
ElementSharedPtr el = it.second->m_items[0]; ElementSharedPtr el = it.second->m_items[0];
if(el->m_parentCAD) if (el->m_parentCAD)
{ {
string name = el->m_parentCAD->GetName(); string name = el->m_parentCAD->GetName();
if(name.size() > 0) if (name.size() > 0)
{ {
m_mesh->m_faceLabels.insert(make_pair(el->GetTagList()[0],name)); m_mesh->m_faceLabels.insert(
make_pair(el->GetTagList()[0], name));
} }
} }
} }
......
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