Commit 921d4443 authored by Douglas Serson's avatar Douglas Serson Committed by Dave Moxey

Improve efficiency of Euler1D

(cherry picked from commit 8ab6b15c)
parent 0fa260be
......@@ -895,11 +895,6 @@ namespace Nektar
Array<OneD, NekDouble> &Fwd,
Array<OneD, NekDouble> &Bwd)
{
// Expansion casts
LocalRegions::Expansion1DSharedPtr exp1D;
LocalRegions::Expansion1DSharedPtr exp1DFirst;
LocalRegions::Expansion1DSharedPtr exp1DLast;
// Counter variables
int n, v;
......@@ -911,10 +906,7 @@ namespace Nektar
Array<OneD, Array<OneD, LocalRegions::ExpansionSharedPtr> >
&elmtToTrace = m_traceMap->GetElmtToTrace();
// Basis shared pointer
LibUtilities::BasisSharedPtr Basis;
// Set forward and backard state to zero
Vmath::Zero(Fwd.num_elements(), Fwd, 1);
Vmath::Zero(Bwd.num_elements(), Bwd, 1);
......@@ -924,12 +916,8 @@ namespace Nektar
// Loop on the elements
for (cnt = n = 0; n < nElements; ++n)
{
exp1D = (*m_exp)[n]->as<LocalRegions::Expansion1D>();
// Set the offset of each element
phys_offset = GetPhys_Offset(n);
Basis = (*m_exp)[n]->GetBasis(0);
for(v = 0; v < 2; ++v, ++cnt)
{
......@@ -1052,24 +1040,19 @@ namespace Nektar
Array<OneD, Array<OneD, LocalRegions::ExpansionSharedPtr> >
&elmtToTrace = m_traceMap->GetElmtToTrace();
// Basis shared pointer
LibUtilities::BasisSharedPtr Basis;
vector<bool> negatedFluxNormal = GetNegatedFluxNormal();
for (n = 0; n < GetExpSize(); ++n)
{
// Basis definition on each element
Basis = (*m_exp)[n]->GetBasis(0);
// Number of coefficients on each element
int e_ncoeffs = (*m_exp)[n]->GetNcoeffs();
offset = GetCoeff_Offset(n);
// Implementation for every points except Gauss points
if (Basis->GetBasisType() != LibUtilities::eGauss_Lagrange)
if ((*m_exp)[n]->GetBasis(0)->GetBasisType() !=
LibUtilities::eGauss_Lagrange)
{
t_offset = GetTrace()->GetCoeff_Offset(elmtToTrace[n][0]->GetElmtId());
if(negatedFluxNormal[2*n])
......
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