Commit 80df25df authored by Spencer Sherwin's avatar Spencer Sherwin
Browse files

Put in collocation checking in StdHexExp

parent e57ffa1e
......@@ -454,24 +454,60 @@ namespace Nektar
Array<OneD, NekDouble> tmp0 = wsp;
Array<OneD, NekDouble> tmp1 = wsp + nmodes0*nquad1*nquad2;
Blas::Dgemm('T', 'N', nquad1*nquad2, nmodes0, nquad0,
1.0, inarray.get(), nquad0,
if(colldir0)
{
// reshuffle data for next operation.
for(int n = 0; n < nmodes0; ++n)
{
Vmath::Vcopy(nquad1*nquad2,inarray.get()+n,nquad0,
tmp0.get()+nquad1*nquad2*n,1);
}
}
else
{
Blas::Dgemm('T', 'N', nquad1*nquad2, nmodes0, nquad0,
1.0, inarray.get(), nquad0,
base0.get(), nquad0,
0.0, tmp0.get(), nquad1*nquad2);
0.0, tmp0.get(), nquad1*nquad2);
}
Blas::Dgemm('T', 'N', nquad2*nmodes0, nmodes1, nquad1,
1.0, tmp0.get(), nquad1,
base1.get(), nquad1,
0.0, tmp1.get(), nquad2*nmodes0);
if(colldir1)
{
// reshuffle data for next operation.
for(int n = 0; n < nmodes1; ++n)
{
Vmath::Vcopy(nquad2*nmodes0,tmp0.get()+n,nquad1,
tmp1.get()+nquad2*nmodes0*n,1);
}
}
else
{
Blas::Dgemm('T', 'N', nquad2*nmodes0, nmodes1, nquad1,
1.0, tmp0.get(), nquad1,
base1.get(), nquad1,
0.0, tmp1.get(), nquad2*nmodes0);
}
Blas::Dgemm('T', 'N', nmodes0*nmodes1, nmodes2, nquad2,
1.0, tmp1.get(), nquad2,
base2.get(), nquad2,
0.0, outarray.get(), nmodes0*nmodes1);
}
if(colldir2)
{
// reshuffle data for next operation.
for(int n = 0; n < nmodes2; ++n)
{
Vmath::Vcopy(nmodes0*nmodes1,tmp1.get()+n,nquad2,
outarray.get()+nmodes0*nmodes1*n,1);
}
}
else
{
Blas::Dgemm('T', 'N', nmodes0*nmodes1, nmodes2, nquad2,
1.0, tmp1.get(), nquad2,
base2.get(), nquad2,
0.0, outarray.get(), nmodes0*nmodes1);
}
}
}
void StdHexExp::v_IProductWRTDerivBase(const int dir,
const Array<OneD, const NekDouble>& inarray,
Array<OneD, NekDouble> & outarray)
......
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