39 namespace MultiRegions
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)
174 int i, j, n, cnt, gid1, gid2;
177 int nBndDofs = pLocToGloMap->GetNumGlobalBndCoeffs();
178 int NumDirBCs = pLocToGloMap->GetNumGlobalDirBndCoeffs();
185 unsigned int rows = nBndDofs - NumDirBCs;
186 unsigned int cols = nBndDofs - NumDirBCs;
189 int bwidth = pLocToGloMap->GetBndSystemBandWidth();
200 rows, cols, 0.0, matStorage, bwidth, bwidth);
205 "Insufficient memory for GlobalLinSys.");
221 "Unknown matrix storage type of type not set up");
228 for (n = cnt = 0; n < SchurCompl->GetNumberOfBlockRows(); ++n)
230 loc_mat = SchurCompl->GetBlock(n, n);
231 loc_lda = loc_mat->GetRows();
234 for (i = 0; i < loc_lda; ++i)
236 gid1 = pLocToGloMap->GetLocalToGlobalBndMap(cnt + i) - NumDirBCs;
237 sign1 = pLocToGloMap->GetLocalToGlobalBndSign(cnt + i);
241 for (j = 0; j < loc_lda; ++j)
243 gid2 = pLocToGloMap->GetLocalToGlobalBndMap(cnt + j) -
245 sign2 = pLocToGloMap->GetLocalToGlobalBndSign(cnt + j);
253 if ((matStorage ==
eFULL) || (gid2 >= gid1))
255 value = Gmat->GetValue(gid1, gid2) +
256 sign1 * sign2 * (*loc_mat)(i, j);
257 Gmat->SetValue(gid1, gid2, value);
278 const std::shared_ptr<AssemblyMap> &l2gMap)
282 mkey, pExpList, pSchurCompl, pBinvD, pC, pInvD, l2gMap);
283 sys->Initialise(l2gMap);
#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 ~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
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...