Commit 96736e11 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Fixed NekManager management enable/disable functionality.


git-svn-id: https://gforge.sci.utah.edu/svn/nektar/trunk@3987 305cdda6-5ce1-45b3-a98d-dfc68c8b3305
parent dbaf6e66
......@@ -92,10 +92,12 @@ namespace Nektar
else
{
m_values = ValueContainerShPtr(new ValueContainer);
m_managementEnabled = BoolSharedPtr(new bool(true));
m_ValueContainerPool[whichPool] = m_values;
m_managementEnabledContainerPool[whichPool] = m_managementEnabled;
if (m_managementEnabledContainerPool.find(whichPool) == m_managementEnabledContainerPool.end())
{
m_managementEnabledContainerPool[whichPool] = BoolSharedPtr(new bool(true));
}
m_managementEnabled = m_managementEnabledContainerPool[whichPool];
}
}
else
......@@ -122,9 +124,12 @@ namespace Nektar
else
{
m_values = ValueContainerShPtr(new ValueContainer);
m_managementEnabled = BoolSharedPtr(new bool(true));
m_ValueContainerPool[whichPool] = m_values;
m_managementEnabledContainerPool[whichPool] = m_managementEnabled;
if (m_managementEnabledContainerPool.find(whichPool) == m_managementEnabledContainerPool.end())
{
m_managementEnabledContainerPool[whichPool] = BoolSharedPtr(new bool(true));
}
m_managementEnabled = m_managementEnabledContainerPool[whichPool];
}
}
......@@ -170,7 +175,7 @@ namespace Nektar
return value;
}
ValueType &operator[](typename boost::call_traits<KeyType>::const_reference key)
ValueType operator[](typename boost::call_traits<KeyType>::const_reference key)
{
typename ValueContainer::iterator found = m_values->find(key);
......@@ -195,7 +200,7 @@ namespace Nektar
{
(*m_values)[key] = v;
}
return (*m_values)[key];
return v;
}
else
{
......@@ -239,7 +244,7 @@ namespace Nektar
}
else
{
m_managementEnabledContainerPool[whichPool] = boost::shared_ptr<bool>(new bool(true));
m_managementEnabledContainerPool[whichPool] = BoolSharedPtr(new bool(true));
}
}
}
......@@ -256,7 +261,7 @@ namespace Nektar
}
else
{
m_managementEnabledContainerPool[whichPool] = boost::shared_ptr<bool>(false);
m_managementEnabledContainerPool[whichPool] = BoolSharedPtr(new bool(false));
}
}
}
......
......@@ -52,12 +52,12 @@ namespace Nektar
LOCAL_REGIONS_EXPORT Expansion(); // default constructor.
LOCAL_REGIONS_EXPORT virtual ~Expansion() {}
DNekScalMatSharedPtr& GetLocMatrix(const LocalRegions::MatrixKey &mkey)
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
{
return v_GetLocMatrix(mkey);
}
DNekScalMatSharedPtr& GetLocMatrix(const StdRegions::MatrixType mtype,
DNekScalMatSharedPtr GetLocMatrix(const StdRegions::MatrixType mtype,
const StdRegions::ConstFactorMap &factors = StdRegions::NullConstFactorMap,
const StdRegions::VarCoeffMap &varcoeffs = StdRegions::NullVarCoeffMap)
{
......@@ -67,7 +67,7 @@ namespace Nektar
protected:
virtual DNekScalMatSharedPtr& v_GetLocMatrix(const LocalRegions::MatrixKey &mkey)
virtual DNekScalMatSharedPtr v_GetLocMatrix(const LocalRegions::MatrixKey &mkey)
{
NEKERROR(ErrorUtil::efatal, "This function is only valid for LocalRegions");
return NullDNekScalMatSharedPtr;
......
......@@ -521,7 +521,7 @@ namespace Nektar
}
MatrixKey iprodmatkey(mtype,DetExpansionType(),*this);
DNekScalMatSharedPtr& iprodmat = m_matrixManager[iprodmatkey];
DNekScalMatSharedPtr iprodmat = m_matrixManager[iprodmatkey];
Blas::Dgemv('N',m_ncoeffs,nq,iprodmat->Scale(),(iprodmat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
......@@ -2264,7 +2264,7 @@ namespace Nektar
}
else
{
DNekScalMatSharedPtr& mat = GetLocMatrix(mkey);
DNekScalMatSharedPtr mat = GetLocMatrix(mkey);
factor = mat->Scale();
goto UseStdRegionsMatrix;
}
......@@ -2273,7 +2273,7 @@ namespace Nektar
{
NekDouble invfactor = 1.0/factor;
NekDouble one = 1.0;
DNekBlkMatSharedPtr& mat = GetStdStaticCondMatrix(mkey);
DNekBlkMatSharedPtr mat = GetStdStaticCondMatrix(mkey);
DNekScalMatSharedPtr Atmp;
DNekMatSharedPtr Asubmat;
......@@ -2348,13 +2348,13 @@ namespace Nektar
}
DNekScalMatSharedPtr& HexExp::v_GetLocMatrix(const MatrixKey &mkey)
DNekScalMatSharedPtr HexExp::v_GetLocMatrix(const MatrixKey &mkey)
{
return m_matrixManager[mkey];
}
DNekScalBlkMatSharedPtr& HexExp::v_GetLocStaticCondMatrix(
DNekScalBlkMatSharedPtr HexExp::v_GetLocStaticCondMatrix(
const MatrixKey &mkey)
{
return m_staticCondMatrixManager[mkey];
......
......@@ -266,11 +266,11 @@ namespace Nektar
LOCAL_REGIONS_EXPORT DNekScalBlkMatSharedPtr CreateStaticCondMatrix(
const MatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr& v_GetLocMatrix(
LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr v_GetLocMatrix(
const MatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual
DNekScalBlkMatSharedPtr& v_GetLocStaticCondMatrix(
DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(
const MatrixKey &mkey);
private:
......
......@@ -200,7 +200,7 @@ namespace Nektar
{
int nq = GetTotPoints();
MatrixKey iprodmatkey(StdRegions::eIProductWRTBase,DetExpansionType(),*this);
DNekScalMatSharedPtr& iprodmat = m_matrixManager[iprodmatkey];
DNekScalMatSharedPtr iprodmat = m_matrixManager[iprodmatkey];
Blas::Dgemv('N',m_ncoeffs,nq,iprodmat->Scale(),(iprodmat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
......@@ -307,7 +307,7 @@ namespace Nektar
}
MatrixKey iprodmatkey(mtype,DetExpansionType(),*this);
DNekScalMatSharedPtr& iprodmat = m_matrixManager[iprodmatkey];
DNekScalMatSharedPtr iprodmat = m_matrixManager[iprodmatkey];
Blas::Dgemv('N',m_ncoeffs,nq,iprodmat->Scale(),(iprodmat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
......@@ -826,9 +826,9 @@ namespace Nektar
MatrixKey lap11key(StdRegions::eLaplacian11,
mkey.GetExpansionType(), *this);
DNekMatSharedPtr& lap00 = GetStdMatrix(lap00key);
DNekMatSharedPtr& lap01 = GetStdMatrix(lap01key);
DNekMatSharedPtr& lap11 = GetStdMatrix(lap11key);
DNekMatSharedPtr lap00 = GetStdMatrix(lap00key);
DNekMatSharedPtr lap01 = GetStdMatrix(lap01key);
DNekMatSharedPtr lap11 = GetStdMatrix(lap11key);
NekDouble jac = (m_metricinfo->GetJac())[0];
Array<TwoD, const NekDouble> gmat = m_metricinfo->GetGmat();
......@@ -906,7 +906,7 @@ namespace Nektar
}
else
{
DNekScalMatSharedPtr& mat = GetLocMatrix(mkey);
DNekScalMatSharedPtr mat = GetLocMatrix(mkey);
factor = mat->Scale();
goto UseStdRegionsMatrix;
}
......
......@@ -358,18 +358,18 @@ namespace Nektar
return CreateStdMatrix(mkey);
}
virtual DNekScalMatSharedPtr& v_GetLocMatrix(const MatrixKey &mkey)
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
{
return m_matrixManager[mkey];
}
// virtual DNekScalMatSharedPtr& v_GetLocMatrix(const StdRegions::MatrixType mtype, NekDouble lambdaval, NekDouble tau)
// virtual DNekScalMatSharedPtr v_GetLocMatrix(const StdRegions::MatrixType mtype, NekDouble lambdaval, NekDouble tau)
// {
// MatrixKey mkey(mtype,DetExpansionType(),*this,lambdaval,tau);
// return m_matrixManager[mkey];
// }
virtual DNekScalBlkMatSharedPtr& v_GetLocStaticCondMatrix(const MatrixKey &mkey)
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey)
{
return m_staticCondMatrixManager[mkey];
}
......
......@@ -1389,12 +1389,12 @@ namespace Nektar
return tmp->GetStdMatrix(mkey);
}
DNekScalMatSharedPtr& PrismExp::v_GetLocMatrix(const MatrixKey &mkey)
DNekScalMatSharedPtr PrismExp::v_GetLocMatrix(const MatrixKey &mkey)
{
return m_matrixManager[mkey];
}
DNekScalBlkMatSharedPtr& PrismExp::v_GetLocStaticCondMatrix(const MatrixKey &mkey)
DNekScalBlkMatSharedPtr PrismExp::v_GetLocStaticCondMatrix(const MatrixKey &mkey)
{
return m_staticCondMatrixManager[mkey];
}
......
......@@ -192,9 +192,9 @@ namespace Nektar
const StdRegions::StdMatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix(
const StdRegions::StdMatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr& v_GetLocMatrix(
LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr v_GetLocMatrix(
const MatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr& v_GetLocStaticCondMatrix(
LOCAL_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(
const MatrixKey &mkey);
LOCAL_REGIONS_EXPORT DNekScalMatSharedPtr CreateMatrix(
const MatrixKey &mkey);
......
......@@ -557,12 +557,12 @@ namespace Nektar
return tmp->GetStdMatrix(mkey);
}
DNekScalMatSharedPtr& PyrExp::v_GetLocMatrix(const MatrixKey &mkey)
DNekScalMatSharedPtr PyrExp::v_GetLocMatrix(const MatrixKey &mkey)
{
return m_matrixManager[mkey];
}
DNekScalBlkMatSharedPtr& PyrExp::v_GetLocStaticCondMatrix(const MatrixKey &mkey)
DNekScalBlkMatSharedPtr PyrExp::v_GetLocStaticCondMatrix(const MatrixKey &mkey)
{
return m_staticCondMatrixManager[mkey];
}
......
......@@ -150,9 +150,9 @@ namespace Nektar
const StdRegions::StdMatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix(
const StdRegions::StdMatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr& v_GetLocMatrix(
LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr v_GetLocMatrix(
const MatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr& v_GetLocStaticCondMatrix(
LOCAL_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(
const MatrixKey &mkey);
LOCAL_REGIONS_EXPORT DNekScalMatSharedPtr CreateMatrix(
const MatrixKey &mkey);
......
......@@ -255,7 +255,7 @@ namespace Nektar
// get Mass matrix inverse
MatrixKey masskey(StdRegions::eInvMass,
DetExpansionType(),*this);
DNekScalMatSharedPtr& matsys = m_matrixManager[masskey];
DNekScalMatSharedPtr matsys = m_matrixManager[masskey];
// copy inarray in case inarray == outarray
NekVector<NekDouble> in(m_ncoeffs,outarray,eCopy);
......@@ -422,7 +422,7 @@ namespace Nektar
{
int nq = GetTotPoints();
MatrixKey iprodmatkey(StdRegions::eIProductWRTBase,DetExpansionType(),*this);
DNekScalMatSharedPtr& iprodmat = m_matrixManager[iprodmatkey];
DNekScalMatSharedPtr iprodmat = m_matrixManager[iprodmatkey];
Blas::Dgemv('N',m_ncoeffs,nq,iprodmat->Scale(),(iprodmat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
......@@ -501,7 +501,7 @@ namespace Nektar
}
MatrixKey iprodmatkey(mtype,DetExpansionType(),*this);
DNekScalMatSharedPtr& iprodmat = m_matrixManager[iprodmatkey];
DNekScalMatSharedPtr iprodmat = m_matrixManager[iprodmatkey];
Blas::Dgemv('N',m_ncoeffs,nq,iprodmat->Scale(),(iprodmat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
......@@ -1577,7 +1577,7 @@ namespace Nektar
{
NekDouble invfactor = 1.0/factor;
NekDouble one = 1.0;
DNekBlkMatSharedPtr& mat = GetStdStaticCondMatrix(mkey);
DNekBlkMatSharedPtr mat = GetStdStaticCondMatrix(mkey);
DNekScalMatSharedPtr Atmp;
DNekMatSharedPtr Asubmat;
......@@ -1652,13 +1652,13 @@ namespace Nektar
}
DNekScalMatSharedPtr& QuadExp::v_GetLocMatrix(const MatrixKey &mkey)
DNekScalMatSharedPtr QuadExp::v_GetLocMatrix(const MatrixKey &mkey)
{
return m_matrixManager[mkey];
}
DNekScalBlkMatSharedPtr& QuadExp::v_GetLocStaticCondMatrix(const MatrixKey &mkey)
DNekScalBlkMatSharedPtr QuadExp::v_GetLocStaticCondMatrix(const MatrixKey &mkey)
{
return m_staticCondMatrixManager[mkey];
}
......
......@@ -206,10 +206,10 @@ namespace Nektar
LOCAL_REGIONS_EXPORT DNekScalBlkMatSharedPtr CreateStaticCondMatrix(
const MatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr& v_GetLocMatrix(
LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr v_GetLocMatrix(
const MatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual
DNekScalBlkMatSharedPtr& v_GetLocStaticCondMatrix(
DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(
const MatrixKey &mkey);
......
......@@ -387,7 +387,7 @@ cout<<"deps/dx ="<<inarray_d0[i]<<" deps/dy="<<inarray_d1[i]<<endl;
// get Mass matrix inverse
MatrixKey masskey(StdRegions::eInvMass, DetExpansionType(),*this);
DNekScalMatSharedPtr& matsys = m_matrixManager[masskey];
DNekScalMatSharedPtr matsys = m_matrixManager[masskey];
// copy inarray in case inarray == outarray
NekVector<NekDouble> in(m_ncoeffs,outarray,eCopy);
......@@ -1261,13 +1261,13 @@ cout<<"deps/dx ="<<inarray_d0[i]<<" deps/dy="<<inarray_d1[i]<<endl;
//-----------------------------
DNekScalBlkMatSharedPtr& SegExp::v_GetLocStaticCondMatrix(
DNekScalBlkMatSharedPtr SegExp::v_GetLocStaticCondMatrix(
const MatrixKey &mkey)
{
return m_staticCondMatrixManager[mkey];
}
DNekScalMatSharedPtr& SegExp::v_GetLocMatrix(const MatrixKey &mkey)
DNekScalMatSharedPtr SegExp::v_GetLocMatrix(const MatrixKey &mkey)
{
return m_matrixManager[mkey];
}
......@@ -1522,7 +1522,7 @@ cout<<"deps/dx ="<<inarray_d0[i]<<" deps/dy="<<inarray_d1[i]<<endl;
{
NekDouble invfactor = 1.0/factor;
NekDouble one = 1.0;
DNekBlkMatSharedPtr& mat = GetStdStaticCondMatrix(mkey);
DNekBlkMatSharedPtr mat = GetStdStaticCondMatrix(mkey);
DNekScalMatSharedPtr Atmp;
DNekMatSharedPtr Asubmat;
......@@ -1659,7 +1659,7 @@ cout<<"deps/dx ="<<inarray_d0[i]<<" deps/dy="<<inarray_d1[i]<<endl;
{
// get Mass matrix inverse
MatrixKey masskey(StdRegions::eInvMass, DetExpansionType(),*this);
DNekScalMatSharedPtr& matsys = m_matrixManager[masskey];
DNekScalMatSharedPtr matsys = m_matrixManager[masskey];
NekVector<NekDouble> in(m_ncoeffs,inarray,eCopy);
NekVector<NekDouble> out(m_ncoeffs,outarray,eWrapper);
......
......@@ -244,10 +244,10 @@ namespace Nektar
LOCAL_REGIONS_EXPORT DNekScalBlkMatSharedPtr CreateStaticCondMatrix(
const MatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr&
LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr
v_GetLocMatrix(const MatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr&
LOCAL_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr
v_GetLocStaticCondMatrix(const MatrixKey &mkey);
......
......@@ -1682,12 +1682,12 @@ namespace Nektar
return tmp->GetStdMatrix(mkey);
}
DNekScalMatSharedPtr& TetExp::v_GetLocMatrix(const MatrixKey &mkey)
DNekScalMatSharedPtr TetExp::v_GetLocMatrix(const MatrixKey &mkey)
{
return m_matrixManager[mkey];
}
DNekScalBlkMatSharedPtr& TetExp::v_GetLocStaticCondMatrix(const MatrixKey &mkey)
DNekScalBlkMatSharedPtr TetExp::v_GetLocStaticCondMatrix(const MatrixKey &mkey)
{
return m_staticCondMatrixManager[mkey];
}
......
......@@ -212,11 +212,11 @@ namespace Nektar
LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix(
const StdRegions::StdMatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr& v_GetLocMatrix(
LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr v_GetLocMatrix(
const MatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual
DNekScalBlkMatSharedPtr& v_GetLocStaticCondMatrix(
DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(
const MatrixKey &mkey);
......
......@@ -260,7 +260,7 @@ namespace Nektar
// get Mass matrix inverse
MatrixKey masskey(StdRegions::eInvMass,
DetExpansionType(),*this);
DNekScalMatSharedPtr& matsys = m_matrixManager[masskey];
DNekScalMatSharedPtr matsys = m_matrixManager[masskey];
// copy inarray in case inarray == outarray
NekVector<NekDouble> in (m_ncoeffs,outarray,eCopy);
......@@ -407,7 +407,7 @@ namespace Nektar
{
int nq = GetTotPoints();
MatrixKey iprodmatkey(StdRegions::eIProductWRTBase,DetExpansionType(),*this);
DNekScalMatSharedPtr& iprodmat = m_matrixManager[iprodmatkey];
DNekScalMatSharedPtr iprodmat = m_matrixManager[iprodmatkey];
Blas::Dgemv('N',m_ncoeffs,nq,iprodmat->Scale(),(iprodmat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
......@@ -516,7 +516,7 @@ namespace Nektar
}
MatrixKey iprodmatkey(mtype,DetExpansionType(),*this);
DNekScalMatSharedPtr& iprodmat = m_matrixManager[iprodmatkey];
DNekScalMatSharedPtr iprodmat = m_matrixManager[iprodmatkey];
Blas::Dgemv('N',m_ncoeffs,nq,iprodmat->Scale(),(iprodmat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
......@@ -1328,9 +1328,9 @@ namespace Nektar
MatrixKey lap11key(StdRegions::eLaplacian11,
mkey.GetExpansionType(), *this);
DNekMatSharedPtr& lap00 = GetStdMatrix(lap00key);
DNekMatSharedPtr& lap01 = GetStdMatrix(lap01key);
DNekMatSharedPtr& lap11 = GetStdMatrix(lap11key);
DNekMatSharedPtr lap00 = GetStdMatrix(lap00key);
DNekMatSharedPtr lap01 = GetStdMatrix(lap01key);
DNekMatSharedPtr lap11 = GetStdMatrix(lap11key);
NekDouble jac = (m_metricinfo->GetJac())[0];
Array<TwoD, const NekDouble> gmat = m_metricinfo->GetGmat();
......@@ -1602,13 +1602,13 @@ namespace Nektar
}
DNekScalMatSharedPtr& TriExp::v_GetLocMatrix(const MatrixKey &mkey)
DNekScalMatSharedPtr TriExp::v_GetLocMatrix(const MatrixKey &mkey)
{
return m_matrixManager[mkey];
}
DNekScalBlkMatSharedPtr& TriExp::v_GetLocStaticCondMatrix(const MatrixKey &mkey)
DNekScalBlkMatSharedPtr TriExp::v_GetLocStaticCondMatrix(const MatrixKey &mkey)
{
return m_staticCondMatrixManager[mkey];
}
......
......@@ -212,10 +212,10 @@ namespace Nektar
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(
const MatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual
DNekScalMatSharedPtr& v_GetLocMatrix(
DNekScalMatSharedPtr v_GetLocMatrix(
const MatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual
DNekScalBlkMatSharedPtr& v_GetLocStaticCondMatrix(
DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(
const MatrixKey &mkey);
LOCAL_REGIONS_EXPORT virtual void v_MassMatrixOp(
......
......@@ -142,7 +142,7 @@ namespace Nektar
DNekBlkMatSharedPtr returnval;
MatrixType mtype = mkey.GetMatrixType();
DNekMatSharedPtr& mat = GetStdMatrix(mkey);
DNekMatSharedPtr mat = GetStdMatrix(mkey);
int nbdry = NumBndryCoeffs(); // also checks to see if this is a boundary interior decomposed expansion
int nint = m_ncoeffs - nbdry;
DNekMatSharedPtr A = MemoryManager<DNekMat>::AllocateSharedPtr(nbdry,nbdry);
......@@ -362,7 +362,7 @@ namespace Nektar
case eInvMass:
{
StdMatrixKey masskey(eMass,mkey.GetExpansionType(),*this,NullConstFactorMap,NullVarCoeffMap,mkey.GetNodalPointsType());
DNekMatSharedPtr& mmat = GetStdMatrix(masskey);
DNekMatSharedPtr mmat = GetStdMatrix(masskey);
returnval = MemoryManager<DNekMat>::AllocateSharedPtr(*mmat); //Populate standard mass matrix.
returnval->Invert();
}
......@@ -370,7 +370,7 @@ namespace Nektar
case eInvNBasisTrans:
{
StdMatrixKey tmpkey(eNBasisTrans,mkey.GetExpansionType(),*this,NullConstFactorMap,NullVarCoeffMap,mkey.GetNodalPointsType());
DNekMatSharedPtr& tmpmat = GetStdMatrix(tmpkey);
DNekMatSharedPtr tmpmat = GetStdMatrix(tmpkey);
returnval = MemoryManager<DNekMat>::AllocateSharedPtr(*tmpmat); //Populate matrix.
returnval->Invert();
}
......@@ -926,7 +926,7 @@ namespace Nektar
{
int nq = GetTotPoints();
StdMatrixKey bwdtransmatkey(eBwdTrans,DetExpansionType(),*this);
DNekMatSharedPtr& bwdtransmat = GetStdMatrix(bwdtransmatkey);
DNekMatSharedPtr bwdtransmat = GetStdMatrix(bwdtransmatkey);
Blas::Dgemv('N',nq,m_ncoeffs,1.0,bwdtransmat->GetPtr().get(),
nq, inarray.get(), 1, 0.0, outarray.get(), 1);
......@@ -1101,7 +1101,7 @@ namespace Nektar
NEKERROR(ErrorUtil::efatal, "This function is not valid for this class");
}
DNekScalBlkMatSharedPtr& StdExpansion::v_GetLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey)
DNekScalBlkMatSharedPtr StdExpansion::v_GetLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey)
{
NEKERROR(ErrorUtil::efatal, "This function is only valid for LocalRegions");
return NullDNekScalBlkMatSharedPtr;
......
......@@ -815,12 +815,12 @@ namespace Nektar
v_ReadFromFile(in,format,dumpVar);
}
inline DNekMatSharedPtr& GetStdMatrix(const StdMatrixKey &mkey)
inline DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
{
return m_stdMatrixManager[mkey];
}
inline DNekBlkMatSharedPtr& GetStdStaticCondMatrix(const StdMatrixKey &mkey)
inline DNekBlkMatSharedPtr GetStdStaticCondMatrix(const StdMatrixKey &mkey)
{
return m_stdStaticCondMatrixManager[mkey];
}
......@@ -855,7 +855,7 @@ namespace Nektar
v_NormVectorIProductWRTBase(Fx,Fy,Fz,outarray);
}
DNekScalBlkMatSharedPtr& GetLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey)
DNekScalBlkMatSharedPtr GetLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey)
{
return v_GetLocStaticCondMatrix(mkey);
}
......@@ -1287,7 +1287,7 @@ namespace Nektar
STD_REGIONS_EXPORT virtual void v_NormVectorIProductWRTBase(const Array<OneD, const NekDouble> &Fx, const Array<OneD, const NekDouble> &Fy, const Array<OneD, const NekDouble> &Fz, Array< OneD, NekDouble> &outarray);
STD_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr& v_GetLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey);
STD_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey);
STD_REGIONS_EXPORT virtual StdRegions::Orientation v_GetFaceOrient(int face);
......
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