StaticSolver.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef SOFA_COMPONENT_ODESOLVER_STATICSOLVER_H
00029 #define SOFA_COMPONENT_ODESOLVER_STATICSOLVER_H
00030
00031 #include <sofa/core/componentmodel/behavior/OdeSolver.h>
00032 #include <sofa/simulation/common/OdeSolverImpl.h>
00033
00034
00035 namespace sofa
00036 {
00037
00038 namespace component
00039 {
00040
00041 namespace odesolver
00042 {
00043
00045 class StaticSolver : public sofa::simulation::OdeSolverImpl
00046 {
00047
00048 public:
00049 StaticSolver();
00050
00051 void solve (double dt);
00052
00055 double getIntegrationFactor(int inputDerivative, int outputDerivative) const
00056 {
00057 double matrix[3][3] = {
00058 { 1, 0, 0},
00059 { 0, 1, 0},
00060 { 0, 0, 0}};
00061 if (inputDerivative >= 3 || outputDerivative >= 3)
00062 return 0;
00063 else
00064 return matrix[outputDerivative][inputDerivative];
00065 }
00066
00069 double getSolutionIntegrationFactor(int outputDerivative) const
00070 {
00071 double vect[3] = { 1, 0, 0};
00072 if (outputDerivative >= 3)
00073 return 0;
00074 else
00075 return vect[outputDerivative];
00076 }
00077
00078 Data<double> massCoef;
00079 Data<double> dampingCoef;
00080 Data<double> stiffnessCoef;
00081 };
00082
00083 }
00084
00085 }
00086
00087 }
00088
00089 #endif