Commit 69b93d2e authored by Dave Moxey's avatar Dave Moxey Committed by Spencer Sherwin
Browse files

Further fix for surface boundary issue

parent 05e58a7f
......@@ -80,7 +80,7 @@ ENDIF (NEKTAR_USE_VTK)
# Nektar++
ADD_NEKTAR_TEST (Nektar++/InvalidTetFace)
ADD_NEKTAR_TEST (Nektar++/CubePrismRefinement)
ADD_NEKTAR_TEST (Nektar++/Tube45Refinement)
# Gmsh tests
ADD_NEKTAR_TEST (Gmsh/CubeAllElements)
ADD_NEKTAR_TEST (Gmsh/CubeHex)
......
......@@ -617,33 +617,31 @@ namespace Nektar
int fid = it->first;
int bl = it->second;
vector<NodeSharedPtr> qNodeList(4);
for (int k = 0; k < 4; ++k)
{
qNodeList[k] = nodeList[faceNodeMap[elType][fid][k]];
}
vector<int> tagBE;
tagBE = m_mesh->m_element[m_mesh->m_expDim-1][bl]->GetTagList();
ElmtConfig bconf(LibUtilities::eQuadrilateral,1,true,true,false);
ElementSharedPtr boundaryElmt = GetElementFactory().
CreateInstance(LibUtilities::eQuadrilateral,bconf,
qNodeList,tagBE);
// Overwrite first layer boundary element with new
// boundary element, otherwise push this back to end of
// the boundary list
if (j == 0)
{
// For first layer reuse existing 2D element.
ElementSharedPtr e = m_mesh->m_element[m_mesh->m_expDim-1][bl];
for (int k = 0; k < 4; ++k)
{
e->SetVertex(
k, nodeList[faceNodeMap[elType][fid][k]]);
}
m_mesh->m_element[m_mesh->m_expDim-1][bl] = boundaryElmt;
}
else
{
// For all other layers create new element.
vector<NodeSharedPtr> qNodeList(4);
for (int k = 0; k < 4; ++k)
{
qNodeList[k] = nodeList[faceNodeMap[elType][fid][k]];
}
vector<int> tagBE;
tagBE = m_mesh->m_element[m_mesh->m_expDim-1][bl]->GetTagList();
ElmtConfig bconf(LibUtilities::eQuadrilateral,1,true,true,false);
ElementSharedPtr boundaryElmt = GetElementFactory().
CreateInstance(LibUtilities::eQuadrilateral,bconf,
qNodeList,tagBE);
m_mesh->m_element[m_mesh->m_expDim-1].push_back(boundaryElmt);
}
}
m_mesh->m_element[m_mesh->m_expDim].push_back(elmt);
}
}
......
<?xml version="1.0" encoding="utf-8" ?>
<NEKTAR>
<GEOMETRY DIM="3" SPACE="3">
<VERTEX>
<V ID="0">0.00000000e+00 0.00000000e+00 1.00000000e+00</V>
<V ID="1">5.00000000e-01 0.00000000e+00 1.00000000e+00</V>
<V ID="2">5.00000000e-01 0.00000000e+00 0.00000000e+00</V>
<V ID="3">0.00000000e+00 0.00000000e+00 0.00000000e+00</V>
<V ID="4">5.00000000e-01 5.00000000e-01 1.00000000e+00</V>
<V ID="5">5.00000000e-01 5.00000000e-01 0.00000000e+00</V>
<V ID="6">0.00000000e+00 5.00000000e-01 1.00000000e+00</V>
<V ID="7">0.00000000e+00 5.00000000e-01 0.00000000e+00</V>
<V ID="8">5.00000000e-01 1.00000000e+00 1.00000000e+00</V>
<V ID="9">5.00000000e-01 1.00000000e+00 0.00000000e+00</V>
<V ID="10">0.00000000e+00 1.00000000e+00 1.00000000e+00</V>
<V ID="11">0.00000000e+00 1.00000000e+00 0.00000000e+00</V>
<V ID="12">1.00000000e+00 0.00000000e+00 1.00000000e+00</V>
<V ID="13">1.00000000e+00 0.00000000e+00 0.00000000e+00</V>
<V ID="14">1.00000000e+00 5.00000000e-01 1.00000000e+00</V>
<V ID="15">1.00000000e+00 5.00000000e-01 0.00000000e+00</V>
<V ID="16">1.00000000e+00 1.00000000e+00 1.00000000e+00</V>
<V ID="17">1.00000000e+00 1.00000000e+00 0.00000000e+00</V>
</VERTEX>
<EDGE>
<E ID="0"> 0 1 </E>
<E ID="1"> 1 2 </E>
<E ID="2"> 3 2 </E>
<E ID="3"> 0 3 </E>
<E ID="4"> 0 4 </E>
<E ID="5"> 1 4 </E>
<E ID="6"> 2 5 </E>
<E ID="7"> 3 5 </E>
<E ID="8"> 4 5 </E>
<E ID="9"> 0 6 </E>
<E ID="10"> 3 7 </E>
<E ID="11"> 6 7 </E>
<E ID="12"> 4 6 </E>
<E ID="13"> 5 7 </E>
<E ID="14"> 6 8 </E>
<E ID="15"> 7 9 </E>
<E ID="16"> 8 9 </E>
<E ID="17"> 4 8 </E>
<E ID="18"> 5 9 </E>
<E ID="19"> 8 10 </E>
<E ID="20"> 10 11 </E>
<E ID="21"> 9 11 </E>
<E ID="22"> 6 10 </E>
<E ID="23"> 7 11 </E>
<E ID="24"> 1 12 </E>
<E ID="25"> 12 13 </E>
<E ID="26"> 2 13 </E>
<E ID="27"> 1 14 </E>
<E ID="28"> 12 14 </E>
<E ID="29"> 13 15 </E>
<E ID="30"> 2 15 </E>
<E ID="31"> 14 15 </E>
<E ID="32"> 14 4 </E>
<E ID="33"> 15 5 </E>
<E ID="34"> 14 16 </E>
<E ID="35"> 16 17 </E>
<E ID="36"> 15 17 </E>
<E ID="37"> 4 16 </E>
<E ID="38"> 5 17 </E>
<E ID="39"> 16 8 </E>
<E ID="40"> 17 9 </E>
</EDGE>
<FACE>
<Q ID="0"> 0 1 2 3</Q>
<T ID="1"> 0 5 4</T>
<Q ID="2"> 1 6 8 5</Q>
<T ID="3"> 2 6 7</T>
<Q ID="4"> 3 7 8 4</Q>
<Q ID="5"> 9 3 10 11</Q>
<T ID="6"> 9 4 12</T>
<T ID="7"> 10 7 13</T>
<Q ID="8"> 11 13 8 12</Q>
<Q ID="9"> 14 11 15 16</Q>
<T ID="10"> 14 12 17</T>
<T ID="11"> 15 13 18</T>
<Q ID="12"> 16 18 8 17</Q>
<Q ID="13"> 19 20 21 16</Q>
<T ID="14"> 19 22 14</T>
<Q ID="15"> 20 23 11 22</Q>
<T ID="16"> 21 23 15</T>
<Q ID="17"> 24 25 26 1</Q>
<T ID="18"> 24 28 27</T>
<Q ID="19"> 25 29 31 28</Q>
<T ID="20"> 26 29 30</T>
<Q ID="21"> 1 30 31 27</Q>
<T ID="22"> 27 32 5</T>
<Q ID="23"> 31 33 8 32</Q>
<T ID="24"> 30 33 6</T>
<Q ID="25"> 34 35 36 31</Q>
<T ID="26"> 34 37 32</T>
<Q ID="27"> 35 38 8 37</Q>
<T ID="28"> 36 38 33</T>
<Q ID="29"> 39 16 40 35</Q>
<T ID="30"> 39 17 37</T>
<T ID="31"> 40 18 38</T>
</FACE>
<ELEMENT>
<R ID="0"> 0 1 2 3 4 </R>
<R ID="1"> 5 6 4 7 8 </R>
<R ID="2"> 9 10 8 11 12 </R>
<R ID="3"> 13 14 15 16 9 </R>
<R ID="4"> 17 18 19 20 21 </R>
<R ID="5"> 21 22 23 24 2 </R>
<R ID="6"> 25 26 27 28 23 </R>
<R ID="7"> 29 30 12 31 27 </R>
</ELEMENT>
<COMPOSITE>
<C ID="0"> R[0-7] </C>
<!--
<C ID="1"> F[3,7,11,16,20,24,28,31] </C>
-->
<C ID="2"> F[0,17] </C>
<C ID="3"> F[19,25] </C>
<C ID="4"> F[13,29] </C>
<C ID="5"> F[5,15] </C>
<!--
<C ID="6"> F[1,6,10,14,18,22,26,30] </C>
-->
</COMPOSITE>
<DOMAIN> C[0] </DOMAIN>
</GEOMETRY>
<EXPANSIONS>
<E COMPOSITE="C[0]" NUMMODES="4" TYPE="MODIFIED" FIELDS="u" />
</EXPANSIONS>
<CONDITIONS />
</NEKTAR>
......@@ -2,9 +2,9 @@
<test>
<description>Test BL refinement from XML file</description>
<executable>MeshConvert</executable>
<parameters>-m jac:list CubePrismRefinement.xml CubePrismRefined.xml:xml:test</parameters>
<parameters>-m bl:surf=2 -m jac:list Tube45Refinement.xml Tube45Refined.xml:xml:test</parameters>
<files>
<file description="Input File">CubePrismRefinement.xml</file>
<file description="Input File">Tube45Refinement.xml</file>
</files>
<metrics>
<metric type="regex" id="1">
......
This diff is collapsed.
Supports Markdown
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