Commit 5745e063 authored by Dave Moxey's avatar Dave Moxey
Browse files

Fixed compiler warnings in LoclRegions.

parent 82ba5c00
...@@ -39,8 +39,8 @@ namespace Nektar ...@@ -39,8 +39,8 @@ namespace Nektar
{ {
namespace LocalRegions namespace LocalRegions
{ {
Expansion0D::Expansion0D() : StdExpansion0D(), Expansion0D::Expansion0D() : StdExpansion(), Expansion(),
Expansion(), StdExpansion() StdExpansion0D()
{ {
m_elementVertexLeft = -1; m_elementVertexLeft = -1;
m_elementVertexRight = -1; m_elementVertexRight = -1;
......
...@@ -42,7 +42,6 @@ namespace Nektar ...@@ -42,7 +42,6 @@ namespace Nektar
DNekMatSharedPtr Expansion1D::v_GenMatrix(const StdRegions::StdMatrixKey &mkey) DNekMatSharedPtr Expansion1D::v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
{ {
DNekMatSharedPtr returnval; DNekMatSharedPtr returnval;
switch(mkey.GetMatrixType()) switch(mkey.GetMatrixType())
...@@ -141,7 +140,6 @@ namespace Nektar ...@@ -141,7 +140,6 @@ namespace Nektar
{ {
int j,k,dir; int j,k,dir;
int nbndry = NumDGBndryCoeffs(); int nbndry = NumDGBndryCoeffs();
int nquad = GetNumPoints(0);
int ncoeffs = GetNcoeffs(); int ncoeffs = GetNcoeffs();
Array<OneD,NekDouble> lambda(nbndry); Array<OneD,NekDouble> lambda(nbndry);
...@@ -159,9 +157,6 @@ namespace Nektar ...@@ -159,9 +157,6 @@ namespace Nektar
returnval = MemoryManager<DNekMat>::AllocateSharedPtr(ncoeffs,nbndry); returnval = MemoryManager<DNekMat>::AllocateSharedPtr(ncoeffs,nbndry);
DNekMat &Qmat = *returnval; DNekMat &Qmat = *returnval;
// Helmholtz matrix
DNekScalMat &invHmat = *GetLocMatrix(StdRegions::eInvHybridDGHelmholtz, factors);
// Lambda to U matrix // Lambda to U matrix
DNekScalMat &lamToU = *GetLocMatrix(StdRegions::eHybridDGLamToU, factors); DNekScalMat &lamToU = *GetLocMatrix(StdRegions::eHybridDGLamToU, factors);
...@@ -284,7 +279,7 @@ namespace Nektar ...@@ -284,7 +279,7 @@ namespace Nektar
} }
} }
void Expansion1D::v_AddHDGHelmholtzTraceTerms(const NekDouble tau, void Expansion1D::AddHDGHelmholtzTraceTerms(const NekDouble tau,
const Array<OneD,const NekDouble> &inarray, Array<OneD,NekDouble> &outarray) const Array<OneD,const NekDouble> &inarray, Array<OneD,NekDouble> &outarray)
{ {
int i,n; int i,n;
......
...@@ -77,14 +77,14 @@ namespace Nektar ...@@ -77,14 +77,14 @@ namespace Nektar
int edge, int edge,
Expansion2DSharedPtr &e); Expansion2DSharedPtr &e);
protected: void AddHDGHelmholtzTraceTerms(
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey);
virtual void v_AddHDGHelmholtzTraceTerms(
const NekDouble tau, const NekDouble tau,
const Array<OneD,const NekDouble> &inarray, const Array<OneD,const NekDouble> &inarray,
Array<OneD,NekDouble> &outarray); Array<OneD,NekDouble> &outarray);
protected:
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey);
virtual void v_AddRobinMassMatrix( virtual void v_AddRobinMassMatrix(
const int vert, const int vert,
const Array<OneD, const NekDouble > &primCoeffs, const Array<OneD, const NekDouble > &primCoeffs,
......
...@@ -44,7 +44,7 @@ namespace Nektar ...@@ -44,7 +44,7 @@ namespace Nektar
namespace LocalRegions namespace LocalRegions
{ {
Expansion2D::Expansion2D() : Expansion2D::Expansion2D() :
StdExpansion2D(), Expansion(), StdExpansion() StdExpansion(), Expansion(), StdExpansion2D()
{ {
m_elementFaceLeft = -1; m_elementFaceLeft = -1;
m_elementFaceRight = -1; m_elementFaceRight = -1;
...@@ -67,7 +67,6 @@ namespace Nektar ...@@ -67,7 +67,6 @@ namespace Nektar
// is enforced here by taking the minimum size and padding with // is enforced here by taking the minimum size and padding with
// zeros. // zeros.
int nquad_e = min(EdgeExp->GetNumPoints(0), int(normals[0].num_elements())); int nquad_e = min(EdgeExp->GetNumPoints(0), int(normals[0].num_elements()));
int coordim = GetCoordim();
Vmath::Zero(EdgeExp->GetNumPoints(0),EdgeExp->UpdatePhys(),1); Vmath::Zero(EdgeExp->GetNumPoints(0),EdgeExp->UpdatePhys(),1);
Vmath::Vmul(nquad_e,normals[0],1,Fx,1, Vmath::Vmul(nquad_e,normals[0],1,Fx,1,
...@@ -184,40 +183,6 @@ namespace Nektar ...@@ -184,40 +183,6 @@ namespace Nektar
} }
} }
// void Expansion2D::v_AddEdgeNormBoundaryBiInt(const int edge,
// StdRegions::StdExpansion1DSharedPtr &EdgeExp,
// const Array<OneD, const NekDouble> &Fwd,
// const Array<OneD, const NekDouble> &Bwd,
// Array<OneD, NekDouble> &outarray)
// {
// int i;
// int order_e = EdgeExp->GetNcoeffs();
// Array<OneD,unsigned int> map;
// Array<OneD,int> sign;
// StdRegions::Orientation edgedir = GetEorient(edge);
//
// // ASSERTL1(v_GetCoordim() == 2,"Routine only set up for two-dimensions");
//
// GetEdgeToElementMap(edge,edgedir,map,sign);
//
// if(edgedir == StdRegions::eForwards)
// {
// EdgeExp->IProductWRTBase(Fwd,EdgeExp->UpdateCoeffs());
// }
//
// else if(edgedir == StdRegions::eBackwards)
// {
// EdgeExp->IProductWRTBase(Bwd,EdgeExp->UpdateCoeffs());
// }
//
// // add data to outarray if forward edge normal is outwards
// for(i = 0; i < order_e; ++i)
// {
// outarray[map[i]] += sign[i]*EdgeExp->GetCoeff(i);
// }
// }
void Expansion2D::SetTraceToGeomOrientation(Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp, Array<OneD, NekDouble> &inout) void Expansion2D::SetTraceToGeomOrientation(Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp, Array<OneD, NekDouble> &inout)
{ {
int i,cnt = 0; int i,cnt = 0;
...@@ -237,7 +202,7 @@ namespace Nektar ...@@ -237,7 +202,7 @@ namespace Nektar
* Computes the C matrix entries due to the presence of the identity * Computes the C matrix entries due to the presence of the identity
* matrix in Eqn. 32. * matrix in Eqn. 32.
*/ */
void Expansion2D::v_AddNormTraceInt(const int dir, void Expansion2D::AddNormTraceInt(const int dir,
Array<OneD, const NekDouble> &inarray, Array<OneD, const NekDouble> &inarray,
Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp, Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp,
Array<OneD,NekDouble> &outarray, Array<OneD,NekDouble> &outarray,
...@@ -246,7 +211,6 @@ namespace Nektar ...@@ -246,7 +211,6 @@ namespace Nektar
int i,e,cnt; int i,e,cnt;
int order_e,nquad_e; int order_e,nquad_e;
int nedges = GetNedges(); int nedges = GetNedges();
int coordim = GetCoordim();
cnt = 0; cnt = 0;
for(e = 0; e < nedges; ++e) for(e = 0; e < nedges; ++e)
...@@ -267,17 +231,17 @@ namespace Nektar ...@@ -267,17 +231,17 @@ namespace Nektar
// Multiply by variable coefficient // Multiply by variable coefficient
/// @TODO: Document this /// @TODO: Document this
StdRegions::VarCoeffType VarCoeff[3] = {StdRegions::eVarCoeffD00, // StdRegions::VarCoeffType VarCoeff[3] = {StdRegions::eVarCoeffD00,
StdRegions::eVarCoeffD11, // StdRegions::eVarCoeffD11,
StdRegions::eVarCoeffD22}; // StdRegions::eVarCoeffD22};
StdRegions::VarCoeffMap::const_iterator x; // StdRegions::VarCoeffMap::const_iterator x;
Array<OneD, NekDouble> varcoeff_work(nquad_e); // Array<OneD, NekDouble> varcoeff_work(nquad_e);
// if ((x = varcoeffs.find(VarCoeff[dir])) != varcoeffs.end()) // if ((x = varcoeffs.find(VarCoeff[dir])) != varcoeffs.end())
// { // {
// GetPhysEdgeVarCoeffsFromElement(e,EdgeExp[e],x->second,varcoeff_work); // GetPhysEdgeVarCoeffsFromElement(e,EdgeExp[e],x->second,varcoeff_work);
// Vmath::Vmul(nquad_e,varcoeff_work,1,EdgeExp[e]->GetPhys(),1,EdgeExp[e]->UpdatePhys(),1); // Vmath::Vmul(nquad_e,varcoeff_work,1,EdgeExp[e]->GetPhys(),1,EdgeExp[e]->UpdatePhys(),1);
// } // }
Vmath::Vmul(nquad_e,normals[dir],1, Vmath::Vmul(nquad_e,normals[dir],1,
EdgeExp[e]->GetPhys(),1, EdgeExp[e]->GetPhys(),1,
...@@ -287,7 +251,7 @@ namespace Nektar ...@@ -287,7 +251,7 @@ namespace Nektar
} }
} }
void Expansion2D::v_AddNormTraceInt(const int dir, void Expansion2D::AddNormTraceInt(const int dir,
Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp, Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp,
Array<OneD,NekDouble> &outarray) Array<OneD,NekDouble> &outarray)
{ {
...@@ -318,7 +282,7 @@ namespace Nektar ...@@ -318,7 +282,7 @@ namespace Nektar
/** /**
* For a given edge add the \tilde{F}_1j contributions * For a given edge add the \tilde{F}_1j contributions
*/ */
void Expansion2D::v_AddEdgeBoundaryInt(const int edge, void Expansion2D::AddEdgeBoundaryInt(const int edge,
StdRegions::StdExpansionSharedPtr &EdgeExp, StdRegions::StdExpansionSharedPtr &EdgeExp,
Array <OneD,NekDouble > &outarray, Array <OneD,NekDouble > &outarray,
const StdRegions::VarCoeffMap &varcoeffs) const StdRegions::VarCoeffMap &varcoeffs)
...@@ -357,7 +321,7 @@ namespace Nektar ...@@ -357,7 +321,7 @@ namespace Nektar
// This method assumes that data in EdgeExp is orientated // This method assumes that data in EdgeExp is orientated
// according to elemental counter clockwise format // according to elemental counter clockwise format
// AddHDGHelmholtzTraceTerms with directions // AddHDGHelmholtzTraceTerms with directions
void Expansion2D::v_AddHDGHelmholtzTraceTerms(const NekDouble tau, void Expansion2D::AddHDGHelmholtzTraceTerms(const NekDouble tau,
const Array<OneD, const NekDouble> &inarray, const Array<OneD, const NekDouble> &inarray,
Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp, Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp,
const StdRegions::VarCoeffMap &dirForcing, const StdRegions::VarCoeffMap &dirForcing,
...@@ -390,7 +354,7 @@ namespace Nektar ...@@ -390,7 +354,7 @@ namespace Nektar
// evaluate additional terms in HDG edges. Not that this assumes that // evaluate additional terms in HDG edges. Not that this assumes that
// edges are unpacked into local cartesian order. // edges are unpacked into local cartesian order.
void Expansion2D::v_AddHDGHelmholtzEdgeTerms(const NekDouble tau, void Expansion2D::AddHDGHelmholtzEdgeTerms(const NekDouble tau,
const int edge, const int edge,
Array <OneD, StdRegions::StdExpansionSharedPtr > &EdgeExp, Array <OneD, StdRegions::StdExpansionSharedPtr > &EdgeExp,
const StdRegions::VarCoeffMap &varcoeffs, const StdRegions::VarCoeffMap &varcoeffs,
...@@ -628,12 +592,11 @@ namespace Nektar ...@@ -628,12 +592,11 @@ namespace Nektar
// U^e (P22) // U^e (P22)
case StdRegions::eHybridDGLamToU: case StdRegions::eHybridDGLamToU:
{ {
int i,j,k; int i,j,k;
int nbndry = NumDGBndryCoeffs(); int nbndry = NumDGBndryCoeffs();
int ncoeffs = GetNcoeffs(); int ncoeffs = GetNcoeffs();
int nedges = GetNedges(); int nedges = GetNedges();
NekDouble lambdaval = mkey.GetConstFactor(StdRegions::eFactorLambda); NekDouble tau = mkey.GetConstFactor(StdRegions::eFactorTau);
NekDouble tau = mkey.GetConstFactor(StdRegions::eFactorTau);
Array<OneD,NekDouble> lambda(nbndry); Array<OneD,NekDouble> lambda(nbndry);
DNekVec Lambda(nbndry,lambda,eWrapper); DNekVec Lambda(nbndry,lambda,eWrapper);
...@@ -696,7 +659,6 @@ namespace Nektar ...@@ -696,7 +659,6 @@ namespace Nektar
{ {
int i,j,k,dir; int i,j,k,dir;
int nbndry = NumDGBndryCoeffs(); int nbndry = NumDGBndryCoeffs();
int nquad = GetNumPoints(0);
int ncoeffs = GetNcoeffs(); int ncoeffs = GetNcoeffs();
int nedges = GetNedges(); int nedges = GetNedges();
...@@ -974,7 +936,6 @@ namespace Nektar ...@@ -974,7 +936,6 @@ namespace Nektar
StdRegions::eWeakDeriv2}; StdRegions::eWeakDeriv2};
int ncoeffs = GetNcoeffs(); int ncoeffs = GetNcoeffs();
int nedges = GetNedges();
DNekScalMat &InvMass = *GetLocMatrix(StdRegions::eInvMass); DNekScalMat &InvMass = *GetLocMatrix(StdRegions::eInvMass);
DNekScalMat &Dmat = *GetLocMatrix(DerivType[dir]); DNekScalMat &Dmat = *GetLocMatrix(DerivType[dir]);
......
...@@ -104,39 +104,11 @@ namespace Nektar ...@@ -104,39 +104,11 @@ namespace Nektar
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey); virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey);
// Hybridized DG routines // Hybridized DG routines
virtual void v_AddNormTraceInt(const int dir,
Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp,
Array<OneD,NekDouble> &outarray);
virtual void v_AddNormTraceInt(const int dir,
Array<OneD, const NekDouble> &inarray,
Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp,
Array<OneD,NekDouble> &outarray,
const StdRegions::VarCoeffMap &varcoeffs);
virtual void v_AddHDGHelmholtzEdgeTerms(const NekDouble tau,
const int edge,
Array <OneD, StdRegions::StdExpansionSharedPtr > &EdgeExp,
const StdRegions::VarCoeffMap &dirForcing,
Array <OneD,NekDouble > &outarray);
virtual void v_AddEdgeBoundaryInt(const int edge,
StdRegions::StdExpansionSharedPtr &EdgeExp,
Array <OneD,NekDouble > &outarray,
const StdRegions::VarCoeffMap &varcoeffs);
virtual void v_DGDeriv(const int dir, virtual void v_DGDeriv(const int dir,
const Array<OneD, const NekDouble>&incoeffs, const Array<OneD, const NekDouble>&incoeffs,
Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp, Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp,
Array<OneD, NekDouble> &out_d); Array<OneD, NekDouble> &out_d);
virtual void v_AddHDGHelmholtzTraceTerms(const NekDouble tau,
const Array<OneD, const NekDouble> &inarray,
Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp,
const StdRegions::VarCoeffMap &dirForcing,
Array<OneD,NekDouble> &outarray);
virtual void v_AddEdgeNormBoundaryInt( virtual void v_AddEdgeNormBoundaryInt(
const int edge, const int edge,
StdRegions::StdExpansionSharedPtr &EdgeExp, StdRegions::StdExpansionSharedPtr &EdgeExp,
...@@ -149,12 +121,6 @@ namespace Nektar ...@@ -149,12 +121,6 @@ namespace Nektar
StdRegions::StdExpansionSharedPtr &EdgeExp, StdRegions::StdExpansionSharedPtr &EdgeExp,
const Array<OneD, const NekDouble> &Fn, const Array<OneD, const NekDouble> &Fn,
Array<OneD, NekDouble> &outarray); Array<OneD, NekDouble> &outarray);
//
// virtual void v_AddEdgeNormBoundaryBiInt(const int edge,
// StdRegions::StdExpansion1DSharedPtr &EdgeExp,
// const Array<OneD, const NekDouble> &Fwd,
// const Array<OneD, const NekDouble> &Bwd,
// Array<OneD, NekDouble> &outarray);
virtual void v_AddRobinMassMatrix(const int edgeid, const Array<OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat); virtual void v_AddRobinMassMatrix(const int edgeid, const Array<OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat);
...@@ -199,48 +165,6 @@ namespace Nektar ...@@ -199,48 +165,6 @@ namespace Nektar
m_edgeExp[edge] = e; m_edgeExp[edge] = e;
} }
inline void Expansion2D::AddNormTraceInt(const int dir,
Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp,
Array<OneD,NekDouble> &outarray)
{
v_AddNormTraceInt(dir, EdgeExp, outarray);
}
inline void Expansion2D::AddNormTraceInt(const int dir,
Array<OneD, const NekDouble> &inarray,
Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp,
Array<OneD,NekDouble> &outarray,
const StdRegions::VarCoeffMap &varcoeffs)
{
v_AddNormTraceInt(dir, inarray, EdgeExp, outarray, varcoeffs);
}
inline void Expansion2D::AddEdgeBoundaryInt(const int edge,
StdRegions::StdExpansionSharedPtr &EdgeExp,
Array <OneD,NekDouble > &outarray,
const StdRegions::VarCoeffMap &varcoeffs)
{
v_AddEdgeBoundaryInt(edge, EdgeExp, outarray, varcoeffs);
}
inline void Expansion2D::AddHDGHelmholtzEdgeTerms(const NekDouble tau,
const int edge,
Array <OneD, StdRegions::StdExpansionSharedPtr > &EdgeExp,
const StdRegions::VarCoeffMap &dirForcing,
Array <OneD,NekDouble > &outarray)
{
v_AddHDGHelmholtzEdgeTerms(tau, edge, EdgeExp, dirForcing, outarray);
}
inline void Expansion2D::AddHDGHelmholtzTraceTerms(const NekDouble tau,
const Array<OneD, const NekDouble> &inarray,
Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp,
const StdRegions::VarCoeffMap &dirForcing,
Array<OneD,NekDouble> &outarray)
{
v_AddHDGHelmholtzTraceTerms(tau, inarray, EdgeExp, dirForcing, outarray);
}
inline Expansion3DSharedPtr Expansion2D::GetLeftAdjacentElementExp() const inline Expansion3DSharedPtr Expansion2D::GetLeftAdjacentElementExp() const
{ {
ASSERTL1(m_elementLeft.lock().get(), "Left adjacent element not set."); ASSERTL1(m_elementLeft.lock().get(), "Left adjacent element not set.");
......
...@@ -44,11 +44,11 @@ namespace Nektar ...@@ -44,11 +44,11 @@ namespace Nektar
{ {
Expansion3D::Expansion3D(){} Expansion3D::Expansion3D(){}
void Expansion3D::v_AddHDGHelmholtzTraceTerms(const NekDouble tau, void Expansion3D::AddHDGHelmholtzTraceTerms(const NekDouble tau,
const Array<OneD, const NekDouble> &inarray, const Array<OneD, const NekDouble> &inarray,
Array<OneD,StdRegions::StdExpansionSharedPtr> &FaceExp, Array<OneD,StdRegions::StdExpansionSharedPtr> &FaceExp,
const StdRegions::VarCoeffMap &dirForcing, const StdRegions::VarCoeffMap &dirForcing,
Array<OneD,NekDouble> &outarray) Array<OneD,NekDouble> &outarray)
{ {
ASSERTL0(&inarray[0] != &outarray[0],"Input and output arrays use the same memory"); ASSERTL0(&inarray[0] != &outarray[0],"Input and output arrays use the same memory");
...@@ -77,7 +77,7 @@ namespace Nektar ...@@ -77,7 +77,7 @@ namespace Nektar
// evaluate additional terms in HDG face. Note that this assumes that // evaluate additional terms in HDG face. Note that this assumes that
// edges are unpacked into local cartesian order. // edges are unpacked into local cartesian order.
void Expansion3D::v_AddHDGHelmholtzFaceTerms(const NekDouble tau, void Expansion3D::AddHDGHelmholtzFaceTerms(const NekDouble tau,
const int face, const int face,
StdRegions::StdExpansionSharedPtr FaceExp, StdRegions::StdExpansionSharedPtr FaceExp,
const StdRegions::VarCoeffMap &varcoeffs, const StdRegions::VarCoeffMap &varcoeffs,
...@@ -190,7 +190,7 @@ namespace Nektar ...@@ -190,7 +190,7 @@ namespace Nektar
* Computes the C matrix entries due to the presence of the identity * Computes the C matrix entries due to the presence of the identity
* matrix in Eqn. 32. * matrix in Eqn. 32.
*/ */
void Expansion3D::v_AddNormTraceInt(const int dir, void Expansion3D::AddNormTraceInt(const int dir,
Array<OneD, const NekDouble> &inarray, Array<OneD, const NekDouble> &inarray,
Array<OneD,StdRegions::StdExpansionSharedPtr> &FaceExp, Array<OneD,StdRegions::StdExpansionSharedPtr> &FaceExp,
Array<OneD,NekDouble> &outarray, Array<OneD,NekDouble> &outarray,
...@@ -199,7 +199,6 @@ namespace Nektar ...@@ -199,7 +199,6 @@ namespace Nektar
int i,f,cnt; int i,f,cnt;
int order_f,nquad_f; int order_f,nquad_f;
int nfaces = GetNfaces(); int nfaces = GetNfaces();
int coordim = GetCoordim();
cnt = 0; cnt = 0;
for(f = 0; f < nfaces; ++f) for(f = 0; f < nfaces; ++f)
...@@ -244,14 +243,13 @@ namespace Nektar ...@@ -244,14 +243,13 @@ namespace Nektar
/** /**
* For a given face add the \tilde{F}_1j contributions * For a given face add the \tilde{F}_1j contributions
*/ */
void Expansion3D::v_AddFaceBoundaryInt(const int face, void Expansion3D::AddFaceBoundaryInt(const int face,
StdRegions::StdExpansionSharedPtr &FaceExp, StdRegions::StdExpansionSharedPtr &FaceExp,
Array <OneD,NekDouble > &outarray, Array <OneD,NekDouble > &outarray,
const StdRegions::VarCoeffMap &varcoeffs) const StdRegions::VarCoeffMap &varcoeffs)
{ {
int i; int i;
int order_f = FaceExp->GetNcoeffs(); int order_f = FaceExp->GetNcoeffs();
int nquad_f = FaceExp->GetNumPoints(0)*FaceExp->GetNumPoints(1);
Array<OneD,unsigned int> map; Array<OneD,unsigned int> map;
Array<OneD,int> sign; Array<OneD,int> sign;
Array<OneD, NekDouble> coeff(order_f); Array<OneD, NekDouble> coeff(order_f);
...@@ -280,59 +278,60 @@ namespace Nektar ...@@ -280,59 +278,60 @@ namespace Nektar
} }
} }
/** /**
* Aligns face orientation with the geometry orientation * Aligns face orientation with the geometry orientation
*/ */
void Expansion3D::SetFaceToGeomOrientation(const int face, Array<OneD, NekDouble> &inout) void Expansion3D::SetFaceToGeomOrientation(const int face, Array<OneD, NekDouble> &inout)
{ {
int j,k; int j,k;
StdRegions::Orientation dir2, dir1 = StdRegions::eDir1FwdDir1_Dir2FwdDir2; StdRegions::Orientation dir2, dir1 = StdRegions::eDir1FwdDir1_Dir2FwdDir2;
dir2 = GetFaceOrient(face); dir2 = GetFaceOrient(face);
Array<OneD, unsigned int> map1, map2; Array<OneD, unsigned int> map1, map2;
Array<OneD, int> sign1, sign2; Array<OneD, int> sign1, sign2;
int nface = GetFaceNcoeffs(face); int nface = GetFaceNcoeffs(face);
Array<OneD, NekDouble> f_in(nface); Array<OneD, NekDouble> f_in(nface);
Vmath::Vcopy(nface,&inout[0],1,&f_in[0],1); Vmath::Vcopy(nface,&inout[0],1,&f_in[0],1);
//retreiving face to element map for standard face orientation and for actual face orientation //retreiving face to element map for standard face orientation and for actual face orientation
GetFaceToElementMap(face, dir1, map1, sign1); GetFaceToElementMap(face, dir1, map1, sign1);
GetFaceToElementMap(face, dir2, map2, sign2); GetFaceToElementMap(face, dir2, map2, sign2);
ASSERTL1(map1.num_elements() == map2.num_elements(), "There is an error with the GetFaceToElementMap"); ASSERTL1(map1.num_elements() == map2.num_elements(), "There is an error with the GetFaceToElementMap");
for(j = 0; j < map1.num_elements(); ++j)//index in the standard orientation for(j = 0; j < map1.num_elements(); ++j)//index in the standard orientation
for(k = 0; k < map2.num_elements(); ++k)//index in the actual orientation for(k = 0; k < map2.num_elements(); ++k)//index in the actual orientation
{ {
if(map1[j] == map2[k] && k != j) if(map1[j] == map2[k] && k != j)
{ {
inout[k] = f_in[j]; inout[k] = f_in[j];
//checking if sign is changing //checking if sign is changing