casadi-bindings-1.9.0.0: Casadi/Wrappers/Classes/IdasIntegrator.hs
{-# OPTIONS_GHC -Wall #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# Language ForeignFunctionInterface #-}
{-# Language FlexibleInstances #-}
{-# Language MultiParamTypeClasses #-}
module Casadi.Wrappers.Classes.IdasIntegrator
(
IdasIntegrator,
IdasIntegratorClass(..),
idasIntegrator,
idasIntegrator',
idasIntegrator'',
idasIntegrator_checkNode,
idasIntegrator_correctInitialConditions,
idasIntegrator_creator,
) 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 IdasIntegrator where
show = unsafePerformIO . printableObject_getDescription
-- direct wrapper
foreign import ccall unsafe "CasADi__IdasIntegrator__checkNode" c_CasADi__IdasIntegrator__checkNode
:: Ptr IdasIntegrator' -> IO CInt
casADi__IdasIntegrator__checkNode
:: IdasIntegrator -> IO Bool
casADi__IdasIntegrator__checkNode x0 =
withMarshal x0 $ \x0' ->
c_CasADi__IdasIntegrator__checkNode x0' >>= wrapReturn
-- classy wrapper
{-|
>Check if the node is pointing to the right type of object.
-}
idasIntegrator_checkNode :: IdasIntegratorClass a => a -> IO Bool
idasIntegrator_checkNode x = casADi__IdasIntegrator__checkNode (castIdasIntegrator x)
-- direct wrapper
foreign import ccall unsafe "CasADi__IdasIntegrator__correctInitialConditions" c_CasADi__IdasIntegrator__correctInitialConditions
:: Ptr IdasIntegrator' -> IO ()
casADi__IdasIntegrator__correctInitialConditions
:: IdasIntegrator -> IO ()
casADi__IdasIntegrator__correctInitialConditions x0 =
withMarshal x0 $ \x0' ->
c_CasADi__IdasIntegrator__correctInitialConditions x0' >>= wrapReturn
-- classy wrapper
{-|
>Correct the initial value for yp and z after resetting the solver.
-}
idasIntegrator_correctInitialConditions :: IdasIntegratorClass a => a -> IO ()
idasIntegrator_correctInitialConditions x = casADi__IdasIntegrator__correctInitialConditions (castIdasIntegrator x)
-- direct wrapper
foreign import ccall unsafe "CasADi__IdasIntegrator__creator" c_CasADi__IdasIntegrator__creator
:: Ptr Function' -> Ptr Function' -> IO (Ptr Integrator')
casADi__IdasIntegrator__creator
:: Function -> Function -> IO Integrator
casADi__IdasIntegrator__creator x0 x1 =
withMarshal x0 $ \x0' ->
withMarshal x1 $ \x1' ->
c_CasADi__IdasIntegrator__creator x0' x1' >>= wrapReturn
-- classy wrapper
idasIntegrator_creator :: Function -> Function -> IO Integrator
idasIntegrator_creator = casADi__IdasIntegrator__creator
-- direct wrapper
foreign import ccall unsafe "CasADi__IdasIntegrator__IdasIntegrator" c_CasADi__IdasIntegrator__IdasIntegrator
:: IO (Ptr IdasIntegrator')
casADi__IdasIntegrator__IdasIntegrator
:: IO IdasIntegrator
casADi__IdasIntegrator__IdasIntegrator =
c_CasADi__IdasIntegrator__IdasIntegrator >>= wrapReturn
-- classy wrapper
{-|
>> CasADi::IdasIntegrator::IdasIntegrator()
>------------------------------------------------------------------------
>
>Default constructor.
>
>> CasADi::IdasIntegrator::IdasIntegrator(const Function &f, const Function &g=Function())
>------------------------------------------------------------------------
>
>Create an integrator for a fully implicit DAE with quadrature states (nz is
>the number of states not to be included in the state vector)
>
>Create an integrator for a fully implicit DAE with quadrature states (nz is
>the number of states not to be included in the state vector)
>
>Parameters:
>-----------
>
>f: dynamical system
>
>>Input scheme: CasADi::DAEInput (DAE_NUM_IN = 5) [daeIn]
>+-----------+-------+----------------------------+
>| Full name | Short | Description |
>+===========+=======+============================+
>| DAE_X | x | Differential state . |
>+-----------+-------+----------------------------+
>| DAE_Z | z | Algebraic state . |
>+-----------+-------+----------------------------+
>| DAE_P | p | Parameter . |
>+-----------+-------+----------------------------+
>| DAE_T | t | Explicit time dependence . |
>+-----------+-------+----------------------------+
>
>>Output scheme: CasADi::DAEOutput (DAE_NUM_OUT = 4) [daeOut]
>+-----------+-------+--------------------------------------------+
>| Full name | Short | Description |
>+===========+=======+============================================+
>| DAE_ODE | ode | Right hand side of the implicit ODE . |
>+-----------+-------+--------------------------------------------+
>| DAE_ALG | alg | Right hand side of algebraic equations . |
>+-----------+-------+--------------------------------------------+
>| DAE_QUAD | quad | Right hand side of quadratures equations . |
>+-----------+-------+--------------------------------------------+
>
>Parameters:
>-----------
>
>g: backwards system
>
>>Input scheme: CasADi::RDAEInput (RDAE_NUM_IN = 8) [rdaeIn]
>+-----------+-------+-------------------------------+
>| Full name | Short | Description |
>+===========+=======+===============================+
>| RDAE_RX | rx | Backward differential state . |
>+-----------+-------+-------------------------------+
>| RDAE_RZ | rz | Backward algebraic state . |
>+-----------+-------+-------------------------------+
>| RDAE_RP | rp | Backward parameter vector . |
>+-----------+-------+-------------------------------+
>| RDAE_X | x | Forward differential state . |
>+-----------+-------+-------------------------------+
>| RDAE_Z | z | Forward algebraic state . |
>+-----------+-------+-------------------------------+
>| RDAE_P | p | Parameter vector . |
>+-----------+-------+-------------------------------+
>| RDAE_T | t | Explicit time dependence . |
>+-----------+-------+-------------------------------+
>
>>Output scheme: CasADi::RDAEOutput (RDAE_NUM_OUT = 4) [rdaeOut]
>+-----------+-------+-------------------------------------------+
>| Full name | Short | Description |
>+===========+=======+===========================================+
>| RDAE_ODE | ode | Right hand side of ODE. . |
>+-----------+-------+-------------------------------------------+
>| RDAE_ALG | alg | Right hand side of algebraic equations. . |
>+-----------+-------+-------------------------------------------+
>| RDAE_QUAD | quad | Right hand side of quadratures. . |
>+-----------+-------+-------------------------------------------+
-}
idasIntegrator :: IO IdasIntegrator
idasIntegrator = casADi__IdasIntegrator__IdasIntegrator
-- direct wrapper
foreign import ccall unsafe "CasADi__IdasIntegrator__IdasIntegrator_TIC" c_CasADi__IdasIntegrator__IdasIntegrator_TIC
:: Ptr Function' -> Ptr Function' -> IO (Ptr IdasIntegrator')
casADi__IdasIntegrator__IdasIntegrator'
:: Function -> Function -> IO IdasIntegrator
casADi__IdasIntegrator__IdasIntegrator' x0 x1 =
withMarshal x0 $ \x0' ->
withMarshal x1 $ \x1' ->
c_CasADi__IdasIntegrator__IdasIntegrator_TIC x0' x1' >>= wrapReturn
-- classy wrapper
idasIntegrator' :: Function -> Function -> IO IdasIntegrator
idasIntegrator' = casADi__IdasIntegrator__IdasIntegrator'
-- direct wrapper
foreign import ccall unsafe "CasADi__IdasIntegrator__IdasIntegrator_TIC_TIC" c_CasADi__IdasIntegrator__IdasIntegrator_TIC_TIC
:: Ptr Function' -> IO (Ptr IdasIntegrator')
casADi__IdasIntegrator__IdasIntegrator''
:: Function -> IO IdasIntegrator
casADi__IdasIntegrator__IdasIntegrator'' x0 =
withMarshal x0 $ \x0' ->
c_CasADi__IdasIntegrator__IdasIntegrator_TIC_TIC x0' >>= wrapReturn
-- classy wrapper
idasIntegrator'' :: Function -> IO IdasIntegrator
idasIntegrator'' = casADi__IdasIntegrator__IdasIntegrator''