opensurgsim
OdeSolverEulerExplicitModified.h
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_ODESOLVEREULEREXPLICITMODIFIED_H
17 #define SURGSIM_MATH_ODESOLVEREULEREXPLICITMODIFIED_H
18 
19 #include "SurgSim/Math/OdeSolver.h"
20 
21 namespace SurgSim
22 {
23 
24 namespace Math
25 {
26 
53 {
54 public:
57  explicit OdeSolverEulerExplicitModified(OdeEquation* equation);
58 
59  void solve(double dt, const OdeState& currentState, OdeState* newState, bool computeCompliance = true) override;
60 
61 protected:
62  void assembleLinearSystem(double dt, const OdeState& state, const OdeState& newState,
63  bool computeRHS = true) override;
64 };
65 
66 }; // namespace Math
67 
68 }; // namespace SurgSim
69 
70 #endif // SURGSIM_MATH_ODESOLVEREULEREXPLICITMODIFIED_H
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
void solve(double dt, const OdeState &currentState, OdeState *newState, bool computeCompliance=true) override
Solves the equation.
Definition: OdeSolverEulerExplicitModified.cpp:31
Ode equation of 2nd order of the form with for initial conditions and a set of boundary conditions...
Definition: OdeEquation.h:54
The state of an ode of 2nd order of the form with boundary conditions.
Definition: OdeState.h:38
void assembleLinearSystem(double dt, const OdeState &state, const OdeState &newState, bool computeRHS=true) override
Assemble the linear system (A.x=b) to be solved for the state and new states (useful for certain ode ...
Definition: OdeSolverEulerExplicitModified.cpp:59
OdeSolverEulerExplicitModified(OdeEquation *equation)
Constructor.
Definition: OdeSolverEulerExplicitModified.cpp:25
Base class for all solvers of ode equation of order 2 of the form .
Definition: OdeSolver.h:78
Modified Euler Explicit ode solver solves the following order ode .
Definition: OdeSolverEulerExplicitModified.h:52