MatrixNnzStructure.h 1.77 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ==  http://www.amdis-fem.org                                              ==
// ==                                                                        ==
// ============================================================================
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology 
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.



/** \file MatrixNnzStructure.h */

#ifndef AMDIS_MATRIX_NNZ_STRUCTURE_H
#define AMDIS_MATRIX_NNZ_STRUCTURE_H

#include "AMDiS_fwd.h"
#include "parallel/ParallelDofMapping.h"
Thomas Witkowski's avatar
Thomas Witkowski committed
28
#include "parallel/PeriodicMap.h"
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

namespace AMDiS {

  using namespace std;

  class MatrixNnzStructure {
  public:
    MatrixNnzStructure()
      : dnnz(NULL),
	onnz(NULL)
    {}
	
    void clear();

    void create(Matrix<DOFMatrix*> *mat,
		MPI::Intracomm mpiComm,
		ParallelDofMapping &rowDofMap,
		ParallelDofMapping &colDofMap,
47
48
		PeriodicMap *perMap,
		const ElementObjectDatabase& elObjDb,
49
50
51
52
53
		bool localMatrix = false);

    void create(Matrix<DOFMatrix*> *mat,
		MPI::Intracomm mpiComm,
		ParallelDofMapping &dofMap,
54
55
		PeriodicMap *perMap,
		const ElementObjectDatabase& elObjDb,
56
57
		bool localMatrix = false)
    {
58
      create(mat, mpiComm, dofMap, dofMap, perMap, elObjDb, localMatrix);
59
60
61
62
63
64
65
66
67
68
69
70
71
72
    }

  protected:
    void create(int nRows0, int nRows1 = -1);

  public:
    int *dnnz;

    int *onnz;
  };

}

#endif