Hermes2D  2.0
asmlist.h
1 // This file is part of Hermes2D.
2 //
3 // Hermes2D is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 2 of the License, or
6 // (at your option) any later version.
7 //
8 // Hermes2D is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with Hermes2D. If not, see <http://www.gnu.org/licenses/>.
15 
16 #ifndef __H2D_ASMLIST_H
17 #define __H2D_ASMLIST_H
18 
19 #include "global.h"
20 
21 namespace Hermes
22 {
23  namespace Hermes2D
24  {
32  template<typename Scalar>
33  class HERMES_API AsmList
34  {
35  public:
37  AsmList();
38 
40  ~AsmList();
41 
42  int* get_idx();
43  int* get_dof();
44  unsigned int get_cnt();
45  Scalar* get_coef();
46  private:
48  AsmList(const AsmList<Scalar> & other);
49 
50  int* idx;
51  int* dof;
52  Scalar* coef;
53  unsigned int cnt;
54  unsigned int cap;
55 
57  void add_triplet(int i, int d, Scalar c);
58 
60  void enlarge();
61  template<typename T> friend class DiscreteProblem;
62  template<typename T> friend class DiscreteProblemLinear;
63  template<typename T> friend class NeighborSearch;
64  template<typename T> friend class Solution;
65  template<typename T> friend class Space;
66  template<typename T> friend class H1Space;
67  template<typename T> friend class L2Space;
68  template<typename T> friend class HcurlSpace;
69  template<typename T> friend class HdivSpace;
70  };
71  }
72 }
73 #endif