no.sfi.mechatronics.fmi4j.me.ApacheSolvers.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fmi-import-solvers-apache-math3 Show documentation
Show all versions of fmi-import-solvers-apache-math3 Show documentation
A software library for dealing with Functional Mock-up Units (FMUs) on the JVM platform
package no.sfi.mechatronics.fmi4j.me
import org.apache.commons.math3.ode.nonstiff.*
/**
*
* Factory for creating instances of ApacheSolver
*
* @author Lars Ivar Hatledal
*/
object ApacheSolvers {
@JvmStatic
fun euler(stepSize: Double): ApacheSolver {
return ApacheSolver(EulerIntegrator(stepSize))
}
@JvmStatic
fun rk4(stepSize: Double): ApacheSolver {
return ApacheSolver(ClassicalRungeKuttaIntegrator(stepSize))
}
@JvmStatic
fun luther(stepSize: Double): ApacheSolver {
return ApacheSolver(LutherIntegrator(stepSize))
}
@JvmStatic
fun gill(stepSize: Double): ApacheSolver {
return ApacheSolver(GillIntegrator(stepSize))
}
@JvmStatic
fun midpoint(stepSize: Double): ApacheSolver {
return ApacheSolver(MidpointIntegrator(stepSize))
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy