Commit 152d2189 authored by Spencer Sherwin's avatar Spencer Sherwin
Browse files

Merge branch 'master' into feature/SumFacPyr

parents 7dc15c29 0e9b34f1
Changelog
=========
v4.5.0
------
**NekMesh**:
- Adjust boundary layer thickness in corners in 2D (!739)
v4.4.0
------
**Library**:
......
......@@ -37,7 +37,9 @@ ADD_CUSTOM_TARGET(developer-guide-pdf
${PDFLATEX} --output-directory ${DEVGUIDE} ${DEVGUIDESRC}/developer-guide.tex
COMMAND TEXMFOUTPUT=${DEVGUIDE} ${BIBTEX} ${DEVGUIDE}/developer-guide.aux
COMMAND TEXMFOUTPUT=${DEVGUIDE} ${MAKEINDEX} ${DEVGUIDE}/developer-guide.idx
COMMAND export TEXINPUTS=${CMAKE_SOURCE_DIR}//: &&
COMMAND TEXINPUTS=${CMAKE_SOURCE_DIR}//:
${PDFLATEX} --output-directory ${DEVGUIDE} ${DEVGUIDESRC}/developer-guide.tex
COMMAND TEXINPUTS=${CMAKE_SOURCE_DIR}//:
${PDFLATEX} --output-directory ${DEVGUIDE} ${DEVGUIDESRC}/developer-guide.tex
WORKING_DIRECTORY ${DEVGUIDESRC}
)
......@@ -44,7 +44,9 @@ ADD_CUSTOM_TARGET(user-guide-pdf
${PDFLATEX} --output-directory ${USERGUIDE} ${USERGUIDESRC}/user-guide.tex
COMMAND TEXMFOUTPUT=${USERGUIDE} ${BIBTEX} ${USERGUIDE}/user-guide.aux
COMMAND TEXMFOUTPUT=${USERGUIDE} ${MAKEINDEX} ${USERGUIDE}/user-guide.idx
COMMAND export TEXINPUTS=${CMAKE_SOURCE_DIR}//: &&
COMMAND TEXINPUTS=${CMAKE_SOURCE_DIR}//:
${PDFLATEX} --output-directory ${USERGUIDE} ${USERGUIDESRC}/user-guide.tex
COMMAND TEXINPUTS=${CMAKE_SOURCE_DIR}//:
${PDFLATEX} --output-directory ${USERGUIDE} ${USERGUIDESRC}/user-guide.tex
WORKING_DIRECTORY ${USERGUIDESRC}
)
......@@ -475,11 +475,11 @@ namespace Nektar
/**
* This operation is evaluated as:
* \f{tabbing}
* \hspace{1cm} \= Do \= $e=$ $1, N_{\mathrm{el}}$ \ \
* \> \> Do \= $i=$ $0,N_m^e-1$ \ \
* \hspace{1cm} \= Do \= $e=$ $1, N_{\mathrm{el}}$ \\
* \> \> Do \= $i=$ $0,N_m^e-1$ \\
* \> \> \> $\boldsymbol{\hat{u}}^{e}[i] = \mbox{sign}[e][i] \cdot
* \boldsymbol{\hat{u}}_g[\mbox{map}[e][i]]$ \ \
* \> \> continue \ \
* \boldsymbol{\hat{u}}_g[\mbox{map}[e][i]]$ \\
* \> \> continue \\
* \> continue
* \f}
* where \a map\f$[e][i]\f$ is the mapping array and \a
......
......@@ -33,6 +33,7 @@
//
////////////////////////////////////////////////////////////////////////////////
#include <algorithm>
#include <math.h>
#include <NekMeshUtils/2DGenerator/2DGenerator.h>
......@@ -55,6 +56,10 @@ Generator2D::Generator2D(MeshSharedPtr m) : ProcessModule(m)
ConfigOption(false, "", "Generate parallelograms on these curves");
m_config["blthick"] =
ConfigOption(false, "0.0", "Parallelogram layer thickness");
m_config["bltadjust"] =
ConfigOption(false, "2.0", "Boundary layer thickness adjustment");
m_config["adjustblteverywhere"] =
ConfigOption(true, "0", "Adjust thickness everywhere");
}
Generator2D::~Generator2D()
......@@ -130,9 +135,8 @@ void Generator2D::Process()
"Face progress");
}
m_facemeshes[i] =
MemoryManager<FaceMesh>::AllocateSharedPtr(i,m_mesh,
m_curvemeshes, 99+i);
m_facemeshes[i] = MemoryManager<FaceMesh>::AllocateSharedPtr(
i, m_mesh, m_curvemeshes, 99 + i);
m_facemeshes[i]->Mesh();
}
......@@ -242,6 +246,16 @@ 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");
divider = 2.0;
}
map<NodeSharedPtr, NodeSharedPtr> nodeNormals;
map<NodeSharedPtr, vector<EdgeSharedPtr> >::iterator it;
for (it = m_nodesToEdge.begin(); it != m_nodesToEdge.end(); it++)
......@@ -261,6 +275,17 @@ void Generator2D::MakeBL(int faceid)
NekDouble t = m_thickness.Evaluate(m_thickness_ID, it->first->m_x,
it->first->m_y, 0.0, 0.0);
// Adjust thickness according to angle between normals
if (adjust)
{
if (adjustEverywhere || it->first->GetNumCadCurve() > 1)
{
NekDouble angle = acos(n1[0] * n2[0] + n1[1] * n2[1]);
angle = (angle > M_PI) ? 2 * M_PI - angle : angle;
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;
......
......@@ -206,6 +206,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;
......@@ -234,12 +245,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)
......@@ -304,6 +317,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", "");
}
}
}
}
else
......
......@@ -63,9 +63,9 @@ 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_nacadomain, 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