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

Force offset nodes

parent 06d97c13
......@@ -72,12 +72,22 @@ void CurveMesh::Mesh()
Ne = round(Ae);
if (Ne + 1 < 2)
if (Ne + 1 < 2 + m_endoffset.size())
{
meshsvalue.resize(2);
Ne = 1 + m_endoffset.size();
meshsvalue.resize(Ne + 1);
meshsvalue[0] = 0.0;
meshsvalue[1] = m_curvelength;
Ne = 1;
if (m_endoffset.count(0))
{
meshsvalue[1] = m_endoffset[0];
}
if (m_endoffset.count(1))
{
meshsvalue[Ne - 1] = m_curvelength - m_endoffset[1];
}
}
else
{
......@@ -88,7 +98,17 @@ void CurveMesh::Mesh()
meshsvalue[0] = 0.0;
meshsvalue[Ne] = m_curvelength;
for (int i = 1; i < Ne; i++)
if (m_endoffset.count(0))
{
meshsvalue[1] = m_endoffset[0];
}
if (m_endoffset.count(1))
{
meshsvalue[Ne - 1] = m_curvelength - m_endoffset[1];
}
for (int i = 1 + m_endoffset.count(0); i < Ne - m_endoffset.count(1);
i++)
{
int iterationcounter = 0;
bool iterate = true;
......
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