All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MlcpPhysicsProblem.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef SURGSIM_PHYSICS_MLCPPHYSICSPROBLEM_H
17 #define SURGSIM_PHYSICS_MLCPPHYSICSPROBLEM_H
18 
20 #include <Eigen/SparseCore>
21 
22 namespace SurgSim
23 {
24 namespace Physics
25 {
26 
29 
44 {
46  virtual ~MlcpPhysicsProblem() override;
47 
57 
61 
68  template <typename SubCDerivedType>
69  void updateConstraint(
70  const Eigen::SparseVector<double>& newSubH,
71  const Eigen::MatrixBase<SubCDerivedType>& subC,
72  size_t indexSubC,
73  size_t indexNewSubH);
74 
79  virtual void setZero(size_t numDof, size_t numConstraintDof, size_t numConstraints) override;
80 
86  static MlcpPhysicsProblem Zero(size_t numDof, size_t numConstraintDof, size_t numConstraints);
87 };
88 
89 }; // namespace Physics
90 }; // namespace SurgSim
91 
93 
94 #endif // SURGSIM_PHYSICS_MLCPPHYSICSPROBLEM_H
virtual ~MlcpPhysicsProblem() override
Destructor.
Definition: MlcpPhysicsProblem.cpp:24
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
A description of a physical mixed LCP system to be solved.
Definition: MlcpPhysicsProblem.h:43
virtual void setZero(size_t numDof, size_t numConstraintDof, size_t numConstraints) override
Resize an MlcpPhysicsProblem and set to zero.
Definition: MlcpPhysicsProblem.cpp:28
Matrix H
The matrix , which is a matrix of size that converts from the degrees of freedom in the system (i...
Definition: MlcpPhysicsProblem.h:56
static MlcpPhysicsProblem Zero(size_t numDof, size_t numConstraintDof, size_t numConstraints)
Initialize an MlcpPhysicsProblem with zero values.
Definition: MlcpPhysicsProblem.cpp:38
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > Matrix
Definition: MlcpProblem.h:62
A description of an MLCP (mixed linear complementarity problem, or mixed LCP) system to be solved...
Definition: MlcpProblem.h:57
void updateConstraint(const Eigen::SparseVector< double > &newSubH, const Eigen::MatrixBase< SubCDerivedType > &subC, size_t indexSubC, size_t indexNewSubH)
Applies a new constraint to a specific Representation.
Definition: MlcpPhysicsProblem-inl.h:27