Nektar++
Loading...
Searching...
No Matches
GlobalLinSysKey.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: GlobalLinSysKey.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: Headers for GlobalLinSysKey
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef NEKTAR_LIBS_MULTIREGIONS_GLOBALLINSYSKEY_H
36#define NEKTAR_LIBS_MULTIREGIONS_GLOBALLINSYSKEY_H
40
42{
43
44/// Describe a linear system.
46{
47public:
49 const StdRegions::MatrixType matrixType,
51 const StdRegions::ConstFactorMap &factors =
54 const StdRegions::VarFactorsMap &varFactors =
56
57 /// Copy constructor.
59
60 /// Destructor.
62
63 /// Less-than operator for GlobalLinSysKey comparison.
64 MULTI_REGIONS_EXPORT friend bool operator<(const GlobalLinSysKey &lhs,
65 const GlobalLinSysKey &rhs);
66
67 /// Return the associated solution type.
69
71
73 const StdRegions::ConstFactorType &coeff) const;
74
76
77protected:
78 /// Store the solution type associated with the linear system. This
79 /// may be none, full matrix, static condensation or multi-level
80 /// static condensation.
83 std::vector<std::size_t> m_varFactors_hashes;
84
85private:
86};
87
88/// Writes information about the object to a given stream.
89MULTI_REGIONS_EXPORT std::ostream &operator<<(std::ostream &os,
90 const GlobalLinSysKey &rhs);
91
96
98{
99 return m_varFactors.size();
100}
101
103 const StdRegions::ConstFactorType &factor) const
104{
105 ASSERTL1(m_varFactors.count(factor) > 0, "factor not found");
106 StdRegions::VarFactorsMap::const_iterator found = m_varFactors.find(factor);
107 return (*found).second;
108}
109
114} // namespace Nektar::MultiRegions
115
116#endif
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define MULTI_REGIONS_EXPORT
const StdRegions::VarFactorsMap & GetVarFactors() const
GlobalSysSolnType m_solnType
Store the solution type associated with the linear system. This may be none, full matrix,...
friend bool operator<(const GlobalLinSysKey &lhs, const GlobalLinSysKey &rhs)
Less-than operator for GlobalLinSysKey comparison.
StdRegions::VarFactorsMap m_varFactors
GlobalSysSolnType GetGlobalSysSolnType() const
Return the associated solution type.
std::vector< std::size_t > m_varFactors_hashes
Describes a matrix with ordering defined by a local to global map.
std::ostream & operator<<(std::ostream &os, const GlobalLinSysKey &rhs)
Writes information about the object to a given stream.
static AssemblyMapSharedPtr NullAssemblyMapSharedPtr
Definition AssemblyMap.h:51
std::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
Definition AssemblyMap.h:50
std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap
static VarFactorsMap NullVarFactorsMap
std::map< ConstFactorType, NekDouble > ConstFactorMap
static ConstFactorMap NullConstFactorMap
static VarCoeffMap NullVarCoeffMap
std::map< StdRegions::VarCoeffType, VarCoeffEntry > VarCoeffMap