Commit 754a31db authored by Spencer Sherwin's avatar Spencer Sherwin
Browse files

Updated regressiont tests to account for the introduction of two new bases...

Updated regressiont tests to account for the introduction of two new bases types OrthoPyr_C and ModifeidPyr_C
parent 75c0ad6e
......@@ -51,17 +51,17 @@ int main(int argc, char *argv[])
fprintf(stderr,"\t Ortho_B = 2\n");
fprintf(stderr,"\t Modified_A = 4\n");
fprintf(stderr,"\t Modified_B = 5\n");
fprintf(stderr,"\t Fourier = 7\n");
fprintf(stderr,"\t Lagrange = 8\n");
fprintf(stderr,"\t Gauss Lagrange = 9\n");
fprintf(stderr,"\t Legendre = 10\n");
fprintf(stderr,"\t Chebyshev = 11\n");
fprintf(stderr,"\t FourierSingleMode = 12\n");
fprintf(stderr,"\t Nodal tri (Electro) = 13\n");
fprintf(stderr,"\t Nodal tri (Fekete) = 14\n");
fprintf(stderr,"\t Fourier = 9\n");
fprintf(stderr,"\t Lagrange = 10\n");
fprintf(stderr,"\t Gauss Lagrange = 11\n");
fprintf(stderr,"\t Legendre = 12\n");
fprintf(stderr,"\t Chebyshev = 13\n");
fprintf(stderr,"\t FourierSingleMode = 14\n");
fprintf(stderr,"\t Nodal tri (Electro) = 15\n");
fprintf(stderr,"\t Nodal tri (Fekete) = 16\n");
fprintf(stderr,"Note type = 3,6 are for three-dimensional basis\n");
fprintf(stderr,"Note type = 3,6,7,8 are for three-dimensional basis\n");
exit(1);
}
......@@ -77,17 +77,17 @@ int main(int argc, char *argv[])
int btype1_val = atoi(argv[2]);
int btype2_val = atoi(argv[3]);
if(( btype1_val <= 12)&&( btype2_val <= 12))
if(( btype1_val <= 14)&&( btype2_val <= 14))
{
btype1 = (LibUtilities::BasisType) btype1_val;
btype2 = (LibUtilities::BasisType) btype2_val;
}
else if(( btype1_val >=13)&&(btype2_val <= 14))
else if(( btype1_val >=15)&&(btype2_val <= 16))
{
btype1 = LibUtilities::eOrtho_A;
btype2 = LibUtilities::eOrtho_B;
if(btype1_val == 13)
if(btype1_val == 15)
{
NodalType = LibUtilities::eNodalTriElec;
}
......
......@@ -21,6 +21,10 @@ using namespace Nektar::StdRegions;
NekDouble Tet_sol(NekDouble x, NekDouble y, NekDouble z,
int order1, int order2, int order3);
/// Defines a solution which excites all modes in a StdPyr expansion.
NekDouble Pyr_sol(NekDouble x, NekDouble y, NekDouble z,
int order1, int order2, int order3);
/// Defines a solution which excites all modes in a StdPrism expansion.
NekDouble Prism_sol(NekDouble x, NekDouble y, NekDouble z,
int order1, int order2, int order3);
......@@ -69,16 +73,16 @@ int main(int argc, char *argv[]){
fprintf(stderr,"\t Ortho_C = 7\n");
fprintf(stderr,"\t Modified_C = 8\n");
fprintf(stderr,"\t Fourier = 7\n");
fprintf(stderr,"\t Lagrange = 8\n");
fprintf(stderr,"\t Gauss Lagrange = 9\n");
fprintf(stderr,"\t Legendre = 10\n");
fprintf(stderr,"\t Chebyshev = 11\n");
fprintf(stderr,"\t Nodal tri (Electro) = 12\n");
fprintf(stderr,"\t Nodal tri (Fekete) = 13\n");
fprintf(stderr,"\t Nodal tet (Electro) = 14\n");
fprintf(stderr,"\t Nodal tet (Even) = 15\n");
fprintf(stderr,"\t Nodal prism (Even) = 16\n");
fprintf(stderr,"\t Fourier = 8\n");
fprintf(stderr,"\t Lagrange = 9\n");
fprintf(stderr,"\t Gauss Lagrange = 10\n");
fprintf(stderr,"\t Legendre = 11\n");
fprintf(stderr,"\t Chebyshev = 12\n");
fprintf(stderr,"\t Nodal tri (Electro) = 13\n");
fprintf(stderr,"\t Nodal tri (Fekete) = 14\n");
fprintf(stderr,"\t Nodal tet (Electro) = 15\n");
fprintf(stderr,"\t Nodal tet (Even) = 16\n");
fprintf(stderr,"\t Nodal prism (Even) = 17\n");
exit(1);
}
......@@ -98,13 +102,13 @@ int main(int argc, char *argv[]){
int btype2_val = atoi(argv[3]);
int btype3_val = atoi(argv[4]);
if (btype1_val <= 11 && btype2_val <= 11)
if (btype1_val <= 13 && btype2_val <= 13)
{
btype1 = (LibUtilities::BasisType) btype1_val;
btype2 = (LibUtilities::BasisType) btype2_val;
btype3 = (LibUtilities::BasisType) btype3_val;
}
else if(btype1_val >=12 && btype2_val <= 16)
else if(btype1_val >=14 && btype2_val <= 18)
{
if (regionshape == LibUtilities::eTetrahedron)
{
......@@ -119,19 +123,19 @@ int main(int argc, char *argv[]){
btype3 = LibUtilities::eOrtho_B;
}
if(btype1_val == 12)
if(btype1_val == 14)
{
NodalType = LibUtilities::eNodalTriElec;
}
else if (btype1_val == 13)
else if (btype1_val == 15)
{
NodalType = LibUtilities::eNodalTriFekete;
}
else if (btype1_val == 14)
else if (btype1_val == 16)
{
NodalType = LibUtilities::eNodalTetElec;
}
else if (btype1_val == 15)
else if (btype1_val == 17)
{
NodalType = LibUtilities::eNodalTetEvenlySpaced;
}
......@@ -335,7 +339,7 @@ int main(int argc, char *argv[]){
// Define solution to be projected
for(i = 0; i < nq1*nq2*nq3; ++i)
{
sol[i] = Tet_sol(x[i],y[i],z[i],order1,order2,order3);
sol[i] = Pyr_sol(x[i],y[i],z[i],order1,order2,order3);
}
//----------------------------------------------
}
......@@ -425,11 +429,14 @@ int main(int argc, char *argv[]){
t[1] = -0.25;
t[2] = -0.3;
if(regionshape == LibUtilities::eTetrahedron ||
regionshape == LibUtilities::ePyramid)
if(regionshape == LibUtilities::eTetrahedron)
{
sol[0] = Tet_sol(t[0], t[1], t[2], order1, order2, order3);
}
else if (regionshape == LibUtilities::ePyramid)
{
sol[0] = Pyr_sol(t[0], t[1], t[2], order1, order2, order3);
}
else if (regionshape == LibUtilities::ePrism)
{
sol[0] = Prism_sol(t[0], t[1], t[2], order1, order2, order3);
......@@ -469,6 +476,28 @@ NekDouble Tet_sol(NekDouble x, NekDouble y, NekDouble z,
return sol;
}
NekDouble Pyr_sol(NekDouble x, NekDouble y, NekDouble z,
int order1, int order2, int order3)
{
int l,k,m;
NekDouble sol = 0.0;
for(k = 0; k < order1; ++k)
{
for(l = 0; l < order2-k; ++l)
{
for(m = 0; m < order3-k-l; ++m)
{
sol += pow(x,k)*pow(y,l)*pow(z,m);
}
}
}
return sol;
}
NekDouble Prism_sol(NekDouble x, NekDouble y, NekDouble z,
int order1, int order2, int order3)
{
......
......@@ -56,15 +56,15 @@ int main(int argc, char *argv[])
fprintf(stderr,"\t Ortho_B = 2\n");
fprintf(stderr,"\t Modified_A = 4\n");
fprintf(stderr,"\t Modified_B = 5\n");
fprintf(stderr,"\t Fourier = 7\n");
fprintf(stderr,"\t Lagrange = 8\n");
fprintf(stderr,"\t Gauss Lagrange = 9\n");
fprintf(stderr,"\t Legendre = 10\n");
fprintf(stderr,"\t Chebyshev = 11\n");
fprintf(stderr,"\t Nodal tri (Electro) = 13\n");
fprintf(stderr,"\t Nodal tri (Fekete) = 14\n");
fprintf(stderr,"\t Fourier = 9\n");
fprintf(stderr,"\t Lagrange = 10\n");
fprintf(stderr,"\t Gauss Lagrange = 11\n");
fprintf(stderr,"\t Legendre = 12\n");
fprintf(stderr,"\t Chebyshev = 13\n");
fprintf(stderr,"\t Nodal tri (Electro) = 14\n");
fprintf(stderr,"\t Nodal tri (Fekete) = 15\n");
fprintf(stderr,"Note type = 3,6 are for three-dimensional basis\n");
fprintf(stderr,"Note type = 3,6,7,8 are for three-dimensional basis\n");
exit(1);
}
......@@ -80,17 +80,17 @@ int main(int argc, char *argv[])
int btype1_val = atoi(argv[2]);
int btype2_val = atoi(argv[3]);
if(( btype1_val <= 11)&&( btype2_val <= 11))
if(( btype1_val <= 13)&&( btype2_val <= 13))
{
btype1 = (LibUtilities::BasisType) btype1_val;
btype2 = (LibUtilities::BasisType) btype2_val;
}
else if(( btype1_val >=13)&&(btype2_val <= 14))
else if(( btype1_val >=15)&&(btype2_val <= 16))
{
btype1 = LibUtilities::eOrtho_A;
btype2 = LibUtilities::eOrtho_B;
if(btype1_val == 13)
if(btype1_val == 15)
{
NodalType = LibUtilities::eNodalTriElec;
}
......
......@@ -87,13 +87,15 @@ int main(int argc, char *argv[]){
fprintf(stderr,"\t Modified_A = 4\n");
fprintf(stderr,"\t Modified_B = 5\n");
fprintf(stderr,"\t Modified_C = 6\n");
fprintf(stderr,"\t Fourier = 7\n");
fprintf(stderr,"\t Lagrange = 8\n");
fprintf(stderr,"\t Gauss Lagrange = 9\n");
fprintf(stderr,"\t Legendre = 10\n");
fprintf(stderr,"\t Chebyshev = 11\n");
fprintf(stderr,"\t Nodal tri (Electro) = 12\n");
fprintf(stderr,"\t Nodal tri (Fekete) = 13\n");
fprintf(stderr,"\t OrthoPyr_C = 7\n");
fprintf(stderr,"\t ModifiedPyr_C = 8\n");
fprintf(stderr,"\t Fourier = 9\n");
fprintf(stderr,"\t Lagrange = 10\n");
fprintf(stderr,"\t Gauss Lagrange = 11\n");
fprintf(stderr,"\t Legendre = 12\n");
fprintf(stderr,"\t Chebyshev = 13\n");
fprintf(stderr,"\t Nodal tri (Electro) = 14\n");
fprintf(stderr,"\t Nodal tri (Fekete) = 15\n");
exit(1);
}
......@@ -112,13 +114,13 @@ int main(int argc, char *argv[]){
int btype1_val = atoi(argv[2]);
int btype2_val = atoi(argv[3]);
int btype3_val = atoi(argv[4]);
if(( btype1_val <= 11)&&( btype2_val <= 11))
if(( btype1_val <= 13)&&( btype2_val <= 13))
{
btype1 = (LibUtilities::BasisType) btype1_val;
btype2 = (LibUtilities::BasisType) btype2_val;
btype3 = (LibUtilities::BasisType) btype3_val;
}
else if(( btype1_val >=12)&&(btype2_val <= 13))
else if(( btype1_val >=14)&&(btype2_val <= 15))
{
btype1 = LibUtilities::eOrtho_A;
btype2 = LibUtilities::eOrtho_B;
......
......@@ -2,7 +2,7 @@
<test>
<description>StdProject2D Quadrilateral Fourier basis P=6 Q=8</description>
<executable>StdProject2D</executable>
<parameters>4 7 7 6 6 8 8</parameters>
<parameters>4 9 9 6 6 8 8</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">1.06892e-15</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>StdProject2D Triangle Nodal basis P=6 Q=7</description>
<executable>StdProject2D</executable>
<parameters>3 13 12 6 6 7 7</parameters>
<parameters>3 15 14 6 6 7 7</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">1.78107e-15</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>StdProject3D Hexahedron Lagrange basis P=6 Q=7</description>
<executable>StdProject3D</executable>
<parameters>8 8 8 8 6 6 6 7 7 7</parameters>
<parameters>8 10 10 10 6 6 6 7 7 7</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">3.06382e-14</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>StdProject3D Pyramid Modified basis P=6 Q=7</description>
<executable>StdProject3D</executable>
<parameters>6 4 4 6 6 6 6 7 7 6</parameters>
<parameters>6 4 4 8 6 6 6 7 7 6</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-9">1.35652e-12</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>StdProject_Diff2D Quadrilateral Fourier basis P=6 Q=8</description>
<executable>StdProject_Diff2D</executable>
<parameters>4 7 7 6 6 8 8</parameters>
<parameters>4 9 9 6 6 8 8</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">1.54556e-14</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>StdProject_Diff2D Quadrilateral Lagrange basis P=6 Q=7</description>
<executable>StdProject_Diff2D</executable>
<parameters>4 8 8 6 6 7 7</parameters>
<parameters>4 10 10 6 6 7 7</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">4.14376e-14</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>StdProject_Diff2D Triangle Nodal basis P=6 Q=7</description>
<executable>StdProject_Diff2D</executable>
<parameters>3 13 12 6 6 7 7</parameters>
<parameters>3 15 14 6 6 7 7</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">1.06405e-14</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>StdProject_Diff3D Hexahedron Lagrange basis P=6 Q=7</description>
<executable>StdProject_Diff3D</executable>
<parameters>8 8 8 8 6 6 6 7 7 7</parameters>
<parameters>8 10 10 10 6 6 6 7 7 7</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">5.11314e-13</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>StdProject_Diff3D Pyramid Modified basis P=6 Q=7</description>
<executable>StdProject_Diff3D</executable>
<parameters>6 4 4 6 6 6 6 7 7 6</parameters>
<parameters>6 4 4 8 6 6 6 7 7 6</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-9">4.99628e-12</value>
......
......@@ -612,7 +612,6 @@ namespace Nektar
mode += N;
B_offset += N;
one_m_z_pow = m_bdata.data();
one_p_z = m_bdata.data()+numPoints;
for(q = 2; q < numModes; ++q)
......@@ -620,14 +619,14 @@ namespace Nektar
// face 0
for(i = 0; i < numPoints; ++i)
{
mode[i] = pow(one_m_z_pow[i],p+q); // [(1-z)/2]^{p+q}
mode[i] = pow(m_bdata[i],p+q); // [(1-z)/2]^{p+q}
}
one_m_z_pow = mode;
mode += numPoints;
// interior
for(int r = 1; r < numModes-max(p,q); ++r, mode+=numPoints)
for(int r = 1; r < numModes-max(p,q); ++r)
{
Polylib::jacobfd(numPoints,z.data(),mode,NULL,r-1,2*p+2*q-1,1.0);
......
......@@ -671,13 +671,20 @@ namespace Nektar
int nq = GetTotPoints();
Array<OneD, NekDouble> tmp(nq);
static int cnt = 0;
cnt++;
if(cnt == 84)
{
std::cout << "Start" << std::endl;
}
v_BwdTrans(inarray,tmp);
if(mkey.HasVarCoeff(eVarCoeffMass))
{
Vmath::Vmul(nq, mkey.GetVarCoeff(eVarCoeffMass), 1, tmp, 1, tmp, 1);
}
v_IProductWRTBase(tmp, outarray);
}
......
......@@ -583,11 +583,6 @@ namespace Nektar
{
v_IProductWRTBase(inarray,outarray);
// get Mass matrix inverse
StdMatrixKey masskey(eMass,DetShapeType(),*this);
DNekMatSharedPtr matsys = GetStdMatrix(masskey);
cout << *matsys << endl;
// get Mass matrix inverse
StdMatrixKey imasskey(eInvMass,DetShapeType(),*this);
DNekMatSharedPtr imatsys = GetStdMatrix(imasskey);
......
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