libigl v2.5.0
Loading...
Searching...
No Matches
massmatrix.h
Go to the documentation of this file.
1// This file is part of libigl, a simple c++ geometry processing library.
2//
3// Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
4//
5// This Source Code Form is subject to the terms of the Mozilla Public License
6// v. 2.0. If a copy of the MPL was not distributed with this file, You can
7// obtain one at http://mozilla.org/MPL/2.0/.
8#ifndef IGL_MASSMATRIX_H
9#define IGL_MASSMATRIX_H
10#include "igl_inline.h"
11
12#include <Eigen/Dense>
13#include <Eigen/Sparse>
14
15namespace igl
16{
33
51 template <typename DerivedV, typename DerivedF, typename Scalar>
53 const Eigen::MatrixBase<DerivedV> & V,
54 const Eigen::MatrixBase<DerivedF> & F,
55 const MassMatrixType type,
56 Eigen::SparseMatrix<Scalar>& M);
57}
58
59#ifndef IGL_STATIC_LIBRARY
60# include "massmatrix.cpp"
61#endif
62
63#endif
64
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
void massmatrix(const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const MassMatrixType type, Eigen::SparseMatrix< Scalar > &M)
Constructs the mass (area) matrix for a given mesh (V,F).
MassMatrixType
Type of mass matrix.
Definition massmatrix.h:19
@ MASSMATRIX_TYPE_DEFAULT
Use MASSMATRIX_TYPE_VORONOI for triangles and MASSMATRIX_TYPE_BARYCENTRIC for tetrahedra.
Definition massmatrix.h:29
@ MASSMATRIX_TYPE_VORONOI
Lumping area by Voronoi dual area (clamped to be positive according to Meyer et al.
Definition massmatrix.h:24
@ NUM_MASSMATRIX_TYPES
Total number of mass matrix types.
Definition massmatrix.h:31
@ MASSMATRIX_TYPE_FULL
Full (non-diagonal mass matrix) for piecewise linear functions.
Definition massmatrix.h:26
@ MASSMATRIX_TYPE_BARYCENTRIC
Lumping area of each element to corner vertices in equal parts.
Definition massmatrix.h:21