40 namespace MultiRegions
56 "Direct static condensation.");
60 "DirectMultiLevelStaticCond",
62 "Direct multi-level static condensation.");
85 const boost::weak_ptr<ExpList> &pExpList,
86 const boost::shared_ptr<AssemblyMap>
94 "This constructor is only valid when using static "
97 == pLocToGloMap->GetGlobalSysSolnType(),
98 "The local to global map is not set up for the requested "
107 const boost::weak_ptr<ExpList> &pExpList,
112 const boost::shared_ptr<AssemblyMap> &pLocToGloMap)
136 int nBndDofs = pLocToGloMap->GetNumGlobalBndCoeffs();
137 int NumDirBCs = pLocToGloMap->GetNumGlobalDirBndCoeffs();
138 unsigned int rows = nBndDofs - NumDirBCs;
139 int bwidth = pLocToGloMap->GetBndSystemBandWidth();
151 if( (2*(bwidth+1)) < rows)
184 int i, j, n, cnt, gid1, gid2;
187 int nBndDofs = pLocToGloMap->GetNumGlobalBndCoeffs();
188 int NumDirBCs = pLocToGloMap->GetNumGlobalDirBndCoeffs();
195 unsigned int rows = nBndDofs - NumDirBCs;
196 unsigned int cols = nBndDofs - NumDirBCs;
199 int bwidth = pLocToGloMap->GetBndSystemBandWidth();
215 "Insufficient memory for GlobalLinSys.");
231 "Unknown matrix storage type of type not set up");
238 for(n = cnt = 0; n < SchurCompl->GetNumberOfBlockRows(); ++n)
240 loc_mat = SchurCompl->GetBlock(n,n);
241 loc_lda = loc_mat->GetRows();
244 for(i = 0; i < loc_lda; ++i)
246 gid1 = pLocToGloMap->GetLocalToGlobalBndMap (cnt + i)
248 sign1 = pLocToGloMap->GetLocalToGlobalBndSign(cnt + i);
252 for(j = 0; j < loc_lda; ++j)
254 gid2 = pLocToGloMap->GetLocalToGlobalBndMap(cnt+j)
256 sign2 = pLocToGloMap->GetLocalToGlobalBndSign(cnt+j);
264 if((matStorage ==
eFULL)||(gid2 >= gid1))
266 value = Gmat->GetValue(gid1,gid2)
267 + sign1*sign2*(*loc_mat)(i,j);
268 Gmat->SetValue(gid1,gid2,value);
286 const boost::weak_ptr<ExpList> &pExpList,
291 const boost::shared_ptr<AssemblyMap> &l2gMap)
295 mkey, pExpList, pSchurCompl, pBinvD, pC, pInvD, l2gMap);
296 sys->Initialise(l2gMap);
GlobalSysSolnType GetGlobalSysSolnType() const
Return the associated solution type.
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
MatrixStorage DetermineMatrixStorage(const boost::shared_ptr< AssemblyMap > &locToGloMap)
Matrix Storage type for known matrices.
boost::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
DNekScalBlkMatSharedPtr m_schurCompl
Block Schur complement matrix.
DNekLinSysSharedPtr m_linSys
Basic linear system object.
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
static std::string className
Name of class.
DNekScalBlkMatSharedPtr m_C
Block matrix.
boost::shared_ptr< GlobalLinSysDirectStaticCond > GlobalLinSysDirectStaticCondSharedPtr
static std::string className2
DNekScalBlkMatSharedPtr m_invD
Block matrix.
boost::shared_ptr< DNekMat > DNekMatSharedPtr
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
GlobalLinSysDirectStaticCond(const GlobalLinSysKey &mkey, const boost::weak_ptr< ExpList > &pExpList, const boost::shared_ptr< AssemblyMap > &locToGloMap)
Constructor for full direct matrix solve.
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
virtual GlobalLinSysStaticCondSharedPtr v_Recurse(const GlobalLinSysKey &mkey, const boost::weak_ptr< ExpList > &pExpList, const DNekScalBlkMatSharedPtr pSchurCompl, const DNekScalBlkMatSharedPtr pBinvD, const DNekScalBlkMatSharedPtr pC, const DNekScalBlkMatSharedPtr pInvD, const boost::shared_ptr< AssemblyMap > &l2gMap)
Describe a linear system.
PointerWrapper
Specifies if the pointer passed to a NekMatrix or NekVector is copied into an internal representation...
static GlobalLinSysSharedPtr create(const GlobalLinSysKey &pLinSysKey, const boost::weak_ptr< ExpList > &pExpList, const boost::shared_ptr< AssemblyMap > &pLocToGloMap)
Creates an instance of this class.
StdRegions::MatrixType GetMatrixType() const
Return the matrix type.
const GlobalLinSysKey m_linSysKey
Key associated with this linear system.
virtual ~GlobalLinSysDirectStaticCond()
virtual void v_AssembleSchurComplement(boost::shared_ptr< AssemblyMap > pLocToGloMap)
GlobalLinSysFactory & GetGlobalLinSysFactory()
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
DNekScalBlkMatSharedPtr m_BinvD
Block matrix.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.
boost::shared_ptr< GlobalLinSysStaticCond > GlobalLinSysStaticCondSharedPtr