1
// Copyright (C) 2006 Anders Logg.
2
// Licensed under the GNU LGPL Version 2.1.
4
// First added: 2006-08-21
5
// Last changed: 2006-08-21
7
#ifndef __MASS_MATRIX_H
8
#define __MASS_MATRIX_H
10
#include <dolfin/common/types.h>
11
#include <dolfin/la/Matrix.h>
12
#include <dolfin/la/PETScMatrix.h>
13
#include <dolfin/la/uBlasSparseMatrix.h>
14
#include "MatrixFactory.h"
21
/// This class represents the standard mass matrix on a given mesh,
22
/// represented as a default DOLFIN matrix.
24
class MassMatrix : public Matrix
28
/// Construct mass matrix on a given mesh
29
MassMatrix(Mesh& mesh) : Matrix()
31
MatrixFactory::computeMassMatrix(*this, mesh);
38
/// This class represents the standard mass matrix on a given mesh,
39
/// represented as a DOLFIN PETSc matrix.
41
class PETScMassMatrix : public PETScMatrix
45
/// Construct mass matrix on a given mesh
46
PETScMassMatrix(Mesh& mesh) : PETScMatrix()
48
MatrixFactory::computeMassMatrix(*this, mesh);
55
/// This class represents the standard mass matrix on a given mesh,
56
/// represented as a sparse DOLFIN uBlas matrix.
58
class uBlasMassMatrix : public uBlasSparseMatrix
62
/// Construct mass matrix on a given mesh
63
uBlasMassMatrix(Mesh& mesh) : uBlasSparseMatrix()
65
MatrixFactory::computeMassMatrix(*this, mesh);