Hex  2.2
Hydrogen-electron collision solver
lu-scalapack.h
Go to the documentation of this file.
1 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
2 // //
3 // / / / / __ \ \ / / //
4 // / /__ / / / _ \ \ \/ / //
5 // / ___ / | |/_/ / /\ \ //
6 // / / / / \_\ / / \ \ //
7 // //
8 // //
9 // Copyright (c) 2016, Jakub Benda, Charles University in Prague //
10 // //
11 // MIT License: //
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 THE //
26 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, //
27 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF //
28 // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. //
29 // //
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 
32 #if (!defined(HEX_LU_SCALAPACK_H) && defined(WITH_SCALAPACK))
33 #define HEX_LU_SCALAPACK_H
34 
35 // --------------------------------------------------------------------------------- //
36 
37 #include "hex-csrmatrix.h"
38 
39 // --------------------------------------------------------------------------------- //
40 
41 #include "luft.h"
42 
43 // --------------------------------------------------------------------------------- //
44 
52 class LUft_SCALAPACK : public LUft
53 {
54  public:
55 
56  // run-time selection mechanism
57  factorizerRunTimeSelectionDefinitions(LUft_SCALAPACK, "scalapack")
58 
59 
60  LUft_SCALAPACK ();
61 
63  virtual ~LUft_SCALAPACK();
64 
65  // Disable bitwise copy
66  LUft_SCALAPACK const & operator= (LUft_SCALAPACK const &) = delete;
67 
69  virtual void factorize (CsrMatrix<LU_int_t,Complex> const & matrix, LUftData data);
70 
72  virtual bool valid () const { return size() != 0; }
73 
75  virtual std::size_t size () const;
76 
78  virtual void solve (const cArrayView b, cArrayView x, int eqs) const;
79 
81  virtual void save (std::string name) const;
82 
84  virtual void load (std::string name, bool throw_on_io_failure = true);
85 
87  virtual void drop ();
88 };
89 
90 // --------------------------------------------------------------------------------- //
91 
92 #endif // WITH_SCALAPACK
virtual void solve(const cArrayView b, cArrayView x, int eqs) const =0
Solve equations.
virtual std::size_t size() const
Size of the numerical data.
Definition: luft.h:117
LU factorization object.
Definition: luft.h:74
Definition: luft.h:42
#define factorizerRunTimeSelectionDefinitions(TYPE, NAME)
Definition: luft.h:198
virtual void drop()
Free memory.
Definition: luft.h:109
virtual void save() const
Definition: luft.h:181
virtual void load()
Definition: luft.h:187
Definition: luft.h:46