|
|
@@ -1,9 +1,9 @@
|
|
|
// This file is part of libigl, a simple c++ geometry processing library.
|
|
|
-//
|
|
|
+//
|
|
|
// Copyright (C) 2017 Alec Jacobson <[email protected]>
|
|
|
-//
|
|
|
-// This Source Code Form is subject to the terms of the Mozilla Public License
|
|
|
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
|
|
+//
|
|
|
+// This Source Code Form is subject to the terms of the Mozilla Public License
|
|
|
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
|
|
// obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
#include "crouzeix_raviart_cotmatrix.h"
|
|
|
#include "unique_simplices.h"
|
|
|
@@ -13,14 +13,14 @@
|
|
|
|
|
|
template <typename DerivedV, typename DerivedF, typename LT, typename DerivedE, typename DerivedEMAP>
|
|
|
void igl::crouzeix_raviart_cotmatrix(
|
|
|
- const Eigen::MatrixBase<DerivedV> & V,
|
|
|
- const Eigen::MatrixBase<DerivedF> & F,
|
|
|
+ const Eigen::MatrixBase<DerivedV> & V,
|
|
|
+ const Eigen::MatrixBase<DerivedF> & F,
|
|
|
Eigen::SparseMatrix<LT> & L,
|
|
|
Eigen::PlainObjectBase<DerivedE> & E,
|
|
|
Eigen::PlainObjectBase<DerivedEMAP> & EMAP)
|
|
|
{
|
|
|
// All occurrences of directed "facets"
|
|
|
- Eigen::MatrixXi allE;
|
|
|
+ Eigen::Matrix<typename DerivedF::Scalar, Eigen::Dynamic, Eigen::Dynamic> allE;
|
|
|
oriented_facets(F,allE);
|
|
|
Eigen::VectorXi _1;
|
|
|
unique_simplices(allE,E,_1,EMAP);
|
|
|
@@ -29,8 +29,8 @@ void igl::crouzeix_raviart_cotmatrix(
|
|
|
|
|
|
template <typename DerivedV, typename DerivedF, typename DerivedE, typename DerivedEMAP, typename LT>
|
|
|
void igl::crouzeix_raviart_cotmatrix(
|
|
|
- const Eigen::MatrixBase<DerivedV> & V,
|
|
|
- const Eigen::MatrixBase<DerivedF> & F,
|
|
|
+ const Eigen::MatrixBase<DerivedV> & V,
|
|
|
+ const Eigen::MatrixBase<DerivedF> & F,
|
|
|
const Eigen::MatrixBase<DerivedE> & E,
|
|
|
const Eigen::MatrixBase<DerivedEMAP> & EMAP,
|
|
|
Eigen::SparseMatrix<LT> & L)
|
|
|
@@ -84,8 +84,8 @@ void igl::crouzeix_raviart_cotmatrix(
|
|
|
for(int c = 0;c<k;c++)
|
|
|
{
|
|
|
LIJV.emplace_back(
|
|
|
- EMAP(F2E(f,LI(c))),
|
|
|
- EMAP(F2E(f,LJ(c))),
|
|
|
+ EMAP(F2E(f,LI(c)), 0),
|
|
|
+ EMAP(F2E(f,LJ(c)), 0),
|
|
|
(c<(k/2)?-1.:1.) * factor *C(f,LV(c)));
|
|
|
}
|
|
|
}
|