com.kabouterlabs.jodeint.cradau5.Cradau5Library Maven / Gradle / Ivy
package com.kabouterlabs.jodeint.cradau5;
import java.util.Collections;
import java.util.Iterator;
import org.bridj.BridJ;
import org.bridj.CRuntime;
import org.bridj.Callback;
import org.bridj.FlagSet;
import org.bridj.IntValuedEnum;
import org.bridj.Pointer;
import org.bridj.ann.Library;
import org.bridj.ann.Ptr;
import org.bridj.ann.Runtime;
/**
* Wrapper for library cradau5
* This file was autogenerated by JNAerator,
* a tool written by Olivier Chafik that uses a few opensource projects..
* For help, please visit NativeLibs4Java or BridJ .
*/
@Library("cradau5")
@Runtime(CRuntime.class)
public class Cradau5Library {
static {
BridJ.register();
}
/**
* enum values
* native declaration : src/main/native/codeint/cradau5/include/cradau5.h
*/
public enum radau5_itol_e implements IntValuedEnum {
ALL_SCALAR(0),
ALL_ARRAY(1);
radau5_itol_e(long value) {
this.value = value;
}
public final long value;
public long value() {
return this.value;
}
public Iterator iterator() {
return Collections.singleton(this).iterator();
}
public static IntValuedEnum fromValue(int value) {
return FlagSet.fromValue(value, values());
}
};
/**
* enum values
* native declaration : src/main/native/codeint/cradau5/include/cradau5.h
*/
public enum radau5_jacobian_e implements IntValuedEnum {
INTERNAL(0),
JAC_USER_PROVIDED(1);
radau5_jacobian_e(long value) {
this.value = value;
}
public final long value;
public long value() {
return this.value;
}
public Iterator iterator() {
return Collections.singleton(this).iterator();
}
public static IntValuedEnum fromValue(int value) {
return FlagSet.fromValue(value, values());
}
};
/**
* enum values
* native declaration : src/main/native/codeint/cradau5/include/cradau5.h
*/
public enum radau5_mass_matrix_e implements IntValuedEnum {
IDENTITY_MATRIX(0),
MASS_USER_PROVIDED(1);
radau5_mass_matrix_e(long value) {
this.value = value;
}
public final long value;
public long value() {
return this.value;
}
public Iterator iterator() {
return Collections.singleton(this).iterator();
}
public static IntValuedEnum fromValue(int value) {
return FlagSet.fromValue(value, values());
}
};
/**
* enum values
* native declaration : src/main/native/codeint/cradau5/include/cradau5.h
*/
public enum radau5_iout_e implements IntValuedEnum {
NEVER_CALLED(0),
OUTPUT(1);
radau5_iout_e(long value) {
this.value = value;
}
public final long value;
public long value() {
return this.value;
}
public Iterator iterator() {
return Collections.singleton(this).iterator();
}
public static IntValuedEnum fromValue(int value) {
return FlagSet.fromValue(value, values());
}
};
/**
* enum values
* native declaration : src/main/native/codeint/cradau5/include/cradau5.h
*/
public enum radau5_idid_e implements IntValuedEnum {
SUCCESS(1),
SUCCESS_INTR(2),
INPUT_INCONSISTENT(-1),
NMAX_TOO_SMALL(-2),
STEP_TOO_SMALL(-3),
STIFF_PROBLEM(-4);
radau5_idid_e(long value) {
this.value = value;
}
public final long value;
public long value() {
return this.value;
}
public Iterator iterator() {
return Collections.singleton(this).iterator();
}
public static IntValuedEnum fromValue(int value) {
return FlagSet.fromValue(value, values());
}
};
/** native declaration : src/main/native/codeint/cradau5/include/cradau5.h */
public static abstract class radau5_ode_func extends Callback {
public void apply(Pointer n, Pointer x, Pointer y, Pointer f, Pointer rpar, Pointer ipar) {
apply(Pointer.getPeer(n), Pointer.getPeer(x), Pointer.getPeer(y), Pointer.getPeer(f), Pointer.getPeer(rpar), Pointer.getPeer(ipar));
}
public void apply(@Ptr long n, @Ptr long x, @Ptr long y, @Ptr long f, @Ptr long rpar, @Ptr long ipar) {
apply((Pointer)Pointer.pointerToAddress(n, Integer.class), (Pointer)Pointer.pointerToAddress(x, Double.class), (Pointer)Pointer.pointerToAddress(y, Double.class), (Pointer)Pointer.pointerToAddress(f, Double.class), (Pointer)Pointer.pointerToAddress(rpar, Double.class), (Pointer)Pointer.pointerToAddress(ipar, Integer.class));
}
};
/** native declaration : src/main/native/codeint/cradau5/include/cradau5.h */
public static abstract class radau5_jacobian extends Callback {
public void apply(Pointer n, Pointer x, Pointer y, Pointer dfy, Pointer ldfy, Pointer rpar, Pointer ipar) {
apply(Pointer.getPeer(n), Pointer.getPeer(x), Pointer.getPeer(y), Pointer.getPeer(dfy), Pointer.getPeer(ldfy), Pointer.getPeer(rpar), Pointer.getPeer(ipar));
}
public void apply(@Ptr long n, @Ptr long x, @Ptr long y, @Ptr long dfy, @Ptr long ldfy, @Ptr long rpar, @Ptr long ipar) {
apply((Pointer)Pointer.pointerToAddress(n, Integer.class), (Pointer)Pointer.pointerToAddress(x, Double.class), (Pointer)Pointer.pointerToAddress(y, Double.class), (Pointer)Pointer.pointerToAddress(dfy, Double.class), (Pointer)Pointer.pointerToAddress(ldfy, Integer.class), (Pointer)Pointer.pointerToAddress(rpar, Double.class), (Pointer)Pointer.pointerToAddress(ipar, Integer.class));
}
};
/** native declaration : src/main/native/codeint/cradau5/include/cradau5.h */
public static abstract class radau5_mass extends Callback {
public void apply(Pointer n, Pointer am, Pointer lmas, Pointer rpar, Pointer ipar) {
apply(Pointer.getPeer(n), Pointer.getPeer(am), Pointer.getPeer(lmas), Pointer.getPeer(rpar), Pointer.getPeer(ipar));
}
public void apply(@Ptr long n, @Ptr long am, @Ptr long lmas, @Ptr long rpar, @Ptr long ipar) {
apply((Pointer)Pointer.pointerToAddress(n, Integer.class), (Pointer)Pointer.pointerToAddress(am, Double.class), (Pointer)Pointer.pointerToAddress(lmas, Integer.class), (Pointer)Pointer.pointerToAddress(rpar, Double.class), (Pointer)Pointer.pointerToAddress(ipar, Integer.class));
}
};
/** native declaration : src/main/native/codeint/cradau5/include/cradau5.h */
public static abstract class radau5_solout extends Callback {
public void apply(Pointer nr, Pointer xold, Pointer x, Pointer y, Pointer cont, Pointer lrc, Pointer n, Pointer rpar, Pointer ipar, Pointer irtrn) {
apply(Pointer.getPeer(nr), Pointer.getPeer(xold), Pointer.getPeer(x), Pointer.getPeer(y), Pointer.getPeer(cont), Pointer.getPeer(lrc), Pointer.getPeer(n), Pointer.getPeer(rpar), Pointer.getPeer(ipar), Pointer.getPeer(irtrn));
}
public void apply(@Ptr long nr, @Ptr long xold, @Ptr long x, @Ptr long y, @Ptr long cont, @Ptr long lrc, @Ptr long n, @Ptr long rpar, @Ptr long ipar, @Ptr long irtrn) {
apply((Pointer)Pointer.pointerToAddress(nr, Integer.class), (Pointer)Pointer.pointerToAddress(xold, Double.class), (Pointer)Pointer.pointerToAddress(x, Double.class), (Pointer)Pointer.pointerToAddress(y, Double.class), (Pointer)Pointer.pointerToAddress(cont, Double.class), (Pointer)Pointer.pointerToAddress(lrc, Integer.class), (Pointer)Pointer.pointerToAddress(n, Integer.class), (Pointer)Pointer.pointerToAddress(rpar, Double.class), (Pointer)Pointer.pointerToAddress(ipar, Integer.class), (Pointer)Pointer.pointerToAddress(irtrn, Integer.class));
}
};
/** native declaration : src/main/native/codeint/cradau5/include/cradau5.h:49 */
public static abstract class radau5_fcn_callback extends Callback {
public void apply(Pointer intPtr1, Pointer doublePtr1, Pointer doublePtr2, Pointer doublePtr3, Pointer doublePtr4, Pointer intPtr2) {
apply(Pointer.getPeer(intPtr1), Pointer.getPeer(doublePtr1), Pointer.getPeer(doublePtr2), Pointer.getPeer(doublePtr3), Pointer.getPeer(doublePtr4), Pointer.getPeer(intPtr2));
}
public void apply(@Ptr long intPtr1, @Ptr long doublePtr1, @Ptr long doublePtr2, @Ptr long doublePtr3, @Ptr long doublePtr4, @Ptr long intPtr2) {
apply((Pointer)Pointer.pointerToAddress(intPtr1, Integer.class), (Pointer)Pointer.pointerToAddress(doublePtr1, Double.class), (Pointer)Pointer.pointerToAddress(doublePtr2, Double.class), (Pointer)Pointer.pointerToAddress(doublePtr3, Double.class), (Pointer)Pointer.pointerToAddress(doublePtr4, Double.class), (Pointer)Pointer.pointerToAddress(intPtr2, Integer.class));
}
};
/** native declaration : src/main/native/codeint/cradau5/include/cradau5.h:57 */
public static abstract class radau5_jac_callback extends Callback {
public void apply(Pointer intPtr1, Pointer doublePtr1, Pointer doublePtr2, Pointer doublePtr3, Pointer intPtr2, Pointer doublePtr4, Pointer intPtr3) {
apply(Pointer.getPeer(intPtr1), Pointer.getPeer(doublePtr1), Pointer.getPeer(doublePtr2), Pointer.getPeer(doublePtr3), Pointer.getPeer(intPtr2), Pointer.getPeer(doublePtr4), Pointer.getPeer(intPtr3));
}
public void apply(@Ptr long intPtr1, @Ptr long doublePtr1, @Ptr long doublePtr2, @Ptr long doublePtr3, @Ptr long intPtr2, @Ptr long doublePtr4, @Ptr long intPtr3) {
apply((Pointer)Pointer.pointerToAddress(intPtr1, Integer.class), (Pointer)Pointer.pointerToAddress(doublePtr1, Double.class), (Pointer)Pointer.pointerToAddress(doublePtr2, Double.class), (Pointer)Pointer.pointerToAddress(doublePtr3, Double.class), (Pointer)Pointer.pointerToAddress(intPtr2, Integer.class), (Pointer)Pointer.pointerToAddress(doublePtr4, Double.class), (Pointer)Pointer.pointerToAddress(intPtr3, Integer.class));
}
};
/** native declaration : src/main/native/codeint/cradau5/include/cradau5.h:61 */
public static abstract class radau5_mas_callback extends Callback {
public void apply(Pointer intPtr1, Pointer doublePtr1, Pointer intPtr2, Pointer doublePtr2, Pointer intPtr3) {
apply(Pointer.getPeer(intPtr1), Pointer.getPeer(doublePtr1), Pointer.getPeer(intPtr2), Pointer.getPeer(doublePtr2), Pointer.getPeer(intPtr3));
}
public void apply(@Ptr long intPtr1, @Ptr long doublePtr1, @Ptr long intPtr2, @Ptr long doublePtr2, @Ptr long intPtr3) {
apply((Pointer)Pointer.pointerToAddress(intPtr1, Integer.class), (Pointer)Pointer.pointerToAddress(doublePtr1, Double.class), (Pointer)Pointer.pointerToAddress(intPtr2, Integer.class), (Pointer)Pointer.pointerToAddress(doublePtr2, Double.class), (Pointer)Pointer.pointerToAddress(intPtr3, Integer.class));
}
};
/** native declaration : src/main/native/codeint/cradau5/include/cradau5.h:65 */
public static abstract class radau5_solout_callback extends Callback {
public void apply(Pointer intPtr1, Pointer doublePtr1, Pointer doublePtr2, Pointer doublePtr3, Pointer doublePtr4, Pointer intPtr2, Pointer intPtr3, Pointer doublePtr5, Pointer intPtr4, Pointer intPtr5) {
apply(Pointer.getPeer(intPtr1), Pointer.getPeer(doublePtr1), Pointer.getPeer(doublePtr2), Pointer.getPeer(doublePtr3), Pointer.getPeer(doublePtr4), Pointer.getPeer(intPtr2), Pointer.getPeer(intPtr3), Pointer.getPeer(doublePtr5), Pointer.getPeer(intPtr4), Pointer.getPeer(intPtr5));
}
public void apply(@Ptr long intPtr1, @Ptr long doublePtr1, @Ptr long doublePtr2, @Ptr long doublePtr3, @Ptr long doublePtr4, @Ptr long intPtr2, @Ptr long intPtr3, @Ptr long doublePtr5, @Ptr long intPtr4, @Ptr long intPtr5) {
apply((Pointer)Pointer.pointerToAddress(intPtr1, Integer.class), (Pointer)Pointer.pointerToAddress(doublePtr1, Double.class), (Pointer)Pointer.pointerToAddress(doublePtr2, Double.class), (Pointer)Pointer.pointerToAddress(doublePtr3, Double.class), (Pointer)Pointer.pointerToAddress(doublePtr4, Double.class), (Pointer)Pointer.pointerToAddress(intPtr2, Integer.class), (Pointer)Pointer.pointerToAddress(intPtr3, Integer.class), (Pointer)Pointer.pointerToAddress(doublePtr5, Double.class), (Pointer)Pointer.pointerToAddress(intPtr4, Integer.class), (Pointer)Pointer.pointerToAddress(intPtr5, Integer.class));
}
};
/**
* Original signature : void radau5(int*, radau5_fcn_callback*, double*, double*, double*, double*, double*, double*, int*, radau5_jac_callback*, int*, int*, int*, radau5_mas_callback*, int*, int*, int*, radau5_solout_callback*, int*, double*, int*, int*, int*, double*, int*, int*)
* native declaration : src/main/native/codeint/cradau5/include/cradau5.h:47
*/
public static void radau5(Pointer n, Pointer fcn, Pointer x, Pointer y, Pointer xend, Pointer h, Pointer rtol, Pointer atol, Pointer itol, Pointer jac, Pointer ijac, Pointer mljac, Pointer mujac, Pointer mas, Pointer imas, Pointer mlmas, Pointer mumas, Pointer solout, Pointer iout, Pointer work, Pointer lwork, Pointer iwork, Pointer liwork, Pointer rpar, Pointer ipar, Pointer idid) {
radau5(Pointer.getPeer(n), Pointer.getPeer(fcn), Pointer.getPeer(x), Pointer.getPeer(y), Pointer.getPeer(xend), Pointer.getPeer(h), Pointer.getPeer(rtol), Pointer.getPeer(atol), Pointer.getPeer(itol), Pointer.getPeer(jac), Pointer.getPeer(ijac), Pointer.getPeer(mljac), Pointer.getPeer(mujac), Pointer.getPeer(mas), Pointer.getPeer(imas), Pointer.getPeer(mlmas), Pointer.getPeer(mumas), Pointer.getPeer(solout), Pointer.getPeer(iout), Pointer.getPeer(work), Pointer.getPeer(lwork), Pointer.getPeer(iwork), Pointer.getPeer(liwork), Pointer.getPeer(rpar), Pointer.getPeer(ipar), Pointer.getPeer(idid));
}
protected native static void radau5(@Ptr long n, @Ptr long fcn, @Ptr long x, @Ptr long y, @Ptr long xend, @Ptr long h, @Ptr long rtol, @Ptr long atol, @Ptr long itol, @Ptr long jac, @Ptr long ijac, @Ptr long mljac, @Ptr long mujac, @Ptr long mas, @Ptr long imas, @Ptr long mlmas, @Ptr long mumas, @Ptr long solout, @Ptr long iout, @Ptr long work, @Ptr long lwork, @Ptr long iwork, @Ptr long liwork, @Ptr long rpar, @Ptr long ipar, @Ptr long idid);
/**
* Original signature : RADAU5_RETVAL radau5_basic(double*, double*, radau5_ode_func, int, double, double, double)
* native declaration : src/main/native/codeint/cradau5/include/cradau5.h:76
*/
public static IntValuedEnum radau5_basic(Pointer stack, Pointer y, Pointer f_func, int n, double xstart, double xfinal, double deltax) {
return FlagSet.fromValue(radau5_basic(Pointer.getPeer(stack), Pointer.getPeer(y), Pointer.getPeer(f_func), n, xstart, xfinal, deltax), Cradau5Library.radau5_idid_e.class);
}
protected native static int radau5_basic(@Ptr long stack, @Ptr long y, @Ptr long f_func, int n, double xstart, double xfinal, double deltax);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy