MlcpPhysicsProblem.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SURGSIM_PHYSICS_MLCPPHYSICSPROBLEM_H
#define SURGSIM_PHYSICS_MLCPPHYSICSPROBLEM_H
#include "SurgSim/Math/MlcpProblem.h"
#include "SurgSim/Math/SparseMatrix.h"
namespace SurgSim
{
namespace Physics
{
struct MlcpPhysicsProblem : public SurgSim::Math::MlcpProblem
{
~MlcpPhysicsProblem() override;
Eigen::SparseMatrix<double, Eigen::RowMajor, ptrdiff_t> H;
Matrix CHt;
void updateConstraint(
const Eigen::SparseVector<double, Eigen::RowMajor, ptrdiff_t>& newSubH,
const Vector& newCHt,
size_t indexSubC,
size_t indexNewSubH);
void setZero(size_t numDof, size_t numConstraintDof, size_t numConstraints) override;
static MlcpPhysicsProblem Zero(size_t numDof, size_t numConstraintDof, size_t numConstraints);
};
}; // namespace Physics
}; // namespace SurgSim
#endif // SURGSIM_PHYSICS_MLCPPHYSICSPROBLEM_H
SurgSim::Physics::MlcpPhysicsProblem::~MlcpPhysicsProblem
~MlcpPhysicsProblem() override
Destructor.
Definition: MlcpPhysicsProblem.cpp:26
SurgSim::Physics::MlcpPhysicsProblem::H
Eigen::SparseMatrix< double, Eigen::RowMajor, ptrdiff_t > H
The matrix , which is a matrix of size that converts from the degrees of freedom in the system (i...
Definition: MlcpPhysicsProblem.h:56
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Physics::MlcpPhysicsProblem::CHt
Matrix CHt
The matrix , which is a matrix of size that is used to convert the vector of constraint forces to t...
Definition: MlcpPhysicsProblem.h:60
SurgSim::Physics::MlcpPhysicsProblem
A description of a physical mixed LCP system to be solved.
Definition: MlcpPhysicsProblem.h:43
SurgSim::Math::MlcpProblem::Vector
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
Definition: MlcpProblem.h:63
MlcpProblem.h
SurgSim::Physics::MlcpPhysicsProblem::setZero
void setZero(size_t numDof, size_t numConstraintDof, size_t numConstraints) override
Resize an MlcpPhysicsProblem and set to zero.
Definition: MlcpPhysicsProblem.cpp:30
SparseMatrix.h
Definitions of useful sparse matrix functions.
SurgSim::Physics::MlcpPhysicsProblem::Zero
static MlcpPhysicsProblem Zero(size_t numDof, size_t numConstraintDof, size_t numConstraints)
Initialize an MlcpPhysicsProblem with zero values.
Definition: MlcpPhysicsProblem.cpp:38
SurgSim::Math::MlcpProblem::Matrix
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > Matrix
Definition: MlcpProblem.h:62
SurgSim::Math::MlcpProblem
A description of an MLCP (mixed linear complementarity problem, or mixed LCP) system to be solved...
Definition: MlcpProblem.h:57
SurgSim::Physics::MlcpPhysicsProblem::updateConstraint
void updateConstraint(const Eigen::SparseVector< double, Eigen::RowMajor, ptrdiff_t > &newSubH, const Vector &newCHt, size_t indexSubC, size_t indexNewSubH)
Applies a new constraint to a specific Representation.
Definition: MlcpPhysicsProblem.cpp:46