Skip to content

Commit 6987872

Browse files
committed
Remove duplicate cross_product_matrix function
1 parent e118277 commit 6987872

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

src/ipc/dynamics/rigid/body_forces.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ void BodyForces::update(const RigidBodies& bodies)
4545
double BodyForces::operator()(
4646
const RigidBodies& bodies, Eigen::ConstRef<Eigen::VectorXd> x)
4747
{
48-
assert(predicted_poses().size() == bodies.num_bodies());
49-
5048
const int ndof = x.size() / bodies.num_bodies();
5149

5250
double energy = 0.0;
@@ -60,8 +58,6 @@ double BodyForces::operator()(
6058
Eigen::VectorXd BodyForces::gradient(
6159
const RigidBodies& bodies, Eigen::ConstRef<Eigen::VectorXd> x)
6260
{
63-
assert(predicted_poses().size() == bodies.num_bodies());
64-
6561
const int ndof = x.size() / bodies.num_bodies();
6662

6763
Eigen::VectorXd grad = Eigen::VectorXd::Zero(x.size());
@@ -77,8 +73,6 @@ Eigen::MatrixXd BodyForces::hessian(
7773
Eigen::ConstRef<Eigen::VectorXd> x,
7874
const PSDProjectionMethod project_hessian_to_psd)
7975
{
80-
assert(predicted_poses().size() == bodies.num_bodies());
81-
8276
const int ndof = x.size() / bodies.num_bodies();
8377

8478
Eigen::MatrixXd hess(x.size(), x.size());

src/ipc/utils/eigen_ext.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,6 @@ inline Eigen::MatrixXd to_X3d(Eigen::ConstRef<Eigen::MatrixXd> vertices)
246246
return vertices_3d;
247247
}
248248

249-
inline Eigen::Matrix3d cross_product_matrix(Eigen::ConstRef<Eigen::Vector3d> x)
250-
{
251-
Eigen::Matrix3d X;
252-
X << 0, -x.z(), x.y(), //
253-
x.z(), 0, -x.x(), //
254-
-x.y(), x.x(), 0;
255-
return X;
256-
}
257-
258249
/// Eigen IO Format to format vectors like vertex rows in an OBJ file.
259250
static const Eigen::IOFormat OBJ_VERTEX_FORMAT = Eigen::IOFormat(
260251
Eigen::FullPrecision, Eigen::DontAlignCols, " ", "", "v ", "\n", "", "");

0 commit comments

Comments
 (0)