OdeSolverEulerExplicit.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_MATH_ODESOLVEREULEREXPLICIT_H
#define SURGSIM_MATH_ODESOLVEREULEREXPLICIT_H
#include "SurgSim/Math/OdeSolver.h"
namespace SurgSim
{
namespace Math
{
class OdeSolverEulerExplicit : public OdeSolver
{
public:
explicit OdeSolverEulerExplicit(OdeEquation* equation);
void solve(double dt, const OdeState& currentState, OdeState* newState, bool computeCompliance = true) override;
protected:
void assembleLinearSystem(double dt, const OdeState& state, const OdeState& newState,
bool computeRHS = true) override;
};
}; // namespace Math
}; // namespace SurgSim
#endif // SURGSIM_MATH_ODESOLVEREULEREXPLICIT_H
SurgSim::Math::OdeSolverEulerExplicit::solve
void solve(double dt, const OdeState &currentState, OdeState *newState, bool computeCompliance=true) override
Solves the equation.
Definition: OdeSolverEulerExplicit.cpp:31
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Math::OdeSolverEulerExplicit
Euler Explicit ode solver solves the following order ode .
Definition: OdeSolverEulerExplicit.h:56
OdeSolver.h
SurgSim::Math::OdeEquation
Ode equation of 2nd order of the form with for initial conditions and a set of boundary conditions...
Definition: OdeEquation.h:54
SurgSim::Math::OdeState
The state of an ode of 2nd order of the form with boundary conditions.
Definition: OdeState.h:38
SurgSim::Math::OdeSolver
Base class for all solvers of ode equation of order 2 of the form .
Definition: OdeSolver.h:78
SurgSim::Math::OdeSolverEulerExplicit::assembleLinearSystem
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: OdeSolverEulerExplicit.cpp:58
SurgSim::Math::OdeSolverEulerExplicit::OdeSolverEulerExplicit
OdeSolverEulerExplicit(OdeEquation *equation)
Constructor.
Definition: OdeSolverEulerExplicit.cpp:25