39 namespace MultiRegions
55 "Direct static condensation.");
59 "DirectMultiLevelStaticCond",
61 "Direct multi-level static condensation.");
84 const std::weak_ptr<ExpList> &pExpList,
85 const std::shared_ptr<AssemblyMap>
93 "This constructor is only valid when using static "
96 == pLocToGloMap->GetGlobalSysSolnType(),
97 "The local to global map is not set up for the requested "
106 const std::weak_ptr<ExpList> &pExpList,
111 const std::shared_ptr<AssemblyMap> &pLocToGloMap)
135 int nBndDofs = pLocToGloMap->GetNumGlobalBndCoeffs();
136 int NumDirBCs = pLocToGloMap->GetNumGlobalDirBndCoeffs();
137 unsigned int rows = nBndDofs - NumDirBCs;
138 int bwidth = pLocToGloMap->GetBndSystemBandWidth();
150 if( (2*(bwidth+1)) < rows)
183 int i, j, n, cnt, gid1, gid2;
186 int nBndDofs = pLocToGloMap->GetNumGlobalBndCoeffs();
187 int NumDirBCs = pLocToGloMap->GetNumGlobalDirBndCoeffs();
194 unsigned int rows = nBndDofs - NumDirBCs;
195 unsigned int cols = nBndDofs - NumDirBCs;
198 int bwidth = pLocToGloMap->GetBndSystemBandWidth();
214 "Insufficient memory for GlobalLinSys.");
230 "Unknown matrix storage type of type not set up");
237 for(n = cnt = 0; n < SchurCompl->GetNumberOfBlockRows(); ++n)
239 loc_mat = SchurCompl->GetBlock(n,n);
240 loc_lda = loc_mat->GetRows();
243 for(i = 0; i < loc_lda; ++i)
245 gid1 = pLocToGloMap->GetLocalToGlobalBndMap (cnt + i)
247 sign1 = pLocToGloMap->GetLocalToGlobalBndSign(cnt + i);
251 for(j = 0; j < loc_lda; ++j)
253 gid2 = pLocToGloMap->GetLocalToGlobalBndMap(cnt+j)
255 sign2 = pLocToGloMap->GetLocalToGlobalBndSign(cnt+j);
263 if((matStorage ==
eFULL)||(gid2 >= gid1))
265 value = Gmat->GetValue(gid1,gid2)
266 + sign1*sign2*(*loc_mat)(i,j);
267 Gmat->SetValue(gid1,gid2,value);
285 const std::weak_ptr<ExpList> &pExpList,
290 const std::shared_ptr<AssemblyMap> &l2gMap)
294 mkey, pExpList, pSchurCompl, pBinvD, pC, pInvD, l2gMap);
295 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.
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
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.
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)
virtual void v_AssembleSchurComplement(std::shared_ptr< AssemblyMap > pLocToGloMap)
MatrixStorage DetermineMatrixStorage(const std::shared_ptr< AssemblyMap > &locToGloMap)
Matrix Storage type for known matrices.
static std::string className
Name of class.
virtual ~GlobalLinSysDirectStaticCond()
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...