OdeSolverLinearEulerImplicit.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_MATH_ODESOLVERLINEAREULERIMPLICIT_H
17 #define SURGSIM_MATH_ODESOLVERLINEAREULERIMPLICIT_H
18 
21 
22 namespace SurgSim
23 {
24 
25 namespace Math
26 {
27 
35 {
36 public:
39  explicit OdeSolverLinearEulerImplicit(OdeEquation* equation);
40 
41  void setNewtonRaphsonMaximumIteration(size_t maximumIteration) override;
42 
45  void solve(double dt, const OdeState& currentState, OdeState* newState, bool computeCompliance = true) override;
46 
47 private:
50 
53 };
54 
55 }; // namespace Math
56 
57 }; // namespace SurgSim
58 
59 #endif // SURGSIM_MATH_ODESOLVERLINEAREULERIMPLICIT_H
SurgSim::Math::OdeSolverLinearEulerImplicit
Linear Version of the Euler Implicit ode solver This solver assumes that the system is linear,...
Definition: OdeSolverLinearEulerImplicit.h:35
OdeSolverEulerImplicit.h
SurgSim::Math::OdeState
The state of an ode of 2nd order of the form with boundary conditions.
Definition: OdeState.h:39
SurgSim::Math::OdeSolverLinearEulerImplicit::solve
void solve(double dt, const OdeState &currentState, OdeState *newState, bool computeCompliance=true) override
The parameter computeCompliance is irrelevant for any Linear solver as it is a constant matrix.
Definition: OdeSolverLinearEulerImplicit.cpp:43
SparseMatrix.h
Definitions of useful sparse matrix functions.
SurgSim
Definition: CompoundShapeToGraphics.cpp:30
SurgSim::Math::OdeSolverLinearEulerImplicit::m_initialized
bool m_initialized
Has the solver been initialized.
Definition: OdeSolverLinearEulerImplicit.h:52
SurgSim::Math::OdeSolverLinearEulerImplicit::m_constantK
SparseMatrix m_constantK
The constant stiffness matrix.
Definition: OdeSolverLinearEulerImplicit.h:49
SurgSim::Math::SparseMatrix
Eigen::SparseMatrix< double > SparseMatrix
A sparse matrix.
Definition: SparseMatrix.h:32
SurgSim::Math::OdeEquation
Ode equation of 2nd order of the form with for initial conditions and a set of boundary conditions.
Definition: OdeEquation.h:55
SurgSim::Math::OdeSolverLinearEulerImplicit::OdeSolverLinearEulerImplicit
OdeSolverLinearEulerImplicit(OdeEquation *equation)
Constructor.
Definition: OdeSolverLinearEulerImplicit.cpp:26
SurgSim::Math::OdeSolverEulerImplicit
Euler implicit (a.k.a backward Euler) ode solver (see OdeSolverEulerImplicit.dox for more details).
Definition: OdeSolverEulerImplicit.h:29
SurgSim::Math::OdeSolverLinearEulerImplicit::setNewtonRaphsonMaximumIteration
void setNewtonRaphsonMaximumIteration(size_t maximumIteration) override
Definition: OdeSolverLinearEulerImplicit.cpp:35