HermesCommon  2.0
dp_interface.h
Go to the documentation of this file.
1 // This file is part of HermesCommon
2 //
3 // Copyright (c) 2009 hp-FEM group at the University of Nevada, Reno (UNR).
4 // Email: hpfem-group@unr.edu, home page: http://hpfem.org/.
5 //
6 // Hermes2D is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published
8 // by the Free Software Foundation; either version 2 of the License,
9 // or (at your option) any later version.
10 //
11 // Hermes2D is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with Hermes2D; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #ifndef DPINTERFACE_H
23 #define DPINTERFACE_H
24 
25 #include "../matrix.h"
26 #include "../tables.h"
27 
28 using namespace Hermes::Algebra;
29 
30 namespace Hermes
31 {
32  namespace Solvers
33  {
35  template<typename Scalar>
37  {
38  public:
40  virtual int get_num_dofs() const = 0;
41 
43  virtual bool is_matrix_free() const = 0;
44 
54  virtual void assemble(Scalar* coeff_vec, SparseMatrix<Scalar>* mat, Vector<Scalar>* rhs = NULL,
55  bool force_diagonal_blocks = false, Table* block_weights = NULL) = 0;
56 
59  virtual void assemble(Scalar* coeff_vec, Vector<Scalar>* rhs = NULL,
60  bool force_diagonal_blocks = false, Table* block_weights = NULL) = 0;
61 
62  protected:
70  virtual void create_sparse_structure() = 0;
71  virtual void create_sparse_structure(SparseMatrix<Scalar>* mat, Vector<Scalar>* rhs = NULL) = 0;
72 
74 
75  template<typename T> friend class DiscreteProblemNOX;
76  };
77  }
78 }
79 #endif