Commit c9676155 authored by Michael Turner's avatar Michael Turner

Merge branch 'feature/space-out-BL' into 'master'

Space out 2D BLs

See merge request !890
parents 0d8abaab 2e9ee31f
......@@ -55,6 +55,7 @@ v5.0.0
elements (!877)
- Revert triangle code to ThirdParty library (!883)
- Fix coinciding nodes issue with very fine meshes (!883)
- Add ability to space out 2D BL nodes to better fit local target Delta (!890)
**FieldConvert**:
- Add input module for Semtex field files (!777)
......
......@@ -178,9 +178,9 @@ void InputMCF::ParseFile(string nm)
it = information.find("MeshType");
ASSERTL0(it != information.end(), "no meshtype defined");
m_cfiMesh = it->second == "CFI";
m_makeBL = it->second == "3DBndLayer";
m_2D = it->second == "2D";
m_cfiMesh = it->second == "CFI";
m_makeBL = it->second == "3DBndLayer";
m_2D = it->second == "2D";
m_manifold = it->second == "Manifold";
if (it->second == "2DBndLayer")
......@@ -232,13 +232,30 @@ void InputMCF::ParseFile(string nm)
it = parameters.find("BndLayerAdjustment");
if (it != parameters.end())
{
m_adjust = true;
m_adjust = true;
m_adjustment = it->second;
}
else
{
m_adjust = false;
}
it = parameters.find("SpaceOutBndLayer");
if (it != parameters.end())
{
m_spaceoutbl = true;
m_spaceoutblthr = it->second;
it = parameters.find("NoSpaceOutSurf");
if (it != parameters.end())
{
m_nospaceoutsurf = it->second;
}
}
else
{
m_spaceoutbl = false;
}
}
m_naca = false;
......@@ -317,7 +334,7 @@ void InputMCF::Process()
module = GetModuleFactory().CreateInstance(
ModuleKey(eProcessModule, "loadcad"), m_mesh);
module->RegisterConfig("filename", m_cadfile);
if(m_mesh->m_verbose)
if (m_mesh->m_verbose)
{
module->RegisterConfig("verbose", "");
}
......@@ -330,7 +347,7 @@ void InputMCF::Process()
module->RegisterConfig("NACA", m_nacadomain);
}
if(m_cfiMesh)
if (m_cfiMesh)
{
module->RegisterConfig("CFIMesh", "");
}
......@@ -363,7 +380,7 @@ void InputMCF::Process()
if (m_2D)
{
////**** 2DGenerator ****////
m_mesh->m_expDim = 2;
m_mesh->m_expDim = 2;
m_mesh->m_spaceDim = 2;
module = GetModuleFactory().CreateInstance(
ModuleKey(eProcessModule, "2dgenerator"), m_mesh);
......@@ -386,6 +403,12 @@ void InputMCF::Process()
{
module->RegisterConfig("smoothbl", "");
}
if (m_spaceoutbl)
{
module->RegisterConfig("spaceoutbl", m_spaceoutblthr);
module->RegisterConfig("nospaceoutsurf", m_nospaceoutsurf);
}
}
if (m_periodic.size())
{
......@@ -444,9 +467,9 @@ void InputMCF::Process()
return;
}
if(m_manifold)
if (m_manifold)
{
//dont want to volume mesh
// dont want to volume mesh
m_mesh->m_expDim = 2;
}
else
......@@ -471,7 +494,8 @@ void InputMCF::Process()
{
cout << "Volume meshing has failed with message:" << 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;
m_mesh->m_expDim = 2;
m_mesh->m_element[3].clear();
......@@ -522,8 +546,7 @@ void InputMCF::Process()
ModuleKey(eProcessModule, "varopti"), m_mesh);
module->RegisterConfig("hyperelastic", "");
module->RegisterConfig("maxiter", "10");
module->RegisterConfig("numthreads",
boost::lexical_cast<string>(np));
module->RegisterConfig("numthreads", boost::lexical_cast<string>(np));
try
{
......@@ -546,8 +569,8 @@ void InputMCF::Process()
ModuleKey(eProcessModule, "bl"), m_mesh);
module->RegisterConfig("layers", m_bllayers);
module->RegisterConfig("surf", m_blsurfs);
module->RegisterConfig(
"nq", boost::lexical_cast<string>(m_mesh->m_nummode));
module->RegisterConfig("nq",
boost::lexical_cast<string>(m_mesh->m_nummode));
module->RegisterConfig("r", m_blprog);
try
......@@ -586,15 +609,16 @@ void InputMCF::Process()
}
// apply surface labels
for(auto &it : m_mesh->m_composite)
for (auto &it : m_mesh->m_composite)
{
ElementSharedPtr el = it.second->m_items[0];
if(el->m_parentCAD)
if (el->m_parentCAD)
{
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));
}
}
}
......
......@@ -61,13 +61,13 @@ public:
void ParseFile(std::string nm);
private:
std::string m_minDelta, m_maxDelta, m_eps, m_cadfile, m_order,
m_blsurfs, m_blthick, m_blprog, m_bllayers, m_refinement,
m_nacadomain, m_periodic, m_adjustment;
std::string m_minDelta, m_maxDelta, m_eps, m_cadfile, m_order, m_blsurfs,
m_blthick, m_blprog, m_bllayers, m_refinement, m_nacadomain, m_periodic,
m_adjustment, m_spaceoutblthr, m_nospaceoutsurf;
bool m_makeBL, m_surfopti, m_varopti, m_refine, m_woct, m_2D, m_splitBL,
m_naca, m_adjust, m_adjustall, m_smoothbl, m_manifold, m_cfiMesh;
m_naca, m_adjust, m_adjustall, m_smoothbl, m_manifold, m_cfiMesh,
m_spaceoutbl;
};
}
}
......
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