Commit 6f50b0e4 authored by Dave Moxey's avatar Dave Moxey
Browse files

Merge branch 'master' into feature/cli-options

parents 7724fd29 64acd8b3
......@@ -127,7 +127,7 @@ int main(int argc, char *argv[])
// Backward Transform Solution to get solved values at
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys());
//----------------------------------------------
Timing("Backard Transform ..");
Timing("Backward Transform ..");
//-----------------------------------------------
// Write solution to file
......
......@@ -69,7 +69,7 @@ namespace Nektar
FaceExp[f]->BwdTrans(FaceExp[f]->GetCoeffs(), FaceExp[f]->UpdatePhys());
AddHDGHelmholtzFaceTerms(tau, f, FaceExp, dirForcing, outarray);
AddHDGHelmholtzFaceTerms(tau, f, FaceExp[f], dirForcing, outarray);
cnt += order_f;
}
......@@ -79,13 +79,13 @@ namespace Nektar
// edges are unpacked into local cartesian order.
void Expansion3D::v_AddHDGHelmholtzFaceTerms(const NekDouble tau,
const int face,
Array <OneD, StdRegions::StdExpansionSharedPtr > &FaceExp,
StdRegions::StdExpansionSharedPtr FaceExp,
const StdRegions::VarCoeffMap &varcoeffs,
Array <OneD,NekDouble > &outarray)
{
int i,j,n;
int nquad_f = FaceExp[face]->GetNumPoints(0)*FaceExp[face]->GetNumPoints(1);
int order_f = FaceExp[face]->GetNcoeffs();
int nquad_f = FaceExp->GetNumPoints(0)*FaceExp->GetNumPoints(1);
int order_f = FaceExp->GetNcoeffs();
int coordim = GetCoordim();
int ncoeffs = GetNcoeffs();
......@@ -122,19 +122,19 @@ namespace Nektar
///// @TODO: What direction to use here??
// if ((x = varcoeffs.find(VarCoeff[0])) != varcoeffs.end())
// {
// GetPhysFaceVarCoeffsFromElement(face,FaceExp[face],x->second,varcoeff_work);
// Vmath::Vmul(nquad_f,varcoeff_work,1,FaceExp[face]->GetPhys(),1,FaceExp[face]->UpdatePhys(),1);
// GetPhysFaceVarCoeffsFromElement(face,FaceExp,x->second,varcoeff_work);
// Vmath::Vmul(nquad_f,varcoeff_work,1,FaceExp->GetPhys(),1,FaceExp->UpdatePhys(),1);
// }
//
//================================================================
// Add F = \tau <phi_i,in_phys>
// Fill face and take inner product
FaceExp[face]->IProductWRTBase(FaceExp[face]->GetPhys(),
FaceExp[face]->UpdateCoeffs());
FaceExp->IProductWRTBase(FaceExp->GetPhys(),
FaceExp->UpdateCoeffs());
// add data to out array
for(i = 0; i < order_f; ++i)
{
outarray[fmap[i]] += sign[i]*tau*FaceExp[face]->GetCoeff(i);
outarray[fmap[i]] += sign[i]*tau*FaceExp->GetCoeff(i);
}
//================================================================
......@@ -145,18 +145,18 @@ namespace Nektar
// Three independent direction
for(n = 0; n < coordim; ++n)
{
Vmath::Vmul(nquad_f,normals[n],1,FaceExp[face]->GetPhys(),1,inval,1);
Vmath::Vmul(nquad_f,normals[n],1,FaceExp->GetPhys(),1,inval,1);
// Multiply by variable coefficient
/// @TODO: Document this (probably not needed)
// StdRegions::VarCoeffMap::const_iterator x;
// if ((x = varcoeffs.find(VarCoeff[n])) != varcoeffs.end())
// {
// GetPhysEdgeVarCoeffsFromElement(edge,FaceExp[face],x->second,varcoeff_work);
// Vmath::Vmul(nquad_f,varcoeff_work,1,FaceExp[face]->GetPhys(),1,FaceExp[face]->UpdatePhys(),1);
// GetPhysEdgeVarCoeffsFromElement(edge,FaceExp,x->second,varcoeff_work);
// Vmath::Vmul(nquad_f,varcoeff_work,1,FaceExp->GetPhys(),1,FaceExp->UpdatePhys(),1);
// }
FaceExp[face]->IProductWRTBase(inval,outcoeff);
FaceExp->IProductWRTBase(inval,outcoeff);
// M^{-1} G
for(i = 0; i < ncoeffs; ++i)
......@@ -458,7 +458,7 @@ namespace Nektar
Array<OneD,NekDouble> f(ncoeffs);
DNekVec F(ncoeffs,f,eWrapper);
Array<OneD,StdRegions::StdExpansionSharedPtr> FaceExp(nfaces);
StdRegions::StdExpansionSharedPtr FaceExp;
// declare matrix space
returnval = MemoryManager<DNekMat>::AllocateSharedPtr(ncoeffs,nbndry);
DNekMat &Umat = *returnval;
......@@ -474,7 +474,7 @@ namespace Nektar
int bndry_cnt = 0;
for(i = 0; i < nfaces; ++i)
{
FaceExp[i] = GetFaceExp(i);//temporary, need to rewrite AddHDGHelmholtzFaceTerms
FaceExp = GetFaceExp(i);//temporary, need to rewrite AddHDGHelmholtzFaceTerms
int nface = GetFaceNcoeffs(i);
Array<OneD, NekDouble> face_lambda(nface);
......@@ -495,9 +495,9 @@ namespace Nektar
SetFaceToGeomOrientation(i, face_lambda);
Vmath::Vcopy(nface, face_lambda, 1, FaceExp[i]->UpdateCoeffs(), 1);
Vmath::Vcopy(nface, face_lambda, 1, FaceExp->UpdateCoeffs(), 1);
FaceExp[i]->BwdTrans(FaceExp[i]->GetCoeffs(), FaceExp[i]->UpdatePhys());
FaceExp->BwdTrans(FaceExp->GetCoeffs(), FaceExp->UpdatePhys());
AddHDGHelmholtzFaceTerms(tau, i, FaceExp, mkey.GetVarCoeffs(), f);
......
......@@ -63,13 +63,13 @@ namespace Nektar
inline void AddHDGHelmholtzFaceTerms(const NekDouble tau,
const int edge,
Array <OneD, StdRegions::StdExpansionSharedPtr > &EdgeExp,
StdRegions::StdExpansionSharedPtr FaceExp,
const StdRegions::VarCoeffMap &dirForcing,
Array <OneD,NekDouble > &outarray);
inline void AddHDGHelmholtzTraceTerms(const NekDouble tau,
const Array<OneD, const NekDouble> &inarray,
Array<OneD,StdRegions::StdExpansionSharedPtr> &EdgeExp,
Array<OneD,StdRegions::StdExpansionSharedPtr> &FaceExp,
const StdRegions::VarCoeffMap &dirForcing,
Array<OneD,NekDouble> &outarray);
......@@ -99,7 +99,7 @@ namespace Nektar
virtual void v_AddHDGHelmholtzFaceTerms(const NekDouble tau,
const int face,
Array <OneD, StdRegions::StdExpansionSharedPtr > &FaceExp,
StdRegions::StdExpansionSharedPtr FaceExp,
const StdRegions::VarCoeffMap &dirForcing,
Array <OneD,NekDouble > &outarray);
......@@ -135,7 +135,7 @@ namespace Nektar
inline void Expansion3D::AddHDGHelmholtzFaceTerms(const NekDouble tau,
const int face,
Array <OneD, StdRegions::StdExpansionSharedPtr > &FaceExp,
StdRegions::StdExpansionSharedPtr FaceExp,
const StdRegions::VarCoeffMap &dirForcing,
Array <OneD,NekDouble > &outarray)
{
......
......@@ -1154,7 +1154,7 @@ namespace Nektar
for(k = 0; k < order_e; ++k)
{
m_localToGlobalBndMap [k+cnt] = gid + orientMap[k];
m_localToGlobalBndSign[k+cnt] = elmSign1[orientMap[k]];
m_localToGlobalBndSign[k+cnt] = elmSign2[orientMap[k]];
}
cnt += order_e;
......
Supports Markdown
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