// ============================================================================ // == == // == 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" #include "parallel/PeriodicMap.h" namespace AMDiS { using namespace std; class MatrixNnzStructure { public: MatrixNnzStructure() : dnnz(NULL), onnz(NULL) {} void clear(); void create(Matrix *mat, MPI::Intracomm mpiComm, ParallelDofMapping &rowDofMap, ParallelDofMapping &colDofMap, PeriodicMap *perMap, const ElementObjectDatabase& elObjDb, bool localMatrix = false); void create(Matrix *mat, MPI::Intracomm mpiComm, ParallelDofMapping &dofMap, PeriodicMap *perMap, const ElementObjectDatabase& elObjDb, bool localMatrix = false) { create(mat, mpiComm, dofMap, dofMap, perMap, elObjDb, localMatrix); } protected: void create(int nRows0, int nRows1 = -1); public: int *dnnz; int *onnz; }; } #endif