Commit edfaac72 authored by Michael Turner's avatar Michael Turner
Browse files

udpate from master

parents 647d3a1a 0e9b34f1
......@@ -4,9 +4,9 @@ Changelog
v4.5.0
------
**NekMesh**:
- Add periodic boundary condition meshing in 2D (!733)
- Automatic peralign call if periodic boundary conditions present (!733)
- Support non-O BL meshing in 2D (!733)
- Adjust boundary layer thickness in corners in 2D (!739)
v4.4.0
------
......@@ -107,9 +107,9 @@ v4.4.0
- Change variable names in mcf file to make more sense (!736)
- Fix issues in varopti module so that in can be compiled without meshgen on
(!736)
- Replace LAPACK Eigenvalue calculation with handwritten function in
- Replace LAPACK Eigenvalue calculation with handwritten function in
varopti (!738)
- Improved node-colouring algorithm for better load-balancing
- Improved node-colouring algorithm for better load-balancing
in varopti (!738)
- Simplified calculation of the energy functional in varopti for improved
performance (!738)
......
......@@ -33,6 +33,7 @@
//
////////////////////////////////////////////////////////////////////////////////
#include <algorithm>
#include <math.h>
#include <NekMeshUtils/2DGenerator/2DGenerator.h>
......@@ -58,7 +59,11 @@ Generator2D::Generator2D(MeshSharedPtr m) : ProcessModule(m)
m_config["blthick"] =
ConfigOption(false, "0.0", "Parallelogram layer thickness");
m_config["periodic"] =
ConfigOption(false, "0", "Set of pairs of periodic curves");
ConfigOption(false, "", "Set of pairs of periodic curves");
m_config["bltadjust"] =
ConfigOption(false, "2.0", "Boundary layer thickness adjustment");
m_config["adjustblteverywhere"] =
ConfigOption(true, "0", "Adjust thickness everywhere");
}
Generator2D::~Generator2D()
......@@ -317,6 +322,7 @@ void Generator2D::Process()
LibUtilities::PrintProgressbar(i, m_mesh->m_cad->GetNumSurf(),
"Face progress");
}
m_facemeshes[i] = MemoryManager<FaceMesh>::AllocateSharedPtr(
i, m_mesh, m_curvemeshes, 99 + i);
m_facemeshes[i]->Mesh();
......@@ -420,6 +426,7 @@ void Generator2D::MakeBL(int faceid)
bool adjust = m_config["bltadjust"].beenSet;
NekDouble divider = m_config["bltadjust"].as<NekDouble>();
bool adjustEverywhere = m_config["adjustblteverywhere"].beenSet;
if (divider < 2.0)
{
WARNINGL1(false, "BndLayerAdjustment too low, corrected to 2.0");
......@@ -452,6 +459,7 @@ void Generator2D::MakeBL(int faceid)
t /= cos(angle / divider);
}
}
n[0] = n[0] * t + it->first->m_x;
n[1] = n[1] * t + it->first->m_y;
n[2] = 0.0;
......
......@@ -225,6 +225,17 @@ void InputMCF::ParseFile(string nm)
it = parameters.find("BndLayerProgression");
m_blprog = it != parameters.end() ? it->second : "2.0";
}
it = parameters.find("BndLayerAdjustment");
if (it != parameters.end())
{
m_adjust = true;
m_adjustment = it->second;
}
else
{
m_adjust = false;
}
}
m_naca = false;
......@@ -253,12 +264,14 @@ void InputMCF::ParseFile(string nm)
}
set<string>::iterator sit;
sit = boolparameters.find("SurfaceOptimiser");
m_surfopti = sit != boolparameters.end();
sit = boolparameters.find("WriteOctree");
m_woct = sit != boolparameters.end();
sit = boolparameters.find("VariationalOptimiser");
m_varopti = sit != boolparameters.end();
sit = boolparameters.find("SurfaceOptimiser");
m_surfopti = sit != boolparameters.end();
sit = boolparameters.find("WriteOctree");
m_woct = sit != boolparameters.end();
sit = boolparameters.find("VariationalOptimiser");
m_varopti = sit != boolparameters.end();
sit = boolparameters.find("BndLayerAdjustEverywhere");
m_adjustall = sit != boolparameters.end();
m_refine = refinement.size() > 0;
if(m_refine)
......@@ -335,6 +348,16 @@ void InputMCF::Process()
{
mods.back()->RegisterConfig("blcurves", m_blsurfs);
mods.back()->RegisterConfig("blthick", m_blthick);
if (m_adjust)
{
mods.back()->RegisterConfig("bltadjust", m_adjustment);
if (m_adjustall)
{
mods.back()->RegisterConfig("adjustblteverywhere", "");
}
}
}
if (m_periodic.size())
{
......
......@@ -63,9 +63,10 @@ public:
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_nacadomain, m_periodic, m_adjustment;
bool m_makeBL, m_surfopti, m_varopti, m_refine, m_woct, m_2D, m_splitBL,
m_naca;
m_naca, m_adjust, m_adjustall;
};
}
......
......@@ -16,6 +16,8 @@
<P PARAM="BndLayerSurfaces" VALUE="5-6" />
<P PARAM="BndLayerThickness" VALUE="0.05" />
<P PARAM="BndLayerAdjustment" VALUE="2.0" />
<P PARAM="Xmin" VALUE="-1.0" />
<P PARAM="Ymin" VALUE="-2.0" />
<P PARAM="Xmax" VALUE="3.0" />
......@@ -24,6 +26,7 @@
</PARAMETERS>
<BOOLPARAMETERS>
<P VALUE="BndLayerAdjustEverywhere" />
</BOOLPARAMETERS>
</MESHING>
......
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