HyperX.Solver.Api 1.23.0
The HyperX Solver Application Programming Interface
Loading...
Searching...
No Matches
External Tools

Advanced use case.

If your margin checks or other core calculations are performed in an external tool, the most performant way to hook that up to HyperX is to find or expose a function that can be called "in-process" from your custom HyperX criterion.

  1. Include the external library and its dependencies in your package. Modify the include regexes in the hxpkg.yaml configuration file.
  2. Call the external library at runtime.

For managed code, such as C#, you may be able to load and call your library with types like C#'s AssemblyLoadContext.

For unmanaged code, such as C++ or Fortran, you may be able to load and call your library with C#'s DllImport.

[DllImport("MyExternalLibrary.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "EntryPoint")]
private static extern void CallRR3DLL(
ref int err,
[In] double[] forces,
ref double ms,
int[,,] modeshape,
int[] modenum);

If the library you call into is Windows-only, your criterion will not be able to run on Linux with the rest of Solver.

If you must call a command line or other slow-running tool to compute your margins, you likely wish to use both Batched Loads and Preprocessing.

  • Batched Loads allows your custom criterion to have access to all load states at the same time, allowing you to shell off far fewer jobs to the external tool if that tool supports many loads at once.
  • Preprocessing allows a single shelled off job to return several margins of safety that can all be reported as individual criterion to HyperX.