Commit 4ed4a9c8 authored by Spencer Sherwin's avatar Spencer Sherwin Committed by Chris Cantwell
Browse files

Updates to allow different pressure and velocity space

Conflicts:
	library/MultiRegions/ExpList.h
	solvers/IncNavierStokesSolver/AdvectionTerms/AdvectionTerm.h
	solvers/IncNavierStokesSolver/AdvectionTerms/NavierStokesAdvection.cpp
parent 7955376b
......@@ -44,12 +44,12 @@
namespace ErrorUtil
{
static boost::optional<std::ostream&> outStream;
static void SetErrorStream(std::ostream& o)
{
outStream = o;
}
static bool HasCustomErrorStream()
{
return outStream;
......@@ -63,8 +63,8 @@ namespace ErrorUtil
class NekError : public std::runtime_error
{
public:
NekError(const std::string& message) : std::runtime_error(message) {}
public:
NekError(const std::string& message) : std::runtime_error(message) {}
};
static void Error(ErrType type, const char *routine, int lineNumber, const char *msg, unsigned int level)
......
......@@ -1315,16 +1315,13 @@ namespace Nektar
}
void QuadExp::v_ExtractDataToCoeffs(const std::vector<NekDouble> &data,
const int offset,
const std::vector<unsigned int > &nummodes,
const int nmode_offset,
Array<OneD, NekDouble> &coeffs)
void QuadExp::v_ExtractDataToCoeffs(const NekDouble *data,
const std::vector<unsigned int > &nummodes, int mode_offset, NekDouble *coeffs)
{
int data_order0 = nummodes[nmode_offset];
int data_order0 = nummodes[mode_offset];
int fillorder0 = std::min(m_base[0]->GetNumModes(),data_order0);
int data_order1 = nummodes[nmode_offset+1];
int data_order1 = nummodes[mode_offset + 1];
int order1 = m_base[1]->GetNumModes();
int fillorder1 = min(order1,data_order1);
......@@ -1342,12 +1339,30 @@ namespace Nektar
Vmath::Zero(m_ncoeffs,coeffs,1);
for(i = 0; i < fillorder0; ++i)
{
Vmath::Vcopy(fillorder1,&data[offset+cnt],1,&coeffs[cnt1],1);
Vmath::Vcopy(fillorder1,data + cnt,1,coeffs +cnt1,1);
cnt += data_order1;
cnt1 += order1;
}
}
break;
case LibUtilities::eGLL_Lagrange:
{
// Assume that input is also Gll_Lagrange but no way to check;
LibUtilities::PointsKey p0(nummodes[0],LibUtilities::eGaussLobattoLegendre);
LibUtilities::PointsKey p1(nummodes[1],LibUtilities::eGaussLobattoLegendre);
LibUtilities::Interp2D(p0,p1,data, m_base[0]->GetPointsKey(),
m_base[1]->GetPointsKey(),coeffs);
}
break;
case LibUtilities::eGauss_Lagrange:
{
// Assume that input is also Gll_Lagrange but no way to check;
LibUtilities::PointsKey p0(nummodes[0],LibUtilities::eGaussGaussLegendre);
LibUtilities::PointsKey p1(nummodes[1],LibUtilities::eGaussGaussLegendre);
LibUtilities::Interp2D(p0,p1,data, m_base[0]->GetPointsKey(),
m_base[1]->GetPointsKey(),coeffs);
}
break;
default:
ASSERTL0(false,"basis is either not set up or not hierarchicial");
}
......
......@@ -181,11 +181,10 @@ namespace Nektar
SpatialDomains::Geometry2DSharedPtr& v_GetGeom2D() const;
LOCAL_REGIONS_EXPORT virtual int v_GetCoordim();
LOCAL_REGIONS_EXPORT virtual void v_ExtractDataToCoeffs(
const std::vector<NekDouble> &data,
const int offset,
const NekDouble *data,
const std::vector<unsigned int > &nummodes,
const int nmode_offset,
Array<OneD, NekDouble> &coeffs);
const int mode_offset,
NekDouble * coeffs);
LOCAL_REGIONS_EXPORT virtual
StdRegions::Orientation v_GetEorient(int edge);
LOCAL_REGIONS_EXPORT virtual
......
......@@ -1007,20 +1007,33 @@ cout<<"deps/dx ="<<inarray_d0[i]<<" deps/dy="<<inarray_d1[i]<<endl;
/// Unpack data from input file assuming it comes from the same expansion type
void SegExp::v_ExtractDataToCoeffs(
const std::vector<NekDouble> &data,
const int offset,
const NekDouble *data,
const std::vector<unsigned int > &nummodes,
const int nmode_offset,
Array<OneD, NekDouble> &coeffs)
const int mode_offset,
NekDouble *coeffs)
{
switch(m_base[0]->GetBasisType())
{
case LibUtilities::eModified_A:
{
int fillorder = min((int) nummodes[nmode_offset],m_ncoeffs);
int fillorder = min((int) nummodes[mode_offset],m_ncoeffs);
Vmath::Zero(m_ncoeffs,coeffs,1);
Vmath::Vcopy(fillorder,&data[offset],1,&coeffs[0],1);
Vmath::Vcopy(fillorder,&data[0],1,&coeffs[0],1);
}
break;
case LibUtilities::eGLL_Lagrange:
{
// Assume that input is also Gll_Lagrange but no way to check;
LibUtilities::PointsKey p0(nummodes[mode_offset],LibUtilities::eGaussLobattoLegendre);
LibUtilities::Interp1D(p0,data, m_base[0]->GetPointsKey(), coeffs);
}
break;
case LibUtilities::eGauss_Lagrange:
{
// Assume that input is also Gauss_Lagrange but no way to check;
LibUtilities::PointsKey p0(nummodes[mode_offset],LibUtilities::eGaussGaussLegendre);
LibUtilities::Interp1D(p0,data, m_base[0]->GetPointsKey(), coeffs);
}
break;
default:
......
......@@ -188,11 +188,10 @@ namespace Nektar
LOCAL_REGIONS_EXPORT virtual SpatialDomains::GeomType v_MetricInfoType();
LOCAL_REGIONS_EXPORT virtual void v_ExtractDataToCoeffs(
const std::vector<NekDouble> &data,
const int offset,
const NekDouble *data,
const std::vector<unsigned int > &nummodes,
const int nmode_offset,
Array<OneD, NekDouble> &coeffs);
const int mode_offset,
NekDouble *coeffs);
LOCAL_REGIONS_EXPORT virtual void v_SetUpPhysTangents(
......
......@@ -1136,16 +1136,12 @@ namespace Nektar
}
void TriExp::v_ExtractDataToCoeffs(const std::vector<NekDouble> &data,
const int offset,
const std::vector<unsigned int > &nummodes,
const int nmode_offset,
Array<OneD, NekDouble> &coeffs)
void TriExp::v_ExtractDataToCoeffs(const NekDouble *data,
const std::vector<unsigned int > &nummodes, const int mode_offset, NekDouble * coeffs)
{
int data_order0 = nummodes[nmode_offset];
int data_order0 = nummodes[mode_offset];
int fillorder0 = min(m_base[0]->GetNumModes(),data_order0);
int data_order1 = nummodes[nmode_offset+1];
int data_order1 = nummodes[mode_offset+1];
int order1 = m_base[1]->GetNumModes();
int fillorder1 = min(order1,data_order1);
......@@ -1163,7 +1159,7 @@ namespace Nektar
Vmath::Zero(m_ncoeffs,coeffs,1);
for(i = 0; i < fillorder0; ++i)
{
Vmath::Vcopy(fillorder1-i,&data[offset+cnt],1,&coeffs[cnt1],1);
Vmath::Vcopy(fillorder1-i,&data[cnt],1,&coeffs[cnt1],1);
cnt += data_order1-i;
cnt1 += order1-i;
}
......
......@@ -178,11 +178,10 @@ namespace Nektar
SpatialDomains::Geometry2DSharedPtr& v_GetGeom2D() const;
LOCAL_REGIONS_EXPORT virtual int v_GetCoordim();
LOCAL_REGIONS_EXPORT virtual void v_ExtractDataToCoeffs(
const std::vector<NekDouble> &data,
const int offset,
const NekDouble *data,
const std::vector<unsigned int > &nummodes,
const int nmode_offset,
Array<OneD, NekDouble> &coeffs);
const int mode_offset,
NekDouble *coeffs);
LOCAL_REGIONS_EXPORT virtual
StdRegions::Orientation v_GetEorient(int edge);
LOCAL_REGIONS_EXPORT virtual
......
......@@ -530,8 +530,8 @@ namespace Nektar
if(bc->GetBoundaryConditionType() != SpatialDomains::ePeriodic)
{
locExpList = MemoryManager<MultiRegions::ExpList1D>
::AllocateSharedPtr(
*(bregions[i]), graph2D, DeclareCoeffPhysArrays);
::AllocateSharedPtr(*(bregions[i]), graph2D,
DeclareCoeffPhysArrays, variable);
// Set up normals on non-Dirichlet boundary conditions
......
......@@ -495,7 +495,7 @@ namespace Nektar
!= SpatialDomains::ePeriodic)
{
locExpList = MemoryManager<MultiRegions::ExpList2D>
::AllocateSharedPtr(m_session,*(bregions[i]), graph3D);
::AllocateSharedPtr(m_session,*(bregions[i]), graph3D, variable);
// Set up normals on non-Dirichlet boundary conditions
if(locBCond->GetBoundaryConditionType() !=
......
......@@ -2078,6 +2078,11 @@ namespace Nektar
v_ExtractDataToCoeffs(fielddef,fielddata,field,coeffs);
}
void ExpList::ExtractCoeffsToCoeffs(const boost::shared_ptr<ExpList> &fromExpList, const Array<OneD, const NekDouble> &fromCoeffs, Array<OneD, NekDouble> &toCoeffs)
{
v_ExtractCoeffsToCoeffs(fromExpList,fromCoeffs,toCoeffs);
}
void ExpList::v_ExtractDataToCoeffs(SpatialDomains::FieldDefinitionsSharedPtr &fielddef, std::vector<NekDouble> &fielddata, std::string &field, Array<OneD, NekDouble> &coeffs)
{
......@@ -2116,7 +2121,6 @@ namespace Nektar
}
int modes_offset = 0;
Array<OneD, NekDouble> coeff_tmp;
for(i = 0; i < fielddef->m_elementIDs.size(); ++i)
{
int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
......@@ -2133,13 +2137,44 @@ namespace Nektar
}
else // unpack data to new order
{
(*m_exp)[eid]->ExtractDataToCoeffs(fielddata, offset, fielddef->m_numModes,modes_offset,coeff_tmp = coeffs + m_coeff_offset[eid]);
(*m_exp)[eid]->ExtractDataToCoeffs(&fielddata[offset], fielddef->m_numModes, modes_offset, &coeffs[m_coeff_offset[eid]]);
}
offset += datalen;
}
}
}
void ExpList::v_ExtractCoeffsToCoeffs(const boost::shared_ptr<ExpList> &fromExpList, const Array<OneD, const NekDouble> &fromCoeffs, Array<OneD, NekDouble> &toCoeffs)
{
int i;
int offset = 0;
// check if the same and if so just copy over coeffs
if(fromExpList->GetNcoeffs() == m_ncoeffs)
{
Vmath::Vcopy(m_ncoeffs,fromCoeffs,1,toCoeffs,1);
}
else
{
std::vector<unsigned int> nummodes;
for(i = 0; i < (*m_exp).size(); ++i)
{
int eid = m_offset_elmt_id[i];
for(int j= 0; j < fromExpList->GetExp(eid)->GetNumBases(); ++j)
{
nummodes.push_back(fromExpList->GetExp(eid)->GetBasisNumModes(j));
}
(*m_exp)[eid]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes,0,
&toCoeffs[m_coeff_offset[eid]]);
offset += fromExpList->GetExp(eid)->GetNcoeffs();
}
}
}
const Array<OneD,const boost::shared_ptr<ExpList> >
&ExpList::v_GetBndCondExpansions(void)
{
......
......@@ -720,7 +720,14 @@ namespace Nektar
std::string &field,
Array<OneD, NekDouble> &coeffs);
/** \brief Extract the data from fromField using
* fromExpList the coeffs using the basic ExpList
* Elemental expansions rather than planes in homogeneous
* case
*/
MULTI_REGIONS_EXPORT void ExtractCoeffsToCoeffs(const boost::shared_ptr<ExpList> &fromExpList, const Array<OneD, const NekDouble> &fromCoeffs, Array<OneD, NekDouble> &toCoeffs);
/// Returns a shared pointer to the current object.
boost::shared_ptr<ExpList> GetSharedThisPtr()
{
......@@ -1102,6 +1109,8 @@ namespace Nektar
virtual void v_ExtractDataToCoeffs(SpatialDomains::FieldDefinitionsSharedPtr &fielddef, std::vector<NekDouble> &fielddata, std::string &field,
Array<OneD, NekDouble> &coeffs);
virtual void v_ExtractCoeffsToCoeffs(const boost::shared_ptr<ExpList> &fromExpList, const Array<OneD, const NekDouble> &fromCoeffs, Array<OneD, NekDouble> &toCoeffs);
virtual void v_WriteTecplotHeader(std::ofstream &outfile,
std::string var = "v");
......
......@@ -240,7 +240,8 @@ namespace Nektar
*/
ExpList1D::ExpList1D(const SpatialDomains::CompositeMap &domain,
const SpatialDomains::MeshGraphSharedPtr &graph2D,
const bool DeclareCoeffPhysArrays):
const bool DeclareCoeffPhysArrays,
const std::string variable):
ExpList()
{
int j,cnt,id=0;
......@@ -264,7 +265,7 @@ namespace Nektar
{
// Retrieve the basis key from the expansion.
LibUtilities::BasisKey bkey
= boost::dynamic_pointer_cast<SpatialDomains::MeshGraph2D>(graph2D)->GetEdgeBasisKey(SegmentGeom);
= boost::dynamic_pointer_cast<SpatialDomains::MeshGraph2D>(graph2D)->GetEdgeBasisKey(SegmentGeom, variable);
seg = MemoryManager<LocalRegions::SegExp>
::AllocateSharedPtr(bkey, SegmentGeom);
......@@ -411,7 +412,8 @@ namespace Nektar
const StdRegions::StdExpansionVector &locexp,
const SpatialDomains::MeshGraphSharedPtr &graph2D,
const map<int,int> &periodicEdges,
const bool DeclareCoeffPhysArrays):
const bool DeclareCoeffPhysArrays,
const std::string variable):
ExpList()
{
int i,j,cnt,id, elmtid=0;
......
......@@ -84,15 +84,16 @@ namespace Nektar
MULTI_REGIONS_EXPORT ExpList1D(
const SpatialDomains::CompositeMap &domain,
const SpatialDomains::MeshGraphSharedPtr &graph2D,
const bool DeclareCoeffPhysArrays = true);
const bool DeclareCoeffPhysArrays = true,
const std::string variable = "DefaultVar");
MULTI_REGIONS_EXPORT ExpList1D(const LibUtilities::SessionReaderSharedPtr &pSession,
const SpatialDomains::CompositeMap &domain,
const SpatialDomains::MeshGraphSharedPtr &graph1D,
int i,
const bool DeclareCoeffPhysArrays = true);
MULTI_REGIONS_EXPORT ExpList1D(const LibUtilities::SessionReaderSharedPtr &pSession,
const SpatialDomains::CompositeMap &domain,
const SpatialDomains::MeshGraphSharedPtr &graph1D,
int i,
const bool DeclareCoeffPhysArrays = true);
/// Specialised constructor for trace expansions.
MULTI_REGIONS_EXPORT ExpList1D(
const Array<OneD,const ExpListSharedPtr> &bndConstraint,
......@@ -101,7 +102,9 @@ namespace Nektar
const StdRegions::StdExpansionVector &locexp,
const SpatialDomains::MeshGraphSharedPtr &graph2D,
const map<int,int> &periodicEdges,
const bool DeclareCoeffPhysArrays = true);
const bool DeclareCoeffPhysArrays = true,
const std::string variable = "DefaultVar");
/// Destructor.
MULTI_REGIONS_EXPORT virtual ~ExpList1D();
......
......@@ -435,7 +435,8 @@ namespace Nektar
const StdRegions::StdExpansionVector &locexp,
const SpatialDomains::MeshGraphSharedPtr &graph3D,
const map<int,PeriodicFace> &periodicFaces,
const bool DeclareCoeffPhysArrays):
const bool DeclareCoeffPhysArrays,
const std::string variable):
ExpList()
{
int i,j,cnt,id, elmtid=0;
......@@ -499,7 +500,7 @@ namespace Nektar
if(FaceDone.count(id)==0)
{
LibUtilities::BasisKey bkey0 =
boost::dynamic_pointer_cast<SpatialDomains::MeshGraph3D>(graph3D)->GetFaceBasisKey(FaceGeom, 0);
boost::dynamic_pointer_cast<SpatialDomains::MeshGraph3D>(graph3D)->GetFaceBasisKey(FaceGeom, 0, variable);
LibUtilities::BasisKey bkey1 =
boost::dynamic_pointer_cast<SpatialDomains::MeshGraph3D>(graph3D)->GetFaceBasisKey(FaceGeom, 1);
......@@ -627,7 +628,8 @@ namespace Nektar
*/
ExpList2D::ExpList2D( const LibUtilities::SessionReaderSharedPtr &pSession,
const SpatialDomains::CompositeMap &domain,
const SpatialDomains::MeshGraphSharedPtr &graph3D):
const SpatialDomains::MeshGraphSharedPtr &graph3D,
const std::string variable):
ExpList(pSession,graph3D)
{
ASSERTL0(boost::dynamic_pointer_cast<SpatialDomains::MeshGraph3D>(graph3D),
......
......@@ -101,14 +101,16 @@ namespace Nektar
const StdRegions::StdExpansionVector &locexp,
const SpatialDomains::MeshGraphSharedPtr &graph3D,
const map<int,PeriodicFace> &periodicFaces,
const bool DeclareCoeffPhysArrays = true);
const bool DeclareCoeffPhysArrays = true,
const std::string variable = "DefaultVar");
/// Specialised constructor for Neumann boundary conditions in
/// DisContField3D and ContField3D.
MULTI_REGIONS_EXPORT ExpList2D(
const LibUtilities::SessionReaderSharedPtr &pSession,
const SpatialDomains::CompositeMap &domain,
const SpatialDomains::MeshGraphSharedPtr &graph3D);
const SpatialDomains::MeshGraphSharedPtr &graph3D,
const std::string variable = "DefaultVar");
/// Destructor.
MULTI_REGIONS_EXPORT virtual ~ExpList2D();
......
......@@ -693,14 +693,14 @@ namespace Nektar
offset += datalen;
}
// Determine mapping from element ids to location in expansion list.
map<int, int> ElmtID_to_ExpID;
for(i = 0; i < m_planes[0]->GetExpSize(); ++i)
{
ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
}
if(i == fielddef->m_fields.size())
{
cout << "Field "<< field<< "not found in data file. " << endl;
......@@ -742,13 +742,27 @@ namespace Nektar
}
else // unpack data to new order
{
(*m_exp)[eid]->ExtractDataToCoeffs(fielddata, offset, fielddef->m_numModes,modes_offset,coeff_tmp = coeffs + m_coeff_offset[eid] + planes_offset*ncoeffs_per_plane);
(*m_exp)[eid]->ExtractDataToCoeffs(&fielddata[offset], fielddef->m_numModes,modes_offset,&coeffs[m_coeff_offset[eid] + planes_offset*ncoeffs_per_plane]);
}
}
}
}
}
//Extract the data in fielddata into the m_coeff list
void ExpListHomogeneous1D::v_ExtractCoeffsToCoeffs(
const boost::shared_ptr<ExpList> &fromExpList,const Array<OneD, const NekDouble> &fromCoeffs, Array<OneD, NekDouble> &toCoeffs)
{
int i;
int fromNcoeffs_per_plane = fromExpList->GetPlane(0)->GetNcoeffs();
Array<OneD, NekDouble> tocoeffs_tmp, fromcoeffs_tmp;
for(i = 0; i < m_planes.num_elements(); ++i)
{
m_planes[i]->ExtractCoeffsToCoeffs(fromExpList->GetPlane(i),fromcoeffs_tmp = fromCoeffs + fromNcoeffs_per_plane*i, tocoeffs_tmp = toCoeffs + m_ncoeffs*i);
}
}
/**
* Write Tecplot Files Header
* @param outfile Output file name.
......@@ -807,6 +821,42 @@ namespace Nektar
outfile << " </DataArray>" << endl;
}
void ExpListHomogeneous1D::v_PhysInterp1DScaled(const NekDouble scale, const Array<OneD, NekDouble> &inarray, Array<OneD, NekDouble> &outarray)
{
int cnt,cnt1;
Array<OneD, NekDouble> tmparray;
cnt = m_planes[0]->GetTotPoints();
cnt1 = m_planes[0]->Get1DScaledTotPoints(scale);
ASSERTL1(m_planes.num_elements()*cnt1 <= outarray.num_elements(),"size of outarray does not match internal estimage");
for(int i = 0; i < m_planes.num_elements(); i++)
{
m_planes[i]->PhysInterp1DScaled(scale,inarray+i*cnt,
tmparray = outarray+i*cnt1);
}
}
void ExpListHomogeneous1D::v_PhysGalerkinProjection1DScaled(const NekDouble scale, const Array<OneD, NekDouble> &inarray, Array<OneD, NekDouble> &outarray)
{
int cnt,cnt1;
Array<OneD, NekDouble> tmparray;
cnt = m_planes[0]->Get1DScaledTotPoints(scale);
cnt1 = m_planes[0]->GetTotPoints();
ASSERTL1(m_planes.num_elements()*cnt <= inarray.num_elements(),"size of outarray does not match internal estimage");
for(int i = 0; i < m_planes.num_elements(); i++)
{
m_planes[i]->PhysGalerkinProjection1DScaled(scale,inarray+i*cnt,
tmparray = outarray+i*cnt1);
}
}
void ExpListHomogeneous1D::v_PhysDeriv(const Array<OneD, const NekDouble> &inarray,
Array<OneD, NekDouble> &out_d0,
Array<OneD, NekDouble> &out_d1,
......
......@@ -201,6 +201,9 @@ namespace Nektar
virtual void v_ExtractDataToCoeffs(SpatialDomains::FieldDefinitionsSharedPtr &fielddef, std::vector<NekDouble> &fielddata, std::string &field, Array<OneD, NekDouble> &coeffs);
virtual void v_ExtractCoeffsToCoeffs(
const boost::shared_ptr<ExpList> &fromExpList, const Array<OneD, const NekDouble> &fromCoeffs, Array<OneD, NekDouble> &toCoeffs);
virtual void v_WriteTecplotHeader(std::ofstream &outfile,
std::string var = "v");
......@@ -210,6 +213,12 @@ namespace Nektar
virtual void v_WriteVtkPieceData(std::ofstream &outfile, int expansion,
std::string var);
virtual void v_PhysInterp1DScaled(const NekDouble scale, const Array<OneD, NekDouble> &inarray, Array<OneD, NekDouble> &outarray);
virtual void v_PhysGalerkinProjection1DScaled(const NekDouble scale, const Array<OneD, NekDouble> &inarray, Array<OneD, NekDouble> &outarray);
virtual void v_HomogeneousFwdTrans(const Array<OneD, const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
CoeffState coeffstate = eLocal,
......
......@@ -118,6 +118,7 @@ namespace Nektar
m_HomoDirec = 0;
m_useFFT = false;
m_dealiasing = false;
m_specHP_dealiasing = false;
m_SingleMode = false;
m_HalfMode = false;
m_MultipleModes = false;
......@@ -202,6 +203,11 @@ namespace Nektar
{
m_dealiasing = true;
}
if(m_session->DefinesSolverInfo("SPECTRALHPDEALIASING"))
{
m_specHP_dealiasing = true;
}
}
else
{
......@@ -311,7 +317,7 @@ namespace Nektar
const LibUtilities::BasisKey BkeyZR(LibUtilities::eFourierHalfModeRe, m_npointsZ, PkeyZ);
const LibUtilities::BasisKey BkeyZI(LibUtilities::eFourierHalfModeIm, m_npointsZ, PkeyZ);
for(i = 0; i < m_fields.num_elements(); i++)
{
......@@ -350,9 +356,19 @@ namespace Nektar
m_fields[0] = firstfield;
for(i = 1; i < m_fields.num_elements(); i++)
{
m_fields[i] = MemoryManager<MultiRegions::ContField2D>
::AllocateSharedPtr(*firstfield, m_graph,m_session->GetVariable(i),
DeclareCoeffPhysArrays, m_checkIfSystemSingular[i]);
if(m_graph->SameExpansions(m_session->GetVariable(0),m_session->GetVariable(i)))
{
m_fields[i] = MemoryManager<MultiRegions::ContField2D>
::AllocateSharedPtr(*firstfield, m_graph,m_session->GetVariable(i),
DeclareCoeffPhysArrays, m_checkIfSystemSingular[i]);
}
else
{
m_fields[i] = MemoryManager<MultiRegions::ContField2D>
::AllocateSharedPtr(m_session, m_graph, m_session->GetVariable(i),