54 "Direct static condensation.");
59 "Direct multi-level static condensation.");
82 const std::shared_ptr<AssemblyMap> &pLocToGloMap)
89 "This constructor is only valid when using static "
92 pLocToGloMap->GetGlobalSysSolnType(),
93 "The local to global map is not set up for the requested "
105 const std::shared_ptr<AssemblyMap> &pLocToGloMap)
126 int nBndDofs = pLocToGloMap->GetNumGlobalBndCoeffs();
127 int NumDirBCs = pLocToGloMap->GetNumGlobalDirBndCoeffs();
128 unsigned int rows = nBndDofs - NumDirBCs;
129 int bwidth = pLocToGloMap->GetBndSystemBandWidth();
141 if ((2 * (bwidth + 1)) < rows)
175 int i, j, n, cnt, gid1, gid2;
178 int nBndDofs = pLocToGloMap->GetNumGlobalBndCoeffs();
179 int NumDirBCs = pLocToGloMap->GetNumGlobalDirBndCoeffs();
186 unsigned int rows = nBndDofs - NumDirBCs;
187 unsigned int cols = nBndDofs - NumDirBCs;
190 int bwidth = pLocToGloMap->GetBndSystemBandWidth();
201 rows, cols, 0.0, matStorage, bwidth, bwidth);
206 "Insufficient memory for GlobalLinSys.");
222 "Unknown matrix storage type of type not set up");
229 for (n = cnt = 0; n < SchurCompl->GetNumberOfBlockRows(); ++n)
231 loc_mat = SchurCompl->GetBlock(n, n);
232 loc_lda = loc_mat->GetRows();
235 for (i = 0; i < loc_lda; ++i)
237 gid1 = pLocToGloMap->GetLocalToGlobalBndMap(cnt + i) - NumDirBCs;
238 sign1 = pLocToGloMap->GetLocalToGlobalBndSign(cnt + i);
242 for (j = 0; j < loc_lda; ++j)
244 gid2 = pLocToGloMap->GetLocalToGlobalBndMap(cnt + j) -
246 sign2 = pLocToGloMap->GetLocalToGlobalBndSign(cnt + j);
254 if ((matStorage ==
eFULL) || (gid2 >= gid1))
256 value = Gmat->GetValue(gid1, gid2) +
257 sign1 * sign2 * (*loc_mat)(i, j);
258 Gmat->SetValue(gid1, gid2, value);
279 const std::shared_ptr<AssemblyMap> &l2gMap)
283 mkey, pExpList, pSchurCompl, pBinvD, pC, pInvD, l2gMap);
284 sys->Initialise(l2gMap);
297 pLocToGloMap->AssembleBnd(pInput, tmp);
299 const int nHomDofs = pNumRows - pNumDir;
300 DNekVec Vin(nHomDofs, tmp + pNumDir);
307 pLocToGloMap->GlobalToLocalBnd(global, pOutput);
#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....
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
DNekLinSysSharedPtr m_linSys
Basic linear system object.
static GlobalLinSysSharedPtr create(const GlobalLinSysKey &pLinSysKey, const std::weak_ptr< ExpList > &pExpList, const std::shared_ptr< AssemblyMap > &pLocToGloMap)
Creates an instance of this class.
static std::string className2
GlobalLinSysDirectStaticCond(const GlobalLinSysKey &mkey, const std::weak_ptr< ExpList > &pExpList, const std::shared_ptr< AssemblyMap > &locToGloMap)
Constructor for full direct matrix solve.
MatrixStorage DetermineMatrixStorage(const std::shared_ptr< AssemblyMap > &locToGloMap)
Matrix Storage type for known matrices.
static std::string className
Name of class.
virtual GlobalLinSysStaticCondSharedPtr v_Recurse(const GlobalLinSysKey &mkey, const std::weak_ptr< ExpList > &pExpList, const DNekScalBlkMatSharedPtr pSchurCompl, const DNekScalBlkMatSharedPtr pBinvD, const DNekScalBlkMatSharedPtr pC, const DNekScalBlkMatSharedPtr pInvD, const std::shared_ptr< AssemblyMap > &l2gMap) override
virtual void v_SolveLinearSystem(const int pNumRows, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const AssemblyMapSharedPtr &locToGloMap, const int pNumDir) override
Solve the linear system for given input and output vectors.
virtual ~GlobalLinSysDirectStaticCond()
virtual void v_AssembleSchurComplement(std::shared_ptr< AssemblyMap > pLocToGloMap) override
const GlobalLinSysKey m_linSysKey
Key associated with this linear system.
Describe a linear system.
GlobalSysSolnType GetGlobalSysSolnType() const
Return the associated solution type.
DNekScalBlkMatSharedPtr m_schurCompl
Block Schur complement matrix.
DNekScalBlkMatSharedPtr m_BinvD
Block matrix.
DNekScalBlkMatSharedPtr m_C
Block matrix.
DNekScalBlkMatSharedPtr m_invD
Block matrix.
StdRegions::MatrixType GetMatrixType() const
Return the matrix type.
@ eDirectMultiLevelStaticCond
std::shared_ptr< GlobalLinSysDirectStaticCond > GlobalLinSysDirectStaticCondSharedPtr
std::shared_ptr< GlobalLinSysStaticCond > GlobalLinSysStaticCondSharedPtr
GlobalLinSysFactory & GetGlobalLinSysFactory()
std::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
@ eLinearAdvectionReaction
@ eLinearAdvectionDiffusionReaction
std::vector< double > w(NPUPPER)
The above copyright notice and this permission notice shall be included.
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
@ ePOSITIVE_DEFINITE_SYMMETRIC_BANDED
@ ePOSITIVE_DEFINITE_SYMMETRIC
std::shared_ptr< DNekMat > DNekMatSharedPtr
PointerWrapper
Specifies if the pointer passed to a NekMatrix or NekVector is copied into an internal representation...