{-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# Language ForeignFunctionInterface #-} {-# Language FlexibleInstances #-} {-# Language MultiParamTypeClasses #-} module Casadi.Wrappers.Classes.Integrator ( Integrator, IntegratorClass(..), integrator, integrator_checkNode, integrator_clone, integrator_getDAE, integrator_integrate, integrator_integrateB, integrator_printStats', integrator_reset, integrator_resetB, ) where import Prelude hiding ( Functor ) import Data.Vector ( Vector ) import Foreign.C.Types import Foreign.Ptr ( Ptr ) import Foreign.ForeignPtr ( newForeignPtr ) import System.IO.Unsafe ( unsafePerformIO ) -- for show instances import Casadi.Wrappers.Classes.PrintableObject import Casadi.Wrappers.CToolsInstances ( ) import Casadi.Wrappers.Data import Casadi.Wrappers.Enums import Casadi.MarshalTypes ( CppVec, StdString' ) -- StdOstream' import Casadi.Marshal ( Marshal(..), withMarshal ) import Casadi.WrapReturn ( WrapReturn(..) ) instance Show Integrator where show = unsafePerformIO . printableObject_getDescription -- direct wrapper foreign import ccall unsafe "CasADi__Integrator__clone" c_CasADi__Integrator__clone :: Ptr Integrator' -> IO (Ptr Integrator') casADi__Integrator__clone :: Integrator -> IO Integrator casADi__Integrator__clone x0 = withMarshal x0 $ \x0' -> c_CasADi__Integrator__clone x0' >>= wrapReturn -- classy wrapper {-| >Clone. -} integrator_clone :: IntegratorClass a => a -> IO Integrator integrator_clone x = casADi__Integrator__clone (castIntegrator x) -- direct wrapper foreign import ccall unsafe "CasADi__Integrator__printStats_TIC" c_CasADi__Integrator__printStats_TIC :: Ptr Integrator' -> IO () casADi__Integrator__printStats' :: Integrator -> IO () casADi__Integrator__printStats' x0 = withMarshal x0 $ \x0' -> c_CasADi__Integrator__printStats_TIC x0' >>= wrapReturn -- classy wrapper integrator_printStats' :: IntegratorClass a => a -> IO () integrator_printStats' x = casADi__Integrator__printStats' (castIntegrator x) -- direct wrapper foreign import ccall unsafe "CasADi__Integrator__reset" c_CasADi__Integrator__reset :: Ptr Integrator' -> IO () casADi__Integrator__reset :: Integrator -> IO () casADi__Integrator__reset x0 = withMarshal x0 $ \x0' -> c_CasADi__Integrator__reset x0' >>= wrapReturn -- classy wrapper {-| >Reset the forward problem Time will be set to t0 and state to >input(INTEGRATOR_X0) -} integrator_reset :: IntegratorClass a => a -> IO () integrator_reset x = casADi__Integrator__reset (castIntegrator x) -- direct wrapper foreign import ccall unsafe "CasADi__Integrator__integrate" c_CasADi__Integrator__integrate :: Ptr Integrator' -> CDouble -> IO () casADi__Integrator__integrate :: Integrator -> Double -> IO () casADi__Integrator__integrate x0 x1 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> c_CasADi__Integrator__integrate x0' x1' >>= wrapReturn -- classy wrapper {-| >Integrate forward until a specified time point. -} integrator_integrate :: IntegratorClass a => a -> Double -> IO () integrator_integrate x = casADi__Integrator__integrate (castIntegrator x) -- direct wrapper foreign import ccall unsafe "CasADi__Integrator__resetB" c_CasADi__Integrator__resetB :: Ptr Integrator' -> IO () casADi__Integrator__resetB :: Integrator -> IO () casADi__Integrator__resetB x0 = withMarshal x0 $ \x0' -> c_CasADi__Integrator__resetB x0' >>= wrapReturn -- classy wrapper {-| >Reset the backward problem Time will be set to tf and backward state to >input(INTEGRATOR_RX0) -} integrator_resetB :: IntegratorClass a => a -> IO () integrator_resetB x = casADi__Integrator__resetB (castIntegrator x) -- direct wrapper foreign import ccall unsafe "CasADi__Integrator__integrateB" c_CasADi__Integrator__integrateB :: Ptr Integrator' -> CDouble -> IO () casADi__Integrator__integrateB :: Integrator -> Double -> IO () casADi__Integrator__integrateB x0 x1 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> c_CasADi__Integrator__integrateB x0' x1' >>= wrapReturn -- classy wrapper {-| >Integrate backward until a specified time point. -} integrator_integrateB :: IntegratorClass a => a -> Double -> IO () integrator_integrateB x = casADi__Integrator__integrateB (castIntegrator x) -- direct wrapper foreign import ccall unsafe "CasADi__Integrator__checkNode" c_CasADi__Integrator__checkNode :: Ptr Integrator' -> IO CInt casADi__Integrator__checkNode :: Integrator -> IO Bool casADi__Integrator__checkNode x0 = withMarshal x0 $ \x0' -> c_CasADi__Integrator__checkNode x0' >>= wrapReturn -- classy wrapper {-| >Check if the node is pointing to the right type of object. -} integrator_checkNode :: IntegratorClass a => a -> IO Bool integrator_checkNode x = casADi__Integrator__checkNode (castIntegrator x) -- direct wrapper foreign import ccall unsafe "CasADi__Integrator__getDAE" c_CasADi__Integrator__getDAE :: Ptr Integrator' -> IO (Ptr Function') casADi__Integrator__getDAE :: Integrator -> IO Function casADi__Integrator__getDAE x0 = withMarshal x0 $ \x0' -> c_CasADi__Integrator__getDAE x0' >>= wrapReturn -- classy wrapper {-| >Get the DAE. -} integrator_getDAE :: IntegratorClass a => a -> IO Function integrator_getDAE x = casADi__Integrator__getDAE (castIntegrator x) -- direct wrapper foreign import ccall unsafe "CasADi__Integrator__Integrator" c_CasADi__Integrator__Integrator :: IO (Ptr Integrator') casADi__Integrator__Integrator :: IO Integrator casADi__Integrator__Integrator = c_CasADi__Integrator__Integrator >>= wrapReturn -- classy wrapper {-| >Default constructor. -} integrator :: IO Integrator integrator = casADi__Integrator__Integrator