Nektar++
GlobalLinSysXxtStaticCond.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: GlobalLinSysXxtStaticCond.h
4//
5// For more information, please see: http://www.nektar.info
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description: GlobalLinSysXxtStaticCond header
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef NEKTAR_LIB_MULTIREGIONS_GLOBALLINSYSXXTSTATICCOND_H
36#define NEKTAR_LIB_MULTIREGIONS_GLOBALLINSYSXXTSTATICCOND_H
37
43
45{
46// Forward declarations
47class AssemblyMapCG;
48class ExpList;
49class GlobalLinSysXxtStaticCond;
50
51typedef std::shared_ptr<GlobalLinSysXxtStaticCond>
53
54/// A global linear system.
56 virtual public GlobalLinSysStaticCond
57{
58public:
59 /// Creates an instance of this class
61 const GlobalLinSysKey &pLinSysKey,
62 const std::weak_ptr<ExpList> &pExpList,
63 const std::shared_ptr<AssemblyMap> &pLocToGloMap)
64 {
67 pLinSysKey, pExpList, pLocToGloMap);
68 p->InitObject();
69 return p;
70 }
71
72 /// Name of class
73 static std::string className;
74 static std::string className2;
75
76 /// Constructor for full direct matrix solve.
78 const GlobalLinSysKey &mkey, const std::weak_ptr<ExpList> &pExpList,
79 const std::shared_ptr<AssemblyMap> &locToGloMap);
80
81 /// Constructor for full direct matrix solve.
83 const GlobalLinSysKey &mkey, const std::weak_ptr<ExpList> &pExpList,
84 const DNekScalBlkMatSharedPtr pSchurCompl,
86 const DNekScalBlkMatSharedPtr pInvD,
87 const std::shared_ptr<AssemblyMap> &locToGloMap);
88
90
91protected:
92 /// Assemble the Schur complement matrix.
94 std::shared_ptr<AssemblyMap> locToGloMap) override;
95
97 const GlobalLinSysKey &mkey, const std::weak_ptr<ExpList> &pExpList,
98 const DNekScalBlkMatSharedPtr pSchurCompl,
100 const DNekScalBlkMatSharedPtr pInvD,
101 const std::shared_ptr<AssemblyMap> &locToGloMap) override;
102
103private:
104 /// Solve the linear system for given input and output vectors.
105 void v_SolveLinearSystem(const int pNumRows,
106 const Array<OneD, const NekDouble> &pInput,
107 Array<OneD, NekDouble> &pOutput,
108 const AssemblyMapSharedPtr &locToGloMap,
109 const int pNumDir) override;
110};
111} // namespace Nektar::MultiRegions
112
113#endif
#define MULTI_REGIONS_EXPORT
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
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.
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 > &locToGloMap) override
GlobalLinSysXxtStaticCond(const GlobalLinSysKey &mkey, const std::weak_ptr< ExpList > &pExpList, const std::shared_ptr< AssemblyMap > &locToGloMap)
Constructor for full direct matrix solve.
void v_AssembleSchurComplement(std::shared_ptr< AssemblyMap > locToGloMap) override
Assemble the Schur complement matrix.
static GlobalLinSysSharedPtr create(const GlobalLinSysKey &pLinSysKey, const std::weak_ptr< ExpList > &pExpList, const std::shared_ptr< AssemblyMap > &pLocToGloMap)
Creates an instance of this class.
std::shared_ptr< GlobalLinSysXxtStaticCond > GlobalLinSysXxtStaticCondSharedPtr
std::shared_ptr< GlobalLinSys > GlobalLinSysSharedPtr
Pointer to a GlobalLinSys object.
Definition: GlobalLinSys.h:51
std::shared_ptr< GlobalLinSysStaticCond > GlobalLinSysStaticCondSharedPtr
std::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
Definition: AssemblyMap.h:50
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:79