Commit e385b2fa authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Merge branch 'fix/perbc-edges' of /opt/gitlab/repositories/nektar

parents 40c100bf a681c142
......@@ -1325,6 +1325,7 @@ namespace Nektar
* in all other elements.
*/
cnt = 0;
// Loop over all the elements in the domain
for(i = 0; i < locExpVector.size(); ++i)
{
......@@ -1491,6 +1492,33 @@ namespace Nektar
edgeOrient = (bndCondFaceExp->GetGeom2D())->GetEorient(k);
meshEdgeId = (bndCondFaceExp->GetGeom2D())->GetEid(k);
pIt = periodicEdges.find(meshEdgeId);
// See if this edge is periodic. If it is, then we map
// all edges to the one with lowest ID, and align all
// coefficients to this edge orientation.
if (pIt != periodicEdges.end())
{
int minId = pIt->second[0].id;
int minIdL = 0;
for (l = 1; l < pIt->second.size(); ++l)
{
if (pIt->second[l].id < minId)
{
minId = min(minId, pIt->second[l].id);
minIdL = l;
}
}
if (pIt->second[minIdL].orient == StdRegions::eBackwards &&
meshEdgeId != min(minId, meshEdgeId))
{
edgeOrient = edgeOrient == StdRegions::eForwards ?
StdRegions::eBackwards :
StdRegions::eForwards;
}
}
bndCondFaceExp->GetEdgeInteriorMap(
k,edgeOrient,edgeInteriorMap,edgeInteriorSign);
......
......@@ -60,6 +60,7 @@ IF( NEKTAR_SOLVER_INCNAVIERSTOKES )
ADD_NEKTAR_TEST_LENGTHY(Tet_Kovasnay_SubStep)
ADD_NEKTAR_TEST(Tet_channel_m3)
ADD_NEKTAR_TEST(Tet_channel_m3_dealiasing)
ADD_NEKTAR_TEST(Tet_channel_m4_per)
ADD_NEKTAR_TEST_LENGTHY(Tet_equitri)
ADD_NEKTAR_TEST_LENGTHY(Prism_channel_m6)
ADD_NEKTAR_TEST_LENGTHY(Prism_channel_m6_dealiasing)
......
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>3D channel flow, Tetrahedral elements, P=4, periodic BCs</description>
<executable>IncNavierStokesSolver</executable>
<parameters>Tet_channel_m4_per.xml</parameters>
<files>
<file description="Session File">Tet_channel_m4_per.xml</file>
</files>
<metrics>
<metric type="L2" id="1">
<value variable="u" tolerance="1e-12">2.169e-15</value>
<value variable="v" tolerance="1e-12">2.23196e-16</value>
<value variable="w" tolerance="1e-12">4.49841e-16</value>
<value variable="p" tolerance="1e-8">1.65856e-14</value>
</metric>
<metric type="Linf" id="2">
<value variable="u" tolerance="1e-12">2.10942e-15</value>
<value variable="v" tolerance="1e-12">3.00716e-16</value>
<value variable="w" tolerance="1e-12">3.21388e-16</value>
<value variable="p" tolerance="1e-8">1.02141e-14</value>
</metric>
</metrics>
</test>
<?xml version="1.0" encoding="utf-8" ?>
<NEKTAR>
<GEOMETRY DIM="3" SPACE="3">
<VERTEX>
<V ID="0">-1.00000000e+00 1.00000000e+00 -1.00000000e+00</V>
<V ID="1">-1.00000000e+00 -1.00000000e+00 -1.00000000e+00</V>
<V ID="2"> 1.00000000e+00 -1.00000000e+00 -1.00000000e+00</V>
<V ID="3"> 1.00000000e+00 -1.00000000e+00 1.00000000e+00</V>
<V ID="4"> 1.00000000e+00 1.00000000e+00 -1.00000000e+00</V>
<V ID="5"> 1.00000000e+00 1.00000000e+00 1.00000000e+00</V>
<V ID="6">-1.00000000e+00 1.00000000e+00 1.00000000e+00</V>
<V ID="7">-1.00000000e+00 -1.00000000e+00 1.00000000e+00</V>
</VERTEX>
<EDGE>
<E ID="0"> 0 1 </E>
<E ID="1"> 1 2 </E>
<E ID="2"> 0 2 </E>
<E ID="3"> 0 3 </E>
<E ID="4"> 1 3 </E>
<E ID="5"> 2 3 </E>
<E ID="6"> 4 2 </E>
<E ID="7"> 4 0 </E>
<E ID="8"> 4 3 </E>
<E ID="9"> 0 5 </E>
<E ID="10"> 5 3 </E>
<E ID="11"> 4 5 </E>
<E ID="12"> 6 0 </E>
<E ID="13"> 6 3 </E>
<E ID="14"> 6 5 </E>
<E ID="15"> 0 7 </E>
<E ID="16"> 7 3 </E>
<E ID="17"> 6 7 </E>
<E ID="18"> 1 7 </E>
</EDGE>
<FACE>
<T ID="0"> 0 1 2</T>
<T ID="1"> 0 4 3 </T>
<T ID="2"> 1 5 4 </T>
<T ID="3"> 2 5 3 </T>
<T ID="4"> 7 2 6 </T>
<T ID="5"> 7 3 8 </T>
<T ID="6"> 6 5 8 </T>
<T ID="7"> 9 3 10 </T>
<T ID="8"> 11 10 8 </T>
<T ID="9"> 7 11 9 </T>
<T ID="10"> 12 3 13 </T>
<T ID="11"> 14 13 10 </T>
<T ID="12"> 12 9 14 </T>
<T ID="13"> 15 3 16 </T>
<T ID="14"> 17 16 13</T>
<T ID="15"> 12 17 15 </T>
<T ID="16"> 0 18 15 </T>
<T ID="17"> 18 4 16 </T>
</FACE>
<ELEMENT>
<A ID="0"> 0 1 2 3 </A>
<A ID="1"> 4 5 3 6 </A>
<A ID="2"> 9 5 8 7 </A>
<A ID="3"> 12 10 7 11 </A>
<A ID="4"> 15 10 14 13 </A>
<A ID="5"> 16 1 13 17 </A>
</ELEMENT>
<COMPOSITE>
<C ID="0"> A[0-5] </C>
<C ID="1"> F[0,4,11,14] </C> // top walls
<C ID="2"> F[6,8] </C> // outflow
<C ID="3"> F[15-16] </C> // inflow
<C ID="4"> F[9,12] </C> // Side walls
<C ID="5"> F[2,17] </C> // Side walls
</COMPOSITE>
<DOMAIN> C[0] </DOMAIN>
</GEOMETRY>
<EXPANSIONS>
<E COMPOSITE="C[0]" NUMMODES="4" TYPE="MODIFIED" FIELDS="u,v,w,p" />
</EXPANSIONS>
<CONDITIONS>
<SOLVERINFO>
<I PROPERTY="SolverType" VALUE="VelocityCorrectionScheme" />
<I PROPERTY="EQTYPE" VALUE="UnsteadyNavierStokes" />
<I PROPERTY="AdvectionForm" VALUE="Convective" />
<I PROPERTY="Projection" VALUE="Galerkin" />
<I PROPERTY="TimeIntegrationMethod" VALUE="IMEXOrder1" />
<I PROPERTY="GlobalSysSoln" VALUE="DirectStaticCond" />
</SOLVERINFO>
<PARAMETERS>
<P> TimeStep = 0.1 </P>
<P> NumSteps = 2 </P>
<P> IO_CheckSteps = 100 </P>
<P> IO_InfoSteps = 1 </P>
<P> IO_CFLSteps = 1 </P>
<P> Kinvis = 1 </P>
</PARAMETERS>
<VARIABLES>
<V ID="0">u</V>
<V ID="1">v</V>
<V ID="2">w</V>
<V ID="3">p</V>
</VARIABLES>
<BOUNDARYREGIONS>
<B ID="0">C[1]</B>
<B ID="1">C[2]</B>
<B ID="2">C[3]</B>
<B ID="3">C[4]</B>
<B ID="4">C[5]</B>
</BOUNDARYREGIONS>
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="u" VALUE="0" />
<D VAR="v" VALUE="0" />
<D VAR="w" VALUE="0" />
<N VAR="p" VALUE="0" USERDEFINEDTYPE="H" />
</REGION>
<REGION REF="1">
<N VAR="u" VALUE="0" />
<N VAR="v" VALUE="0" />
<N VAR="w" VALUE="0" />
<D VAR="p" VALUE="0" />
</REGION>
<REGION REF="2">
<D VAR="u" VALUE="1-z^2" />
<D VAR="v" VALUE="0.0" />
<D VAR="w" VALUE="0.0" />
<N VAR="p" VALUE="0" USERDEFINEDTYPE="H" />
</REGION>
<REGION REF="3">
<P VAR="u" VALUE="[4]" />
<P VAR="v" VALUE="[4]" />
<P VAR="w" VALUE="[4]" />
<P VAR="p" VALUE="[4]" />
</REGION>
<REGION REF="4">
<P VAR="u" VALUE="[3]" />
<P VAR="v" VALUE="[3]" />
<P VAR="w" VALUE="[3]" />
<P VAR="p" VALUE="[3]" />
</REGION>
</BOUNDARYCONDITIONS>
<FUNCTION NAME="InitialConditions">
<E VAR="u" VALUE="1-z^2" />
<E VAR="v" VALUE="0" />
<E VAR="w" VALUE="0" />
<E VAR="p" VALUE="-2*(x-1)" />
</FUNCTION>
<FUNCTION NAME="ExactSolution">
<E VAR="u" VALUE="1-z^2" />
<E VAR="v" VALUE="0" />
<E VAR="w" VALUE="0" />
<E VAR="p" VALUE="-2*(x-1)" />
</FUNCTION>
</CONDITIONS>
</NEKTAR>
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