Commit 9848abf5 authored by David Moxey's avatar David Moxey

Fix issues relating to Initialise not being called from linear solver

parent 56f2c469
......@@ -6,13 +6,10 @@ CMAKE_DEPENDENT_OPTION(THIRDPARTY_BUILD_PETSC
"NEKTAR_USE_PETSC" OFF)
IF( NEKTAR_USE_PETSC )
IF (THIRDPARTY_BUILD_PETSC)
# TODO
ELSE (THIRDPARTY_BUILD_PETSC)
INCLUDE (FindPETSc)
MESSAGE(STATUS "Found PETSc: ${PETSC_LIBRARIES}")
ADD_DEFINITIONS(-DNEKTAR_USING_PETSC)
ENDIF (THIRDPARTY_BUILD_PETSC)
INCLUDE(FindPETSc)
MESSAGE(STATUS "Found PETSc: ${PETSC_LIBRARIES}")
ADD_DEFINITIONS(-DNEKTAR_USING_PETSC)
INCLUDE_DIRECTORIES(${PETSC_INCLUDES})
ENDIF( NEKTAR_USE_PETSC )
INCLUDE_DIRECTORIES(${PETSC_INCLUDES})
......
......@@ -399,6 +399,12 @@ namespace Nektar
{
NEKERROR(ErrorUtil::efatal, "Method does not exist" );
}
void GlobalLinSys::v_Initialise(
const boost::shared_ptr<AssemblyMap>& pLocToGloMap)
{
NEKERROR(ErrorUtil::efatal, "Method does not exist" );
}
} //end of namespace
} //end of namespace
......@@ -86,6 +86,8 @@ namespace Nektar
const inline boost::weak_ptr<ExpList> &GetLocMat(void) const;
inline void InitObject();
inline void Initialise(
const boost::shared_ptr<AssemblyMap>& pLocToGloMap);
/// Solve the linear system for given input and output vectors
/// using a specified local to global map.
......@@ -147,6 +149,8 @@ namespace Nektar
const int pNumDir) = 0;
virtual void v_InitObject();
virtual void v_Initialise(
const boost::shared_ptr<AssemblyMap>& pLocToGloMap);
static std::string lookupIds[];
static std::string def;
......@@ -201,6 +205,12 @@ namespace Nektar
v_InitObject();
}
inline void GlobalLinSys::Initialise(
const boost::shared_ptr<AssemblyMap>& pLocToGloMap)
{
v_Initialise(pLocToGloMap);
}
inline DNekScalMatSharedPtr GlobalLinSys::GetBlock(unsigned int n)
{
return v_GetBlock(n);
......
......@@ -263,7 +263,7 @@ namespace Nektar
* the next level of the condensed system is computed.
* @param pLocToGloMap Local to global mapping.
*/
void GlobalLinSysStaticCond::Initialise(
void GlobalLinSysStaticCond::v_Initialise(
const boost::shared_ptr<AssemblyMap>& pLocToGloMap)
{
int nLocalBnd = m_locToGloMap->GetNumLocalBndCoeffs();
......
......@@ -128,7 +128,7 @@ namespace Nektar
virtual void v_InitObject();
/// Initialise this object
void Initialise(
virtual void v_Initialise(
const boost::shared_ptr<AssemblyMap>& locToGloMap);
/// Set up the storage for the Schur complement or the top level
......
......@@ -1175,6 +1175,7 @@ namespace Nektar
// since this then makes the matrix storage of type eFull
MultiRegions::GlobalLinSysKey key(StdRegions::eLinearAdvectionReaction,locToGloMap);
mat.m_CoupledBndSys = MemoryManager<MultiRegions::GlobalLinSysDirectStaticCond>::AllocateSharedPtr(key,m_fields[0],pAh,pBh,pCh,pDh,locToGloMap);
mat.m_CoupledBndSys->Initialise(locToGloMap);
timer.Stop();
cout << "Multilevel condensation: " << timer.TimePerTest(1) << endl;
}
......
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