35 #include <boost/core/ignore_unused.hpp> 48 namespace MultiRegions
52 "GlobalSysSoln",
"DirectFull",
55 "GlobalSysSoln",
"DirectStaticCond",
58 "GlobalSysSoln",
"DirectMultiLevelStaticCond",
61 "GlobalSysSoln",
"IterativeFull",
64 "GlobalSysSoln",
"IterativeStaticCond",
67 "GlobalSysSoln",
"IterativeMultiLevelStaticCond",
70 "GlobalSysSoln",
"XxtFull",
73 "GlobalSysSoln",
"XxtStaticCond",
76 "GlobalSysSoln",
"XxtMultiLevelStaticCond",
79 "GlobalSysSoln",
"PETScFull",
82 "GlobalSysSoln",
"PETScStaticCond",
85 "GlobalSysSoln",
"PETScMultiLevelStaticCond",
89 #ifdef NEKTAR_USE_SCOTCH 92 "DirectMultiLevelStaticCond");
197 const std::weak_ptr<ExpList> &pExpList,
198 const std::shared_ptr<AssemblyMap>
202 m_robinBCInfo(m_expList.lock()->GetRobinBCInfo()),
203 m_verbose(m_expList.lock()->GetSession()->
204 DefinesCmdLineArgument(
"verbose"))
206 boost::ignore_unused(pLocToGloMap);
253 std::shared_ptr<MultiRegions::ExpList> expList =
m_expList.lock();
277 "VarCoeffSVVCuroffRatio is set but " 278 " not FactorSVVCutoffRatio");
306 cnt = expList->GetPhys_Offset(n);
310 vVarCoeffMap[x.first] = x.second + cnt;
316 vExp->DetShapeType(),
342 int rows = loc_mat->GetRows();
343 int cols = loc_mat->GetColumns();
344 const NekDouble *dat = loc_mat->GetRawPtr();
347 Blas::Dscal(rows*cols,loc_mat->Scale(),new_mat->GetRawPtr(),1);
350 for(rBC =
m_robinBCInfo.find(n)->second;rBC; rBC = rBC->next)
352 vExp->AddRobinMassMatrix(
353 rBC->m_robinID, rBC->m_robinPrimitiveCoeffs, new_mat);
386 tmp_mat = loc_mat->GetBlock(0,0);
389 int rows = tmp_mat->GetRows();
390 int cols = tmp_mat->GetColumns();
391 const NekDouble *dat = tmp_mat->GetRawPtr();
394 Blas::Dscal(rows*cols,tmp_mat->Scale(),new_mat->GetRawPtr(),1);
397 for(rBC =
m_robinBCInfo.find(n)->second;rBC; rBC = rBC->next)
399 vExp->AddRobinMassMatrix(
400 rBC->m_robinID, rBC->m_robinPrimitiveCoeffs, new_mat);
407 unsigned int exp_size[] = {tmp_mat->GetRows(), loc_mat->GetBlock(1,1)->GetRows()};
408 unsigned int nblks = 2;
412 new_loc_mat->SetBlock(0,0,tmp_mat);
413 new_loc_mat->SetBlock(0,1,loc_mat->GetBlock(0,1));
414 new_loc_mat->SetBlock(1,0,loc_mat->GetBlock(1,0));
415 new_loc_mat->SetBlock(1,1,loc_mat->GetBlock(1,1));
416 loc_mat = new_loc_mat;
440 const std::shared_ptr<AssemblyMap>& pLocToGloMap)
442 boost::ignore_unused(pLocToGloMap);
std::shared_ptr< RobinBCInfo > RobinBCInfoSharedPtr
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
static std::string RegisterEnumValue(std::string pEnum, std::string pString, int pEnumValue)
Registers an enumeration value.
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
const StdRegions::ConstFactorMap & GetConstFactors() const
Returns all the constants.
PreconFactory & GetPreconFactory()
std::map< ConstFactorType, NekDouble > ConstFactorMap
std::shared_ptr< DNekMat > DNekMatSharedPtr
virtual DNekScalBlkMatSharedPtr v_GetStaticCondBlock(unsigned int n)
Retrieves a the static condensation block matrices from n-th expansion using the matrix key provided ...
int GetNVarCoeffs() const
std::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
StdRegions::MatrixType GetMatrixType() const
Return the matrix type.
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
virtual DNekScalMatSharedPtr v_GetBlock(unsigned int n)
Retrieves the block matrix from n-th expansion using the matrix key provided by the m_linSysKey...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
virtual int v_GetNumBlocks()
Get the number of blocks in this system.
virtual void v_InitObject()
virtual void v_Initialise(const std::shared_ptr< AssemblyMap > &pLocToGloMap)
Describe a linear system.
std::shared_ptr< GlobalLinSys > GetSharedThisPtr()
Returns a shared pointer to the current object.
const Array< OneD, const NekDouble > & GetVarFactors(const StdRegions::ConstFactorType &coeff) const
const GlobalLinSysKey m_linSysKey
Key associated with this linear system.
const StdRegions::VarCoeffMap & GetVarCoeffs() const
std::shared_ptr< Expansion > ExpansionSharedPtr
LocalRegions::MatrixKey GetBlockMatrixKey(unsigned int n)
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
const std::weak_ptr< ExpList > m_expList
Local Matrix System.
virtual void v_DropStaticCondBlock(unsigned int n)
Releases the static condensation block matrices from NekManager of n-th expansion using the matrix ke...
int GetNVarFactors() const
static std::string lookupIds[]
std::shared_ptr< Preconditioner > PreconditionerSharedPtr
static std::string RegisterDefaultSolverInfo(const std::string &pName, const std::string &pValue)
Registers the default string value of a solver info property.
GlobalLinSysFactory & GetGlobalLinSysFactory()
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
const char *const PreconditionerTypeMap[]
GlobalLinSys(const GlobalLinSysKey &pKey, const std::weak_ptr< ExpList > &pExpList, const std::shared_ptr< AssemblyMap > &pLocToGloMap)
Constructor for full direct matrix solve.
const std::map< int, RobinBCInfoSharedPtr > m_robinBCInfo
Robin boundary info.
PreconditionerSharedPtr CreatePrecon(AssemblyMapSharedPtr asmMap)
Create a preconditioner object from the parameters defined in the supplied assembly map...
Provides a generic Factory class.