Commit bd7e75cb authored by Dave Moxey's avatar Dave Moxey

Merge branch 'fix/varP' into 'master'

Fix numbering in gs for variable P

This MR fixes the ids in the gs object used for variable P, since id=0 is ignored.

See merge request !663
parents 36e57a48 8e9651a1
......@@ -1429,7 +1429,7 @@ namespace Nektar
Array<OneD, NekDouble> edgeDof (dofs[1].size());
for(dofIt = dofs[1].begin(), i=0; dofIt != dofs[1].end(); dofIt++, i++)
{
edgeId[i] = dofIt->first;
edgeId[i] = dofIt->first + 1;
edgeDof[i] = (NekDouble) dofIt->second;
}
Gs::gs_data *tmp = Gs::Init(edgeId, vComm);
......@@ -1437,7 +1437,7 @@ namespace Nektar
Gs::Finalise(tmp);
for (i=0; i < dofs[1].size(); i++)
{
dofs[1][edgeId[i]] = (int) (edgeDof[i]+0.5);
dofs[1][edgeId[i]-1] = (int) (edgeDof[i]+0.5);
}
// Periodic edges
for (pIt = periodicEdges.begin(); pIt != periodicEdges.end(); ++pIt)
......@@ -1459,7 +1459,7 @@ namespace Nektar
for(dofIt = faceModes[0].begin(), dofIt2 = faceModes[1].begin(),i=0;
dofIt != faceModes[0].end(); dofIt++, dofIt2++, i++)
{
faceId[i] = dofIt->first;
faceId[i] = dofIt->first+1;
faceP[i] = (NekDouble) dofIt->second;
faceQ[i] = (NekDouble) dofIt2->second;
}
......@@ -1469,8 +1469,8 @@ namespace Nektar
Gs::Finalise(tmp2);
for (i=0; i < faceModes[0].size(); i++)
{
faceModes[0][faceId[i]] = (int) (faceP[i]+0.5);
faceModes[1][faceId[i]] = (int) (faceQ[i]+0.5);
faceModes[0][faceId[i]-1] = (int) (faceP[i]+0.5);
faceModes[1][faceId[i]-1] = (int) (faceQ[i]+0.5);
}
// Periodic faces
for (pIt = periodicFaces.begin(); pIt != periodicFaces.end(); ++pIt)
......@@ -1493,19 +1493,19 @@ namespace Nektar
int P, Q;
for (i=0; i < faceModes[0].size(); i++)
{
P = faceModes[0][faceId[i]];
Q = faceModes[1][faceId[i]];
if (faceType[faceId[i]] == LibUtilities::eQuadrilateral)
P = faceModes[0][faceId[i]-1];
Q = faceModes[1][faceId[i]-1];
if (faceType[faceId[i]-1] == LibUtilities::eQuadrilateral)
{
// Quad face
dofs[2][faceId[i]] =
dofs[2][faceId[i]-1] =
LibUtilities::StdQuadData::getNumberOfCoefficients(P,Q) -
LibUtilities::StdQuadData::getNumberOfBndCoefficients(P,Q);
}
else
{
// Tri face
dofs[2][faceId[i]] =
dofs[2][faceId[i]-1] =
LibUtilities::StdTriData::getNumberOfCoefficients(P,Q) -
LibUtilities::StdTriData::getNumberOfBndCoefficients(P,Q);
}
......
......@@ -8,14 +8,14 @@
</files>
<metrics>
<metric type="L2" id="1">
<value variable="u" tolerance="1e-12">5.68743e-05</value>
<value variable="v" tolerance="1e-12">0.000123899</value>
<value variable="p" tolerance="1e-12">0.000569749</value>
<value variable="u" tolerance="1e-12">7.24234e-05</value>
<value variable="v" tolerance="1e-12">0.000118842</value>
<value variable="p" tolerance="1e-12">0.000545425</value>
</metric>
<metric type="Linf" id="2">
<value variable="u" tolerance="1e-12">0.00014278</value>
<value variable="v" tolerance="1e-12">0.000409628</value>
<value variable="p" tolerance="1e-12">0.00342738</value>
<value variable="u" tolerance="1e-12">0.000136274</value>
<value variable="v" tolerance="1e-12">0.000329206</value>
<value variable="p" tolerance="1e-12">0.00303542</value>
</metric>
</metrics>
</test>
......
......@@ -22,9 +22,9 @@
<PARAMETERS>
<P> TimeStep = 0.001 </P>
<P> NumSteps = 10 </P>
<P> IO_CheckSteps = 1 </P>
<P> IO_InfoSteps = 1 </P>
<P> NumSteps = 1000 </P>
<P> IO_CheckSteps = 1000 </P>
<P> IO_InfoSteps = 1000 </P>
<P> Kinvis = 0.025 </P>
</PARAMETERS>
......
......@@ -3,20 +3,20 @@
<description>Kovasznay Flow variable P, periodic BC (parallel)</description>
<executable>IncNavierStokesSolver</executable>
<parameters>--use-metis -I GlobalSysSoln=XxtMultiLevelStaticCond KovaFlow_varP_per.xml</parameters>
<processes> 3 </processes>
<processes> 2 </processes>
<files>
<file description="Session File">KovaFlow_varP_per.xml</file>
</files>
<metrics>
<metric type="L2" id="1">
<value variable="u" tolerance="1e-12">4.74673e-05</value>
<value variable="v" tolerance="1e-12">0.000201486</value>
<value variable="p" tolerance="1e-12">0.000565444</value>
<value variable="u" tolerance="1e-12">9.24657e-05</value>
<value variable="v" tolerance="1e-12">0.000139872</value>
<value variable="p" tolerance="1e-12">0.000546763</value>
</metric>
<metric type="Linf" id="2">
<value variable="u" tolerance="1e-12">0.00011373</value>
<value variable="v" tolerance="1e-12"> 0.000382783</value>
<value variable="p" tolerance="1e-12">0.00344565</value>
<value variable="u" tolerance="1e-12">0.000175798</value>
<value variable="v" tolerance="1e-12"> 0.000331233</value>
<value variable="p" tolerance="1e-12">0.00303366</value>
</metric>
</metrics>
</test>
......
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