Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- multirate rk12 solver for cpp runtime
- Loading branch information
Showing
16 changed files
with
1,884 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#pragma once | ||
/** @addtogroup solverEuler | ||
* | ||
* @{ | ||
*/ | ||
#if defined(__vxworks) | ||
#define BOOST_EXTENSION_SOLVER_DECL | ||
#define BOOST_EXTENSION_SOLVERSETTINGS_DECL | ||
#elif defined(RUNTIME_STATIC_LINKING) && (defined(OMC_BUILD) || defined(SIMSTER_BUILD)) | ||
#define BOOST_EXTENSION_SOLVER_DECL | ||
#define BOOST_EXTENSION_STATESELECT_DECL | ||
#define BOOST_EXTENSION_SOLVERSETTINGS_DECL | ||
#define BOOST_EXTENSION_MONITOR_DECL | ||
#elif defined(OMC_BUILD) || defined(SIMSTER_BUILD) | ||
#define BOOST_EXTENSION_SOLVER_DECL BOOST_EXTENSION_IMPORT_DECL | ||
#define BOOST_EXTENSION_STATESELECT_DECL BOOST_EXTENSION_IMPORT_DECL | ||
#define BOOST_EXTENSION_SOLVERSETTINGS_DECL BOOST_EXTENSION_IMPORT_DECL | ||
#define BOOST_EXTENSION_MONITOR_DECL BOOST_EXTENSION_IMPORT_DECL | ||
#else | ||
error "operating system not supported" | ||
#endif | ||
/** @} */ // end of solverEuler | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#pragma once | ||
/** @addtogroup solverRK12 | ||
* | ||
* @{ | ||
*/ | ||
|
||
|
||
/*****************************************************************************/ | ||
/** | ||
Encapsulation of settings for RK12 solver | ||
\date October, 1st, 2008 | ||
\author | ||
*/ | ||
/***************************************************************************** | ||
Copyright (c) 2008, OSMC | ||
*****************************************************************************/ | ||
class IRK12Settings | ||
{ | ||
|
||
public: | ||
/// Enum to choose the integration method | ||
enum RK12METHOD | ||
{ | ||
STEPSIZECONTROL = 0, ///< Explicit RK12 | ||
MULTIRATE = 1, ///< Implicit RK12 | ||
|
||
}; | ||
|
||
/// Enum to choose the method for zero search | ||
enum ZEROSEARCHMETHOD | ||
{ | ||
NO_ZERO_SEARCH = 0, ///< Ignore zero functions | ||
BISECTION = 1, ///< Bisection method | ||
LINEAR_INTERPOLATION = 2, ///< Linear interpolation | ||
}; | ||
virtual ~IRK12Settings() {}; | ||
|
||
/** | ||
Choise of solution method according to RK12METHOD ([0,1,2,3,4,5]; default: 0) | ||
**/ | ||
virtual unsigned int getRK12Method() =0; | ||
virtual void setRK12Method(unsigned int) =0; | ||
/** | ||
Choise of method for zero search according to ZEROSEARCHMETHOD ([0,1]; default: 0) | ||
*/ | ||
virtual unsigned int getZeroSearchMethod() =0; | ||
virtual void setZeroSearchMethod(unsigned int ) =0; | ||
|
||
/** | ||
Determination of number of zeros in one intervall (used only for methods [2,3]) ([true,false]; default: false) | ||
*/ | ||
virtual bool getUseSturmSequence() =0; | ||
virtual void setUseSturmSequence(bool) =0; | ||
/** | ||
For implicit methods only. Choise between fixpoint and newton-iteration kann eine Newtoniteration gewählt werden. ([false,true]; default: false = Fixpunktiteration) | ||
*/ | ||
virtual bool getUseNewtonIteration() =0; | ||
virtual void setUseNewtonIteration(bool) =0; | ||
/** | ||
Equidistant output(by interpolation polynominal) ([true,false]; default: false) | ||
*/ | ||
virtual bool getDenseOutput() =0; | ||
virtual void setDenseOutput(bool) =0; | ||
/** | ||
Tolerance for newton iteration (used when _useNewtonIteration=true) (default: 1e-8) | ||
*/ | ||
virtual double getIterTol()=0; | ||
virtual void setIterTol(double)=0; | ||
virtual void load(std::string xml_file)=0; | ||
|
||
}; | ||
/** @} */ // end of solverRK12 |
Oops, something went wrong.