53 "GlobalSysSoln",
"DirectMultiLevelStaticCond",
58 "GlobalSysSoln",
"IterativeStaticCond",
61 "GlobalSysSoln",
"IterativeMultiLevelStaticCond",
68 "GlobalSysSoln",
"XxtMultiLevelStaticCond",
75 "GlobalSysSoln",
"PETScMultiLevelStaticCond",
78#ifdef NEKTAR_USE_SCOTCH
81 "GlobalSysSoln",
"DirectMultiLevelStaticCond");
196 [[maybe_unused]]
const std::shared_ptr<AssemblyMap> &pLocToGloMap)
197 : m_linSysKey(pKey), m_expList(pExpList),
198 m_robinBCInfo(m_expList.lock()->GetRobinBCInfo()),
200 m_expList.lock()->GetSession()->DefinesCmdLineArgument(
"verbose"))
212 std::string PreconType = asmMap->GetPreconType();
235 std::shared_ptr<MultiRegions::ExpList> expList =
m_expList.lock();
256 "VarCoeffSVVCuroffRatio is set but "
257 " not FactorSVVCutoffRatio");
284 expList->GetPhys_Offset(n),
285 vExp->GetTotPoints());
292 expList->GetGJPData()->IsImplicit())
312 "GJP matrix flag not being set in GlobalLinSys");
318 (expList->GetGJPData()->IsSemiImplicit() ||
319 expList->GetGJPData()->IsImplicit()))
329 vConstFactorMap, vVarCoeffMap,
353 int rows = loc_mat->GetRows();
354 int cols = loc_mat->GetColumns();
355 const NekDouble *dat = loc_mat->GetRawPtr();
358 Blas::Dscal(rows * cols, loc_mat->Scale(), new_mat->GetRawPtr(), 1);
361 for (rBC =
m_robinBCInfo.find(n)->second; rBC; rBC = rBC->next)
363 vExp->AddRobinMassMatrix(rBC->m_robinID,
364 rBC->m_robinPrimitiveCoeffs, new_mat);
395 tmp_mat = loc_mat->GetBlock(0, 0);
398 int rows = tmp_mat->GetRows();
399 int cols = tmp_mat->GetColumns();
400 const NekDouble *dat = tmp_mat->GetRawPtr();
403 Blas::Dscal(rows * cols, tmp_mat->Scale(), new_mat->GetRawPtr(), 1);
406 for (rBC =
m_robinBCInfo.find(n)->second; rBC; rBC = rBC->next)
408 vExp->AddRobinMassMatrix(rBC->m_robinID,
409 rBC->m_robinPrimitiveCoeffs, new_mat);
415 unsigned int exp_size[] = {tmp_mat->GetRows(),
416 loc_mat->GetBlock(1, 1)->GetRows()};
417 unsigned int nblks = 2;
419 nblks, nblks, exp_size, exp_size);
421 new_loc_mat->SetBlock(0, 0, tmp_mat);
422 new_loc_mat->SetBlock(0, 1, loc_mat->GetBlock(0, 1));
423 new_loc_mat->SetBlock(1, 0, loc_mat->GetBlock(1, 0));
424 new_loc_mat->SetBlock(1, 1, loc_mat->GetBlock(1, 1));
425 loc_mat = new_loc_mat;
461 [[maybe_unused]]
const std::shared_ptr<AssemblyMap> &pLocToGloMap)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Provides a generic Factory class.
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
static std::string RegisterEnumValue(std::string pEnum, std::string pString, int pEnumValue)
Registers an enumeration value.
static std::string RegisterDefaultSolverInfo(const std::string &pName, const std::string &pValue)
Registers the default string value of a solver info property.
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.
const std::weak_ptr< ExpList > m_expList
Local Matrix System.
static std::string lookupIds[]
LocalRegions::MatrixKey GetBlockMatrixKey(unsigned int n)
std::shared_ptr< GlobalLinSys > GetSharedThisPtr()
Returns a shared pointer to the current object.
const std::map< int, RobinBCInfoSharedPtr > m_robinBCInfo
Robin boundary info.
GlobalLinSys(const GlobalLinSysKey &pKey, const std::weak_ptr< ExpList > &pExpList, const std::shared_ptr< AssemblyMap > &pLocToGloMap)
Constructor for full direct matrix solve.
virtual void v_InitObject()
const GlobalLinSysKey m_linSysKey
Key associated with this linear system.
virtual DNekScalMatSharedPtr v_GetBlock(unsigned int n)
Retrieves the block matrix from n-th expansion using the matrix key provided by the m_linSysKey.
virtual void v_DropBlock(unsigned int n)
Releases the local block matrix from NekManager of n-th expansion using the matrix key provided by th...
PreconditionerSharedPtr CreatePrecon(AssemblyMapSharedPtr asmMap)
Create a preconditioner object from the parameters defined in the supplied assembly map.
virtual DNekScalBlkMatSharedPtr v_GetStaticCondBlock(unsigned int n)
Retrieves a the static condensation block matrices from n-th expansion using the matrix key provided ...
virtual void v_Initialise(const std::shared_ptr< AssemblyMap > &pLocToGloMap)
virtual void v_DropStaticCondBlock(unsigned int n)
Releases the static condensation block matrices from NekManager of n-th expansion using the matrix ke...
Describe a linear system.
int GetNVarFactors() const
const Array< OneD, const NekDouble > & GetVarFactors(const StdRegions::ConstFactorType &coeff) const
const StdRegions::ConstFactorMap & GetConstFactors() const
Returns all the constants.
int GetNVarCoeffs() const
const StdRegions::VarCoeffMap & GetVarCoeffs() const
StdRegions::MatrixType GetMatrixType() const
Return the matrix type.
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
std::shared_ptr< Expansion > ExpansionSharedPtr
@ eIterativeMultiLevelStaticCond
@ eDirectMultiLevelStaticCond
@ eXxtMultiLevelStaticCond
@ ePETScMultiLevelStaticCond
std::shared_ptr< RobinBCInfo > RobinBCInfoSharedPtr
GlobalLinSysFactory & GetGlobalLinSysFactory()
std::shared_ptr< Preconditioner > PreconditionerSharedPtr
PreconFactory & GetPreconFactory()
std::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
@ eFactorSVVDGKerDiffCoeff
@ eFactorSVVPowerKerDiffCoeff
std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap
@ eLinearAdvectionDiffusionReaction
@ eLinearAdvectionDiffusionReactionGJP
VarCoeffMap RestrictCoeffMap(const VarCoeffMap &m, size_t offset, size_t cnt)
std::map< ConstFactorType, NekDouble > ConstFactorMap
std::map< StdRegions::VarCoeffType, VarCoeffEntry > VarCoeffMap
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
std::shared_ptr< DNekMat > DNekMatSharedPtr