libMesh
Loading...
Searching...
No Matches
lumped_mass_matrix.h
Go to the documentation of this file.
1// The libMesh Finite Element Library.
2// Copyright (C) 2002-2026 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3
4// This library is free software; you can redistribute it and/or
5// modify it under the terms of the GNU Lesser General Public
6// License as published by the Free Software Foundation; either
7// version 2.1 of the License, or (at your option) any later version.
8
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// Lesser General Public License for more details.
13
14// You should have received a copy of the GNU Lesser General Public
15// License along with this library; if not, write to the Free Software
16// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18#ifndef LIBMESH_LUMPED_MASS_MATRIX_H
19#define LIBMESH_LUMPED_MASS_MATRIX_H
20
21#include "libmesh/diagonal_matrix.h"
22
23namespace libMesh
24{
25
34template <typename T>
36{
37public:
50
56 virtual SparseMatrix<T> & operator=(const SparseMatrix<T> &) override
57 {
58 libmesh_not_implemented();
59 return *this;
60 }
61
62 virtual std::unique_ptr<SparseMatrix<T>> zero_clone() const override;
63
64 virtual std::unique_ptr<SparseMatrix<T>> clone() const override;
65
66 virtual void set(const numeric_index_type i,
67 const numeric_index_type j,
68 const T value) override;
69
70 virtual void add(const numeric_index_type i,
71 const numeric_index_type j,
72 const T value) override;
73 virtual void add(const T a, const SparseMatrix<T> & X) override;
74
75protected:
80
85};
86
87} // namespace libMesh
88
89#endif // LIBMESH_LUMPED_MASS_MATRIX_H
Diagonal matrix class whose underlying storage is a vector.
Template class used to construct a lumped mass matrix.
virtual void add(const numeric_index_type i, const numeric_index_type j, const T value) override
Add value to the element (i,j).
virtual std::unique_ptr< SparseMatrix< T > > zero_clone() const override
virtual void set(const numeric_index_type i, const numeric_index_type j, const T value) override
Set the element (i,j) to value.
LumpedMassMatrix(LumpedMassMatrix &&)=default
unique pointers can be moved but not copied
virtual std::unique_ptr< SparseMatrix< T > > clone() const override
LumpedMassMatrix & operator=(LumpedMassMatrix &&)=default
virtual SparseMatrix< T > & operator=(const SparseMatrix< T > &) override
This looks like a copy assignment operator, but note that, unlike normal copy assignment operators,...
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
const Parallel::Communicator & comm() const
Generic sparse matrix.
The libMesh namespace provides an interface to certain functionality in the library.
dof_id_type numeric_index_type
Definition id_types.h:99
static const bool value
Definition xdr_io.C:55