Commit 4555ecfd authored by Dave Moxey's avatar Dave Moxey

Add regression test, modify to test for modified -> Lagrange conversion and...

Add regression test, modify to test for modified -> Lagrange conversion and Lagrange -> Lagrange conversion at different orders
parent 9825170f
......@@ -1103,9 +1103,7 @@ namespace Nektar
"Not set up for non boundary-interior expansions");
ASSERTL1(inoutmat->GetRows() == inoutmat->GetColumns(),
"Assuming that input matrix was square");
ASSERTL1(GetBasisType(0) == LibUtilities::eModified_A,
"Method set up only for modified modal bases curretly");
int i,j;
int id1,id2;
Expansion2DSharedPtr faceExp = m_faceExp[face].lock();
......
......@@ -1563,15 +1563,17 @@ namespace Nektar
break;
case LibUtilities::eGLL_Lagrange:
{
// Assume that input is also Gll_Lagrange but no way to check;
LibUtilities::PointsKey
p0(nummodes[0], LibUtilities::eGaussLobattoLegendre);
LibUtilities::PointsKey
p1(nummodes[1], LibUtilities::eGaussLobattoLegendre);
LibUtilities::Interp2D(p0, p1, data,
m_base[0]->GetPointsKey(),
m_base[1]->GetPointsKey(),
coeffs);
LibUtilities::PointsKey t0(
m_base[0]->GetNumModes(),
LibUtilities::eGaussLobattoLegendre);
LibUtilities::PointsKey t1(
m_base[1]->GetNumModes(),
LibUtilities::eGaussLobattoLegendre);
LibUtilities::Interp2D(p0, p1, data, t0, t1, coeffs);
}
break;
case LibUtilities::eGauss_Lagrange:
......@@ -1581,10 +1583,13 @@ namespace Nektar
p0(nummodes[0],LibUtilities::eGaussGaussLegendre);
LibUtilities::PointsKey
p1(nummodes[1],LibUtilities::eGaussGaussLegendre);
LibUtilities::Interp2D(p0, p1, data,
m_base[0]->GetPointsKey(),
m_base[1]->GetPointsKey(),
coeffs);
LibUtilities::PointsKey t0(
m_base[0]->GetNumModes(),
LibUtilities::eGaussGaussLegendre);
LibUtilities::PointsKey t1(
m_base[1]->GetNumModes(),
LibUtilities::eGaussGaussLegendre);
LibUtilities::Interp2D(p0, p1, data, t0, t1, coeffs);
}
break;
default:
......
......@@ -84,9 +84,13 @@ namespace Nektar
bool StdHexExp::v_IsBoundaryInteriorExpansion()
{
return (m_base[0]->GetBasisType() == LibUtilities::eModified_A) &&
(m_base[1]->GetBasisType() == LibUtilities::eModified_A) &&
(m_base[2]->GetBasisType() == LibUtilities::eModified_A);
return
(m_base[0]->GetBasisType() == LibUtilities::eModified_A &&
m_base[1]->GetBasisType() == LibUtilities::eModified_A &&
m_base[2]->GetBasisType() == LibUtilities::eModified_A) ||
(m_base[0]->GetBasisType() == LibUtilities::eGLL_Lagrange &&
m_base[1]->GetBasisType() == LibUtilities::eGLL_Lagrange &&
m_base[1]->GetBasisType() == LibUtilities::eGLL_Lagrange);
}
......
......@@ -173,6 +173,7 @@ IF( NEKTAR_SOLVER_ADR )
ADD_NEKTAR_TEST_LENGTHY(Helmholtz3D_nodal)
ADD_NEKTAR_TEST(Helmholtz3D_CubePeriodic)
ADD_NEKTAR_TEST(Helmholtz3D_Cube_BndFile)
ADD_NEKTAR_TEST(Helmholtz3D_Cube_BndFile_Lagrange)
ADD_NEKTAR_TEST(Helmholtz3D_CubePeriodic_RotateFace)
ADD_NEKTAR_TEST(CubeAllElements)
ADD_NEKTAR_TEST(ImDiffusion_m12)
......
......@@ -9,10 +9,10 @@
</files>
<metrics>
<metric type="L2" id="1">
<value variable="u" tolerance="1e-12">8.64367e-07</value>
<value variable="u" tolerance="1e-12">9.53762e-07</value>
</metric>
<metric type="Linf" id="2">
<value variable="u" tolerance="1e-12">1.75866e-05</value>
<value variable="u" tolerance="1e-12">1.84523e-05</value>
</metric>
</metrics>
</test>
......@@ -146,7 +146,7 @@
<DOMAIN> C[0] </DOMAIN>
</GEOMETRY>
<EXPANSIONS>
<E COMPOSITE="C[0]" NUMMODES="7" TYPE="MODIFIED" FIELDS="u" />
<E COMPOSITE="C[0]" NUMMODES="7" TYPE="GLL_LAGRANGE" FIELDS="u" />
</EXPANSIONS>
<CONDITIONS>
<SOLVERINFO>
......
<?xml version="1.0" encoding="utf-8" ?>
<NEKTAR>
<Metadata>
<Provenance>
<GitBranch>refs/heads/fix/lagrange-interp</GitBranch>
<GitSHA1>9825170fede03c92e760e0c8d3a05d62722a3ee1</GitSHA1>
<Hostname>farringdon</Hostname>
<NektarVersion>4.5.0</NektarVersion>
<Timestamp>12-Apr-2017 11:34:55</Timestamp>
</Provenance>
<ChkFileNum>0</ChkFileNum>
<SessionName0>Helmholtz3D_Cube_BndFile.xml</SessionName0>
</Metadata>
<ELEMENTS FIELDS="u" SHAPE="Quadrilateral" BASIS="GLL_Lagrange,GLL_Lagrange" NUMMODESPERDIR="UNIORDER:9,9" ID="1,6,21,25" COMPRESSED="B64Z-LittleEndian" BITSIZE="64">eJytVv9P1HUYp9rUFUgydGxBIKzmjuMgYVPW4VOSt4qaLWlr2RcIIqYs+RKGxBk0cdRIZOObRoBjB8Q4Au6ApI++AQOUjm8icsDFCQ6kQBBamzYnHfe83v+B98t798Pz5fV6Pc/r+bi7bPzu0cO1Vt138yuU9mqcm99/y3Q8/4faWM8lGtXot56tmqerutj6f5unKXVu9up5t2HK/qmsy7DTTLOTpoDNiTOK2z8cb15b0agHVmgocm7125llKgw/meT+aJEsN4/WnT0zT5YH7ekF56ZpftuxDLvLMJlmt2/t2GYmL83S6Jb1CSUV9WW8W09hdOPDuzRw5Y1LFZpF+tKl1RB/Z4605sw9lrY/6b1w/f0KzyEK9g+M8tKb6K+EOUP00LiSj/5LUP93GR9+ILy9eoGKMsbP3Zq8TZG9noP7VyYp3TZljVVbyD1n6IW0+mYa7FB/7ffWlDII/H3oPx31yxF/6oTa1rVup85YVV20eYwO/3Lyrt3US9dFb3xBRgO1Hj5955BxVBkFf13AH4H+I1C/A/Gqvm5jXsoANUe4z4RaLpN3ncGj/WA1hS22LOXsa1Oywf8C+IsDfj36/wz12xCvq9G5Jj7XRJOqXX4eoUU0NtAf9fPxK4oZ+l0A/y+Bv4Fsxm9G/66ob0e8pzV6xh59guqTYyt1WxqVpOf3ZEbtmFBighprS167qXhtCljyj7crLapnRsaPdCvvehytfr1/TGna+L/UqYS46qwHvK8pwSqf3GJdqdY5ftlG7ePKk8y4RB7jEvd3OnEJhXGJDMYl/q514hKljEtkMS7xxEaeVwzKEeZZrDLPQsM8C8yJ+Jx5FlPMs9jHPIsbyLdpI0/VZe0C6y56WXehZt1FMOsuTKy78GXdxUXki2TexZNOYNe0Fp5D0clzKPQ8h+I8z6H4nudQdCPfR+jPCrzONE03tBm8F+Ir3gvRx3shjvFeiGLkC0R/McBrA3/OPCE92lLeU9HFeyr2854KC/Llob9A4E0Af2E8Z+KpjTx7bVpf9g2Rx74hmpEvFf2VA281+LNDD6nvo3XHL8DG+rvcE93KpelKR77Aie0/ejv60/nO6d934P3gi4yECgd/BW+vPn3LoUecPimkzKHv8Mib6nf8zWLzh56hL9YUKtLPEjBHyZgDK3QcgQ5p4LESPPgAh+xD+lkW+lxG32bg+AO4soDTDNynwIPEIf1sC3gLA49B4DUFPEvetdDBiHySB+ln7dAxB7oGQedS6J6CORhEvnT0J3mUfpaKuYrBnP2KucvFHJYgXzb6qwFeqYP0Mxv20Ia598EeKMgXgv52Aa8R/EkdpZ8p2LtI7OFvyCf3NB54PwF/09BDzoH0s+Jx9oEF5FtDfybgHQR/L0OPfOgr50j6kPOtqlWcb2If/3+2h9+k6/xa+/ntmOW3aEQr5/Bx5ZF+poVvl8s7wLgoDT7fAt+/zX5JH+MuHGRcJP3MiPgg3JVO3JlPcXcycYeycJdsuFOJzDNJP5tD/W7E78Ddg+6kwV3cjTt5AXfzNOtO0s/i0L+8ez2Iz8ddLsOdzsXdrsQdj+E5JOlnDcD/DfqH/9EZxCfiu+EiviPgT7SX94Kknz0AfxK/Cv3L+h2Ih19SA75zdvOekvSzQ+B/BvwZgL8C/Sejfgvic/Dd1cS+QVJ/qZ/kX/In8cv+ZX0ZDx+j/wFRsSyM</ELEMENTS>
</NEKTAR>
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>3D Helmholtz with boundary files, different Lagrange order</description>
<executable>ADRSolver</executable>
<parameters>Helmholtz3D_Cube_BndFile_Lagrange.xml</parameters>
<files>
<file description="Session File">Helmholtz3D_Cube_BndFile_Lagrange.xml</file>
<file description="Session File">Helmholtz3D_Cube_BndFile_Lagrange.bc</file>
</files>
<metrics>
<metric type="L2" id="1">
<value variable="u" tolerance="1e-12">9.59332e-07</value>
</metric>
<metric type="Linf" id="2">
<value variable="u" tolerance="1e-12">1.85419e-05</value>
</metric>
</metrics>
</test>
<?xml version="1.0" encoding="utf-8" ?>
<NEKTAR>
<GEOMETRY DIM="3" SPACE="3">
<VERTEX>
<V ID="0">0.00000000e+00 0.00000000e+00 0.00000000e+00</V>
<V ID="1">5.00000000e-01 0.00000000e+00 0.00000000e+00</V>
<V ID="2">5.00000000e-01 5.00000000e-01 0.00000000e+00</V>
<V ID="3">0.00000000e+00 5.00000000e-01 0.00000000e+00</V>
<V ID="4">0.00000000e+00 0.00000000e+00 5.00000000e-01</V>
<V ID="5">5.00000000e-01 0.00000000e+00 5.00000000e-01</V>
<V ID="6">5.00000000e-01 5.00000000e-01 5.00000000e-01</V>
<V ID="7">0.00000000e+00 5.00000000e-01 5.00000000e-01</V>
<V ID="8">0.00000000e+00 0.00000000e+00 1.00000000e+00</V>
<V ID="9">5.00000000e-01 0.00000000e+00 1.00000000e+00</V>
<V ID="10">5.00000000e-01 5.00000000e-01 1.00000000e+00</V>
<V ID="11">0.00000000e+00 5.00000000e-01 1.00000000e+00</V>
<V ID="12">5.00000000e-01 1.00000000e+00 0.00000000e+00</V>
<V ID="13">0.00000000e+00 1.00000000e+00 0.00000000e+00</V>
<V ID="14">5.00000000e-01 1.00000000e+00 5.00000000e-01</V>
<V ID="15">0.00000000e+00 1.00000000e+00 5.00000000e-01</V>
<V ID="16">5.00000000e-01 1.00000000e+00 1.00000000e+00</V>
<V ID="17">0.00000000e+00 1.00000000e+00 1.00000000e+00</V>
<V ID="18">1.00000000e+00 0.00000000e+00 0.00000000e+00</V>
<V ID="19">1.00000000e+00 5.00000000e-01 0.00000000e+00</V>
<V ID="20">1.00000000e+00 0.00000000e+00 5.00000000e-01</V>
<V ID="21">1.00000000e+00 5.00000000e-01 5.00000000e-01</V>
<V ID="22">1.00000000e+00 0.00000000e+00 1.00000000e+00</V>
<V ID="23">1.00000000e+00 5.00000000e-01 1.00000000e+00</V>
<V ID="24">1.00000000e+00 1.00000000e+00 0.00000000e+00</V>
<V ID="25">1.00000000e+00 1.00000000e+00 5.00000000e-01</V>
<V ID="26">1.00000000e+00 1.00000000e+00 1.00000000e+00</V>
</VERTEX>
<EDGE>
<E ID="0"> 0 1 </E>
<E ID="1"> 0 3 </E>
<E ID="2"> 0 4 </E>
<E ID="3"> 1 2 </E>
<E ID="4"> 1 5 </E>
<E ID="5"> 2 3 </E>
<E ID="6"> 2 6 </E>
<E ID="7"> 3 7 </E>
<E ID="8"> 4 5 </E>
<E ID="9"> 4 7 </E>
<E ID="10"> 5 6 </E>
<E ID="11"> 6 7 </E>
<E ID="12"> 4 8 </E>
<E ID="13"> 5 9 </E>
<E ID="14"> 6 10 </E>
<E ID="15"> 7 11 </E>
<E ID="16"> 8 9 </E>
<E ID="17"> 8 11 </E>
<E ID="18"> 9 10 </E>
<E ID="19"> 10 11 </E>
<E ID="20"> 3 13 </E>
<E ID="21"> 2 12 </E>
<E ID="22"> 12 13 </E>
<E ID="23"> 12 14 </E>
<E ID="24"> 13 15 </E>
<E ID="25"> 7 15 </E>
<E ID="26"> 6 14 </E>
<E ID="27"> 14 15 </E>
<E ID="28"> 14 16 </E>
<E ID="29"> 15 17 </E>
<E ID="30"> 11 17 </E>
<E ID="31"> 10 16 </E>
<E ID="32"> 16 17 </E>
<E ID="33"> 1 18 </E>
<E ID="34"> 18 19 </E>
<E ID="35"> 18 20 </E>
<E ID="36"> 19 2 </E>
<E ID="37"> 19 21 </E>
<E ID="38"> 5 20 </E>
<E ID="39"> 20 21 </E>
<E ID="40"> 21 6 </E>
<E ID="41"> 20 22 </E>
<E ID="42"> 21 23 </E>
<E ID="43"> 9 22 </E>
<E ID="44"> 22 23 </E>
<E ID="45"> 23 10 </E>
<E ID="46"> 19 24 </E>
<E ID="47"> 24 12 </E>
<E ID="48"> 24 25 </E>
<E ID="49"> 21 25 </E>
<E ID="50"> 25 14 </E>
<E ID="51"> 25 26 </E>
<E ID="52"> 23 26 </E>
<E ID="53"> 26 16 </E>
</EDGE>
<FACE>
<Q ID="0"> 0 3 5 1</Q>
<Q ID="1"> 0 4 8 2</Q>
<Q ID="2"> 3 6 10 4</Q>
<Q ID="3"> 5 7 11 6</Q>
<Q ID="4"> 1 2 9 7</Q>
<Q ID="5"> 8 10 11 9</Q>
<Q ID="6"> 8 13 16 12</Q>
<Q ID="7"> 10 14 18 13</Q>
<Q ID="8"> 11 15 19 14</Q>
<Q ID="9"> 9 12 17 15</Q>
<Q ID="10"> 16 18 19 17</Q>
<Q ID="11"> 5 21 22 20</Q>
<Q ID="12"> 21 23 26 6</Q>
<Q ID="13"> 22 24 27 23</Q>
<Q ID="14"> 20 7 25 24</Q>
<Q ID="15"> 11 26 27 25</Q>
<Q ID="16"> 26 28 31 14</Q>
<Q ID="17"> 27 29 32 28</Q>
<Q ID="18"> 25 15 30 29</Q>
<Q ID="19"> 19 31 32 30</Q>
<Q ID="20"> 33 34 36 3</Q>
<Q ID="21"> 33 35 38 4</Q>
<Q ID="22"> 34 37 39 35</Q>
<Q ID="23"> 36 6 40 37</Q>
<Q ID="24"> 38 39 40 10</Q>
<Q ID="25"> 38 41 43 13</Q>
<Q ID="26"> 39 42 44 41</Q>
<Q ID="27"> 40 14 45 42</Q>
<Q ID="28"> 43 44 45 18</Q>
<Q ID="29"> 36 46 47 21</Q>
<Q ID="30"> 46 48 49 37</Q>
<Q ID="31"> 47 23 50 48</Q>
<Q ID="32"> 40 49 50 26</Q>
<Q ID="33"> 49 51 52 42</Q>
<Q ID="34"> 50 28 53 51</Q>
<Q ID="35"> 45 52 53 31</Q>
</FACE>
<ELEMENT>
<H ID="0"> 0 1 2 3 4 5 </H>
<H ID="1"> 5 6 7 8 9 10 </H>
<H ID="2"> 11 3 12 13 14 15 </H>
<H ID="3"> 15 8 16 17 18 19 </H>
<H ID="4"> 20 21 22 23 2 24 </H>
<H ID="5"> 24 25 26 27 7 28 </H>
<H ID="6"> 29 23 30 31 12 32 </H>
<H ID="7"> 32 27 33 34 16 35 </H>
</ELEMENT>
<COMPOSITE>
<C ID="0"> H[0-7] </C>
<C ID="1"> F[0,11,20,29] </C>
<C ID="2"> F[1,6,21,25] </C>
<C ID="3"> F[22,26,30,33] </C>
<C ID="4"> F[13,17,31,34] </C>
<C ID="5"> F[4,9,14,18] </C>
<C ID="6"> F[10,19,28,35] </C>
</COMPOSITE>
<DOMAIN> C[0] </DOMAIN>
</GEOMETRY>
<EXPANSIONS>
<E COMPOSITE="C[0]" NUMMODES="7" TYPE="GLL_LAGRANGE" FIELDS="u" />
</EXPANSIONS>
<CONDITIONS>
<SOLVERINFO>
<I PROPERTY="EQTYPE" VALUE="Helmholtz" />
<I PROPERTY="Projection" VALUE="Continuous" />
</SOLVERINFO>
<PARAMETERS>
<P> Lambda = 1 </P>
<P> IterativeSolverTolerance = 1e-8 </P>
</PARAMETERS>
<VARIABLES>
<V ID="0"> u </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>
<B ID="5"> C[6] </B>
</BOUNDARYREGIONS>
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="u" VALUE="cos(PI*x)*cos(PI*y)*cos(PI*z)" />
</REGION>
<REGION REF="1">
<D VAR="u" FILE="Helmholtz3D_Cube_BndFile_Lagrange.bc" />
</REGION>
<REGION REF="2">
<D VAR="u" VALUE="cos(PI*x)*cos(PI*y)*cos(PI*z)" />
</REGION>
<REGION REF="3">
<D VAR="u" VALUE="cos(PI*x)*cos(PI*y)*cos(PI*z)" />
</REGION>
<REGION REF="4">
<R VAR="u" VALUE="10*cos(PI*x)*cos(PI*y)*cos(PI*z) + PI*sin(PI*x)*cos(PI*y)*cos(PI*z)" PRIMCOEFF="10.0"/>
</REGION>
<REGION REF="5">
<D VAR="u" VALUE="cos(PI*x)*cos(PI*y)*cos(PI*z)" />
</REGION>
</BOUNDARYCONDITIONS>
<FUNCTION NAME="Forcing">
<E VAR="u" VALUE="-(Lambda+3*PI*PI)*cos(PI*x)*cos(PI*y)*cos(PI*z)" />
</FUNCTION>
<FUNCTION NAME="ExactSolution">
<E VAR="u" VALUE="cos(PI*x)*cos(PI*y)*cos(PI*z)" />
</FUNCTION>
</CONDITIONS>
</NEKTAR>
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